NAME
vtkImageData - Similar to structured points.
SYNOPSIS
#include "/opt/vtk-c++/common/vtkImageData.h"
class VTK_EXPORT vtkImageData : public vtkReferenceCount
vtkImageData();
static vtkImageData *New() {return new vtkImageData;};
const char *GetClassName() {return "vtkImageData";};
void PrintSelf(ostream& os, vtkIndent indent);
void SetExtent(int num, int *extent);
void SetAxisExtent(int axis, int min, int max);
int *GetExtent() {return this->Extent;}
void GetAxisExtent(int axis, int &min, int &max);
void GetAxes(int num, int *axes);
int GetAxes();
int *GetAxes(){return this->Axes;}
void GetMemoryOrder(int num, int *axes);
int *GetMemoryOrder(){return this->MemoryOrder;}
void SetScalarType(int type);
void SetScalarTypeToFloat(){this->SetScalarType(VTK_FLOAT);}
void SetScalarTypeToInt(){this->SetScalarType(VTK_INT);}
void SetScalarTypeToShort(){this->SetScalarType(VTK_SHORT);}
void SetScalarTypeToUnsignedShort(){this->SetScalarType(VTK_UNSIGNED_SHORT);}
void SetScalarTypeToUnsignedChar(){this->SetScalarType(VTK_UNSIGNED_CHAR);}
int GetScalarType();
void GetIncrements(int dim, int *incs);
void GetAxisIncrement(int axis, int &inc);
int *GetIncrements(){return this->Increments;}
int AreScalarsAllocated();
void MakeScalarsWritable();
void SetScalars(vtkScalars *scalars);
void *GetScalarPointer(int coordinates[VTK_IMAGE_DIMENSIONS]);
void *GetScalarPointer();
vtkScalars *GetScalars(){return this->PointData.GetScalars();};
void SetPrintScalars(int);
int GetPrintScalars();
void PrintScalarsOn();
void PrintScalarsOff();
DESCRIPTION
vtkImageData is the basic image data structure specific to the image pipeline. The axes cannot be reordered as in vtkImageRegion. All the ivars are accessed as if the Axes were set to (0,1,2,3,4). The extent represetns the actual dimensions of the underlying memory. The actual memory is stored in objects (vtkPointData,vtkScalars,vtkArray) used in the visualization pipline, so transfer of data is efficient. Cuurently, only the only contents of PointData used are the Scalars, and vtkColorScalars are excluded. The underlying memory can be any data type.
DEFINED MACROS
VTK_IMAGE_DIMENSIONS 5
VTK_IMAGE_EXTENT_DIMENSIONS 10
int GetScalarType()
The MemoryOrder instance variable specifies how the axes are arranged in memory. It is currently fixed to (COMPONENTS X, Y, Z, Time), but might be arbitrary in the future. The ScalarType determines the contents of the underlying memory. The ScalarType cannot be changed after the data has been allocated.
void SetPrintScalars(int)
Different ways to get the increments for moving around the data. They are store (X, Y, Z, Time, Components). A flag that determines wheter to print the data or not.
vtkImageData()
Construct an instance of vtkImageData with no data.
void ComputeIncrements()
This method computes the increments from the MemoryOrder and the extent. It also computes "NumberOfScalars".
int AreScalarsAllocated()
This method returns 1 if the scalar data has been allocated.
int AllocateScalars()
This method allocates memory for the vtkImageData scalars. The extent of the data object and the ScalarType should be set before this method is called. The method returns 1 if the allocation was sucessful, 0 if not.
void MakeScalarsWritable()
This method makes sure the scalars are allocated, and we have the only reference. It copies the scalars if necessary.
void SetScalars(vtkScalars *scalars)
You can set the scalars directly (instead of allocating), but you better make sure that the extent are set properly before this method is called. This method is here (instead of GetPointData()->SetScalars) because ScalarType Needs to be set. This may change in the future.