25 #ifndef vtkImageData_h
26 #define vtkImageData_h
29 #include "vtkCommonDataModelModule.h"
34 VTK_ABI_NAMESPACE_BEGIN
85 double tol2,
int& subId,
double pcoords[3],
double* weights)
override;
99 const double x[3],
int ijk[3],
double pcoords[3],
double tol2);
131 virtual void GetPointGradient(
int i,
int j,
int k,
vtkDataArray* s,
double g[3]);
137 virtual void SetAxisUpdateExtent(
138 int axis,
int min,
int max,
const int updateExtent[6],
int axisUpdateExtent[6]);
139 virtual void GetAxisUpdateExtent(
int axis,
int& min,
int&
max,
const int updateExtent[6]);
148 virtual double GetScalarTypeMin();
150 virtual double GetScalarTypeMax();
158 virtual int GetScalarSize();
175 virtual
void GetIncrements(
vtkIdType inc[3]);
177 virtual
void GetIncrements(
196 virtual
void GetContinuousIncrements(
198 virtual
void GetContinuousIncrements(
vtkDataArray* scalars, VTK_FUTURE_CONST
int extent[6],
206 virtual
void* GetScalarPointerForExtent(VTK_FUTURE_CONST
int extent[6]);
207 virtual
void* GetScalarPointer(
int coordinates[3]);
208 virtual
void* GetScalarPointer(
int x,
int y,
int z);
209 virtual
void* GetScalarPointer();
216 virtual
vtkIdType GetScalarIndexForExtent(
int extent[6]);
217 virtual
vtkIdType GetScalarIndex(
int coordinates[3]);
218 virtual
vtkIdType GetScalarIndex(
int x,
int y,
int z);
225 virtual
float GetScalarComponentAsFloat(
int x,
int y,
int z,
int component);
226 virtual
void SetScalarComponentFromFloat(
int x,
int y,
int z,
int component,
float v);
227 virtual
double GetScalarComponentAsDouble(
int x,
int y,
int z,
int component);
228 virtual
void SetScalarComponentFromDouble(
int x,
int y,
int z,
int component,
double v);
236 virtual
void AllocateScalars(
int dataType,
int numComponents);
253 virtual
void CopyAndCastFrom(
vtkImageData* inData, VTK_FUTURE_CONST
int extent[6]);
254 virtual
void CopyAndCastFrom(
vtkImageData* inData,
int x0,
int x1,
int y0,
int y1,
int z0,
int z1)
263 this->CopyAndCastFrom(inData, e);
272 void Crop(
const int updateExtent[6])
override;
289 vtkGetVector3Macro(Spacing,
double);
290 virtual void SetSpacing(
double i,
double j,
double k);
291 virtual void SetSpacing(
const double ijk[3]);
303 vtkGetVector3Macro(Origin,
double);
304 virtual void SetOrigin(
double i,
double j,
double k);
305 virtual void SetOrigin(
const double ijk[3]);
315 virtual void SetDirectionMatrix(
const double elements[9]);
316 virtual void SetDirectionMatrix(
double e00,
double e01,
double e02,
double e10,
double e11,
317 double e12,
double e20,
double e21,
double e22);
345 virtual void TransformContinuousIndexToPhysicalPoint(
double i,
double j,
double k,
double xyz[3]);
346 virtual void TransformContinuousIndexToPhysicalPoint(
const double ijk[3],
double xyz[3]);
347 virtual void TransformIndexToPhysicalPoint(
int i,
int j,
int k,
double xyz[3]);
348 virtual void TransformIndexToPhysicalPoint(
const int ijk[3],
double xyz[3]);
349 static void TransformContinuousIndexToPhysicalPoint(
double i,
double j,
double k,
350 double const origin[3],
double const spacing[3],
double const direction[9],
double xyz[3]);
378 virtual void TransformPhysicalPointToContinuousIndex(
double x,
double y,
double z,
double ijk[3]);
379 virtual void TransformPhysicalPointToContinuousIndex(
const double xyz[3],
double ijk[3]);
386 virtual void TransformPhysicalNormalToContinuousIndex(
const double xyz[3],
double ijk[3]);
393 virtual void TransformPhysicalPlaneToContinuousIndex(
double const pplane[4],
double iplane[4]);
399 static void ComputeIndexToPhysicalMatrix(
400 double const origin[3],
double const spacing[3],
double const direction[9],
double result[16]);
406 static void ComputePhysicalToIndexMatrix(
407 double const origin[3],
double const spacing[3],
double const direction[9],
double result[16]);
442 void* GetArrayPointer(
vtkDataArray* array, VTK_FUTURE_CONST
int coordinates[3]);
443 void* GetArrayPointer(
vtkDataArray* array,
int x,
int y,
int z);
458 void ComputeInternalExtent(
int* intExt,
int* tgtExt,
int* bnds);
482 void ComputeIncrements();
485 void ComputeIncrements(
int numberOfComponents);
489 void ComputeIncrements(
vtkIdType inc[3]);
492 void ComputeIncrements(
int numberOfComponents,
vtkIdType inc[3]);
496 void ComputeTransforms();
510 bool DirectionMatrixIsIdentity;
546 VTK_ABI_NAMESPACE_END
vtkIdType ComputePointId(int ijk[3]) override
Given a location in structured coordinates (i-j-k), return the point id.
vtkMatrix3x3 * DirectionMatrix
int GetDataObjectType() VTK_FUTURE_CONST override
Return what type of dataset this is.
represent and manipulate 4x4 transformation matrices
static vtkDataObject * New()
static vtkIdType ComputeCellIdForExtent(const int extent[6], const int ijk[3], int dataDescription=vtkStructuredData::VTK_STRUCTURED_EMPTY)
Given a location in structured coordinates (i-j-k), and the extent of the structured dataset...
virtual void ComputeScalarRange()
Compute the range of the scalars and cache it into ScalarRange only if the cache became invalid (Scal...
abstract class to specify dataset behavior
a cell that represents a 3D point
a cell that represents an orthogonal quadrilateral
implicit object to represent cell connectivity
vtkMatrix4x4 * PhysicalToIndexMatrix
virtual void CopyInformationFromPipeline(vtkInformation *info)
Copy from the pipeline information to the data object's own information.
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.
static vtkCartesianGrid * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkMatrix4x4 * IndexToPhysicalMatrix
provides thread-safe access to cells
void CopyStructure(vtkDataSet *ds) override
Standard vtkObject 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
topologically and geometrically regular array of data
abstract superclass for arrays of numeric data
vtkIdType ComputeCellId(int ijk[3]) override
Given a location in structured coordinates (i-j-k), return the cell id.
virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
Locate cell based on global coordinate x and tolerance squared.
#define VTK_SIZEHINT(...)
virtual int * GetExtent()
Set/Get the extent.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkCell * GetCell(vtkIdType cellId) override
Standard vtkDataSet API methods.
void DeepCopy(vtkDataObject *src) override
Standard vtkObject API methods.
vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Standard vtkDataSet API methods.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard vtkObject API methods.
virtual void CopyInformationToPipeline(vtkInformation *info)
Copy information from this data object to the pipeline information.
static vtkIdType ComputePointIdForExtent(const int extent[6], const int ijk[3], int dataDescription=vtkStructuredData::VTK_STRUCTURED_EMPTY)
Given a location in structured coordinates (i-j-k), and the extent of the structured dataset...
Abstract API for vtkImageData and vtkRectilinearGrid.
virtual void Crop(const int updateExtent[6])
This method crops the data object (if necessary) so that the extent matches the update extent...
virtual vtkIdType ComputePointId(int ijk[3])=0
Given a location in structured coordinates (i-j-k), return the point id.
represent and manipulate 3x3 transformation matrices
virtual vtkIdType ComputeCellId(int ijk[3])=0
Given a location in structured coordinates (i-j-k), return the cell id.
general representation of visualization data
virtual void BuildPoints()=0
Pure abstract method responsible to build and set internal points.
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.
represent and manipulate 3D points
virtual int ComputeStructuredCoordinates(const double x[3], int ijk[3], double pcoords[3])=0
Computes the structured coordinates for a point x[3].
virtual void GetCellBounds(vtkIdType cellId, double bounds[6])
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
void ShallowCopy(vtkDataObject *src) override
Standard vtkObject API methods.