These function return the TAG pixel value of a pixel identified by its 3D position.
Syntax
unsigned char (*Fct_Pixel_Get_TAG)(
SliceO_Class *pt,
void *ima,
Vect pos
)
Parameters
pt
Pointer to the class calling the function.
ima
Pointer to a Tomo_Image structure, as defined in the SliceO_File class.
pos
position of a point in the image plane.
Return value
This function return the TAG value of the pixel at the location. "pos".
Remarks
By default, the function will apply the local transformation to the position and call the same function for the parent class in the tree. The "root" class will return the actual value.
Requirements
Header:
sliceO_include.hpp
Library:
sliceO_Structures.lib
Example
Default callback for all classes except "Root"
|
// ----------------------------------------------------------------------------
//
// Class_Class_Pixel_Get_TAG
//
// Get one pixel from the original TAG image
//
// ----------------------------------------------------------------------------
unsigned char Class_Class_Pixel_Get_TAG( SliceO_Class *pt, void *ima, Vect pos )
{
// --- Apply the current transformation to the pixel's coord ---
if ( ! pt->m_ident )
pos *= pt->m_new2old ;
// --- if a parent function exist, use it! ---
SliceO_Class *parent = pt->Parent_Get_Pt() ;
return( parent->Fct_Pixel_Get_TAG( parent, ima, pos ) ) ;
}
|
|
Default callback for "Root" class
|
// ----------------------------------------------------------------------------
//
// Class_Root_Pixel_Get_TAG
//
// Get one pixel from the original TAG image
//
// ----------------------------------------------------------------------------
unsigned char Class_Root_Pixel_Get_TAG( SliceO_Class *pt, void *ima, Vect pos )
{
return( Tomo_Image_Pixel_Get_Tag( NULL, ((Tomo_Image *) ima), (int) pos.x, (int) pos.y, (int) pos.z, (int) pos.t ) ) ;
}
|
|
See also