25 #ifndef vtkImageData_h
26 #define vtkImageData_h
28 #include "vtkCommonDataModelModule.h"
33 VTK_ABI_NAMESPACE_BEGIN
84 double pcoords[3],
double* weights)
override;
86 double tol2,
int& subId,
double pcoords[3],
double* weights)
override;
88 double pcoords[3],
double* weights)
override;
95 this->GetDimensions(dimensions);
101 this->GetDimensions(dimensions);
128 unsigned char IsPointVisible(
vtkIdType ptId);
135 unsigned char IsCellVisible(
vtkIdType cellId);
154 void GetCellDims(
int cellDims[3]);
159 virtual void SetDimensions(
int i,
int j,
int k);
164 virtual void SetDimensions(
const int dims[3]);
180 virtual
void GetDimensions(
int dims[3]);
181 #if VTK_ID_TYPE_IMPL != VTK_INT
182 virtual void GetDimensions(
vtkIdType dims[3]);
191 virtual int ComputeStructuredCoordinates(
const double x[3],
int ijk[3],
double pcoords[3]);
210 virtual void GetPointGradient(
int i,
int j,
int k,
vtkDataArray* s,
double g[3]);
215 virtual int GetDataDimension();
237 virtual void SetAxisUpdateExtent(
238 int axis,
int min,
int max,
const int* updateExtent,
int* axisUpdateExtent);
239 virtual void GetAxisUpdateExtent(
int axis,
int& min,
int&
max,
const int* updateExtent);
254 virtual void SetExtent(
int extent[6]);
255 virtual void SetExtent(
int x1,
int x2,
int y1,
int y2,
int z1,
int z2);
256 vtkGetVector6Macro(Extent,
int);
265 virtual double GetScalarTypeMin();
267 virtual double GetScalarTypeMax();
275 virtual int GetScalarSize();
292 virtual
void GetIncrements(
vtkIdType inc[3]);
294 virtual
void GetIncrements(
313 virtual
void GetContinuousIncrements(
315 virtual
void GetContinuousIncrements(
323 virtual
void* GetScalarPointerForExtent(
int extent[6]);
324 virtual
void* GetScalarPointer(
int coordinates[3]);
325 virtual
void* GetScalarPointer(
int x,
int y,
int z);
326 virtual
void* GetScalarPointer();
333 virtual
vtkIdType GetScalarIndexForExtent(
int extent[6]);
334 virtual
vtkIdType GetScalarIndex(
int coordinates[3]);
335 virtual
vtkIdType GetScalarIndex(
int x,
int y,
int z);
342 virtual
float GetScalarComponentAsFloat(
int x,
int y,
int z,
int component);
343 virtual
void SetScalarComponentFromFloat(
int x,
int y,
int z,
int component,
float v);
344 virtual
double GetScalarComponentAsDouble(
int x,
int y,
int z,
int component);
345 virtual
void SetScalarComponentFromDouble(
int x,
int y,
int z,
int component,
double v);
353 virtual
void AllocateScalars(
int dataType,
int numComponents);
370 virtual
void CopyAndCastFrom(
vtkImageData* inData,
int extent[6]);
371 virtual
void CopyAndCastFrom(
vtkImageData* inData,
int x0,
int x1,
int y0,
int y1,
int z0,
int z1)
380 this->CopyAndCastFrom(inData, e);
389 void Crop(
const int* updateExtent)
override;
406 vtkGetVector3Macro(Spacing,
double);
407 virtual void SetSpacing(
double i,
double j,
double k);
408 virtual void SetSpacing(
const double ijk[3]);
420 vtkGetVector3Macro(Origin,
double);
421 virtual void SetOrigin(
double i,
double j,
double k);
422 virtual void SetOrigin(
const double ijk[3]);
432 virtual void SetDirectionMatrix(
const double elements[9]);
433 virtual void SetDirectionMatrix(
double e00,
double e01,
double e02,
double e10,
double e11,
434 double e12,
double e20,
double e21,
double e22);
449 virtual void TransformContinuousIndexToPhysicalPoint(
double i,
double j,
double k,
double xyz[3]);
450 virtual void TransformContinuousIndexToPhysicalPoint(
const double ijk[3],
double xyz[3]);
451 virtual void TransformIndexToPhysicalPoint(
int i,
int j,
int k,
double xyz[3]);
452 virtual void TransformIndexToPhysicalPoint(
const int ijk[3],
double xyz[3]);
453 static void TransformContinuousIndexToPhysicalPoint(
double i,
double j,
double k,
454 double const origin[3],
double const spacing[3],
double const direction[9],
double xyz[3]);
469 virtual void TransformPhysicalPointToContinuousIndex(
double x,
double y,
double z,
double ijk[3]);
470 virtual void TransformPhysicalPointToContinuousIndex(
const double xyz[3],
double ijk[3]);
473 static void ComputeIndexToPhysicalMatrix(
474 double const origin[3],
double const spacing[3],
double const direction[9],
double result[16]);
480 virtual void TransformPhysicalNormalToContinuousIndex(
const double xyz[3],
double ijk[3]);
487 virtual void TransformPhysicalPlaneToContinuousIndex(
double const pplane[4],
double iplane[4]);
500 static void SetNumberOfScalarComponents(
int n,
vtkInformation* meta_data);
501 static int GetNumberOfScalarComponents(
vtkInformation* meta_data);
502 static bool HasNumberOfScalarComponents(
vtkInformation* meta_data);
503 int GetNumberOfScalarComponents();
546 void* GetArrayPointer(
vtkDataArray* array,
int coordinates[3]);
572 void ComputeInternalExtent(
int* intExt,
int* tgtExt,
int* bnds);
607 void ComputeIncrements();
610 void ComputeIncrements(
int numberOfComponents);
614 void ComputeIncrements(
vtkIdType inc[3]);
617 void ComputeIncrements(
int numberOfComponents,
vtkIdType inc[3]);
621 void ComputeTransforms();
624 vtkCell* GetCellTemplateForDataDescription();
626 bool GetIJKMinForCellId(
vtkIdType cellId,
int ijkMin[3]);
627 bool GetIJKMaxForIJKMin(
int ijkMin[3],
int ijkMax[3]);
628 void AddPointsToCellTemplate(
vtkCell* cell,
int ijkMin[3],
int ijkMax[3]);
632 void SetDataDescription(
int desc);
685 dims[0] = extent[1] - extent[0] + 1;
686 dims[1] = extent[3] - extent[2] + 1;
687 dims[2] = extent[5] - extent[4] + 1;
689 return dims[0] * dims[1] * dims[2];
698 VTK_ABI_NAMESPACE_END
int GetExtentType() override
The extent type is a 3D extent.
vtkMatrix3x3 * DirectionMatrix
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.
represent and manipulate 4x4 transformation matrices
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
virtual vtkIdType GetCellSize(vtkIdType cellId)
Get the size of cell with cellId such that: 0 <= cellId < NumberOfCells.
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
vtkMatrix4x4 * PhysicalToIndexMatrix
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.
vtkMatrix4x4 * IndexToPhysicalMatrix
virtual vtkIdType ComputeCellId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the cell id.
virtual bool HasAnyBlankCells()
Returns 1 if there are any blanking cells 0 otherwise.
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
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 void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds, int dataDescription, int dim[3])
Get the points defining a cell.
virtual bool HasAnyBlankPoints()
Returns 1 if there are any blanking points 0 otherwise.
topologically and geometrically regular array of data
list of point or cell ids
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
Topological inquiry to get points defining cell.
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.
virtual void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds)
Topological inquiry to get all cells using list of points exclusive of cell specified (e...
#define VTK_SIZEHINT(...)
void Initialize() override
Restore data object to initial state.
const char * GetScalarTypeAsString()
static vtkIdType ComputeCellIdForExtent(const int extent[6], const int ijk[3], int dataDescription=VTK_EMPTY)
Given a location in structured coordinates (i-j-k), and the extent of the structured dataset...
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Standard vtkDataSet API methods.
static vtkIdType ComputePointIdForExtent(const int extent[6], const 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, VTK_FUTURE_CONST int dim[3])
Get the cells using a point.
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.
represent and manipulate 3x3 transformation matrices
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