io.visualize
Class MatchingViewer3DPanel

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

public class MatchingViewer3DPanel
extends java.lang.Object

Visualizing a 3D matching result with VTK. Used in the matching GUI.


Field Summary
private  Config config
          holding config parameters
private  CleanMatchingResult result
          the matching result
 
Constructor Summary
MatchingViewer3DPanel(CleanMatchingResult result, Config config)
          Creating a new instance.
 
Method Summary
 java.util.List<vtk.vtkActor> changeWindowPanel(vtk.vtkRenderWindowPanel renderWindowPanel, java.util.List<vtk.vtkActor> toBeRemoved)
          Update the window panel.
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 a skeleton actor from the 3D thinning cube.
private  vtk.vtkActor createSurfaceActor(SkeletonObject so)
          Create an actor for the volume's surface.
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 CleanMatchingResult result
the matching result


config

private Config config
holding config parameters

Constructor Detail

MatchingViewer3DPanel

public MatchingViewer3DPanel(CleanMatchingResult result,
                             Config config)
Creating a new instance.

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

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

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.

createSkeletonActor

private vtk.vtkActor createSkeletonActor(int[][][] cube,
                                         SkeletonObject so)
Create a skeleton actor from the 3D thinning cube.

Parameters:
cube - the thinning cube
so - the skeleton object
Returns:
vtk actor representing the skeleton

createSurfaceActor

private vtk.vtkActor createSurfaceActor(SkeletonObject so)
Create an actor for the volume's surface.

Parameters:
so - the skeleton object to be visualized
Returns:
vtk actor representing the volume's surface

changeWindowPanel

public java.util.List<vtk.vtkActor> changeWindowPanel(vtk.vtkRenderWindowPanel renderWindowPanel,
                                                      java.util.List<vtk.vtkActor> toBeRemoved)
Update the window panel.

Parameters:
renderWindowPanel - the panel to be updated
toBeRemoved - a list of actors that must be removed from the previous iteration.
Returns:
all displayed vtk actors, so they can be passed as toBeRemoved in the next iteration.