VTK  9.0.20210805
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 =========================================================================*/
31 #ifndef vtkImageData_h
32 #define vtkImageData_h
33 
34 #include "vtkCommonDataModelModule.h" // For export macro
35 #include "vtkDataSet.h"
36 
37 #include "vtkStructuredData.h" // Needed for inline methods
38 
39 class vtkDataArray;
40 class vtkLine;
41 class vtkMatrix3x3;
42 class vtkMatrix4x4;
43 class vtkPixel;
44 class vtkVertex;
45 class vtkVoxel;
46 
47 class VTKCOMMONDATAMODEL_EXPORT vtkImageData : public vtkDataSet
48 {
49 public:
50  static vtkImageData* New();
52 
53  vtkTypeMacro(vtkImageData, vtkDataSet);
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
60  void CopyStructure(vtkDataSet* ds) override;
61 
65  int GetDataObjectType() override { return VTK_IMAGE_DATA; }
66 
68 
76  vtkIdType GetNumberOfPoints() override;
77  double* GetPoint(vtkIdType ptId) VTK_SIZEHINT(3) override;
78  void GetPoint(vtkIdType id, double x[3]) override;
79  vtkCell* GetCell(vtkIdType cellId) override;
80  vtkCell* GetCell(int i, int j, int k) override;
81  void GetCell(vtkIdType cellId, vtkGenericCell* cell) override;
82  void GetCellBounds(vtkIdType cellId, double bounds[6]) override;
83  virtual vtkIdType FindPoint(double x, double y, double z)
84  {
85  return this->vtkDataSet::FindPoint(x, y, z);
86  }
87  vtkIdType FindPoint(double x[3]) override;
88  vtkIdType FindCell(double x[3], vtkCell* cell, vtkIdType cellId, double tol2, int& subId,
89  double pcoords[3], double* weights) override;
90  vtkIdType FindCell(double x[3], vtkCell* cell, vtkGenericCell* gencell, vtkIdType cellId,
91  double tol2, int& subId, double pcoords[3], double* weights) override;
92  vtkCell* FindAndGetCell(double x[3], vtkCell* cell, vtkIdType cellId, double tol2, int& subId,
93  double pcoords[3], double* weights) override;
94  int GetCellType(vtkIdType cellId) override;
95  void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override
96  {
97  int dimensions[3];
98  this->GetDimensions(dimensions);
99  vtkStructuredData::GetCellPoints(cellId, ptIds, this->DataDescription, dimensions);
100  }
101  void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override
102  {
103  int dimensions[3];
104  this->GetDimensions(dimensions);
105  vtkStructuredData::GetPointCells(ptId, cellIds, dimensions);
106  }
107  void ComputeBounds() override;
108  int GetMaxCellSize() override { return 8; } // voxel is the largest
109  void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds) override;
111 
119  void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds, int* seedLoc);
120 
124  void Initialize() override;
125 
131  unsigned char IsPointVisible(vtkIdType ptId);
132 
138  unsigned char IsCellVisible(vtkIdType cellId);
139 
144  bool HasAnyBlankPoints() override;
149  bool HasAnyBlankCells() override;
150 
157  void GetCellDims(int cellDims[3]);
158 
162  virtual void SetDimensions(int i, int j, int k);
163 
167  virtual void SetDimensions(const int dims[3]);
168 
175  virtual int* GetDimensions() VTK_SIZEHINT(3);
176 
183  virtual void GetDimensions(int dims[3]);
184 #if VTK_ID_TYPE_IMPL != VTK_INT
185  virtual void GetDimensions(vtkIdType dims[3]);
186 #endif
187 
194  virtual int ComputeStructuredCoordinates(const double x[3], int ijk[3], double pcoords[3]);
195 
205  virtual void GetVoxelGradient(int i, int j, int k, vtkDataArray* s, vtkDataArray* g);
206 
213  virtual void GetPointGradient(int i, int j, int k, vtkDataArray* s, double g[3]);
214 
218  virtual int GetDataDimension();
219 
223  virtual vtkIdType ComputePointId(int ijk[3])
224  {
225  return vtkStructuredData::ComputePointIdForExtent(this->Extent, ijk);
226  }
227 
231  virtual vtkIdType ComputeCellId(int ijk[3])
232  {
233  return vtkStructuredData::ComputeCellIdForExtent(this->Extent, ijk);
234  }
235 
237 
240  virtual void SetAxisUpdateExtent(
241  int axis, int min, int max, const int* updateExtent, int* axisUpdateExtent);
242  virtual void GetAxisUpdateExtent(int axis, int& min, int& max, const int* updateExtent);
244 
246 
257  virtual void SetExtent(int extent[6]);
258  virtual void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2);
259  vtkGetVector6Macro(Extent, int);
261 
263 
267  virtual double GetScalarTypeMin(vtkInformation* meta_data);
268  virtual double GetScalarTypeMin();
269  virtual double GetScalarTypeMax(vtkInformation* meta_data);
270  virtual double GetScalarTypeMax();
272 
274 
277  virtual int GetScalarSize(vtkInformation* meta_data);
278  virtual int GetScalarSize();
280 
282 
289  virtual void GetIncrements(vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
290  virtual void GetIncrements(vtkIdType inc[3]);
291  virtual vtkIdType* GetIncrements(vtkDataArray* scalars) VTK_SIZEHINT(3);
292  virtual void GetIncrements(
293  vtkDataArray* scalars, vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
294  virtual void GetIncrements(vtkDataArray* scalars, vtkIdType inc[3]);
296 
298 
311  virtual void GetContinuousIncrements(
312  int extent[6], vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
313  virtual void GetContinuousIncrements(
314  vtkDataArray* scalars, int extent[6], vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
316 
318 
321  virtual void* GetScalarPointerForExtent(int extent[6]);
322  virtual void* GetScalarPointer(int coordinates[3]);
323  virtual void* GetScalarPointer(int x, int y, int z);
324  virtual void* GetScalarPointer();
326 
328 
331  virtual vtkIdType GetScalarIndexForExtent(int extent[6]);
332  virtual vtkIdType GetScalarIndex(int coordinates[3]);
333  virtual vtkIdType GetScalarIndex(int x, int y, int z);
335 
337 
340  virtual float GetScalarComponentAsFloat(int x, int y, int z, int component);
341  virtual void SetScalarComponentFromFloat(int x, int y, int z, int component, float v);
342  virtual double GetScalarComponentAsDouble(int x, int y, int z, int component);
343  virtual void SetScalarComponentFromDouble(int x, int y, int z, int component, double v);
345 
351  virtual void AllocateScalars(int dataType, int numComponents);
352 
359  virtual void AllocateScalars(vtkInformation* pipeline_info);
360 
362 
368  virtual void CopyAndCastFrom(vtkImageData* inData, int extent[6]);
369  virtual void CopyAndCastFrom(vtkImageData* inData, int x0, int x1, int y0, int y1, int z0, int z1)
370  {
371  int e[6];
372  e[0] = x0;
373  e[1] = x1;
374  e[2] = y0;
375  e[3] = y1;
376  e[4] = z0;
377  e[5] = z1;
378  this->CopyAndCastFrom(inData, e);
379  }
381 
387  void Crop(const int* updateExtent) override;
388 
397  unsigned long GetActualMemorySize() override;
398 
400 
404  vtkGetVector3Macro(Spacing, double);
405  virtual void SetSpacing(double i, double j, double k);
406  virtual void SetSpacing(const double ijk[3]);
408 
410 
418  vtkGetVector3Macro(Origin, double);
419  virtual void SetOrigin(double i, double j, double k);
420  virtual void SetOrigin(const double ijk[3]);
422 
424 
428  vtkGetObjectMacro(DirectionMatrix, vtkMatrix3x3);
430  virtual void SetDirectionMatrix(const double elements[9]);
431  virtual void SetDirectionMatrix(double e00, double e01, double e02, double e10, double e11,
432  double e12, double e20, double e21, double e22);
434 
436 
440  vtkGetObjectMacro(IndexToPhysicalMatrix, vtkMatrix4x4);
442 
444 
447  virtual void TransformContinuousIndexToPhysicalPoint(double i, double j, double k, double xyz[3]);
448  virtual void TransformContinuousIndexToPhysicalPoint(const double ijk[3], double xyz[3]);
449  virtual void TransformIndexToPhysicalPoint(int i, int j, int k, double xyz[3]);
450  virtual void TransformIndexToPhysicalPoint(const int ijk[3], double xyz[3]);
451  static void TransformContinuousIndexToPhysicalPoint(double i, double j, double k,
452  double const origin[3], double const spacing[3], double const direction[9], double xyz[3]);
454 
456 
460  vtkGetObjectMacro(PhysicalToIndexMatrix, vtkMatrix4x4);
462 
464 
467  virtual void TransformPhysicalPointToContinuousIndex(double x, double y, double z, double ijk[3]);
468  virtual void TransformPhysicalPointToContinuousIndex(const double xyz[3], double ijk[3]);
470 
472  double const origin[3], double const spacing[3], double const direction[9], double result[16]);
473 
475 
478  virtual void TransformPhysicalNormalToContinuousIndex(const double xyz[3], double ijk[3]);
480 
485  virtual void TransformPhysicalPlaneToContinuousIndex(double const pplane[4], double iplane[4]);
486 
487  static void SetScalarType(int, vtkInformation* meta_data);
488  static int GetScalarType(vtkInformation* meta_data);
489  static bool HasScalarType(vtkInformation* meta_data);
491  const char* GetScalarTypeAsString() { return vtkImageScalarTypeNameMacro(this->GetScalarType()); }
492 
494 
498  static void SetNumberOfScalarComponents(int n, vtkInformation* meta_data);
503 
508  void CopyInformationFromPipeline(vtkInformation* information) override;
509 
515  void CopyInformationToPipeline(vtkInformation* information) override;
516 
522  void PrepareForNewData() override;
523 
525 
528  void ShallowCopy(vtkDataObject* src) override;
529  void DeepCopy(vtkDataObject* src) override;
531 
532  //--------------------------------------------------------------------------
533  // Methods that apply to any array (not just scalars).
534  // I am starting to experiment with generalizing imaging filters
535  // to operate on more than just scalars.
536 
538 
544  void* GetArrayPointer(vtkDataArray* array, int coordinates[3]);
546 
548 
555  vtkIdType GetTupleIndex(vtkDataArray* array, int coordinates[3]);
557 
562  void GetArrayIncrements(vtkDataArray* array, vtkIdType increments[3]);
563 
570  void ComputeInternalExtent(int* intExt, int* tgtExt, int* bnds);
571 
575  int GetExtentType() override { return VTK_3D_EXTENT; }
576 
578 
582  static vtkImageData* GetData(vtkInformationVector* v, int i = 0);
584 
585 protected:
587  ~vtkImageData() override;
588 
589  // The extent of what is currently in the structured grid.
590  // Dimensions is just an array to return a value.
591  // Its contents are out of data until GetDimensions is called.
592  int Dimensions[3];
593  vtkIdType Increments[3];
594 
595  // Variables used to define dataset physical orientation
596  double Origin[3];
597  double Spacing[3];
601 
602  int Extent[6];
603 
604  // The first method assumes Active Scalars
605  void ComputeIncrements();
606  // This one is given the number of components of the
607  // scalar field explicitly
608  void ComputeIncrements(int numberOfComponents);
609  void ComputeIncrements(vtkDataArray* scalars);
610 
611  // The first method assumes Acitive Scalars
613  // This one is given the number of components of the
614  // scalar field explicitly
615  void ComputeIncrements(int numberOfComponents, vtkIdType inc[3]);
616  void ComputeIncrements(vtkDataArray* scalars, vtkIdType inc[3]);
617 
618  // for the index to physical methods
620 
621  // Cell utilities
624  bool GetIJKMinForCellId(vtkIdType cellId, int ijkMin[3]);
625  bool GetIJKMaxForIJKMin(int ijkMin[3], int ijkMax[3]);
626  void AddPointsToCellTemplate(vtkCell* cell, int ijkMin[3], int ijkMax[3]);
627 
629 
630  void SetDataDescription(int desc);
631  int GetDataDescription() { return this->DataDescription; }
632 
633 private:
634  void InternalImageDataCopy(vtkImageData* src);
635 
636 private:
637  friend class vtkUniformGrid;
638 
639  // for the GetCell method
640  vtkVertex* Vertex;
641  vtkLine* Line;
642  vtkPixel* Pixel;
643  vtkVoxel* Voxel;
644 
645  // for the GetPoint method
646  double Point[3];
647 
648  int DataDescription;
649 
650  vtkImageData(const vtkImageData&) = delete;
651  void operator=(const vtkImageData&) = delete;
652 };
653 
654 //----------------------------------------------------------------------------
656 {
657  this->ComputeIncrements(this->Increments);
658 }
659 
660 //----------------------------------------------------------------------------
661 inline void vtkImageData::ComputeIncrements(int numberOfComponents)
662 {
663  this->ComputeIncrements(numberOfComponents, this->Increments);
664 }
665 
666 //----------------------------------------------------------------------------
668 {
669  this->ComputeIncrements(scalars, this->Increments);
670 }
671 
672 //----------------------------------------------------------------------------
674 {
675  this->GetPoint(id, this->Point);
676  return this->Point;
677 }
678 
679 //----------------------------------------------------------------------------
681 {
682  const int* extent = this->Extent;
683  vtkIdType dims[3];
684  dims[0] = extent[1] - extent[0] + 1;
685  dims[1] = extent[3] - extent[2] + 1;
686  dims[2] = extent[5] - extent[4] + 1;
687 
688  return dims[0] * dims[1] * dims[2];
689 }
690 
691 //----------------------------------------------------------------------------
693 {
694  return vtkStructuredData::GetDataDimension(this->DataDescription);
695 }
696 
697 #endif
vtkImageData::GetIJKMaxForIJKMin
bool GetIJKMaxForIJKMin(int ijkMin[3], int ijkMax[3])
vtkImageData::GetPointGradient
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::GetCellTemplateForDataDescription
vtkCell * GetCellTemplateForDataDescription()
vtkImageData::TransformIndexToPhysicalPoint
virtual void TransformIndexToPhysicalPoint(int i, int j, int k, double xyz[3])
Convert coordinates from index space (ijk) to physical space (xyz).
vtkImageData::HasAnyBlankCells
bool HasAnyBlankCells() override
Returns 1 if there is any visibility constraint on the cells, 0 otherwise.
vtkImageData::GetCellTemplateForDataDescription
bool GetCellTemplateForDataDescription(vtkGenericCell *cell)
vtkDataSet::GetNumberOfPoints
virtual vtkIdType GetNumberOfPoints()=0
Determine the number of points composing the dataset.
vtkStructuredData::GetDataDimension
static int GetDataDimension(int dataDescription)
Return the topological dimension of the data (e.g., 0, 1, 2, or 3D).
vtkImageData::SetSpacing
virtual void SetSpacing(const double ijk[3])
Set the spacing (width,height,length) of the cubical cells that compose the data set.
vtkImageData::GetCellPoints
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Standard vtkDataSet API methods.
Definition: vtkImageData.h:95
vtkImageData::HasNumberOfScalarComponents
static bool HasNumberOfScalarComponents(vtkInformation *meta_data)
Set/Get the number of scalar components for points.
vtkImageData::TransformContinuousIndexToPhysicalPoint
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).
vtkImageData::IndexToPhysicalMatrix
vtkMatrix4x4 * IndexToPhysicalMatrix
Definition: vtkImageData.h:599
vtkX3D::component
@ component
Definition: vtkX3D.h:181
vtkImageData::AddPointsToCellTemplate
void AddPointsToCellTemplate(vtkCell *cell, int ijkMin[3], int ijkMax[3])
vtkImageData::GetMaxCellSize
int GetMaxCellSize() override
Standard vtkDataSet API methods.
Definition: vtkImageData.h:108
vtkImageData::SetDimensions
virtual void SetDimensions(int i, int j, int k)
Same as SetExtent(0, i-1, 0, j-1, 0, k-1)
vtkImageData::GetNumberOfScalarComponents
static int GetNumberOfScalarComponents(vtkInformation *meta_data)
Set/Get the number of scalar components for points.
vtkImageData::ComputeBounds
void ComputeBounds() override
Standard vtkDataSet API methods.
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkImageData::GetCellDims
void GetCellDims(int cellDims[3])
Given the node dimensions of this grid instance, this method computes the node dimensions.
vtkImageData::GetActualMemorySize
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
vtkImageData::ExtentComputeTime
vtkTimeStamp ExtentComputeTime
Definition: vtkImageData.h:628
vtkImageData::ComputeInternalExtent
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...
vtkX3D::direction
@ direction
Definition: vtkX3D.h:266
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkImageData::GetCellNeighbors
void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds) override
Standard vtkDataSet API methods.
vtkImageData::ComputePointId
virtual vtkIdType ComputePointId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the point id.
Definition: vtkImageData.h:223
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:33
VTK_IMAGE_DATA
#define VTK_IMAGE_DATA
Definition: vtkType.h:83
vtkImageData::GetScalarSize
virtual int GetScalarSize()
Get the size of the scalar type in bytes.
vtkImageData::SetOrigin
virtual void SetOrigin(double i, double j, double k)
Set/Get the origin of the dataset.
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:35
vtkImageData::TransformPhysicalNormalToContinuousIndex
virtual void TransformPhysicalNormalToContinuousIndex(const double xyz[3], double ijk[3])
Convert normal from physical space (xyz) to index space (ijk).
vtkImageData::PrepareForNewData
void PrepareForNewData() override
make the output data ready for new data to be inserted.
vtkImageData::GetExtentType
int GetExtentType() override
The extent type is a 3D extent.
Definition: vtkImageData.h:575
vtkImageData::GetCellType
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet API methods.
vtkImageData::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageData::SetDirectionMatrix
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.
vtkImageData::FindCell
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.
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
vtkImageData::SetExtent
virtual void SetExtent(int extent[6])
Set/Get the extent.
vtkImageData::GetData
static vtkImageData * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
vtkImageData::CopyInformationFromPipeline
void CopyInformationFromPipeline(vtkInformation *information) override
Override these to handle origin, spacing, scalar type, and scalar number of components.
vtkImageData::SetExtent
virtual void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2)
Set/Get the extent.
vtkImageData::GetCell
vtkCell * GetCell(vtkIdType cellId) override
Standard vtkDataSet API methods.
vtkImageData::FindCell
vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Standard vtkDataSet API methods.
vtkImageData::SetDirectionMatrix
virtual void SetDirectionMatrix(vtkMatrix3x3 *m)
Set/Get the direction transform of the dataset.
vtkImageData::GetCellNeighbors
void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds, int *seedLoc)
Get cell neighbors around cell located at seedloc, except cell of id cellId.
vtkVertex
a cell that represents a 3D point
Definition: vtkVertex.h:31
vtkImageData::GetCellBounds
void GetCellBounds(vtkIdType cellId, double bounds[6]) override
Standard vtkDataSet API methods.
vtkMatrix3x3
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:34
vtkImageData::GetDimensions
virtual int * GetDimensions()
Get dimensions of this structured points dataset.
vtkImageData::TransformPhysicalPlaneToContinuousIndex
virtual void TransformPhysicalPlaneToContinuousIndex(double const pplane[4], double iplane[4])
Convert a plane from physical to a continuous index.
vtkLine
cell represents a 1D line
Definition: vtkLine.h:31
vtkImageData::SetAxisUpdateExtent
virtual void SetAxisUpdateExtent(int axis, int min, int max, const int *updateExtent, int *axisUpdateExtent)
Set / Get the extent on just one axis.
vtkImageData::SetScalarType
static void SetScalarType(int, vtkInformation *meta_data)
max
#define max(a, b)
Definition: vtkX3DExporterFIWriterHelper.h:31
vtkImageData::Extent
int Extent[6]
Definition: vtkImageData.h:602
VTK_3D_EXTENT
#define VTK_3D_EXTENT
Definition: vtkDataObject.h:56
vtkImageData::FindAndGetCell
vtkCell * FindAndGetCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Standard vtkDataSet API methods.
vtkImageData::PhysicalToIndexMatrix
vtkMatrix4x4 * PhysicalToIndexMatrix
Definition: vtkImageData.h:600
vtkImageData::ShallowCopy
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
vtkStructuredData.h
vtkImageData::ComputeTransforms
void ComputeTransforms()
vtkImageData::GetNumberOfScalarComponents
int GetNumberOfScalarComponents()
Set/Get the number of scalar components for points.
vtkImageData::SetDataDescription
void SetDataDescription(int desc)
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:48
vtkStructuredData::GetCellPoints
static void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds, int dataDescription, int dim[3])
Get the points defining a cell.
vtkImageData::GetScalarSize
virtual int GetScalarSize(vtkInformation *meta_data)
Get the size of the scalar type in bytes.
vtkImageData::ComputeCellId
virtual vtkIdType ComputeCellId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the cell id.
Definition: vtkImageData.h:231
vtkDataSet::FindPoint
vtkIdType FindPoint(double x, double y, double z)
Locate the closest point to the global coordinate x.
Definition: vtkDataSet.h:201
vtkImageData::TransformPhysicalPointToContinuousIndex
virtual void TransformPhysicalPointToContinuousIndex(double x, double y, double z, double ijk[3])
Convert coordinates from physical space (xyz) to index space (ijk).
vtkImageData::FindPoint
virtual vtkIdType FindPoint(double x, double y, double z)
Standard vtkDataSet API methods.
Definition: vtkImageData.h:83
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:58
vtkImageData::~vtkImageData
~vtkImageData() override
vtkImageData::ComputeIncrements
void ComputeIncrements(vtkDataArray *scalars, vtkIdType inc[3])
vtkStructuredData::GetPointCells
static void GetPointCells(vtkIdType ptId, vtkIdList *cellIds, int dim[3])
Get the cells using a point.
vtkImageData::TransformContinuousIndexToPhysicalPoint
virtual void TransformContinuousIndexToPhysicalPoint(double i, double j, double k, double xyz[3])
Convert coordinates from index space (ijk) to physical space (xyz).
vtkImageData::ComputeIncrements
void ComputeIncrements(vtkIdType inc[3])
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:48
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:36
vtkImageData::SetDirectionMatrix
virtual void SetDirectionMatrix(const double elements[9])
Set/Get the direction transform of the dataset.
vtkImageData::GetPoint
double * GetPoint(vtkIdType ptId) override
Standard vtkDataSet API methods.
Definition: vtkImageData.h:673
vtkImageData::IsPointVisible
unsigned char IsPointVisible(vtkIdType ptId)
Return non-zero value if specified point is visible.
vtkImageData::GetIncrements
virtual vtkIdType * GetIncrements()
Different ways to get the increments for moving around the data.
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:31
vtkImageData::GetPointCells
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Standard vtkDataSet API methods.
Definition: vtkImageData.h:101
vtkImageData::GetNumberOfPoints
vtkIdType GetNumberOfPoints() override
Standard vtkDataSet API methods.
Definition: vtkImageData.h:680
vtkImageData::SetDimensions
virtual void SetDimensions(const int dims[3])
Same as SetExtent(0, dims[0]-1, 0, dims[1]-1, 0, dims[2]-1)
vtkImageData::GetTupleIndex
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...
vtkImageData::SetNumberOfScalarComponents
static void SetNumberOfScalarComponents(int n, vtkInformation *meta_data)
Set/Get the number of scalar components for points.
vtkImageData::SetOrigin
virtual void SetOrigin(const double ijk[3])
Set/Get the origin of the dataset.
vtkImageData::TransformIndexToPhysicalPoint
virtual void TransformIndexToPhysicalPoint(const int ijk[3], double xyz[3])
Convert coordinates from index space (ijk) to physical space (xyz).
vtkImageData::GetScalarType
static int GetScalarType(vtkInformation *meta_data)
vtkImageData::Initialize
void Initialize() override
Restore data object to initial state.
vtkImageData::GetArrayPointerForExtent
void * GetArrayPointerForExtent(vtkDataArray *array, int extent[6])
These are convenience methods for getting a pointer from any filed array.
vtkImageData::CopyStructure
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input image data object.
vtkDataSet.h
vtkX3D::spacing
@ spacing
Definition: vtkX3D.h:487
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
vtkImageData::HasAnyBlankPoints
bool HasAnyBlankPoints() override
Returns 1 if there is any visibility constraint on the points, 0 otherwise.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:74
vtkImageData::DeepCopy
void DeepCopy(vtkDataObject *src) override
Shallow and Deep copy.
vtkImageData::FindPoint
vtkIdType FindPoint(double x[3]) override
Standard vtkDataSet API methods.
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkImageData::ComputeIndexToPhysicalMatrix
static void ComputeIndexToPhysicalMatrix(double const origin[3], double const spacing[3], double const direction[9], double result[16])
vtkDataSet::GetPoint
virtual double * GetPoint(vtkIdType ptId)=0
Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints.
vtkImageData::TransformContinuousIndexToPhysicalPoint
virtual void TransformContinuousIndexToPhysicalPoint(const double ijk[3], double xyz[3])
Convert coordinates from index space (ijk) to physical space (xyz).
vtkImageData::GetCell
vtkCell * GetCell(int i, int j, int k) override
Standard vtkDataSet API methods.
vtkImageData::GetCell
void GetCell(vtkIdType cellId, vtkGenericCell *cell) override
Standard vtkDataSet API methods.
vtkImageData::ComputeIncrements
void ComputeIncrements(int numberOfComponents, vtkIdType inc[3])
vtkPixel
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:35
vtkImageData::GetScalarType
int GetScalarType()
vtkImageData::ComputeStructuredCoordinates
virtual int ComputeStructuredCoordinates(const double x[3], int ijk[3], double pcoords[3])
Convenience function computes the structured coordinates for a point x[3].
vtkImageData::CopyInformationToPipeline
void CopyInformationToPipeline(vtkInformation *information) override
Copy information from this data object to the pipeline information.
vtkImageData::GetDataDescription
int GetDataDescription()
Definition: vtkImageData.h:631
vtkImageData::GetDataDimension
virtual int GetDataDimension()
Return the dimensionality of the data.
Definition: vtkImageData.h:692
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:37
vtkImageData::IsCellVisible
unsigned char IsCellVisible(vtkIdType cellId)
Return non-zero value if specified point is visible.
vtkImageData::ExtendedNew
static vtkImageData * ExtendedNew()
vtkImageData::GetIJKMinForCellId
bool GetIJKMinForCellId(vtkIdType cellId, int ijkMin[3])
vtkImageData::TransformPhysicalPointToContinuousIndex
virtual void TransformPhysicalPointToContinuousIndex(const double xyz[3], double ijk[3])
Convert coordinates from physical space (xyz) to index space (ijk).
vtkImageData::Increments
vtkIdType Increments[3]
Definition: vtkImageData.h:593
vtkImageData::GetArrayPointer
void * GetArrayPointer(vtkDataArray *array, int coordinates[3])
These are convenience methods for getting a pointer from any filed array.
vtkImageData::SetSpacing
virtual void SetSpacing(double i, double j, double k)
Set the spacing (width,height,length) of the cubical cells that compose the data set.
vtkImageData::GetPoint
void GetPoint(vtkIdType id, double x[3]) override
Standard vtkDataSet API methods.
vtkImageData::DirectionMatrix
vtkMatrix3x3 * DirectionMatrix
Definition: vtkImageData.h:598
vtkX3D::extent
@ extent
Definition: vtkX3D.h:351
vtkImageData::GetVoxelGradient
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...
vtkImageData::GetDataObjectType
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkImageData.h:65
vtkStructuredData::ComputeCellIdForExtent
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,...
Definition: vtkStructuredData.h:394
vtkImageData::ComputeIncrements
void ComputeIncrements()
Definition: vtkImageData.h:655
vtkImageData::GetData
static vtkImageData * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkImageData::GetScalarTypeMax
virtual double GetScalarTypeMax(vtkInformation *meta_data)
These returns the minimum and maximum values the ScalarType can hold without overflowing.
vtkImageData::GetArrayIncrements
void GetArrayIncrements(vtkDataArray *array, vtkIdType increments[3])
Since various arrays have different number of components, the will have different increments.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:60
vtkImageData::GetNumberOfCells
vtkIdType GetNumberOfCells() override
Standard vtkDataSet API methods.
vtkImageData::New
static vtkImageData * New()
vtkImageData::GetScalarTypeAsString
const char * GetScalarTypeAsString()
Definition: vtkImageData.h:491
vtkImageData::GetScalarTypeMin
virtual double GetScalarTypeMin()
These returns the minimum and maximum values the ScalarType can hold without overflowing.
vtkImageData::GetScalarTypeMax
virtual double GetScalarTypeMax()
These returns the minimum and maximum values the ScalarType can hold without overflowing.
vtkStructuredData::ComputePointIdForExtent
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,...
Definition: vtkStructuredData.h:381
vtkImageData::GetScalarTypeMin
virtual double GetScalarTypeMin(vtkInformation *meta_data)
These returns the minimum and maximum values the ScalarType can hold without overflowing.
vtkImageData::vtkImageData
vtkImageData()
vtkImageData::GetAxisUpdateExtent
virtual void GetAxisUpdateExtent(int axis, int &min, int &max, const int *updateExtent)
Set / Get the extent on just one axis.
vtkImageData::Crop
void Crop(const int *updateExtent) override
Reallocates and copies to set the Extent to updateExtent.
vtkImageData::HasScalarType
static bool HasScalarType(vtkInformation *meta_data)
vtkVoxel
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:39