Go to the documentation of this file.
31 #ifndef vtkImageData_h
32 #define vtkImageData_h
34 #include "vtkCommonDataModelModule.h"
83 int& subId,
double pcoords[3],
double *weights)
override;
86 vtkIdType cellId,
double tol2,
int& subId,
87 double pcoords[3],
double *weights)
override;
89 double tol2,
int& subId,
double pcoords[3],
90 double *weights)
override;
94 this->GetDimensions());}
130 virtual
void GetDimensions(
int dims[3]);
138 virtual
int ComputeStructuredCoordinates(
139 const
double x[3],
int ijk[3],
double pcoords[3]);
141 static
int ComputeStructuredCoordinates( const
double x[3],
int ijk[3],
double pcoords[3],
144 const
double* origin,
145 const
double* bounds);
155 virtual
void GetVoxelGradient(
164 virtual
void GetPointGradient(
170 virtual
int GetDataDimension();
189 const int* updateExtent,
190 int* axisUpdateExtent);
207 virtual void SetExtent(
int x1,
int x2,
int y1,
int y2,
int z1,
int z2);
208 vtkGetVector6Macro(Extent,
int);
260 virtual
void GetContinuousIncrements(
270 virtual
void *GetScalarPointerForExtent(
int extent[6]);
271 virtual
void *GetScalarPointer(
int coordinates[3]);
272 virtual
void *GetScalarPointer(
int x,
int y,
int z);
273 virtual
void *GetScalarPointer();
280 virtual
float GetScalarComponentAsFloat(
int x,
int y,
int z,
int component);
281 virtual
void SetScalarComponentFromFloat(
282 int x,
int y,
int z,
int component,
float v);
283 virtual
double GetScalarComponentAsDouble(
int x,
int y,
int z,
int component);
284 virtual
void SetScalarComponentFromDouble(
285 int x,
int y,
int z,
int component,
double v);
293 virtual
void AllocateScalars(
int dataType,
int numComponents);
312 int y0,
int y1,
int z0,
int z1)
313 {
int e[6]; e[0]=x0; e[1]=x1; e[2]=y0; e[3]=y1; e[4]=z0; e[5]=z1;
314 this->CopyAndCastFrom(inData, e);}
322 void Crop(
const int* updateExtent)
override;
339 vtkSetVector3Macro(Spacing,
double);
340 vtkGetVector3Macro(Spacing,
double);
352 vtkSetVector3Macro(Origin,
double);
353 vtkGetVector3Macro(Origin,
double);
361 {
return vtkImageScalarTypeNameMacro ( this->GetScalarType() ); };
460 void ComputeIncrements();
463 void ComputeIncrements(
int numberOfComponents);
535 return dims[0]*dims[1]*dims[2];
virtual vtkIdType GetNumberOfPoints()=0
Determine the number of points composing the dataset.
static int GetDataDimension(int dataDescription)
Return the topological dimension of the data (e.g., 0, 1, 2, or 3D).
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Topological inquiry to get points defining cell.
static bool HasNumberOfScalarComponents(vtkInformation *meta_data)
int GetMaxCellSize() override
Convenience method returns largest cell size in dataset.
virtual void SetDimensions(int i, int j, int k)
Same as SetExtent(0, i-1, 0, j-1, 0, k-1)
static int GetNumberOfScalarComponents(vtkInformation *meta_data)
void ComputeBounds() override
Compute the data bounding box from data points.
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
vtkTimeStamp ExtentComputeTime
void ComputeInternalExtent(int *intExt, int *tgtExt, int *bnds)
Given how many pixel are required on a side for bounrary conditions (in bnds), the target extent to t...
record modification and/or execution time
virtual int GetScalarSize()
void PrepareForNewData() override
make the output data ready for new data to be inserted.
int GetExtentType() override
The extent type is a 3D extent.
int GetCellType(vtkIdType cellId) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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.
abstract superclass for arrays of numeric data
virtual void SetExtent(int extent[6])
Set/Get the extent.
static vtkImageData * GetData(vtkInformationVector *v, int i=0)
void CopyInformationFromPipeline(vtkInformation *information) override
Override these to handle origin, spacing, scalar type, and scalar number of components.
virtual void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2)
vtkCell * GetCell(vtkIdType cellId) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
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.
a cell that represents a 3D point
void GetCellBounds(vtkIdType cellId, double bounds[6]) override
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual int * GetDimensions()
Get dimensions of this structured points dataset.
cell represents a 1D line
virtual void SetAxisUpdateExtent(int axis, int min, int max, const int *updateExtent, int *axisUpdateExtent)
Set / Get the extent on just one axis.
static void SetScalarType(int, vtkInformation *meta_data)
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.
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
int GetNumberOfScalarComponents()
void SetDataDescription(int desc)
#define VTK_SIZEHINT(...)
static void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds, int dataDescription, int dim[3])
Get the points defining a cell.
virtual int GetScalarSize(vtkInformation *meta_data)
Get the size of the scalar type in bytes.
virtual vtkIdType ComputeCellId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the cell id.
vtkIdType FindPoint(double x, double y, double z)
Locate the closest point to the global coordinate x.
virtual vtkIdType FindPoint(double x, double y, double z)
abstract class to specify cell behavior
void ComputeIncrements(vtkDataArray *scalars, vtkIdType inc[3])
static void GetPointCells(vtkIdType ptId, vtkIdList *cellIds, int dim[3])
Get the cells using a point.
void ComputeIncrements(vtkIdType inc[3])
topologically and geometrically regular array of data
a simple class to control print indentation
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,...
double * GetPoint(vtkIdType ptId) override
Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints.
virtual vtkIdType * GetIncrements()
Different ways to get the increments for moving around the data.
list of point or cell ids
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Topological inquiry to get cells using point.
vtkIdType GetNumberOfPoints() override
Determine the number of points composing the dataset.
virtual void SetDimensions(const int dims[3])
Same as SetExtent(0, dims[0]-1, 0, dims[1]-1, 0, dims[2]-1)
static void SetNumberOfScalarComponents(int n, vtkInformation *meta_data)
Set/Get the number of scalar components for points.
static int GetScalarType(vtkInformation *meta_data)
void Initialize() override
Restore data object to initial state.
void * GetArrayPointerForExtent(vtkDataArray *array, int extent[6])
These are convenience methods for getting a pointer from any filed array.
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input image data object.
abstract class to specify dataset behavior
void DeepCopy(vtkDataObject *src) override
vtkIdType FindPoint(double x[3]) override
virtual double * GetPoint(vtkIdType ptId)=0
Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints.
vtkCell * GetCell(int i, int j, int k) override
void GetCell(vtkIdType cellId, vtkGenericCell *cell) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
void ComputeIncrements(int numberOfComponents, vtkIdType inc[3])
void CopyOriginAndSpacingFromPipeline(vtkInformation *info)
a cell that represents an orthogonal quadrilateral
void CopyInformationToPipeline(vtkInformation *information) override
Copy information from this data object to the pipeline information.
virtual int GetDataDimension()
Return the dimensionality of the data.
provides thread-safe access to cells
void * GetArrayPointer(vtkDataArray *array, int coordinates[3])
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,...
void GetPoint(vtkIdType id, double x[3]) override
Copy point coordinates into user provided array x[3] for specified point id.
int GetDataObjectType() override
Return what type of dataset this is.
static vtkImageData * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
virtual double GetScalarTypeMax(vtkInformation *meta_data)
void GetArrayIncrements(vtkDataArray *array, vtkIdType increments[3])
Since various arrays have different number of components, the will have different increments.
general representation of visualization data
vtkIdType GetNumberOfCells() override
Standard vtkDataSet API methods.
static vtkImageData * New()
const char * GetScalarTypeAsString()
virtual double GetScalarTypeMin()
virtual double GetScalarTypeMax()
virtual double GetScalarTypeMin(vtkInformation *meta_data)
These returns the minimum and maximum values the ScalarType can hold without overflowing.
virtual void GetAxisUpdateExtent(int axis, int &min, int &max, const int *updateExtent)
void Crop(const int *updateExtent) override
Reallocates and copies to set the Extent to updateExtent.
static bool HasScalarType(vtkInformation *meta_data)
a cell that represents a 3D orthogonal parallelepiped