Classes | Enumerations | Enumerator | Functions | Variables

cmtkPipeline Library

This library provides pipeline-based processing similar to the paradigms used by VTK and, to lesser extent, ITK. More...

Classes

class  cmtk::ArrayFilter< I, O, InputDim >
 Filter class for array inputs. More...
class  cmtk::Colormap
 Class representing a configurable (HSV) colormap. More...
class  cmtk::Drain< I >
 General data drain template class. More...
class  cmtk::Filter< I, O >
 Basic filter class. More...
class  cmtk::Image
 Class for 2D image data. More...
class  cmtk::ImageEdgeOperator
 Filter class to apply edge operators to Image objects. More...
class  cmtk::ImageRGB
 Class to represent ready-to-display RGB image data. More...
class  cmtk::ImageToImageRGB
 Filter to convert image to RGB image using a color lookup table. More...
class  cmtk::MultiFilter< O >
 Filter with several inputs. More...
class  cmtk::Object
 Base class for all reference counted objects. More...
class  cmtk::PipelineObject
 Base class for all reference counted and linked objects. More...
class  cmtk::Plane
 Class for 2D planes, that is uniform point meshes. More...
class  cmtk::PlaneSource
 Class to generate slicing planes according to volume data. More...
class  cmtk::Renderer
 General renderer template class. More...
struct  cmtk::RGB
 Red, green, and blue components of one pixel. More...
class  cmtk::RGBA
 RGB components plus transparency (alpha value). More...
class  cmtk::Slicer
 Reformat slice image from a volume. More...
class  cmtk::Source< O >
 General data source object. More...
class  cmtk::VolumeWrapper
 Class to encapsulate volume objects. More...

Enumerations

enum  cmtk::ImageAlphaToggle { cmtk::IMAGE_RGB, cmtk::IMAGE_RGBA }
 

Type definition for the status of the alpha-channel presence flag.

More...
enum  cmtk::PlaneSource::ScandirectionEnum {
  cmtk::PlaneSource::SCANDIRECTION_CAUDAL_CRANIAL = 0, cmtk::PlaneSource::SCANDIRECTION_CRANIAL_CAUDAL = 1, cmtk::PlaneSource::SCANDIRECTION_RIGHT_LEFT = 2, cmtk::PlaneSource::SCANDIRECTION_LEFT_RIGHT = 3,
  cmtk::PlaneSource::SCANDIRECTION_VENTRAL_DORSAL = 4, cmtk::PlaneSource::SCANDIRECTION_DORSAL_VENTRAL = 5
}

Functions

virtual void cmtk::Object::Delete ()
 Destroy this object.
void cmtk::Object::SetReferenceCount (const int referenceCount)
 Directly set the reference counter.
int cmtk::Object::GetReferenceCount () const
 Get the reference counter.
long cmtk::Object::GetModifiedTime () const
 Return this objects last modification time.
void cmtk::Object::UpdateModifiedTime ()
 Set time of last modification to current time.
void cmtk::Object::UpdateModifiedTime (long modifiedTime)
 Explicitly set time of last modification.
template<class C >
bool cmtk::Object::ReplaceObject (C *&to, C *const from)
 Utility function: Replace one reference counted object by another.
 cmtk::Object::Object ()
 Default constructor.
virtual cmtk::Object::~Object ()
 Virtual constructor.
static long cmtk::Object::GetCurrentTime ()
 Query the time processing counter.
static PlaneSource * cmtk::PlaneSource::New ()
 Create new object.
 cmtk::PlaneSource::igsClassParameter (int, Direction)
 Direction of the orthogonal reformatted plane.
 cmtk::PlaneSource::igsClassParameter (Types::Coordinate, Position)
 Position of the slice plane with respect to the selected scan direction.
 cmtk::PlaneSource::igsClassParameter (Types::Coordinate, Resolution)
 Resolution of the generated plane.
 cmtk::PlaneSource::igsClassParameter (int, ReferenceVolumeIndex)
 Flag selection reference volume.
virtual void cmtk::PlaneSource::Execute ()
 Execute plane generation.
Types::Coordinate cmtk::PlaneSource::GetMinPosition ()
 Return the minimum allowed position value.
Types::Coordinate cmtk::PlaneSource::GetMaxPosition ()
 Return the maximum allowed position value.
Types::Coordinate cmtk::PlaneSource::GetMaxResolution ()
 Return maximum resolution (minimum pixel size) in [mm].
virtual void cmtk::PlaneSource::SetInput (const int index, VolumeWrapper *const input)
 Set input volume(s).
virtual int cmtk::PlaneSource::HasValidInputs () const
 Check whether we have all valid inputs.
 cmtk::PlaneSource::PlaneSource ()
 Default constructor.
virtual cmtk::PlaneSource::~PlaneSource ()
 Destructor.
 cmtk::Colormap::Colormap ()
 Default constructor.
void cmtk::Colormap::SetFromStudy (const Study *study)
 Set colormap parameters from Study object.
void cmtk::Colormap::SetStandardColormap (const int index)
 Chose one out of five predefined colormaps.
void cmtk::Colormap::Apply (void *const outPtr, const TypedArray *inPtr, const bool generateAlpha=false)
 Apply this colormap to an image to get an RGB presentation.
template<class T >
void cmtk::Colormap::ApplyPrimitive (RGB *const outPtr, const T *inPtr, const unsigned int count, const bool paddingFlag, const T paddingData) const
 Apply table lookup for a particular primitive data type.
template<class T >
void cmtk::Colormap::ApplyPrimitive (RGBA *const outPtr, const T *inPtr, const unsigned int count, const bool paddingFlag, const T paddingData) const
 Apply table lookup with constant alpha for one primitive data type.
virtual void cmtk::Colormap::Execute ()
 Execute function.
static void cmtk::Colormap::HSV2RGB (RGB &rgb, Types::DataItem H, Types::DataItem S, Types::DataItem V)
 Convert HSV color to RGB.
 cmtk::Image::Image ()
 Default constructor.
TypedArray::SmartPtr cmtk::Image::GetData ()
 Return a pointer to the object holding the image data.
void cmtk::Image::SetData (TypedArray::SmartPtr &data)
 Replace existing data array by new one.
void cmtk::Image::SetFromScalarImage (ScalarImage *const scalarImage, const bool copyPixelData)
 Copy non-pipelined scalar image.
void cmtk::Image::SetFromScalarImage (const ScalarImage *scalarImage)
 Copy non-pipelined scalar image.
ScalarImage * cmtk::Image::GetScalarImage () const
 Create copy as non-pipelined scalar image.
double cmtk::Image::GetDataAt (const int x, const int y, const double def=0)
 Return data at a certain grid location (pixel).
double cmtk::Image::GetDataAt (const int index, const double def=0)
 Return data at a certain grid location (index).
void cmtk::Image::SetDataAt (const int x, const int y, const double value=0)
 Set data at a certain grid location (pixel).
void cmtk::Image::SetDataAt (const int index, const double value=0)
 Set data at a certain grid location (index).
double cmtk::Image::GetDataAt (const double x, const double y, const double def=0)
 Return data at a certain grid location (in world coordinates).
virtual void cmtk::ImageEdgeOperator::Execute ()
 Execute edge operator.
static ImageRGB * cmtk::ImageRGB::New ()
 Construct new class instance.
 cmtk::ImageRGB::ImageRGB ()
 Default costructor.
 cmtk::ImageRGB::~ImageRGB ()
 Destructor.
bytecmtk::ImageRGB::GetDataPtr (const bool forceAlloc)
 Get pointer to RGB data.
void cmtk::ImageRGB::SetAlphaChannel (const ImageAlphaToggle alphaChannel, const bool convertData=false)
 Set alpha channel flag.
void cmtk::ImageRGB::GetPixel (RGBA &rgb, const int index)
 Return RGBA pixel data.
void cmtk::ImageRGB::SetPixel (const int index, const RGBA &rgb)
 Set RGBA pixel data.
void cmtk::ImageRGB::GetPixel (RGB &rgb, const int index)
 Return RGB pixel data.
void cmtk::ImageRGB::SetPixel (const int index, const RGB &rgb)
 Set RGB pixel data.
bool cmtk::ImageRGB::IsGreyscale () const
 Return true if this image is actually grey valued.
 cmtk::ImageToImageRGB::ImageToImageRGB ()
 Default constructor.
virtual cmtk::ImageToImageRGB::~ImageToImageRGB ()
 Destructor.
void cmtk::ImageToImageRGB::SetInput (Image *const image)
 Set an input image.
void cmtk::ImageToImageRGB::SetColormap (Colormap *const colormap)
 Set a colormap.
virtual void cmtk::ImageToImageRGB::Execute ()
 Convert image to RGB image.
template<class T >
void cmtk::ImageToImageRGB::MarkPaddingData (const unsigned int dimsx, const unsigned int dimsy, T *const rgba, const TypedArray *data) const
 Overwrite padded regions with checkerboard pattern.
 cmtk::PipelineObject::PipelineObject ()
 Default constructor.
int cmtk::PipelineObject::Register (PipelineObject *const owner=NULL)
 Register another object as this objects owner.
void cmtk::PipelineObject::Unregister (PipelineObject *const owner=NULL)
 Unregister one owner object.
virtual long cmtk::PipelineObject::Update ()
 Check for update.
virtual int cmtk::PipelineObject::CheckInputForUpdate (PipelineObject *const object)
 Compare input for update.
virtual long cmtk::PipelineObject::ExecuteIfNecessary ()
 Execute an update if object was modified after last execution.
 cmtk::Plane::Plane ()
 Default constructor.
void cmtk::Plane::CopyStructure (const Plane *plane)
 Copy the structure of another Plane object.
void cmtk::Plane::Project (Vector3D &p, const Vector3D &q) const
 Project 3D coordinate onto plane.
void cmtk::Plane::ProjectPixel (const Vector3D &v, unsigned int &i, unsigned int &j) const
 Project 3D coordinate onto image plane pixels.
 cmtk::Renderer::Renderer ()
 Default constructor.
 cmtk::Renderer::~Renderer ()
 Destructor.
void cmtk::Renderer::SetInput (ImageRGB *const input)
 Set image to display.
virtual long cmtk::Renderer::Update ()
 The actual Update() function.
virtual void cmtk::Renderer::Render ()
 Calls to this function should make derived objects update their display.
 cmtk::Slicer::Slicer ()
 Default constructor.
virtual cmtk::Slicer::~Slicer ()
 Virtual destructor.
void cmtk::Slicer::SetPlane (Plane *const plane)
 Set slice plane defining geometry of reformatted data.
virtual long cmtk::Slicer::Update ()
 Check for update.
virtual void cmtk::Slicer::Execute ()
 Perform actual reformatting.
void cmtk::Slicer::ExecuteSplineWarp (TypedArray::SmartPtr &data, const SplineWarpXform *warpXform, const unsigned int *dims, const Vector3D &offset, const Vector3D &dX, const Vector3D &dY)
 Helper function for slicing under a linear warp transformation.
static VolumeWrapper * cmtk::VolumeWrapper::New ()
 Create new wrapper object.
 cmtk::VolumeWrapper::VolumeWrapper ()
 Default constructor.
virtual cmtk::VolumeWrapper::~VolumeWrapper ()
 Destructor.
void cmtk::VolumeWrapper::SetVolume (UniformVolume::SmartPtr &volume)
 Set new volume to encapsulate.
void cmtk::VolumeWrapper::SetAffineXform (AffineXform::SmartPtr &affineXform)
 Set new affine transformation.
void cmtk::VolumeWrapper::SetWarpXform (WarpXform::SmartPtr &warpXform)
 Set new deformation.

Variables

int cmtk::Object::ReferenceCount
 The actual reference counter.
long cmtk::Object::ModifiedTime
 Last modification time.
VolumeWrapper * cmtk::PlaneSource::Input [2]
 Array of input volumes to determine the parameter ranges.
static const char * cmtk::Colormap::StandardColormaps []
 NULL-terminated list of standard colormap names.

igsCurrentTime

Static counter representing the current (discrete) processing time.

This variable is incremented with every query using Object::GetCurrentTime(). Direct access MUST NOT occur in order to prevent inconsistent object times.

See also:
PipelineObject::GetCurrentTime

long cmtk::CurrentTime = 1

Detailed Description

This library provides pipeline-based processing similar to the paradigms used by VTK and, to lesser extent, ITK.

Deprecated:
This library is deprecated and should not be relied on for future development. It is currently only maintained to the extent necessary to keep the "triplanar" viewer program functional.

Enumeration Type Documentation

Type definition for the status of the alpha-channel presence flag.

Enumerator:
IMAGE_RGB 

Image has no alpha channel (3 bytes per pixel).

IMAGE_RGBA 

Image has an alpha channel (4 bytes per pixel).

Definition at line 52 of file cmtkImageRGB.h.

Enumerator:
SCANDIRECTION_CAUDAL_CRANIAL 

Axial scans from foot to head.

SCANDIRECTION_CRANIAL_CAUDAL 

Axial scans from head to foot.

SCANDIRECTION_RIGHT_LEFT 

Sagittal scans from right to left.

SCANDIRECTION_LEFT_RIGHT 

Sagittal scans from left to right.

SCANDIRECTION_VENTRAL_DORSAL 

Coronal scans from front to back.

SCANDIRECTION_DORSAL_VENTRAL 

Coronal scans from back to front.

Definition at line 60 of file cmtkPlaneSource.h.


Function Documentation

void cmtk::Colormap::Apply ( void *const   outPtr,
const TypedArray inPtr,
const bool  generateAlpha = false 
) [inherited]

Apply this colormap to an image to get an RGB presentation.

Parameters:
outPtrPointer to a suffiently big memory segment that will hold the resulting RGB data. The data will be stored as three unsigned 8-bit values per pixel, representing the red, green, and blue components of that pixel.
inPtrPointer to a TypedArray object containing the data to be converted. The primitive data type can be any of the types supported by TypedArray, eg. byte, short, float etc.
generateAlphaIf this flag is set, a constant alpha value will be generated for each pixel, resulting in 32 bits of aRGB data per pixel, rather than 24 bits of RGB data. Default value for this parameter is off.

Definition at line 133 of file cmtkColormap.cxx.

References cmtk::TypedArray::GetDataPtr(), cmtk::TypedArray::GetDataSize(), cmtk::TypedArray::GetPaddingFlag(), cmtk::TypedArray::GetPaddingPtr(), cmtk::TypedArray::GetType(), NULL, cmtk::TYPE_BYTE, cmtk::TYPE_CHAR, cmtk::TYPE_DOUBLE, cmtk::TYPE_FLOAT, cmtk::TYPE_INT, cmtk::TYPE_NONE, cmtk::TYPE_SHORT, cmtk::TYPE_UINT, and cmtk::TYPE_USHORT.

Referenced by cmtk::ImageToImageRGB::Execute().

template<class T >
void cmtk::Colormap::ApplyPrimitive ( RGB *const   outPtr,
const T *  inPtr,
const unsigned int  count,
const bool  paddingFlag,
const T  paddingData 
) const [private, inherited]

Apply table lookup for a particular primitive data type.

"T" is a template parameter specifying the primitive data type to lookup in the color table, eg. byte, short, float etc.

Parameters:
outPtrPointer to an array holding the RGB pixel data after table lookup.
inPtrPointer to the primitive data array of type T.
countNumber of values in the array pointed to by inPtr. As inPtr is not a TypedArray anymore, we have to make this explicit.
paddingFlagFlag for use of padding data.
paddingDataPadding value. Values equal to this are ignored if "paddingFlag" is true.
See also:
Apply

Definition at line 212 of file cmtkColormap.cxx.

template<class T >
void cmtk::Colormap::ApplyPrimitive ( RGBA *const   outPtr,
const T *  inPtr,
const unsigned int  count,
const bool  paddingFlag,
const T  paddingData 
) const [private, inherited]

Apply table lookup with constant alpha for one primitive data type.

"T" is a template parameter specifying the primitive data type to lookup in the color table, eg. byte, short, float etc.

Parameters:
outPtrPointer to an array holding the aRGB pixel data after table lookup.
inPtrPointer to the primitive data array of type T.
countNumber of values in the array pointed to by inPtr. As inPtr is not a TypedArray anymore, we have to make this explicit.
paddingFlagFlag for use of padding data.
paddingDataPadding value. Values equal to this are ignored if "paddingFlag" is true.
See also:
Apply

Definition at line 250 of file cmtkColormap.cxx.

References cmtk::RGBA::Alpha.

int cmtk::PipelineObject::CheckInputForUpdate ( PipelineObject *const   object ) [protected, virtual, inherited]

Compare input for update.

For the given input object (Owner for example), the Update() function is called. Afterwards, the returned execution time of the input object is compared to the current object's modification time. The later of both times is then set as the current object's modification time.

Definition at line 75 of file cmtkPipelineObject.cxx.

Referenced by cmtk::Slicer::Update().

cmtk::Colormap::Colormap (  ) [protected, inherited]

Default constructor.

Definition at line 56 of file cmtkColormap.cxx.

References cmtk::CreateSystemLabelColorMap(), and cmtk::PALETTE_GRAY.

void cmtk::Plane::CopyStructure ( const Plane plane ) [inherited]

Copy the structure of another Plane object.

This function copies dimensions, pixel size, and spatial location of a given object.

Definition at line 54 of file cmtkPlane.cxx.

Referenced by cmtk::Slicer::Execute(), and cmtk::ImageToImageRGB::Execute().

virtual void cmtk::Object::Delete (  ) [inline, virtual, inherited]

Destroy this object.

This function decrements this object's reference counter. If the updated reference count is zero, this object is deleted.

Definition at line 145 of file cmtkObject.h.

Referenced by cmtk::ArrayFilter< I, O, InputDim >::~ArrayFilter(), cmtk::Filter< Image, Image >::~Filter(), and cmtk::Slicer::~Slicer().

void cmtk::PlaneSource::Execute (  ) [virtual, inherited]

Execute plane generation.

Reimplemented from cmtk::PipelineObject.

Definition at line 130 of file cmtkPlaneSource.cxx.

References NULL, and cmtk::Volume::Size.

void cmtk::Slicer::Execute (  ) [virtual, inherited]
void cmtk::ImageEdgeOperator::Execute (  ) [virtual, inherited]

Execute edge operator.

Reimplemented from cmtk::PipelineObject.

Definition at line 42 of file cmtkImageEdgeOperator.cxx.

References NULL, and cmtk::Image::SetFromScalarImage().

void cmtk::ImageToImageRGB::Execute (  ) [virtual, inherited]
void cmtk::Colormap::Execute (  ) [protected, virtual, inherited]

Execute function.

Called by the Update() function inherited from Object, this function computes the lookup table using the parameters specified.

Reimplemented from cmtk::PipelineObject.

Definition at line 289 of file cmtkColormap.cxx.

long cmtk::PipelineObject::ExecuteIfNecessary (  ) [protected, virtual, inherited]

Execute an update if object was modified after last execution.

Returns:
The new time of last execution.

Definition at line 89 of file cmtkPipelineObject.cxx.

Referenced by cmtk::Slicer::Update().

void cmtk::Slicer::ExecuteSplineWarp ( TypedArray::SmartPtr data,
const SplineWarpXform warpXform,
const unsigned int *  dims,
const Vector3D offset,
const Vector3D dX,
const Vector3D dY 
) [private, inherited]

Helper function for slicing under a linear warp transformation.

This function is called by Execute() if a B-spline deformation is to be applied during slicing. Its main purpose is to keep separate this reslicing from the purely affine implementation in Execute() itself.

Definition at line 230 of file cmtkSlicer.cxx.

References cmtk::SplineWarpXform::ApplyInPlace(), cmtk::Interpolators::COSINE_SINC, cmtk::Interpolators::CUBIC, cmtk::Interpolators::LINEAR, cmtk::Interpolators::NEAREST_NEIGHBOR, and cmtk::Interpolators::PARTIALVOLUME.

Referenced by cmtk::Slicer::Execute().

static long cmtk::Object::GetCurrentTime (  ) [inline, static, inherited]

Query the time processing counter.

Immediately after returning the present time, the time counter is advanced.

Returns:
The present time.
See also:
igsCurrentTime

Definition at line 231 of file cmtkObject.h.

TypedArray::SmartPtr cmtk::Image::GetData (  ) [inherited]
double cmtk::Image::GetDataAt ( const int  x,
const int  y,
const double  def = 0 
) [inherited]

Return data at a certain grid location (pixel).

Parameters:
xIndex of requested pixel in x-direction. Valid range is [0..Dims[0]-1].
yIndex of requested pixel in y-direction. Valid range is [0..Dims[1]-1].
defValue returned when there is no valid data at the queried position. This parameter defaults to zero.
Returns:
The value of the pixel at position (x,y) or the value of parameter def if there was no valid data for this position.

Definition at line 135 of file cmtkImage.cxx.

References cmtk::TypedArray::Get(), and cmtk::Image::GetData().

Referenced by cmtk::Slicer::Execute().

double cmtk::Image::GetDataAt ( const int  index,
const double  def = 0 
) [inherited]

Return data at a certain grid location (index).

Parameters:
indexIndex of requested pixel. Valid range is [0..GetNumPixels()-1].
defValue returned when there is no valid data at the queried position. This parameter defaults to zero.
Returns:
The value of the pixel at position (x,y) or the value of parameter def if there was no valid data for this position.

Definition at line 151 of file cmtkImage.cxx.

References cmtk::TypedArray::Get(), and cmtk::Image::GetData().

double cmtk::Image::GetDataAt ( const double  x,
const double  y,
const double  def = 0 
) [inherited]

Return data at a certain grid location (in world coordinates).

Parameters:
xLocation of requested pixel in x-direction.
yLocation of requested pixel in y-direction.
defValue returned when there is no valid data at the specified position. This parameter defaults to zero.
Returns:
The value of the pixel at position (x,y) or the value of parameter "def" if there was no valid data for this position.

Definition at line 179 of file cmtkImage.cxx.

References cmtk::TypedArray::Get(), and cmtk::Image::GetData().

byte * cmtk::ImageRGB::GetDataPtr ( const bool  forceAlloc ) [inherited]

Get pointer to RGB data.

This function checks whether a data array of the appropriate size exists. If not, the old array is freed and a new one with the correct size is created.

Parameters:
forceAllocIf this flag is true, then a data array of appropriate size is allocated if it had not been done before.

Definition at line 63 of file cmtkImageRGB.cxx.

References cmtk::Memory::DeleteArray(), and NULL.

Types::Coordinate cmtk::PlaneSource::GetMaxPosition (  ) [inherited]

Return the maximum allowed position value.

Definition at line 84 of file cmtkPlaneSource.cxx.

References NULL, and cmtk::Volume::Size.

Types::Coordinate cmtk::PlaneSource::GetMaxResolution (  ) [inherited]

Return maximum resolution (minimum pixel size) in [mm].

Definition at line 110 of file cmtkPlaneSource.cxx.

References cmtk::UniformVolume::GetMinDelta().

Types::Coordinate cmtk::PlaneSource::GetMinPosition (  ) [inherited]

Return the minimum allowed position value.

Definition at line 78 of file cmtkPlaneSource.cxx.

long cmtk::Object::GetModifiedTime (  ) const [inline, inherited]

Return this objects last modification time.

Definition at line 166 of file cmtkObject.h.

void cmtk::ImageRGB::GetPixel ( RGBA rgb,
const int  index 
) [inherited]

Return RGBA pixel data.

If this is actually an RGB image only, the alpha component of the returned pixel will be set to 255 (opaque).

Definition at line 130 of file cmtkImageRGB.cxx.

References cmtk::RGBA::Alpha, cmtk::RGBA::B, cmtk::RGBA::G, cmtk::IMAGE_RGBA, and cmtk::RGBA::R.

void cmtk::ImageRGB::GetPixel ( RGB rgb,
const int  index 
) [inherited]

Return RGB pixel data.

If this is actually an RGBA image, the requested pixel's alpha component will be ignored.

Definition at line 152 of file cmtkImageRGB.cxx.

References cmtk::RGB::B, cmtk::RGB::G, and cmtk::RGB::R.

int cmtk::Object::GetReferenceCount (  ) const [inline, inherited]

Get the reference counter.

Definition at line 160 of file cmtkObject.h.

ScalarImage * cmtk::Image::GetScalarImage (  ) const [inherited]

Create copy as non-pipelined scalar image.

Definition at line 121 of file cmtkImage.cxx.

References cmtk::Image::Data, and cmtk::ScalarImage::SetImageOrigin().

int cmtk::PlaneSource::HasValidInputs (  ) const [virtual, inherited]

Check whether we have all valid inputs.

Definition at line 56 of file cmtkPlaneSource.cxx.

References NULL.

void cmtk::Colormap::HSV2RGB ( RGB rgb,
Types::DataItem  H,
Types::DataItem  S,
Types::DataItem  V 
) [static, inherited]

Convert HSV color to RGB.

Definition at line 375 of file cmtkColormap.cxx.

References cmtk::RGB::B, cmtk::RGB::G, and cmtk::RGB::R.

cmtk::PlaneSource::igsClassParameter ( int  ,
Direction   
) [inherited]

Direction of the orthogonal reformatted plane.

This flag selects one of the six standard orthogonal slice plane directions. There are three pairs of directions, where each consists of two identical position with a flip in the x-direction. For convenient selection of the scan direction, SCANDIRECTION_XXX preprocessor definitions are available.

See also:
SCANDIRECTION_XXX
cmtk::PlaneSource::igsClassParameter ( Types::Coordinate  ,
Position   
) [inherited]

Position of the slice plane with respect to the selected scan direction.

This value is the distance of the slice plane from the reference volume origin in direction of the plane normal. The unit is identical to the volume's coordinate units, ie. it is usually in [mm].

cmtk::PlaneSource::igsClassParameter ( Types::Coordinate  ,
Resolution   
) [inherited]

Resolution of the generated plane.

This is the size of the square grid elements (pixels) of the plane object created by this class.

cmtk::PlaneSource::igsClassParameter ( int  ,
ReferenceVolumeIndex   
) [inherited]

Flag selection reference volume.

The resulting plane will be aligned with the boundaries of the given volume in the Input[] list.

cmtk::Image::Image (  ) [protected, inherited]

Default constructor.

Definition at line 42 of file cmtkImage.cxx.

References cmtk::TYPE_NONE.

cmtk::ImageRGB::ImageRGB (  ) [protected, inherited]

Default costructor.

Definition at line 49 of file cmtkImageRGB.cxx.

References cmtk::IMAGE_RGB, and NULL.

cmtk::ImageToImageRGB::ImageToImageRGB (  ) [protected, inherited]
bool cmtk::ImageRGB::IsGreyscale (  ) const [inherited]

Return true if this image is actually grey valued.

Definition at line 169 of file cmtkImageRGB.cxx.

References cmtk::IMAGE_RGB.

template<class T >
void cmtk::ImageToImageRGB::MarkPaddingData ( const unsigned int  dimsx,
const unsigned int  dimsy,
T *const   rgba,
const TypedArray data 
) const [private, inherited]

Overwrite padded regions with checkerboard pattern.

Definition at line 107 of file cmtkImageToImageRGB.cxx.

References cmtk::TypedArray::PaddingDataAt().

Referenced by cmtk::ImageToImageRGB::Execute().

VolumeWrapper * cmtk::VolumeWrapper::New (  ) [static, inherited]

Create new wrapper object.

Definition at line 42 of file cmtkVolumeWrapper.cxx.

static PlaneSource* cmtk::PlaneSource::New (  ) [inline, static, inherited]

Create new object.

Definition at line 77 of file cmtkPlaneSource.h.

ImageRGB * cmtk::ImageRGB::New (  ) [static, inherited]

Construct new class instance.

Reimplemented from cmtk::Plane.

Definition at line 44 of file cmtkImageRGB.cxx.

cmtk::Object::Object (  ) [inline, inherited]

Default constructor.

Set the reference counter to zero initially.

Definition at line 214 of file cmtkObject.h.

cmtk::PipelineObject::PipelineObject (  ) [protected, inherited]

Default constructor.

Set the reference counter to zero initially.

Definition at line 41 of file cmtkPipelineObject.cxx.

References NULL.

cmtk::Plane::Plane (  ) [protected, inherited]

Default constructor.

Set all plane fields to safe values.

Definition at line 44 of file cmtkPlane.cxx.

cmtk::PlaneSource::PlaneSource (  ) [protected, inherited]

Default constructor.

Definition at line 44 of file cmtkPlaneSource.cxx.

References NULL.

void cmtk::Plane::Project ( Vector3D p,
const Vector3D q 
) const [inherited]

Project 3D coordinate onto plane.

Parameters:
pProjected coordinate.
qOriginal coordinate.

Definition at line 63 of file cmtkPlane.cxx.

void cmtk::Plane::ProjectPixel ( const Vector3D v,
unsigned int &  i,
unsigned int &  j 
) const [inherited]

Project 3D coordinate onto image plane pixels.

Parameters:
vOriginal coordinate.
iIndex of projected pixel in x direction.
jIndex of projected pixel in y direction.

Definition at line 80 of file cmtkPlane.cxx.

int cmtk::PipelineObject::Register ( PipelineObject *const   owner = NULL ) [inherited]

Register another object as this objects owner.

The reference counter of this object is also incremented.

Parameters:
ownerThe object to be registered as the owner of this object. If this parameter is not given, the current owner is left untouched. In this case, only the reference counter is modified.
Returns:
The new value of the reference counter.
See also:
ReferenceCount

Definition at line 50 of file cmtkPipelineObject.cxx.

void cmtk::Renderer::Render (  ) [virtual, inherited]

Calls to this function should make derived objects update their display.

Reimplemented in cmtk::QtRenderImageRGB.

Definition at line 69 of file cmtkRenderer.cxx.

cmtk::Renderer::Renderer (  ) [protected, inherited]

Default constructor.

Definition at line 42 of file cmtkRenderer.cxx.

References NULL.

template<class C >
bool cmtk::Object::ReplaceObject ( C *&  to,
C *const   from 
) [inline, inherited]

Utility function: Replace one reference counted object by another.

References are updated accordingly. Substitution of a pointer by itself does not have any effect. The function is NULL safe.

Parameters:
toReference to a pointer to be replaced by the pointer given as "from" parameter. If both pointers are different, the reference counter of this object is decremented before overwriting the pointer. It is safe to pass references to NULL pointers here.
fromThe reference counter of the object pointed to by this pointer is increased if a pointer substitution takes place. It is safe to pass a NULL pointer here.
Returns:
"True" is returned if there was an actual replacement. If an object was basically replaced by itself, "false" is returned instead. Note that only POINTERS are compared to find out which of both has happened.

Definition at line 201 of file cmtkObject.h.

Referenced by cmtk::ImageToImageRGB::SetColormap(), cmtk::ImageToImageRGB::SetInput(), and cmtk::Slicer::SetPlane().

void cmtk::VolumeWrapper::SetAffineXform ( AffineXform::SmartPtr affineXform ) [inherited]

Set new affine transformation.

Definition at line 70 of file cmtkVolumeWrapper.cxx.

void cmtk::ImageRGB::SetAlphaChannel ( const ImageAlphaToggle  alphaChannel,
const bool  convertData = false 
) [inherited]

Set alpha channel flag.

This function is used to toggle the image between RGB and RGB+Alpha modes.

Definition at line 84 of file cmtkImageRGB.cxx.

References cmtk::Memory::DeleteArray(), cmtk::IMAGE_RGB, and NULL.

Referenced by cmtk::ImageToImageRGB::Execute().

void cmtk::ImageToImageRGB::SetColormap ( Colormap *const   colormap ) [inherited]
void cmtk::Image::SetData ( TypedArray::SmartPtr data ) [inherited]

Replace existing data array by new one.

BEWARE! The size of the new array must match precisely the dimensions as specified by the inherited Dims[] array.

Definition at line 74 of file cmtkImage.cxx.

References cmtk::Image::Data, and cmtk::Object::UpdateModifiedTime().

void cmtk::Image::SetDataAt ( const int  index,
const double  value = 0 
) [inherited]

Set data at a certain grid location (index).

Parameters:
indexIndex of requested pixel. Valid range is [0..GetNumPixels()-1].
valueValue to set pixel to.

Definition at line 173 of file cmtkImage.cxx.

References cmtk::Image::GetData().

void cmtk::Image::SetDataAt ( const int  x,
const int  y,
const double  value = 0 
) [inherited]

Set data at a certain grid location (pixel).

Parameters:
xIndex of requested pixel in x-direction. Valid range is [0..Dims[0]-1].
yIndex of requested pixel in y-direction. Valid range is [0..Dims[1]-1].
valueValue to set pixel to.

Definition at line 167 of file cmtkImage.cxx.

References cmtk::Image::GetData().

void cmtk::Image::SetFromScalarImage ( const ScalarImage scalarImage ) [inherited]

Copy non-pipelined scalar image.

Definition at line 103 of file cmtkImage.cxx.

References cmtk::ScalarImage::GetDims(), and cmtk::ScalarImage::GetImageOrigin().

void cmtk::Image::SetFromScalarImage ( ScalarImage *const   scalarImage,
const bool  copyPixelData 
) [inherited]
void cmtk::Colormap::SetFromStudy ( const Study study ) [inherited]

Set colormap parameters from Study object.

Definition at line 75 of file cmtkColormap.cxx.

References cmtk::Study::GetUserLabelMap().

Referenced by cmtk::QtTriplanarWindow::slotColormapChanged().

void cmtk::PlaneSource::SetInput ( const int  index,
VolumeWrapper *const   input 
) [virtual, inherited]

Set input volume(s).

Definition at line 70 of file cmtkPlaneSource.cxx.

void cmtk::Renderer::SetInput ( ImageRGB *const   input ) [inherited]

Set image to display.

Definition at line 55 of file cmtkRenderer.cxx.

void cmtk::ImageToImageRGB::SetInput ( Image *const   image ) [inherited]

Set an input image.

Definition at line 61 of file cmtkImageToImageRGB.cxx.

References cmtk::ImageToImageRGB::m_Image, and cmtk::Object::ReplaceObject().

Referenced by cmtk::QtTriplanarWindow::QtTriplanarWindow().

void cmtk::ImageRGB::SetPixel ( const int  index,
const RGBA rgb 
) [inherited]

Set RGBA pixel data.

If this is actually an RGB image only, the target pixel's alpha value will be set to 255 (opaque).

Definition at line 142 of file cmtkImageRGB.cxx.

References cmtk::RGBA::Alpha, cmtk::RGBA::B, cmtk::RGBA::G, cmtk::IMAGE_RGBA, and cmtk::RGBA::R.

void cmtk::ImageRGB::SetPixel ( const int  index,
const RGB rgb 
) [inherited]

Set RGB pixel data.

If this is actually an RGBA image, the target pixel's alpha value will be set to 255 (opaque).

Definition at line 160 of file cmtkImageRGB.cxx.

References cmtk::RGB::B, cmtk::RGB::G, and cmtk::RGB::R.

void cmtk::Slicer::SetPlane ( Plane *const   plane ) [inherited]

Set slice plane defining geometry of reformatted data.

Definition at line 68 of file cmtkSlicer.cxx.

References cmtk::Slicer::m_Plane, and cmtk::Object::ReplaceObject().

void cmtk::Object::SetReferenceCount ( const int  referenceCount ) [inline, inherited]

Directly set the reference counter.

This function should be used CAREFULLY.

Definition at line 153 of file cmtkObject.h.

void cmtk::Colormap::SetStandardColormap ( const int  index ) [inherited]

Chose one out of five predefined colormaps.

Parameters:
indexThe index of the desired standard colormap. Valid values are 0 (Greylevel), 1 (Red), 2 (Green), 3 (Blue), 4 (Rainbow), 5 (Inverse Rainbow). PALETTE_XXX constants are available for convenient access.

Definition at line 93 of file cmtkColormap.cxx.

References cmtk::PALETTE_BLUE, cmtk::PALETTE_GRAY, cmtk::PALETTE_GREEN, cmtk::PALETTE_LABELS, cmtk::PALETTE_RAINBOW, and cmtk::PALETTE_RED.

Referenced by cmtk::QtTriplanarWindow::QtTriplanarWindow().

void cmtk::VolumeWrapper::SetVolume ( UniformVolume::SmartPtr volume ) [inherited]

Set new volume to encapsulate.

Definition at line 60 of file cmtkVolumeWrapper.cxx.

void cmtk::VolumeWrapper::SetWarpXform ( WarpXform::SmartPtr warpXform ) [inherited]

Set new deformation.

Definition at line 80 of file cmtkVolumeWrapper.cxx.

cmtk::Slicer::Slicer (  ) [protected, inherited]

Default constructor.

Definition at line 50 of file cmtkSlicer.cxx.

References cmtk::Interpolators::LINEAR, cmtk::Slicer::m_Plane, NULL, and cmtk::Slicer::TempImage.

void cmtk::PipelineObject::Unregister ( PipelineObject *const   owner = NULL ) [inherited]

Unregister one owner object.

This function decrements this object's reference counter. If the updated reference count is zero, this object is destroyed.

Definition at line 61 of file cmtkPipelineObject.cxx.

References NULL.

Referenced by cmtk::ImageToImageRGB::~ImageToImageRGB(), and cmtk::Source< Image >::~Source().

long cmtk::PipelineObject::Update (  ) [virtual, inherited]

Check for update.

This function first checks whether since its last execution its owner has been modified. In this case, the Execute() function is called to update the current object with the new input. Derived classes may override this function if they have more than one input object, for instance.

Such derived implementations can then use the CheckForUpdate() and ExecuteIfNecessary() member functions for convenient state checking and execution.

See also:
Execute
CheckInputForUpdate
ExecuteIfNecessary

Reimplemented in cmtk::ArrayFilter< I, O, InputDim >, cmtk::Drain< I >, cmtk::Filter< I, O >, cmtk::MultiFilter< O >, cmtk::Renderer, cmtk::Slicer, cmtk::Filter< VolumeWrapper, Image >, cmtk::Filter< Image, Image >, cmtk::MultiFilter< ImageRGB >, and cmtk::MultiFilter< Plane >.

Definition at line 69 of file cmtkPipelineObject.cxx.

long cmtk::Slicer::Update (  ) [virtual, inherited]

Check for update.

This functions first checks this class' additional "Plane" input object for updates, then it calls the inherited "Update" function.

See also:
Object::Update

Reimplemented from cmtk::Filter< VolumeWrapper, Image >.

Definition at line 74 of file cmtkSlicer.cxx.

References cmtk::PipelineObject::CheckInputForUpdate(), cmtk::PipelineObject::ExecuteIfNecessary(), cmtk::Filter< VolumeWrapper, Image >::Input, and cmtk::Slicer::m_Plane.

long cmtk::Renderer::Update (  ) [virtual, inherited]

The actual Update() function.

Reimplemented from cmtk::PipelineObject.

Definition at line 61 of file cmtkRenderer.cxx.

void cmtk::Object::UpdateModifiedTime ( long  modifiedTime ) [inline, inherited]

Explicitly set time of last modification.

Only monotone updates, ie. setting the update time to a more recent time, are allowed.

Definition at line 181 of file cmtkObject.h.

void cmtk::Object::UpdateModifiedTime (  ) [inline, inherited]

Set time of last modification to current time.

Definition at line 172 of file cmtkObject.h.

Referenced by cmtk::Image::GetData(), and cmtk::Image::SetData().

cmtk::VolumeWrapper::VolumeWrapper (  ) [protected, inherited]

Default constructor.

Definition at line 47 of file cmtkVolumeWrapper.cxx.

cmtk::ImageRGB::~ImageRGB (  ) [protected, inherited]

Destructor.

Free image data array if one has been allocated.

Definition at line 57 of file cmtkImageRGB.cxx.

References cmtk::Memory::DeleteArray().

cmtk::ImageToImageRGB::~ImageToImageRGB (  ) [protected, virtual, inherited]

Destructor.

Dereference all input and output objects.

Definition at line 53 of file cmtkImageToImageRGB.cxx.

References cmtk::ImageToImageRGB::m_Colormap, cmtk::ImageToImageRGB::m_Image, and cmtk::PipelineObject::Unregister().

virtual cmtk::Object::~Object (  ) [inline, virtual, inherited]

Virtual constructor.

This function is only present to ensure that derived classes can have a virtual destructor function.

Definition at line 223 of file cmtkObject.h.

virtual cmtk::PlaneSource::~PlaneSource (  ) [inline, protected, virtual, inherited]

Destructor.

Definition at line 132 of file cmtkPlaneSource.h.

cmtk::Renderer::~Renderer (  ) [protected, inherited]

Destructor.

Definition at line 49 of file cmtkRenderer.cxx.

References NULL.

cmtk::Slicer::~Slicer (  ) [protected, virtual, inherited]

Virtual destructor.

Definition at line 59 of file cmtkSlicer.cxx.

References cmtk::Object::Delete(), cmtk::Slicer::m_Plane, and cmtk::Slicer::TempImage.

cmtk::VolumeWrapper::~VolumeWrapper (  ) [protected, virtual, inherited]

Destructor.

Definition at line 54 of file cmtkVolumeWrapper.cxx.


Variable Documentation

Definition at line 50 of file cmtkObject.cxx.

VolumeWrapper* cmtk::PlaneSource::Input[2] [protected, inherited]

Array of input volumes to determine the parameter ranges.

Definition at line 132 of file cmtkPlaneSource.h.

long cmtk::Object::ModifiedTime [private, inherited]

Last modification time.

This is the time of the last modification made to this object or one of its input parameters.

Definition at line 244 of file cmtkObject.h.

int cmtk::Object::ReferenceCount [mutable, private, inherited]

The actual reference counter.

Definition at line 238 of file cmtkObject.h.

const char * cmtk::Colormap::StandardColormaps [static, inherited]
Initial value:
 
{
  "Gray", "Red", "Green", "Blue", "Rainbow", "Labels", NULL
}

NULL-terminated list of standard colormap names.

Definition at line 106 of file cmtkColormap.h.

Referenced by cmtk::QtTriplanarWindow::slotSetColormap().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines