Imp
[using it]
Interface Manipulation Package v4.0 (2008-06-25) a-projector ©copyright Author


imp.ima
Class Volume.Filter

java.lang.Object
  extended by imp.ima.Volume.Filter
Enclosing class:
Volume

public static class Volume.Filter
extends Object

Defines an iterative filter on a volume.


Field Summary
 int depth
          Filtered volume depth.
 int height
          Filtered volume height.
 int size
          Filtered volume size = width * height * depth.
 int thick
          Filtered volume thickness = width * height.
 int width
          Filtered volume width.
 
Constructor Summary
Volume.Filter(int borderX, int borderY, int borderZ)
          Constructs an image filter.
 
Method Summary
 Volume getOutput(Volume input)
          Returns the filtered volume.
 double getVoxel(double[] input, int ijk)
          Returns the filtered voxel.
 String more(int iteration, int step, double deviation, double count)
          Returns true to run a new filtering iteration, false to stop.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

depth

public int depth
Filtered volume depth.


height

public int height
Filtered volume height.


size

public int size
Filtered volume size = width * height * depth.


thick

public int thick
Filtered volume thickness = width * height.


width

public int width
Filtered volume width.

Constructor Detail

Volume.Filter

public Volume.Filter(int borderX,
                     int borderY,
                     int borderZ)
Constructs an image filter.

Parameters:
borderX - [optional, default is 0] Border size: width in voxel on the image border where the filter must not be computed.
borderY - [optional, default is borderX] Border size: height in voxel on the image border where the filter must not be computed.
borderZ - [optional, default is borderX] Border size: depth in voxel on the image border where the filter must not be computed.
Method Detail

getOutput

public Volume getOutput(Volume input)
Returns the filtered volume.


getVoxel

public double getVoxel(double[] input,
                       int ijk)
Returns the filtered voxel.
This method is overwritten when implementing a filter.

Parameters:
input - The buffer input s(i+u, j+v, k+w) = input[ijk + u + v * width + w * thick] with -border < {u, v, w} < border.
ijk - Input index.
Returns:
The filtered voxel value.

more

public String more(int iteration,
                   int step,
                   double deviation,
                   double count)
Returns true to run a new filtering iteration, false to stop.
This method is overwritten when implementing a filter.
Here a basic mechanism with iteration while the input/output standard-deviation decreases is implemented.

Parameters:
iteration - @ Iteration number starting from 0 (just before the 1st iteration).
step - Step number starting from 0. Several iterations may be re-done at each step.
deviation - Average quadratic error square-root between the iteration input and output.
count - Number of voxels taken into account (i.e. the volume size minus the border).
Returns:
The iteration status:
break, to stop the iteration loop (default),
redo, to re-do the present step at the next iteration,
next, to run the next step at the next iteration,
next and clear, to run the next step at the next iteration and clear the input border,