Documentation for vtkImageCache

vtkImageCache - Caches are used by vtkImageSource.

Super Class: vtkObject

Description:

vtkImageCache is the super class of all image caches. Caches sit between image filters and handle caching and storing the results.

 

Methods:

void vtkImageCache ()
void vtkImageCache ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
void SetUpdateExtent (int )
void SetUpdateExtent (int ,int ,int ,int ,int ,int )
void SetAxisUpdateExtent (int ,int ,int )
void SetUpdateExtentToWholeExtent ()
void GetUpdateExtent (int )
int *GetUpdateExtent ()
void GetUpdateExtent (int & ,int & ,int & ,int & ,int & ,int &)
void GetAxisUpdateExtent (int ,int & ,int &)
void ClipUpdateExtentWithWholeExtent ()
void Update ()
vtkImageData *UpdateAndReturnData ()
void ReleaseData ()
vtkImageData *GetData ()
int ShouldIReleaseData ()
void UpdateImageInformation ()
unsigned long GetPipelineMTime ()
void SetSpacing (float ,float ,float )
void SetSpacing (float *)
float *GetSpacing ()
void SetOrigin (float ,float ,float )
void SetOrigin (float *)
float *GetOrigin ()
void SetWholeExtent (int )
void SetWholeExtent (int ,int ,int ,int ,int ,int )
void GetWholeExtent (int )
int *GetWholeExtent ()
void GetWholeExtent (int & ,int & ,int & ,int & ,int & ,int &)
void GetDimensions (int )
void GetDimensions (int & ,int & ,int &)
void GetCenter (float )
void GetCenter (float & ,float & ,float &)
void GetBounds (float )
void GetBounds (float & ,float & ,float & ,float & ,float & ,float &)
float *GetBounds ()
void SetSource (vtkImageSource *)
vtkImageSource *GetSource ()
long GetUpdateExtentMemorySize ()
vtkImageToStructuredPoints *GetImageToStructuredPoints ()
void SetScalarType (int )
int GetScalarType ()
char *GetScalarTypeAsString ()
void SetNumberOfScalarComponents (int )
int GetNumberOfScalarComponents ()
void SetMemoryLimit (long )
long GetMemoryLimit ()
void SetDataReleased (int )
int GetDataReleased ()
void SetReleaseDataFlag (int )
int GetReleaseDataFlag ()
void ReleaseDataFlagOn ()
void ReleaseDataFlagOff ()
void SetGlobalReleaseDataFlag (int )
void GlobalReleaseDataFlagOn ()
void GlobalReleaseDataFlagOff ()
int GetGlobalReleaseDataFlag ()
void GetScalarRange (float )
float *GetScalarRange ()
void UnRegister (vtkObject *)

 

Detailed Method Descriptions:

This method sets the instance variable "UpdateExtent" which specifies the extent of the image that will be updated. Extent is specified and a (min,max) value for each axis (in the order X, Y, Z). All the "Components" of vectors and scalars are generated all the time. If "UpdateExtent" has not been set by the first update, it defaults to the "WholeExtent". If the UpdateExtent is larger than the "WholeExtent" then "UpdateExtent" will be reduced, and a waring message will occur.

void SetUpdateExtent (int )
void SetUpdateExtent (int ,int ,int ,int ,int ,int )
void SetAxisUpdateExtent (int ,int ,int )
void SetUpdateExtentToWholeExtent ()

Get the current update extent.

void GetUpdateExtent (int )
int *GetUpdateExtent ()
void GetUpdateExtent (int & ,int & ,int & ,int & ,int & ,int &)
void GetAxisUpdateExtent (int ,int & ,int &)

Clip updateExtent so it will nopt be larger than WHoleExtent

void ClipUpdateExtentWithWholeExtent ()

Update this cache so that it holds valid data for the current update extent.

void Update ()

This is the most common way to obtain data from a cache. After setting the update extent invoke this method and it will return an ImageData instance containing the requested data.

vtkImageData *UpdateAndReturnData ()

Release the data held by this cache.

void ReleaseData ()

supplied by subclass: just return the data object associated with the UpdateExtent.

vtkImageData *GetData ()

Return flag indicating whether data should be released after use by a filter.

int ShouldIReleaseData ()

This method updates the instance variables "WholeExtent", "Spacing", "Origin", "Bounds" etc. It needs to be separate from "Update" because the image information may be needed to compute the required UpdateExtent of the input (see "vtkImageFilter").

void UpdateImageInformation ()

Make this a separate method to avoid another GetPipelineMTime call.

unsigned long GetPipelineMTime ()

void SetSpacing (float ,float ,float )
void SetSpacing (float *)
float *GetSpacing ()
void SetOrigin (float ,float ,float )
void SetOrigin (float *)
float *GetOrigin ()
void SetWholeExtent (int )
void SetWholeExtent (int ,int ,int ,int ,int ,int )
void GetWholeExtent (int )
int *GetWholeExtent ()
void GetWholeExtent (int & ,int & ,int & ,int & ,int & ,int &)

These duplicate the above and also provide compatibility with vtkImageStructuredPoints. Note: The result of these calls depends on the coordinate system! Note: These methods provide image information, not the data in the cache.

void GetDimensions (int )
void GetDimensions (int & ,int & ,int &)
void GetCenter (float )
void GetCenter (float & ,float & ,float &)
void GetBounds (float )
void GetBounds (float & ,float & ,float & ,float & ,float & ,float &)

Set/Get the source associated with this cache

float *GetBounds ()
void SetSource (vtkImageSource *)
vtkImageSource *GetSource ()

This method returns the memory that would be required for scalars on update. The returned value is in units KBytes. This method is used for determining when to stream.

long GetUpdateExtentMemorySize ()

This method is used translparently by the "SetInput(vtkImageCache *)" method to connect the image pipeline to the visualization pipeline.

vtkImageToStructuredPoints *GetImageToStructuredPoints ()

Set the data scalar type of the regions created by this cache.

void SetScalarType (int )
int GetScalarType ()

Return C type name of the data

char *GetScalarTypeAsString ()

Set/Get the number of scalar components

void SetNumberOfScalarComponents (int )
int GetNumberOfScalarComponents ()

Set/Get memory limit. Make this smaller to stream.

void SetMemoryLimit (long )
long GetMemoryLimit ()

Set/Get the DataReleased ivar.

void SetDataReleased (int )
int GetDataReleased ()

Turn on/off flag to control whether this object's data is released after being used by a filter.

void SetReleaseDataFlag (int )
int GetReleaseDataFlag ()
void ReleaseDataFlagOn ()
void ReleaseDataFlagOff ()

Turn on/off flag to control whether every object releases its data after being used by a filter.

void SetGlobalReleaseDataFlag (int )
void GlobalReleaseDataFlagOn ()
void GlobalReleaseDataFlagOff ()
int GetGlobalReleaseDataFlag ()

Convenience method to get the range of the scalar data in the current "UpdateExtent". Returns the (min/max) range. The components are lumped into one range. If there are no scalars the method will return (0,1). Note: Update needs to be called first to create the scalars.

void GetScalarRange (float )
float *GetScalarRange ()

Needed because not all objects are reference counted.

void UnRegister (vtkObject *)