3D Window Structure

(created by Chris)

 
The 3D Window component of IRIS is essentially a module which implements all the functionality for display and interaction with 3D image segmentations. When the IRIS tool starts, a single instance of the Window3D class is created and initialized.

The major componets of the 3D Window are :

The 3D Window detects user interactions and handles them in a number of different ways depending on the type of the interaction. Currently, the types of user interaction that the 3D Window detects can be classified into three categories: Crosshairs Position Placement is the mode of interaction that allows a user to position the 3D cursor in the 3D segmentation. Navigation Manipulation refers to interaction which affects how the 3D image segmentation is positioned in the window. 3D Image Segmentation refers to the process of picking regions on the 3D surface.

When the 3D Window detects a button click event, the Window3D class communicates with the Global State to determine the current toolbar mode. Currently, there are four possible toolbar modes: crosshairs mode, navigation mode, polygon mode, and point-line mode.

If the current toolbar mode is "crosshairs mode", the 3D Window allows only Crosshairs Position Placement user interaction.

If the current toolbar mode is "navigation mode", the 3D Window allows only Navigation interaction.

If the current toolbar mode is "point-line mode", the 3D Window allows only 3D Image Segmentation user interaction.

Currently, if the current toolbar mode is "polygon mode", the 3D Window does not allow any type of user interaction.
 
 

Crosshairs Position Placement

In this mode of interaction, when the left mouse button is clicked, the 3D Window attempts to place the 3D crosshairs at the location on the Mesh Object where the user clicked.  When a left mouse click event is received, the 3D Window determines the world space viewing ray which corresponds to the screen space position of where the click was received.  The 3D Window then passes this viewing ray to the Voxel Data Structure.  The Voxel Data Structure determines the first voxel (if any) intersected by the viewing ray which is labeled.  The (x,y,z) position of this sample is returned to the 3D Window.  Finally, the 3D Window notifies the Global State of the new crosshairs position and tells the GUI to update all the windows with the new crosshairs position information.
 
 

Navigation

In this mode of interaction, the 3D Window performs different actions depending on which button click event is detected.

While in "Rotation submode", when a mouse motion event is received the displayed 3D segmentation rotates. Motion in the horizontal direction rotates the segmentation horizontally; motion in the vertical direction rotates the segmentation vertically.

While in "Pan submode", when a mouse motion event is received the displayed 3D segmentation pans. Motion in the horizontal direction pans the segmentation horizontally; motion in the vertical direction pans the segmentation vertically.

While in "Zoom submode", when a mouse motion event is received the displayed 3D segmentation zooms. Upward motion enlarges the segmentation; downward motion shrinks the segmentation.
 
 

3D Image Segmentation

In this mode of interaction, the user is allowed to modify the segmentation labeling in the Voxel Data Structure.  When a left mouse click event is received (or the left mouse button is held down and a drag event is received) the 3D Window determines the world space viewing ray which corresponds to the screen space position of where the event was received.  The 3D Window then passes this viewing ray to the Voxel Data Structure.  The Voxel Data Structure determines the first voxel (if any) intersected by the viewing ray which is labeled.  The (x,y,z) position of this sample is returned to the 3D Window where it is retained in a list of samples.  When a user clicks the "Accept Button" of the GUI, the voxels which have been labelled are passed to the Voxel Data Structure.
 
 

Display
When the GUI determines that the 3D Window needs to be re-displayed, it sends a request to the 3D Window. Upon a request from the GUI, the 3D Window renders the Mesh Object, then draws the crosshairs and any voxels which were labelled during 3D Image Segmentation mode.