io.visualize
Class MatchingViewer3D

java.lang.Object
  extended by io.visualize.MatchingViewer3D

public class MatchingViewer3D
extends java.lang.Object

Visualization of 3d matching results with the help of VTK (Visualization Toolkit)


Field Summary
private  Config config
           
private  org.apache.log4j.Logger logger
          Logging instance
private  CleanMatchingResult result
          holds the matching result
 
Constructor Summary
MatchingViewer3D(CleanMatchingResult result)
          Constructor.
MatchingViewer3D(CleanMatchingResult result, Config config)
          Constructor.
 
Method Summary
private  vtk.vtkActor createLineActor(Index index1, Index index2, Dimensions dim1, Dimensions dim2, int offset)
          Create a vtkActor for a line.
private  vtk.vtkActor createSkeletonActor(int[][][] cube, SkeletonObject so)
          create an actor for a 3D skeleton cube.
 void show()
          Show the matching result.
private  int[][][] SkeletonTo3DArray(SkeletonObject so)
          Create a 3D cube from the specified skeleton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

result

private final CleanMatchingResult result
holds the matching result


config

private Config config

logger

private final org.apache.log4j.Logger logger
Logging instance

Constructor Detail

MatchingViewer3D

public MatchingViewer3D(CleanMatchingResult result)
                 throws InvalidConfigParameterException
Constructor. When using this constructor, visualization will show automatically the volume, not the skeleton.

Parameters:
result - the matching result to be visualized
Throws:
InvalidConfigParameterException

MatchingViewer3D

public MatchingViewer3D(CleanMatchingResult result,
                        Config config)
Constructor.

Parameters:
result - the matching result to be visualized
config - holding configuration parameters
Method Detail

createSkeletonActor

private vtk.vtkActor createSkeletonActor(int[][][] cube,
                                         SkeletonObject so)
create an actor for a 3D skeleton cube. Each entry in the cube with a value higher than 0 will be assumed as skeleton point. The dimensions of the skeleton voxels are taken into account.

Parameters:
cube - - 3d array containing for each voxel index the skeleton information
so - - the skeleton object
Returns:
a vtkActor constructed from the information specified by the two parameters

SkeletonTo3DArray

private int[][][] SkeletonTo3DArray(SkeletonObject so)
Create a 3D cube from the specified skeleton.

Parameters:
so - the skeleton object to be encoded in 3d array
Returns:
3d array containing all skeleton information: Entries containing skeleton voxels are > 0.

createLineActor

private vtk.vtkActor createLineActor(Index index1,
                                     Index index2,
                                     Dimensions dim1,
                                     Dimensions dim2,
                                     int offset)
Create a vtkActor for a line.

Parameters:
index1 - the index of the starting point of the line
index2 - the index of the end point of the line
dim1 - the dimensions of the first skeleton object to be visualized
dim2 - the dimensions of the second skeleton object to be visualized
offset - the offset between the two skeleton objects
Returns:
actor constructed based on the parameters

show

public void show()
Show the matching result.