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());}
109 virtual void SetDimensions(
int i,
int j,
int k);
114 virtual void SetDimensions(
const int dims[3]);
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();
188 virtual void SetAxisUpdateExtent(
int axis,
int min,
int max,
189 const int* updateExtent,
190 int* axisUpdateExtent);
191 virtual void GetAxisUpdateExtent(
int axis,
int &min,
int &max,
const int* updateExtent);
206 virtual void SetExtent(
int extent[6]);
207 virtual void SetExtent(
int x1,
int x2,
int y1,
int y2,
int z1,
int z2);
208 vtkGetVector6Macro(Extent,
int);
217 virtual double GetScalarTypeMin();
219 virtual double GetScalarTypeMax();
227 virtual int GetScalarSize();
239 virtual void GetIncrements(
vtkIdType inc[3]);
260 virtual void GetContinuousIncrements(
262 virtual void GetContinuousIncrements(
vtkDataArray *scalars,
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);
310 virtual void CopyAndCastFrom(
vtkImageData *inData,
int extent[6]);
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() ); };
368 static void SetNumberOfScalarComponents(
int n,
vtkInformation* meta_data);
369 static int GetNumberOfScalarComponents(
vtkInformation* meta_data);
370 static bool HasNumberOfScalarComponents(
vtkInformation* meta_data);
371 int GetNumberOfScalarComponents();
413 void *GetArrayPointerForExtent(
vtkDataArray* array,
int extent[6]);
414 void *GetArrayPointer(
vtkDataArray* array,
int coordinates[3]);
429 void ComputeInternalExtent(
int *intExt,
int *tgtExt,
int *bnds);
460 void ComputeIncrements();
463 void ComputeIncrements(
int numberOfComponents);
467 void ComputeIncrements(
vtkIdType inc[3]);
470 void ComputeIncrements(
int numberOfComponents,
vtkIdType inc[3]);
476 void SetDataDescription(
int desc);
531 dims[0] = extent[1] - extent[0] + 1;
532 dims[1] = extent[3] - extent[2] + 1;
533 dims[2] = extent[5] - extent[4] + 1;
535 return dims[0]*dims[1]*dims[2];
int GetExtentType() override
The extent type is a 3D extent.
virtual vtkCell * FindAndGetCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
Locate the cell that contains a point and return the cell.
virtual vtkIdType GetNumberOfCells()=0
Determine the number of cells composing the dataset.
int GetDataObjectType() override
Return what type of dataset this is.
static vtkDataObject * New()
virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)=0
Locate cell based on global coordinate x and tolerance squared.
virtual vtkIdType GetNumberOfPoints()=0
Determine the number of points composing the dataset.
abstract class to specify dataset behavior
a cell that represents a 3D point
record modification and/or execution time
static int GetDataDimension(int dataDescription)
Return the topological dimension of the data (e.g., 0, 1, 2, or 3D).
a cell that represents an orthogonal quadrilateral
virtual void ComputeBounds()
Compute the data bounding box from data points.
virtual void PrepareForNewData()
make the output data ready for new data to be inserted.
int GetMaxCellSize() override
Standard vtkDataSet API methods.
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Standard vtkDataSet API methods.
virtual vtkIdType FindPoint(double x, double y, double z)
Standard vtkDataSet API methods.
virtual vtkIdType ComputeCellId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the cell id.
static vtkDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
provides thread-safe access to cells
vtkIdType GetNumberOfPoints() override
Standard vtkDataSet API methods.
virtual vtkIdType ComputePointId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the point id.
virtual void Crop(const int *updateExtent)
This method crops the data object (if necessary) so that the extent matches the update extent...
double * GetPoint(vtkIdType ptId) override
Standard vtkDataSet API methods.
cell represents a 1D line
abstract class to specify cell behavior
virtual void CopyAndCastFrom(vtkImageData *inData, int x0, int x1, int y0, int y1, int z0, int z1)
This method is passed a input and output region, and executes the filter algorithm to fill the output...
a cell that represents a 3D orthogonal parallelepiped
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
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...
static void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds, int dataDescription, int dim[3])
Get the points defining a cell.
topologically and geometrically regular array of data
list of point or cell ids
abstract superclass for arrays of numeric data
virtual void CopyInformationFromPipeline(vtkInformation *vtkNotUsed(info))
Copy from the pipeline information to the data object's own information.
void DeepCopy(vtkDataObject *src) override
Shallow and Deep copy.
#define VTK_SIZEHINT(...)
static void GetPointCells(vtkIdType ptId, vtkIdList *cellIds, int dim[3])
Get the cells using a point.
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 Initialize() override
Restore data object to initial state.
const char * GetScalarTypeAsString()
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Standard vtkDataSet API methods.
virtual void CopyStructure(vtkDataSet *ds)=0
Copy the geometric and topological structure of an object.
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
virtual double * GetPoint(vtkIdType ptId)=0
Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints.
general representation of visualization data
virtual void CopyInformationToPipeline(vtkInformation *vtkNotUsed(info))
Copy information from this data object to the pipeline information.
vtkIdType FindPoint(double x, double y, double z)
Locate the closest point to the global coordinate x.
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual void GetCellBounds(vtkIdType cellId, double bounds[6])
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual int GetDataDimension()
Return the dimensionality of the data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int GetCellType(vtkIdType cellId)=0
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkTimeStamp ExtentComputeTime