31 #ifndef vtkImageData_h
32 #define vtkImageData_h
34 #include "vtkCommonDataModelModule.h"
69 vtkIdType GetNumberOfPoints() VTK_OVERRIDE;
74 void GetCellBounds(
vtkIdType cellId,
double bounds[6]) VTK_OVERRIDE;
75 virtual
vtkIdType FindPoint(
double x,
double y,
double z)
82 int& subId,
double pcoords[3],
double *weights) VTK_OVERRIDE;
85 vtkIdType cellId,
double tol2,
int& subId,
86 double pcoords[3],
double *weights) VTK_OVERRIDE;
88 double tol2,
int& subId,
double pcoords[3],
89 double *weights) VTK_OVERRIDE;
93 this->GetDimensions());}
97 int GetMaxCellSize() VTK_OVERRIDE {
return 8;};
108 virtual
void SetDimensions(
int i,
int j,
int k);
113 virtual
void SetDimensions(const
int dims[3]);
121 virtual
int *GetDimensions();
129 virtual
void GetDimensions(
int dims[3]);
137 virtual
int ComputeStructuredCoordinates(
138 const
double x[3],
int ijk[3],
double pcoords[3]);
140 static
int ComputeStructuredCoordinates( const
double x[3],
int ijk[3],
double pcoords[3],
143 const
double* origin,
144 const
double* bounds);
154 virtual
void GetVoxelGradient(
163 virtual
void GetPointGradient(
169 virtual
int GetDataDimension();
188 const int* updateExtent,
189 int* axisUpdateExtent);
206 virtual void SetExtent(
int x1,
int x2,
int y1,
int y2,
int z1,
int z2);
207 vtkGetVector6Macro(Extent,
int);
281 int x,
int y,
int z,
int component,
float v);
284 int x,
int y,
int z,
int component,
double v);
311 int y0,
int y1,
int z0,
int z1)
312 {
int e[6]; e[0]=x0; e[1]=x1; e[2]=y0; e[3]=y1; e[4]=z0; e[5]=z1;
313 this->CopyAndCastFrom(inData, e);}
321 void Crop(
const int* updateExtent) VTK_OVERRIDE;
338 vtkSetVector3Macro(Spacing,
double);
339 vtkGetVector3Macro(Spacing,
double);
351 vtkSetVector3Macro(Origin,
double);
352 vtkGetVector3Macro(Origin,
double);
359 const
char* GetScalarTypeAsString()
360 {
return vtkImageScalarTypeNameMacro ( this->GetScalarType() ); };
428 void ComputeInternalExtent(
int *intExt,
int *tgtExt,
int *bnds);
459 void ComputeIncrements();
462 void ComputeIncrements(
int numberOfComponents);
469 void ComputeIncrements(
int numberOfComponents,
vtkIdType inc[3]);
475 void SetDataDescription(
int desc);
476 int GetDataDescription() {
return this->DataDescription; }
496 void operator=(
const vtkImageData&) VTK_DELETE_FUNCTION;
534 return dims[0]*dims[1]*dims[2];
void GetPoint(const int i, const int j, const int k, double pnt[3])
abstract class to specify cell behavior
abstract superclass for arrays of numeric data
general representation of visualization data
abstract class to specify dataset behavior
vtkIdType FindPoint(double x, double y, double z)
Locate the closest point to the global coordinate x.
provides thread-safe access to cells
list of point or cell ids
topologically and geometrically regular array of data
void Crop(const int *updateExtent) override
Reallocates and copies to set the Extent to updateExtent.
virtual int GetDataDimension()
Return the dimensionality of the data.
vtkIdType FindCell(double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
This is a version of the above method that can be used with multithreaded applications.
virtual vtkIdType * GetIncrements(vtkDataArray *scalars)
virtual void * GetScalarPointer(int coordinates[3])
void CopyInformationToPipeline(vtkInformation *information) override
Copy information from this data object to the pipeline information.
vtkCell * FindAndGetCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Locate the cell that contains a point and return the cell.
virtual void CopyAndCastFrom(vtkImageData *inData, int x0, int x1, int y0, int y1, int z0, int z1)
virtual vtkIdType * GetIncrements()
Different ways to get the increments for moving around the data.
virtual void CopyAndCastFrom(vtkImageData *inData, int extent[6])
This method is passed a input and output region, and executes the filter algorithm to fill the output...
virtual float GetScalarComponentAsFloat(int x, int y, int z, int component)
For access to data from tcl.
static vtkImageData * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
virtual double GetScalarTypeMin()
virtual void GetIncrements(vtkDataArray *scalars, vtkIdType inc[3])
void ComputeBounds() override
Compute the data bounding box from data points.
double * GetPoint(vtkIdType ptId) override
Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints.
virtual void * GetScalarPointer()
static vtkImageData * New()
virtual double GetScalarTypeMin(vtkInformation *meta_data)
These returns the minimum and maximum values the ScalarType can hold without overflowing.
virtual int GetScalarSize(vtkInformation *meta_data)
Get the size of the scalar type in bytes.
virtual void SetExtent(int extent[6])
Set/Get the extent.
static int GetNumberOfScalarComponents(vtkInformation *meta_data)
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Topological inquiry to get points defining cell.
virtual void GetIncrements(vtkDataArray *scalars, vtkIdType &incX, vtkIdType &incY, vtkIdType &incZ)
virtual double GetScalarTypeMax(vtkInformation *meta_data)
int GetNumberOfScalarComponents()
vtkIdType GetNumberOfPoints() override
Determine the number of points composing the dataset.
vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Locate cell based on global coordinate x and tolerance squared.
virtual void GetAxisUpdateExtent(int axis, int &min, int &max, const int *updateExtent)
virtual void GetIncrements(vtkIdType inc[3])
virtual void AllocateScalars(int dataType, int numComponents)
Allocate the point scalars for this dataset.
virtual void SetScalarComponentFromFloat(int x, int y, int z, int component, float v)
static void SetNumberOfScalarComponents(int n, vtkInformation *meta_data)
Set/Get the number of scalar components for points.
int GetCellType(vtkIdType cellId) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkIdType GetNumberOfCells() override
Standard vtkDataSet API methods.
virtual void GetContinuousIncrements(int extent[6], vtkIdType &incX, vtkIdType &incY, vtkIdType &incZ)
Different ways to get the increments for moving around the data.
virtual int GetScalarSize()
int GetDataObjectType() override
Return what type of dataset this is.
void CopyInformationFromPipeline(vtkInformation *information) override
Override these to handle origin, spacing, scalar type, and scalar number of components.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual double GetScalarComponentAsDouble(int x, int y, int z, int component)
virtual void GetContinuousIncrements(vtkDataArray *scalars, int extent[6], vtkIdType &incX, vtkIdType &incY, vtkIdType &incZ)
vtkIdType FindPoint(double x[3]) override
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
virtual void AllocateScalars(vtkInformation *pipeline_info)
Allocate the point scalars for this dataset.
void Initialize() override
Restore data object to initial state.
static vtkImageData * GetData(vtkInformationVector *v, int i=0)
virtual void SetScalarComponentFromDouble(int x, int y, int z, int component, double v)
virtual void GetIncrements(vtkIdType &incX, vtkIdType &incY, vtkIdType &incZ)
virtual void * GetScalarPointer(int x, int y, int z)
virtual double GetScalarTypeMax()
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Topological inquiry to get cells using point.
virtual void SetAxisUpdateExtent(int axis, int min, int max, const int *updateExtent, int *axisUpdateExtent)
Set / Get the extent on just one axis.
static bool HasNumberOfScalarComponents(vtkInformation *meta_data)
void PrepareForNewData() override
make the output data ready for new data to be inserted.
virtual void * GetScalarPointerForExtent(int extent[6])
Access the native pointer for the scalar data.
virtual void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2)
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input image data object.
virtual vtkIdType ComputeCellId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the cell id.
a simple class to control print indentation
cell represents a 1D line
a cell that represents an orthogonal quadrilateral
static vtkIdType ComputeCellIdForExtent(int extent[6], int ijk[3], int dataDescription=VTK_EMPTY)
Given a location in structured coordinates (i-j-k), and the extent of the structured dataset,...
static void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds, int dataDescription, int dim[3])
Get the points defining a cell.
static int GetDataDimension(int dataDescription)
Return the topological dimension of the data (e.g., 0, 1, 2, or 3D).
static vtkIdType ComputePointIdForExtent(int extent[6], int ijk[3], int dataDescription=VTK_EMPTY)
Given a location in structured coordinates (i-j-k), and the extent of the structured dataset,...
static void GetPointCells(vtkIdType ptId, vtkIdList *cellIds, int dim[3])
Get the cells using a point.
record modification and/or execution time
a cell that represents a 3D point
a cell that represents a 3D orthogonal parallelepiped
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)