VTK  9.2.6
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=========================================================================*/
46#ifndef vtkImageData_h
47#define vtkImageData_h
48
49#include "vtkCommonDataModelModule.h" // For export macro
50#include "vtkDataSet.h"
51
52#include "vtkStructuredData.h" // Needed for inline methods
53
54class vtkDataArray;
55class vtkLine;
56class vtkMatrix3x3;
57class vtkMatrix4x4;
58class vtkPixel;
59class vtkVertex;
60class vtkVoxel;
61
62class VTKCOMMONDATAMODEL_EXPORT vtkImageData : public vtkDataSet
63{
64public:
65 static vtkImageData* New();
67
68 vtkTypeMacro(vtkImageData, vtkDataSet);
69 void PrintSelf(ostream& os, vtkIndent indent) override;
70
75 void CopyStructure(vtkDataSet* ds) override;
76
80 int GetDataObjectType() override { return VTK_IMAGE_DATA; }
81
83
92 double* GetPoint(vtkIdType ptId) VTK_SIZEHINT(3) override;
93 void GetPoint(vtkIdType id, double x[3]) override;
94 vtkCell* GetCell(vtkIdType cellId) override;
95 vtkCell* GetCell(int i, int j, int k) override;
96 void GetCell(vtkIdType cellId, vtkGenericCell* cell) override;
97 void GetCellBounds(vtkIdType cellId, double bounds[6]) override;
98 virtual vtkIdType FindPoint(double x, double y, double z)
99 {
100 return this->vtkDataSet::FindPoint(x, y, z);
101 }
102 vtkIdType FindPoint(double x[3]) override;
103 vtkIdType FindCell(double x[3], vtkCell* cell, vtkIdType cellId, double tol2, int& subId,
104 double pcoords[3], double* weights) override;
105 vtkIdType FindCell(double x[3], vtkCell* cell, vtkGenericCell* gencell, vtkIdType cellId,
106 double tol2, int& subId, double pcoords[3], double* weights) override;
107 vtkCell* FindAndGetCell(double x[3], vtkCell* cell, vtkIdType cellId, double tol2, int& subId,
108 double pcoords[3], double* weights) override;
109 int GetCellType(vtkIdType cellId) override;
112 void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override
113 {
114 int dimensions[3];
115 this->GetDimensions(dimensions);
116 vtkStructuredData::GetCellPoints(cellId, ptIds, this->DataDescription, dimensions);
117 }
118 void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override
119 {
120 int dimensions[3];
121 this->GetDimensions(dimensions);
122 vtkStructuredData::GetPointCells(ptId, cellIds, dimensions);
123 }
124 void ComputeBounds() override;
125 int GetMaxCellSize() override { return 8; } // voxel is the largest
126 void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds) override;
128
136 void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds, int* seedLoc);
137
141 void Initialize() override;
142
148 unsigned char IsPointVisible(vtkIdType ptId);
149
155 unsigned char IsCellVisible(vtkIdType cellId);
156
161 bool HasAnyBlankPoints() override;
166 bool HasAnyBlankCells() override;
167
174 void GetCellDims(int cellDims[3]);
175
179 virtual void SetDimensions(int i, int j, int k);
180
184 virtual void SetDimensions(const int dims[3]);
185
192 virtual int* GetDimensions() VTK_SIZEHINT(3);
193
200 virtual void GetDimensions(int dims[3]);
201#if VTK_ID_TYPE_IMPL != VTK_INT
202 virtual void GetDimensions(vtkIdType dims[3]);
203#endif
204
211 virtual int ComputeStructuredCoordinates(const double x[3], int ijk[3], double pcoords[3]);
212
222 virtual void GetVoxelGradient(int i, int j, int k, vtkDataArray* s, vtkDataArray* g);
223
230 virtual void GetPointGradient(int i, int j, int k, vtkDataArray* s, double g[3]);
231
235 virtual int GetDataDimension();
236
240 virtual vtkIdType ComputePointId(int ijk[3])
241 {
242 return vtkStructuredData::ComputePointIdForExtent(this->Extent, ijk);
243 }
244
248 virtual vtkIdType ComputeCellId(int ijk[3])
249 {
250 return vtkStructuredData::ComputeCellIdForExtent(this->Extent, ijk);
251 }
252
254
258 int axis, int min, int max, const int* updateExtent, int* axisUpdateExtent);
259 virtual void GetAxisUpdateExtent(int axis, int& min, int& max, const int* updateExtent);
261
263
274 virtual void SetExtent(int extent[6]);
275 virtual void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2);
276 vtkGetVector6Macro(Extent, int);
278
280
284 virtual double GetScalarTypeMin(vtkInformation* meta_data);
285 virtual double GetScalarTypeMin();
286 virtual double GetScalarTypeMax(vtkInformation* meta_data);
287 virtual double GetScalarTypeMax();
289
291
294 virtual int GetScalarSize(vtkInformation* meta_data);
295 virtual int GetScalarSize();
297
299
311 virtual void GetIncrements(vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
312 virtual void GetIncrements(vtkIdType inc[3]);
313 virtual vtkIdType* GetIncrements(vtkDataArray* scalars) VTK_SIZEHINT(3);
314 virtual void GetIncrements(
315 vtkDataArray* scalars, vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
316 virtual void GetIncrements(vtkDataArray* scalars, vtkIdType inc[3]);
318
320
333 virtual void GetContinuousIncrements(
334 int extent[6], vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
335 virtual void GetContinuousIncrements(
336 vtkDataArray* scalars, int extent[6], vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
338
340
343 virtual void* GetScalarPointerForExtent(int extent[6]);
344 virtual void* GetScalarPointer(int coordinates[3]);
345 virtual void* GetScalarPointer(int x, int y, int z);
346 virtual void* GetScalarPointer();
348
350
353 virtual vtkIdType GetScalarIndexForExtent(int extent[6]);
354 virtual vtkIdType GetScalarIndex(int coordinates[3]);
355 virtual vtkIdType GetScalarIndex(int x, int y, int z);
357
359
362 virtual float GetScalarComponentAsFloat(int x, int y, int z, int component);
363 virtual void SetScalarComponentFromFloat(int x, int y, int z, int component, float v);
364 virtual double GetScalarComponentAsDouble(int x, int y, int z, int component);
365 virtual void SetScalarComponentFromDouble(int x, int y, int z, int component, double v);
367
373 virtual void AllocateScalars(int dataType, int numComponents);
374
381 virtual void AllocateScalars(vtkInformation* pipeline_info);
382
384
390 virtual void CopyAndCastFrom(vtkImageData* inData, int extent[6]);
391 virtual void CopyAndCastFrom(vtkImageData* inData, int x0, int x1, int y0, int y1, int z0, int z1)
392 {
393 int e[6];
394 e[0] = x0;
395 e[1] = x1;
396 e[2] = y0;
397 e[3] = y1;
398 e[4] = z0;
399 e[5] = z1;
400 this->CopyAndCastFrom(inData, e);
401 }
403
409 void Crop(const int* updateExtent) override;
410
419 unsigned long GetActualMemorySize() override;
420
422
426 vtkGetVector3Macro(Spacing, double);
427 virtual void SetSpacing(double i, double j, double k);
428 virtual void SetSpacing(const double ijk[3]);
430
432
440 vtkGetVector3Macro(Origin, double);
441 virtual void SetOrigin(double i, double j, double k);
442 virtual void SetOrigin(const double ijk[3]);
444
446
450 vtkGetObjectMacro(DirectionMatrix, vtkMatrix3x3);
452 virtual void SetDirectionMatrix(const double elements[9]);
453 virtual void SetDirectionMatrix(double e00, double e01, double e02, double e10, double e11,
454 double e12, double e20, double e21, double e22);
456
458
462 vtkGetObjectMacro(IndexToPhysicalMatrix, vtkMatrix4x4);
464
466
469 virtual void TransformContinuousIndexToPhysicalPoint(double i, double j, double k, double xyz[3]);
470 virtual void TransformContinuousIndexToPhysicalPoint(const double ijk[3], double xyz[3]);
471 virtual void TransformIndexToPhysicalPoint(int i, int j, int k, double xyz[3]);
472 virtual void TransformIndexToPhysicalPoint(const int ijk[3], double xyz[3]);
473 static void TransformContinuousIndexToPhysicalPoint(double i, double j, double k,
474 double const origin[3], double const spacing[3], double const direction[9], double xyz[3]);
476
478
482 vtkGetObjectMacro(PhysicalToIndexMatrix, vtkMatrix4x4);
484
486
489 virtual void TransformPhysicalPointToContinuousIndex(double x, double y, double z, double ijk[3]);
490 virtual void TransformPhysicalPointToContinuousIndex(const double xyz[3], double ijk[3]);
492
494 double const origin[3], double const spacing[3], double const direction[9], double result[16]);
495
497
500 virtual void TransformPhysicalNormalToContinuousIndex(const double xyz[3], double ijk[3]);
502
507 virtual void TransformPhysicalPlaneToContinuousIndex(double const pplane[4], double iplane[4]);
508
509 static void SetScalarType(int, vtkInformation* meta_data);
510 static int GetScalarType(vtkInformation* meta_data);
511 static bool HasScalarType(vtkInformation* meta_data);
513 const char* GetScalarTypeAsString() { return vtkImageScalarTypeNameMacro(this->GetScalarType()); }
514
516
520 static void SetNumberOfScalarComponents(int n, vtkInformation* meta_data);
525
530 void CopyInformationFromPipeline(vtkInformation* information) override;
531
537 void CopyInformationToPipeline(vtkInformation* information) override;
538
544 void PrepareForNewData() override;
545
547
550 void ShallowCopy(vtkDataObject* src) override;
551 void DeepCopy(vtkDataObject* src) override;
553
554 //--------------------------------------------------------------------------
555 // Methods that apply to any array (not just scalars).
556 // I am starting to experiment with generalizing imaging filters
557 // to operate on more than just scalars.
558
560
565 void* GetArrayPointerForExtent(vtkDataArray* array, int extent[6]);
566 void* GetArrayPointer(vtkDataArray* array, int coordinates[3]);
568
570
577 vtkIdType GetTupleIndex(vtkDataArray* array, int coordinates[3]);
579
584 void GetArrayIncrements(vtkDataArray* array, vtkIdType increments[3]);
585
592 void ComputeInternalExtent(int* intExt, int* tgtExt, int* bnds);
593
597 int GetExtentType() override { return VTK_3D_EXTENT; }
598
600
606
607protected:
609 ~vtkImageData() override;
610
611 // The extent of what is currently in the structured grid.
612 // Dimensions is just an array to return a value.
613 // Its contents are out of data until GetDimensions is called.
614 int Dimensions[3];
615 vtkIdType Increments[3];
616
617 // Variables used to define dataset physical orientation
618 double Origin[3];
619 double Spacing[3];
623
624 int Extent[6];
625
626 // The first method assumes Active Scalars
627 void ComputeIncrements();
628 // This one is given the number of components of the
629 // scalar field explicitly
630 void ComputeIncrements(int numberOfComponents);
631 void ComputeIncrements(vtkDataArray* scalars);
632
633 // The first method assumes Acitive Scalars
635 // This one is given the number of components of the
636 // scalar field explicitly
637 void ComputeIncrements(int numberOfComponents, vtkIdType inc[3]);
639
640 // for the index to physical methods
642
643 // Cell utilities
646 bool GetIJKMinForCellId(vtkIdType cellId, int ijkMin[3]);
647 bool GetIJKMaxForIJKMin(int ijkMin[3], int ijkMax[3]);
648 void AddPointsToCellTemplate(vtkCell* cell, int ijkMin[3], int ijkMax[3]);
649
651
652 void SetDataDescription(int desc);
653 int GetDataDescription() { return this->DataDescription; }
654
655private:
656 void InternalImageDataCopy(vtkImageData* src);
657
658private:
659 friend class vtkUniformGrid;
660
661 // for the GetCell method
662 vtkVertex* Vertex;
663 vtkLine* Line;
664 vtkPixel* Pixel;
665 vtkVoxel* Voxel;
666
667 // for the GetPoint method
668 double Point[3];
669
670 int DataDescription;
671
672 vtkImageData(const vtkImageData&) = delete;
673 void operator=(const vtkImageData&) = delete;
674};
675
676//----------------------------------------------------------------------------
678{
679 this->ComputeIncrements(this->Increments);
680}
681
682//----------------------------------------------------------------------------
683inline void vtkImageData::ComputeIncrements(int numberOfComponents)
684{
685 this->ComputeIncrements(numberOfComponents, this->Increments);
686}
687
688//----------------------------------------------------------------------------
690{
691 this->ComputeIncrements(scalars, this->Increments);
692}
693
694//----------------------------------------------------------------------------
696{
697 this->GetPoint(id, this->Point);
698 return this->Point;
699}
700
701//----------------------------------------------------------------------------
703{
704 const int* extent = this->Extent;
705 vtkIdType dims[3];
706 dims[0] = extent[1] - extent[0] + 1;
707 dims[1] = extent[3] - extent[2] + 1;
708 dims[2] = extent[5] - extent[4] + 1;
709
710 return dims[0] * dims[1] * dims[2];
711}
712
713//----------------------------------------------------------------------------
715{
716 return vtkStructuredData::GetDataDimension(this->DataDescription);
717}
718
719#endif
abstract class to specify cell behavior
Definition vtkCell.h:70
abstract superclass for arrays of numeric data
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:72
virtual vtkIdType GetNumberOfPoints()=0
Determine the number of points composing the dataset.
virtual double * GetPoint(vtkIdType ptId)=0
Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints.
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:241
provides thread-safe access to cells
list of point or cell ids
Definition vtkIdList.h:43
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])
Convert coordinates from physical space (xyz) to index space (ijk).
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
Standard vtkDataSet API methods.
virtual vtkIdType * GetIncrements()
Different ways to get the increments for moving around the data.
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.
bool GetIJKMaxForIJKMin(int ijkMin[3], int ijkMax[3])
vtkIdType GetCellSize(vtkIdType cellId) override
Standard vtkDataSet API methods.
vtkCell * GetCellTemplateForDataDescription()
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.
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
virtual int * GetDimensions()
Get dimensions of this structured points dataset.
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()
vtkCell * FindAndGetCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Standard vtkDataSet API methods.
static vtkImageData * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
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.
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.
void * GetArrayPointerForExtent(vtkDataArray *array, int extent[6])
These are convenience methods for getting a pointer from any filed array.
vtkCell * GetCell(vtkIdType cellId) override
Standard vtkDataSet API methods.
bool GetIJKMinForCellId(vtkIdType cellId, int ijkMin[3])
static vtkImageData * ExtendedNew()
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
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
int GetDataDescription()
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.
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.
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.
static vtkImageData * New()
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])
int GetNumberOfScalarComponents()
Set/Get the number of scalar components for points.
vtkIdType GetNumberOfPoints() override
Standard vtkDataSet 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 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.
void * GetArrayPointer(vtkDataArray *array, int coordinates[3])
These are convenience methods for getting a pointer from any filed array.
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)
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]
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.
const char * GetScalarTypeAsString()
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
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 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.
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.
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
vtkCell * GetCell(int i, int j, int k) override
Standard vtkDataSet API methods.
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)
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.
vtkMatrix4x4 * PhysicalToIndexMatrix
virtual vtkIdType ComputeCellId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the cell id.
static vtkImageData * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
a simple class to control print indentation
Definition vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
cell represents a 1D line
Definition vtkLine.h:43
represent and manipulate 3x3 transformation matrices
represent and manipulate 4x4 transformation matrices
a cell that represents an orthogonal quadrilateral
Definition vtkPixel.h:47
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
image data with blanking
a cell that represents a 3D point
Definition vtkVertex.h:43
a cell that represents a 3D orthogonal parallelepiped
Definition vtkVoxel.h:51
#define VTK_3D_EXTENT
int vtkIdType
Definition vtkType.h:332
#define VTK_IMAGE_DATA
Definition vtkType.h:83
#define VTK_SIZEHINT(...)
#define max(a, b)