SliceO_Class:: SliceO_Frame

 

The "SliceO_Frame" class is the leaf of the database tree.  Its Class ID is: CLASS_ID_FRAME. The title of the class is "Frame", the name of each instance is derived from the associated file name.

 

Each "frame" refer to a single 2D matrix of pixels. 

 

This class is derived from the SliceO_Class class and has the added variables and methods (the color code used in the tables is explained bellow):

 

 

Rows with pink background are for private variables

 

 

Rows with yellow background are for variables and methods that are used by TomoVision but will probably not be used in user modules.

 

 

Rows with white background are for variables and methods that will probably be useful in user modules.

 

 

 

Constructors

 

The constructor and destructor of the class are described here:

 

Public:

SliceO_Frame

The constructor of the class.

 

~SliceO_Frame

The destructor of the class.

 

 

 

Frame Parameters

 

Public:

m_file (SliceO_File *)

The data for the frame comes from a file. These information give a pointer to the file along with the "bunch" and slice information needed to identify the data in the file.

 

 

 

m_bunch (int)

 

m_slice (int)

 

 

m_ima (void *)

Pointer to the "Tomo_Image" structure of this frame.

 

m_flag (unsigned int)

 

 

 

m_x (unsigned short)

m_x and m_y are the x and y resolution of the frame. m_z and m_t are the index of this frame in a 3D or 4D dataset.

 

 

 

 

m_y (unsigned short)

 

m_z (unsigned short)

 

m_t (unsigned short)

 

 

m_pix_type (unsigned char)

Type of the pixel (as defined in "TomoVision_Convert.hpp")

 

m_pix_units (char)

Units used to express the pixel values.

 

m_pix_fill (int)

Value of the pixels outside the ROI (if any).

 

gli_offset (float)

 

Real pixel value = GLI value * gli_scale + gli_offset

 

 

gli_scale (float)

 

 

gli_min (float)

 

Minimum and maximum of the GLI values in this frame

 

 

gli_max (float)

 

 

val_min (float)

Minimum and maximum displayed values (from the color scheme), GLI values < minimum = color table[0], GLI values > maximum = color table [max]

 

 

val_max (float)

 

 

Frame Buffers

 

Some buffers are specific to the frames, for the most used ones (Erase, Work_GLI and Work_TAG) we have specific methods to address them:

 

Public:

Buf_Erase (void *)

Shortcut to the Erase buffer.  If this variable exist, you can access the buffer directly from it.  Otherwise, you need to use "Erase_Get()" to obtain a pointer to the buffer.

Erase_Get

 

Erase_Load

 

Erase_Restore

 

Erase_Lock

Methods to Lock and Unlock the buffer while you are working with it.

 

Erase_Unlock

 

Public:

Buf_Work_GLI (void *)

Shortcut to the Erase buffer.  If this variable exist, you can access the buffer directly from it.  Otherwise, you need to use "Work_GLI_Get()" to obtain a pointer to the buffer.

Work_GLI_Get

 

Work_GLI_Load

 

Work_GLI_Clear

 

Work_GLI_Lock

Methods to Lock and Unlock the buffer while you are working with it.

 

Work_GLI_Unlock

 

Public:

Buf_Work_TAG (void *)

Shortcut to the Erase buffer.  If this variable exist, you can access the buffer directly from it.  Otherwise, you need to use "Work_TAG_Get()" to obtain a pointer to the buffer.

Work_TAG_Get

 

Work_TAG_Load

 

Work_TAG_Clear

 

Work_TAG_Lock

Methods to Lock and Unlock the buffer while you are working with it.

 

 

Work_TAG_Unlock

 

Public:

Buf_Disp_GLI (void *)

Shortcut to the buffers.  If this variable exist, you can access the buffers directly from them.  Otherwise, you need to use "User_Get()" mechanism to obtain a pointer to the buffer.

 

 

 

 

Buf_Disp_TAG (void *)

Buf_Mask (void *)

Buf_Filter (void *)

Buf_Gradient (void *)

 

 

Frame Redraw

 

Private:

m_redraw (Region_2D)

Portion of the frame to redraw (in "Frame" space)

 

Public:

Region_Redraw_Get

 

Region_Redraw_Set

 

Region_Redraw_Clear

 

 

 

Frame Update

 

Private:

m_update  (Region_2D)

Portion of the frame to update (in "Frame" space)

 

Public:

Region_Update_Get

 

Region_Update_Set

 

Region_Update_Clear

 

 

 

Frame Coordinate Transformations

 

Public:

Frm_2_Inf

From "Frm" (Frame) system to "Inf" (Infinite) system

Inf_2_Frm

From "Inf" (Infinite) system to "Frm" (Frame) system

Frm_2_Org

From "Frm" (Frame) system to "Org" (Origin) system

 

The following variable are associated with the "Inf" coordinate system.

 

Public:

 

m_scale (float **)

Display scaling factor. There is one scaling factor per window mode, and one set of these per window.

m_ratio (float)

 

Pixel aspect ration (y/x)

 

The following variable are associated with the 3D coordinate system.

 

Public:

m_org (Vect)

 

Position of the upper left corner of the upper left pixel in 3D space.

m_dir_h (Vect)

Direction verctors in 3D space. "h" is the horizontal direction, "v" is the vertical and "d" is depth.

 

 

m_dir_v (Vect)

m_dir_d (Vect)

 

m_inc (Vect)

 

Increments between pixels. m_inc.z is the spacing between slices.

m_dim (Vect)

 

Dimensions of the pixels

m_pos_d (float)

 

Position of the frame in the "d" direction.

m_time (float)

 

Frame time

m_mat_2D_3D (Matrix)

 

Transformation matrices to go from 2D ("Frm" space) to 3D ("Org" space).

 

m_mat_3D_2D (Matrix)

 

 

 

Contours

 

In some of the 3D modes (Shell and Contour) we display a "contour" line that surround the TAG values on the frames.  This contour is computed with the Fct_Contour_Compute and Fct_Contour_Update functions of the sliceO_5's library.  To help these functions, the SliceO_Frame class has a number of variables and methods. 

 

You should not have any direct need for these.

 

Private:

m_contour_mutex (HANDLE)

Private variable used by the Contour_Mutex_Open and Contour_Mutex_Close methods.

Public:

Contour_Mutex_Open

Methods used by the Fct_Contour... functions to insure mutual exclusion since these operations can be used by multiple threads.

 

Contour_Mutex_Close

Contour_Invalid[ ] (unsigned char)

Vector of flags (one per TAG values) to signal that a specific TAG contour is no longer valid and should be re-computed. This flag is set by the "Fct_Pixel_Set_TAG" callback of the frames and used and reset by the .

 

 

Histogram Info

 

We keep an "histogram" dataset fro each frame.  These methods are used bu the "Histogram" tool of the SliceO_Tool library.

 

Public:

Histogram_Get

Return the "Histogram" structure of the histogram associated with this frame.

Histogram_Delete

Delete the histogram and free all associated memory.

Histogram_Compute

Compute the "Histogram" values for the frame. This function is already indirectly called by "Histogram_Get" if the histogram values do not exist.  You do not need to call it from any user modules.

 

 

Callbacks

 

Public:

Fct_Update_GLI_Disp[ ]

 

Fct_Update_TAG_Disp[ ]

 

Fct_Pixel_Get_Filter

 

Fct_Pixel_Get_Gradient_Amp

 

Fct_Pixel_Get_Gradient_Dir