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.
|
The constructor and destructor of the class are described here:
|
Public: |
The constructor of the class.
|
|
|
The destructor of the class.
|
|
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) |
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. |
|
|
||
|
|
||
|
|
||
|
Methods to Lock and Unlock the buffer while you are working with it.
|
||
|
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. |
|
|
||
|
|
||
|
|
||
|
Methods to Lock and Unlock the buffer while you are working with it.
|
||
|
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. |
|
|
||
|
|
||
|
|
||
|
Methods to Lock and Unlock the buffer while you are working with it.
|
||
|
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 Coordinate Transformations
|
Public: |
From "Frm" (Frame) system to "Inf" (Infinite) system |
|
|
From "Inf" (Infinite) system to "Frm" (Frame) system |
||
|
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)
|
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: |
Methods used by the Fct_Contour... functions to insure mutual exclusion since these operations can be used by multiple threads.
|
|
|
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 . |
We keep an "histogram" dataset fro each frame. These methods are used bu the "Histogram" tool of the SliceO_Tool library.
|
Public: |
Return the "Histogram" structure of the histogram associated with this frame. |
|
|
Delete the histogram and free all associated memory. |
||
|
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. |
|
Public: |
Fct_Update_GLI_Disp[ ] |
|
|
Fct_Update_TAG_Disp[ ] |
|
|
|
Fct_Pixel_Get_Filter |
|
|
|
Fct_Pixel_Get_Gradient_Amp |
|
|
|
Fct_Pixel_Get_Gradient_Dir |
|