25 #ifndef vtkImageData_h
26 #define vtkImageData_h
28 #include "vtkCommonDataModelModule.h"
82 double pcoords[3],
double* weights)
override;
84 double tol2,
int& subId,
double pcoords[3],
double* weights)
override;
86 double pcoords[3],
double* weights)
override;
129 virtual
void GetDimensions(
int dims[3]);
130 #if VTK_ID_TYPE_IMPL != VTK_INT
131 virtual void GetDimensions(
vtkIdType dims[3]);
164 virtual int GetDataDimension();
187 int axis,
int min,
int max,
const int* updateExtent,
int* axisUpdateExtent);
204 virtual void SetExtent(
int x1,
int x2,
int y1,
int y2,
int z1,
int z2);
205 vtkGetVector6Macro(Extent,
int);
238 virtual
void GetIncrements(
257 virtual
void GetContinuousIncrements(
259 virtual
void GetContinuousIncrements(
267 virtual
void* GetScalarPointerForExtent(
int extent[6]);
268 virtual
void* GetScalarPointer(
int coordinates[3]);
269 virtual
void* GetScalarPointer(
int x,
int y,
int z);
270 virtual
void* GetScalarPointer();
277 virtual
float GetScalarComponentAsFloat(
int x,
int y,
int z,
int component);
278 virtual
void SetScalarComponentFromFloat(
int x,
int y,
int z,
int component,
float v);
279 virtual
double GetScalarComponentAsDouble(
int x,
int y,
int z,
int component);
280 virtual
void SetScalarComponentFromDouble(
int x,
int y,
int z,
int component,
double v);
288 virtual
void AllocateScalars(
int dataType,
int numComponents);
306 virtual
void CopyAndCastFrom(
vtkImageData* inData,
int x0,
int x1,
int y0,
int y1,
int z0,
int z1)
315 this->CopyAndCastFrom(inData, e);
324 void Crop(
const int* updateExtent)
override;
341 vtkGetVector3Macro(Spacing,
double);
355 vtkGetVector3Macro(Origin,
double);
369 double e12,
double e20,
double e21,
double e22);
389 double const origin[3],
double const spacing[3],
double const direction[9],
double xyz[3]);
409 double const origin[3],
double const spacing[3],
double const direction[9],
double result[16]);
530 void ComputeIncrements();
533 void ComputeIncrements(
int numberOfComponents);
613 return dims[0] * dims[1] * dims[2];
abstract class to specify cell behavior
abstract superclass for arrays of numeric data
general representation of visualization data
abstract class to specify dataset behavior
virtual vtkIdType GetNumberOfPoints()=0
Determine the number of points composing the dataset.
vtkIdType FindPoint(double x, double y, double z)
Locate the closest point to the global coordinate x.
virtual double * GetPoint(vtkIdType ptId)=0
Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints.
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 void TransformPhysicalPointToContinuousIndex(const double xyz[3], double ijk[3])
bool GetCellTemplateForDataDescription(vtkGenericCell *cell)
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.
void GetArrayIncrements(vtkDataArray *array, vtkIdType increments[3])
Since various arrays have different number of components, the will have different increments.
virtual void TransformContinuousIndexToPhysicalPoint(const double ijk[3], double xyz[3])
void CopyInformationToPipeline(vtkInformation *information) override
Copy information from this data object to the pipeline information.
vtkCell * GetCellTemplateForDataDescription()
bool GetIJKMaxForIJKMin(int ijkMin[3], int ijkMax[3])
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 vtkIdType * GetIncrements()
Different ways to get the increments for moving around the data.
virtual vtkIdType ComputePointId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the point id.
virtual void SetDirectionMatrix(vtkMatrix3x3 *m)
vtkMatrix4x4 * IndexToPhysicalMatrix
static vtkImageData * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
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...
virtual void SetDimensions(int i, int j, int k)
Same as SetExtent(0, i-1, 0, j-1, 0, k-1)
virtual double GetScalarTypeMin()
virtual void SetDirectionMatrix(const double elements[9])
virtual void TransformIndexToPhysicalPoint(const int ijk[3], double xyz[3])
static int GetScalarType(vtkInformation *meta_data)
vtkCell * GetCell(vtkIdType cellId) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
void AddPointsToCellTemplate(vtkCell *cell, int ijkMin[3], int ijkMax[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.
static vtkImageData * New()
bool GetIJKMinForCellId(vtkIdType cellId, int ijkMin[3])
virtual double GetScalarTypeMin(vtkInformation *meta_data)
These returns the minimum and maximum values the ScalarType can hold without overflowing.
void GetCellBounds(vtkIdType cellId, double bounds[6]) override
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual void TransformPhysicalNormalToContinuousIndex(const double xyz[3], double ijk[3])
Convert normal from physical space (xyz) to index space (ijk)
void SetDataDescription(int desc)
void GetPoint(vtkIdType id, double x[3]) override
Copy point coordinates into user provided array x[3] for specified point id.
vtkTimeStamp ExtentComputeTime
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.
virtual int * GetDimensions()
Get dimensions of this structured points dataset.
static int GetNumberOfScalarComponents(vtkInformation *meta_data)
virtual void TransformPhysicalPlaneToContinuousIndex(double const pplane[4], double iplane[4])
Convert a plane form physical to continuous index.
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Topological inquiry to get points defining cell.
virtual void GetVoxelGradient(int i, int j, int k, vtkDataArray *s, vtkDataArray *g)
Given structured coordinates (i,j,k) for a voxel cell, compute the eight gradient values for the voxe...
virtual double GetScalarTypeMax(vtkInformation *meta_data)
void ComputeIncrements(int numberOfComponents, vtkIdType inc[3])
const char * GetScalarTypeAsString()
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.
vtkCell * GetCell(int i, int j, int k) override
void ComputeIncrements(vtkDataArray *scalars, vtkIdType inc[3])
virtual void GetAxisUpdateExtent(int axis, int &min, int &max, const int *updateExtent)
int GetExtentType() override
The extent type is a 3D extent.
virtual int ComputeStructuredCoordinates(const double x[3], int ijk[3], double pcoords[3])
Convenience function computes the structured coordinates for a point x[3].
virtual void SetSpacing(double i, double j, double k)
static void SetNumberOfScalarComponents(int n, vtkInformation *meta_data)
Set/Get the number of scalar components for points.
virtual void SetDirectionMatrix(double e00, double e01, double e02, double e10, double e11, double e12, double e20, double e21, double e22)
int GetCellType(vtkIdType cellId) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual void SetSpacing(const double ijk[3])
static void SetScalarType(int, vtkInformation *meta_data)
vtkIdType GetNumberOfCells() override
Standard vtkDataSet API methods.
virtual void SetOrigin(const double ijk[3])
void DeepCopy(vtkDataObject *src) override
virtual int GetScalarSize()
virtual void TransformPhysicalPointToContinuousIndex(double x, double y, double z, double ijk[3])
Convert coordinates from physical space (xyz) to index space (ijk)
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.
static void TransformContinuousIndexToPhysicalPoint(double i, double j, double k, double const origin[3], double const spacing[3], double const direction[9], double xyz[3])
void ComputeIncrements(vtkIdType inc[3])
vtkMatrix3x3 * DirectionMatrix
vtkIdType FindPoint(double x[3]) override
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
void GetCell(vtkIdType cellId, vtkGenericCell *cell) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
void Initialize() override
Restore data object to initial state.
static vtkImageData * GetData(vtkInformationVector *v, int i=0)
static void ComputeIndexToPhysicalMatrix(double const origin[3], double const spacing[3], double const direction[9], double result[16])
virtual void TransformContinuousIndexToPhysicalPoint(double i, double j, double k, double xyz[3])
Convert coordinates from index space (ijk) to physical space (xyz)
virtual void SetOrigin(double i, double j, double k)
virtual double GetScalarTypeMax()
virtual void TransformIndexToPhysicalPoint(int i, int j, int k, double xyz[3])
int GetMaxCellSize() override
Convenience method returns largest cell size in dataset.
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Topological inquiry to get cells using point.
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
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)
static bool HasScalarType(vtkInformation *meta_data)
void * GetArrayPointerForExtent(vtkDataArray *array, int extent[6])
These are convenience methods for getting a pointer from any filed array.
virtual void GetPointGradient(int i, int j, int k, vtkDataArray *s, double g[3])
Given structured coordinates (i,j,k) for a point in a structured point dataset, compute the gradient ...
void PrepareForNewData() override
make the output data ready for new data to be inserted.
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 void SetDimensions(const int dims[3])
Same as SetExtent(0, dims[0]-1, 0, dims[1]-1, 0, dims[2]-1)
virtual vtkIdType FindPoint(double x, double y, double z)
vtkMatrix4x4 * PhysicalToIndexMatrix
virtual vtkIdType ComputeCellId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the cell id.
void * GetArrayPointer(vtkDataArray *array, int coordinates[3])
a simple class to control print indentation
cell represents a 1D line
represent and manipulate 3x3 transformation matrices
represent and manipulate 4x4 transformation matrices
a cell that represents an orthogonal quadrilateral
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 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 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,...
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
#define VTK_SIZEHINT(...)