VTK  9.2.20221001
vtkImageData.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageData.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
146 #ifndef vtkImageData_h
147 #define vtkImageData_h
148 
149 #include "vtkCommonDataModelModule.h" // For export macro
150 #include "vtkDataSet.h"
151 
152 #include "vtkStructuredData.h" // Needed for inline methods
153 
154 VTK_ABI_NAMESPACE_BEGIN
155 class vtkDataArray;
156 class vtkLine;
157 class vtkMatrix3x3;
158 class vtkMatrix4x4;
159 class vtkPixel;
160 class vtkVertex;
161 class vtkVoxel;
162 
163 class VTKCOMMONDATAMODEL_EXPORT vtkImageData : public vtkDataSet
164 {
165 public:
166  static vtkImageData* New();
168 
169  vtkTypeMacro(vtkImageData, vtkDataSet);
170  void PrintSelf(ostream& os, vtkIndent indent) override;
171 
176  void CopyStructure(vtkDataSet* ds) override;
177 
181  int GetDataObjectType() override { return VTK_IMAGE_DATA; }
182 
184 
192  vtkIdType GetNumberOfPoints() override;
193  double* GetPoint(vtkIdType ptId) VTK_SIZEHINT(3) override;
194  void GetPoint(vtkIdType id, double x[3]) override;
195  vtkCell* GetCell(vtkIdType cellId) override;
196  vtkCell* GetCell(int i, int j, int k) override;
197  void GetCell(vtkIdType cellId, vtkGenericCell* cell) override;
198  void GetCellBounds(vtkIdType cellId, double bounds[6]) override;
199  virtual vtkIdType FindPoint(double x, double y, double z)
200  {
201  return this->vtkDataSet::FindPoint(x, y, z);
202  }
203  vtkIdType FindPoint(double x[3]) override;
204  vtkIdType FindCell(double x[3], vtkCell* cell, vtkIdType cellId, double tol2, int& subId,
205  double pcoords[3], double* weights) override;
206  vtkIdType FindCell(double x[3], vtkCell* cell, vtkGenericCell* gencell, vtkIdType cellId,
207  double tol2, int& subId, double pcoords[3], double* weights) override;
208  vtkCell* FindAndGetCell(double x[3], vtkCell* cell, vtkIdType cellId, double tol2, int& subId,
209  double pcoords[3], double* weights) override;
210  int GetCellType(vtkIdType cellId) override;
211  vtkIdType GetCellSize(vtkIdType cellId) override;
213  void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override
214  {
215  int dimensions[3];
216  this->GetDimensions(dimensions);
217  vtkStructuredData::GetCellPoints(cellId, ptIds, this->DataDescription, dimensions);
218  }
219  void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override
220  {
221  int dimensions[3];
222  this->GetDimensions(dimensions);
223  vtkStructuredData::GetPointCells(ptId, cellIds, dimensions);
224  }
225  void ComputeBounds() override;
226  int GetMaxCellSize() override { return 8; } // voxel is the largest
227  void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds) override;
229 
237  void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds, int* seedLoc);
238 
242  void Initialize() override;
243 
249  unsigned char IsPointVisible(vtkIdType ptId);
250 
256  unsigned char IsCellVisible(vtkIdType cellId);
257 
262  bool HasAnyBlankPoints() override;
267  bool HasAnyBlankCells() override;
268 
275  void GetCellDims(int cellDims[3]);
276 
280  virtual void SetDimensions(int i, int j, int k);
281 
285  virtual void SetDimensions(const int dims[3]);
286 
293  virtual int* GetDimensions() VTK_SIZEHINT(3);
294 
301  virtual void GetDimensions(int dims[3]);
302 #if VTK_ID_TYPE_IMPL != VTK_INT
303  virtual void GetDimensions(vtkIdType dims[3]);
304 #endif
305 
312  virtual int ComputeStructuredCoordinates(const double x[3], int ijk[3], double pcoords[3]);
313 
323  virtual void GetVoxelGradient(int i, int j, int k, vtkDataArray* s, vtkDataArray* g);
324 
331  virtual void GetPointGradient(int i, int j, int k, vtkDataArray* s, double g[3]);
332 
336  virtual int GetDataDimension();
337 
341  virtual vtkIdType ComputePointId(int ijk[3])
342  {
343  return vtkStructuredData::ComputePointIdForExtent(this->Extent, ijk);
344  }
345 
349  virtual vtkIdType ComputeCellId(int ijk[3])
350  {
351  return vtkStructuredData::ComputeCellIdForExtent(this->Extent, ijk);
352  }
353 
355 
358  virtual void SetAxisUpdateExtent(
359  int axis, int min, int max, const int* updateExtent, int* axisUpdateExtent);
360  virtual void GetAxisUpdateExtent(int axis, int& min, int& max, const int* updateExtent);
362 
364 
375  virtual void SetExtent(int extent[6]);
376  virtual void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2);
377  vtkGetVector6Macro(Extent, int);
379 
381 
385  virtual double GetScalarTypeMin(vtkInformation* meta_data);
386  virtual double GetScalarTypeMin();
387  virtual double GetScalarTypeMax(vtkInformation* meta_data);
388  virtual double GetScalarTypeMax();
390 
392 
395  virtual int GetScalarSize(vtkInformation* meta_data);
396  virtual int GetScalarSize();
398 
400 
412  virtual void GetIncrements(vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
413  virtual void GetIncrements(vtkIdType inc[3]);
414  virtual vtkIdType* GetIncrements(vtkDataArray* scalars) VTK_SIZEHINT(3);
415  virtual void GetIncrements(
416  vtkDataArray* scalars, vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
417  virtual void GetIncrements(vtkDataArray* scalars, vtkIdType inc[3]);
419 
421 
434  virtual void GetContinuousIncrements(
435  int extent[6], vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
436  virtual void GetContinuousIncrements(
437  vtkDataArray* scalars, int extent[6], vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
439 
441 
444  virtual void* GetScalarPointerForExtent(int extent[6]);
445  virtual void* GetScalarPointer(int coordinates[3]);
446  virtual void* GetScalarPointer(int x, int y, int z);
447  virtual void* GetScalarPointer();
449 
451 
454  virtual vtkIdType GetScalarIndexForExtent(int extent[6]);
455  virtual vtkIdType GetScalarIndex(int coordinates[3]);
456  virtual vtkIdType GetScalarIndex(int x, int y, int z);
458 
460 
463  virtual float GetScalarComponentAsFloat(int x, int y, int z, int component);
464  virtual void SetScalarComponentFromFloat(int x, int y, int z, int component, float v);
465  virtual double GetScalarComponentAsDouble(int x, int y, int z, int component);
466  virtual void SetScalarComponentFromDouble(int x, int y, int z, int component, double v);
468 
474  virtual void AllocateScalars(int dataType, int numComponents);
475 
482  virtual void AllocateScalars(vtkInformation* pipeline_info);
483 
485 
491  virtual void CopyAndCastFrom(vtkImageData* inData, int extent[6]);
492  virtual void CopyAndCastFrom(vtkImageData* inData, int x0, int x1, int y0, int y1, int z0, int z1)
493  {
494  int e[6];
495  e[0] = x0;
496  e[1] = x1;
497  e[2] = y0;
498  e[3] = y1;
499  e[4] = z0;
500  e[5] = z1;
501  this->CopyAndCastFrom(inData, e);
502  }
504 
510  void Crop(const int* updateExtent) override;
511 
520  unsigned long GetActualMemorySize() override;
521 
523 
527  vtkGetVector3Macro(Spacing, double);
528  virtual void SetSpacing(double i, double j, double k);
529  virtual void SetSpacing(const double ijk[3]);
531 
533 
541  vtkGetVector3Macro(Origin, double);
542  virtual void SetOrigin(double i, double j, double k);
543  virtual void SetOrigin(const double ijk[3]);
545 
547 
551  vtkGetObjectMacro(DirectionMatrix, vtkMatrix3x3);
553  virtual void SetDirectionMatrix(const double elements[9]);
554  virtual void SetDirectionMatrix(double e00, double e01, double e02, double e10, double e11,
555  double e12, double e20, double e21, double e22);
557 
559 
563  vtkGetObjectMacro(IndexToPhysicalMatrix, vtkMatrix4x4);
565 
567 
570  virtual void TransformContinuousIndexToPhysicalPoint(double i, double j, double k, double xyz[3]);
571  virtual void TransformContinuousIndexToPhysicalPoint(const double ijk[3], double xyz[3]);
572  virtual void TransformIndexToPhysicalPoint(int i, int j, int k, double xyz[3]);
573  virtual void TransformIndexToPhysicalPoint(const int ijk[3], double xyz[3]);
574  static void TransformContinuousIndexToPhysicalPoint(double i, double j, double k,
575  double const origin[3], double const spacing[3], double const direction[9], double xyz[3]);
577 
579 
583  vtkGetObjectMacro(PhysicalToIndexMatrix, vtkMatrix4x4);
585 
587 
590  virtual void TransformPhysicalPointToContinuousIndex(double x, double y, double z, double ijk[3]);
591  virtual void TransformPhysicalPointToContinuousIndex(const double xyz[3], double ijk[3]);
593 
595  double const origin[3], double const spacing[3], double const direction[9], double result[16]);
596 
598 
601  virtual void TransformPhysicalNormalToContinuousIndex(const double xyz[3], double ijk[3]);
603 
608  virtual void TransformPhysicalPlaneToContinuousIndex(double const pplane[4], double iplane[4]);
609 
610  static void SetScalarType(int, vtkInformation* meta_data);
611  static int GetScalarType(vtkInformation* meta_data);
612  static bool HasScalarType(vtkInformation* meta_data);
614  const char* GetScalarTypeAsString() { return vtkImageScalarTypeNameMacro(this->GetScalarType()); }
615 
617 
621  static void SetNumberOfScalarComponents(int n, vtkInformation* meta_data);
626 
631  void CopyInformationFromPipeline(vtkInformation* information) override;
632 
638  void CopyInformationToPipeline(vtkInformation* information) override;
639 
645  void PrepareForNewData() override;
646 
648 
651  void ShallowCopy(vtkDataObject* src) override;
652  void DeepCopy(vtkDataObject* src) override;
654 
655  //--------------------------------------------------------------------------
656  // Methods that apply to any array (not just scalars).
657  // I am starting to experiment with generalizing imaging filters
658  // to operate on more than just scalars.
659 
661 
667  void* GetArrayPointer(vtkDataArray* array, int coordinates[3]);
669 
671 
678  vtkIdType GetTupleIndex(vtkDataArray* array, int coordinates[3]);
680 
685  void GetArrayIncrements(vtkDataArray* array, vtkIdType increments[3]);
686 
693  void ComputeInternalExtent(int* intExt, int* tgtExt, int* bnds);
694 
698  int GetExtentType() override { return VTK_3D_EXTENT; }
699 
701 
705  static vtkImageData* GetData(vtkInformationVector* v, int i = 0);
707 
708 protected:
710  ~vtkImageData() override;
711 
712  // The extent of what is currently in the structured grid.
713  // Dimensions is just an array to return a value.
714  // Its contents are out of data until GetDimensions is called.
715  int Dimensions[3];
716  vtkIdType Increments[3];
717 
718  // Variables used to define dataset physical orientation
719  double Origin[3];
720  double Spacing[3];
724 
725  int Extent[6];
726 
727  // The first method assumes Active Scalars
728  void ComputeIncrements();
729  // This one is given the number of components of the
730  // scalar field explicitly
731  void ComputeIncrements(int numberOfComponents);
732  void ComputeIncrements(vtkDataArray* scalars);
733 
734  // The first method assumes Acitive Scalars
736  // This one is given the number of components of the
737  // scalar field explicitly
738  void ComputeIncrements(int numberOfComponents, vtkIdType inc[3]);
739  void ComputeIncrements(vtkDataArray* scalars, vtkIdType inc[3]);
740 
741  // for the index to physical methods
743 
744  // Cell utilities
747  bool GetIJKMinForCellId(vtkIdType cellId, int ijkMin[3]);
748  bool GetIJKMaxForIJKMin(int ijkMin[3], int ijkMax[3]);
749  void AddPointsToCellTemplate(vtkCell* cell, int ijkMin[3], int ijkMax[3]);
750 
752 
753  void SetDataDescription(int desc);
754  int GetDataDescription() { return this->DataDescription; }
755 
756 private:
757  void InternalImageDataCopy(vtkImageData* src);
758 
759 private:
760  friend class vtkUniformGrid;
761 
762  // for the GetCell method
763  vtkVertex* Vertex;
764  vtkLine* Line;
765  vtkPixel* Pixel;
766  vtkVoxel* Voxel;
767 
768  // for the GetPoint method
769  double Point[3];
770 
771  int DataDescription;
772 
773  vtkImageData(const vtkImageData&) = delete;
774  void operator=(const vtkImageData&) = delete;
775 };
776 
777 //----------------------------------------------------------------------------
779 {
780  this->ComputeIncrements(this->Increments);
781 }
782 
783 //----------------------------------------------------------------------------
784 inline void vtkImageData::ComputeIncrements(int numberOfComponents)
785 {
786  this->ComputeIncrements(numberOfComponents, this->Increments);
787 }
788 
789 //----------------------------------------------------------------------------
791 {
792  this->ComputeIncrements(scalars, this->Increments);
793 }
794 
795 //----------------------------------------------------------------------------
797 {
798  this->GetPoint(id, this->Point);
799  return this->Point;
800 }
801 
802 //----------------------------------------------------------------------------
804 {
805  const int* extent = this->Extent;
806  vtkIdType dims[3];
807  dims[0] = extent[1] - extent[0] + 1;
808  dims[1] = extent[3] - extent[2] + 1;
809  dims[2] = extent[5] - extent[4] + 1;
810 
811  return dims[0] * dims[1] * dims[2];
812 }
813 
814 //----------------------------------------------------------------------------
816 {
817  return vtkStructuredData::GetDataDimension(this->DataDescription);
818 }
819 
820 VTK_ABI_NAMESPACE_END
821 #endif
abstract class to specify cell behavior
Definition: vtkCell.h:151
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:166
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:174
virtual vtkIdType GetNumberOfPoints()=0
Determine the number of points composing the dataset.
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
Topological inquiry to get points defining cell.
vtkIdType FindPoint(double x, double y, double z)
Locate the closest point to the global coordinate x.
Definition: vtkDataSet.h:343
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
Definition: vtkIdList.h:144
topologically and geometrically regular array of data
Definition: vtkImageData.h:164
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])
Convert coordinates from physical space (xyz) to index space (ijk).
bool GetCellTemplateForDataDescription(vtkGenericCell *cell)
virtual int GetDataDimension()
Return the dimensionality of the data.
Definition: vtkImageData.h:815
vtkIdType FindCell(double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Standard vtkDataSet API methods.
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])
Convert coordinates from index space (ijk) to physical space (xyz).
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])
vtkIdType GetCellSize(vtkIdType cellId) override
Standard vtkDataSet API methods.
vtkCell * FindAndGetCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Standard vtkDataSet API methods.
virtual vtkIdType * GetIncrements()
Different ways to get the increments for moving around the data.
bool HasAnyBlankCells() override
Returns 1 if there is any visibility constraint on the cells, 0 otherwise.
virtual vtkIdType ComputePointId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the point id.
Definition: vtkImageData.h:341
void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds) override
Standard vtkDataSet API methods.
virtual void SetDirectionMatrix(vtkMatrix3x3 *m)
Set/Get the direction transform of the dataset.
vtkMatrix4x4 * IndexToPhysicalMatrix
Definition: vtkImageData.h:722
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 boundary 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()
These returns the minimum and maximum values the ScalarType can hold without overflowing.
virtual void SetDirectionMatrix(const double elements[9])
Set/Get the direction transform of the dataset.
void ComputeIncrements()
Definition: vtkImageData.h:778
virtual void TransformIndexToPhysicalPoint(const int ijk[3], double xyz[3])
Convert coordinates from index space (ijk) to physical space (xyz).
static int GetScalarType(vtkInformation *meta_data)
void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds, int *seedLoc)
Get cell neighbors around cell located at seedloc, except cell of id cellId.
vtkCell * GetCell(vtkIdType cellId) override
Standard vtkDataSet API methods.
void AddPointsToCellTemplate(vtkCell *cell, int ijkMin[3], int ijkMax[3])
void ComputeBounds() override
Standard vtkDataSet API methods.
double * GetPoint(vtkIdType ptId) override
Standard vtkDataSet API methods.
Definition: vtkImageData.h:796
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.
static vtkImageData * ExtendedNew()
void GetCellBounds(vtkIdType cellId, double bounds[6]) override
Standard vtkDataSet API methods.
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
Standard vtkDataSet API methods.
void GetCellDims(int cellDims[3])
Given the node dimensions of this grid instance, this method computes the node dimensions.
vtkTimeStamp ExtentComputeTime
Definition: vtkImageData.h:751
int GetDataDescription()
Definition: vtkImageData.h:754
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)
Set/Get the number of scalar components for points.
virtual void TransformPhysicalPlaneToContinuousIndex(double const pplane[4], double iplane[4])
Convert a plane from physical to a continuous index.
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Standard vtkDataSet API methods.
Definition: vtkImageData.h:213
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)
These returns the minimum and maximum values the ScalarType can hold without overflowing.
vtkIdType GetTupleIndex(vtkDataArray *array, int coordinates[3])
Given a data array and a coordinate, return the index of the tuple in the array corresponding to that...
void ComputeIncrements(int numberOfComponents, vtkIdType inc[3])
const char * GetScalarTypeAsString()
Definition: vtkImageData.h:614
int GetNumberOfScalarComponents()
Set/Get the number of scalar components for points.
vtkIdType GetNumberOfPoints() override
Standard vtkDataSet API methods.
Definition: vtkImageData.h:803
vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Standard vtkDataSet API methods.
vtkCell * GetCell(int i, int j, int k) override
Standard vtkDataSet API methods.
void ComputeIncrements(vtkDataArray *scalars, vtkIdType inc[3])
virtual void GetAxisUpdateExtent(int axis, int &min, int &max, const int *updateExtent)
Set / Get the extent on just one axis.
int GetExtentType() override
The extent type is a 3D extent.
Definition: vtkImageData.h:698
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)
Set the spacing (width,height,length) of the cubical cells that compose the data set.
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)
Set/Get the direction transform of the dataset.
vtkIdType Increments[3]
Definition: vtkImageData.h:716
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet API methods.
virtual void SetSpacing(const double ijk[3])
Set the spacing (width,height,length) of the cubical cells that compose the data set.
static void SetScalarType(int, vtkInformation *meta_data)
vtkIdType GetNumberOfCells() override
Standard vtkDataSet API methods.
virtual void SetOrigin(const double ijk[3])
Set/Get the origin of the dataset.
void DeepCopy(vtkDataObject *src) override
Shallow and Deep copy.
virtual int GetScalarSize()
Get the size of the scalar type in bytes.
int GetScalarType()
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.
Definition: vtkImageData.h:181
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])
Convert coordinates from index space (ijk) to physical space (xyz).
void ComputeIncrements(vtkIdType inc[3])
void ComputeTransforms()
vtkMatrix3x3 * DirectionMatrix
Definition: vtkImageData.h:721
vtkIdType FindPoint(double x[3]) override
Standard vtkDataSet API methods.
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
void GetCell(vtkIdType cellId, vtkGenericCell *cell) override
Standard vtkDataSet API methods.
void Initialize() override
Restore data object to initial state.
static vtkImageData * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
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)
Set/Get the origin of the dataset.
virtual double GetScalarTypeMax()
These returns the minimum and maximum values the ScalarType can hold without overflowing.
virtual void TransformIndexToPhysicalPoint(int i, int j, int k, double xyz[3])
Convert coordinates from index space (ijk) to physical space (xyz).
int GetMaxCellSize() override
Standard vtkDataSet API methods.
Definition: vtkImageData.h:226
unsigned char IsPointVisible(vtkIdType ptId)
Return non-zero value if specified point is visible.
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Standard vtkDataSet API methods.
Definition: vtkImageData.h:219
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)
Set/Get the number of scalar components for points.
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 ...
~vtkImageData() override
unsigned char IsCellVisible(vtkIdType cellId)
Return non-zero value if specified point is visible.
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)
Set/Get the extent.
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input image data object.
bool HasAnyBlankPoints() override
Returns 1 if there is any visibility constraint on the points, 0 otherwise.
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)
Standard vtkDataSet API methods.
Definition: vtkImageData.h:199
vtkMatrix4x4 * PhysicalToIndexMatrix
Definition: vtkImageData.h:723
virtual vtkIdType ComputeCellId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the cell id.
Definition: vtkImageData.h:349
void * GetArrayPointer(vtkDataArray *array, int coordinates[3])
These are convenience methods for getting a pointer from any filed array.
a simple class to control print indentation
Definition: vtkIndent.h:120
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
cell represents a 1D line
Definition: vtkLine.h:144
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:67
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:152
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:78
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, VTK_FUTURE_CONST int dim[3])
Get the cells using a point.
record modification and/or execution time
Definition: vtkTimeStamp.h:56
image data with blanking
a cell that represents a 3D point
Definition: vtkVertex.h:104
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:92
@ component
Definition: vtkX3D.h:187
@ info
Definition: vtkX3D.h:388
@ direction
Definition: vtkX3D.h:272
@ extent
Definition: vtkX3D.h:357
@ spacing
Definition: vtkX3D.h:493
#define VTK_3D_EXTENT
int vtkIdType
Definition: vtkType.h:326
#define VTK_IMAGE_DATA
Definition: vtkType.h:83
#define VTK_SIZEHINT(...)
#define max(a, b)