73 const std::array<int, 6> Extent;
74 const std::array<vtkIdType, 3> Dimensions;
78 std::array<double, 16> IndexToPhysicalMatrix;
80 void TransformIndexToPhysicalPoint(
int i,
int j,
int k, ValueType* out)
const;
88 ArrayTypeX* arrayX, ArrayTypeY* arrayY, ArrayTypeZ* arrayZ,
int extent[6],
double dirMatrix[9])
90 , X(
vtk::DataArrayValueRange<1>(ArrayX))
92 , Y(
vtk::DataArrayValueRange<1>(ArrayY))
94 , Z(
vtk::DataArrayValueRange<1>(ArrayZ))
95 , Extent({ { extent[0], extent[1], extent[2], extent[3], extent[4], extent[5] } })
97 { { extent[1] - extent[0] + 1, extent[3] - extent[2] + 1, extent[5] - extent[4] + 1 } })
98 , Dimension_0_BY_1(this->Dimensions[0] * this->Dimensions[1])
99 , IndexToPhysicalMatrix({ {} })
103 assert(this->ArrayX->GetNumberOfTuples() == 2);
104 assert(this->ArrayY->GetNumberOfTuples() == 2);
105 assert(this->ArrayZ->GetNumberOfTuples() == 2);
107 std::array<double, 3> origin = { { this->X[0], this->Y[0], this->Z[0] } };
109 std::array<double, 3>
spacing = { { this->X[1] - this->X[0], this->Y[1] - this->Y[0],
110 this->Z[1] - this->Z[0] } };
112 this->IndexToPhysicalMatrix[0] = dirMatrix[0] *
spacing[0];
113 this->IndexToPhysicalMatrix[1] = dirMatrix[1] *
spacing[1];
114 this->IndexToPhysicalMatrix[2] = dirMatrix[2] *
spacing[2];
115 this->IndexToPhysicalMatrix[3] = origin[0];
116 this->IndexToPhysicalMatrix[4] = dirMatrix[3] *
spacing[0];
117 this->IndexToPhysicalMatrix[5] = dirMatrix[4] *
spacing[1];
118 this->IndexToPhysicalMatrix[6] = dirMatrix[5] *
spacing[2];
119 this->IndexToPhysicalMatrix[7] = origin[1];
120 this->IndexToPhysicalMatrix[8] = dirMatrix[6] *
spacing[0];
121 this->IndexToPhysicalMatrix[9] = dirMatrix[7] *
spacing[1];
122 this->IndexToPhysicalMatrix[10] = dirMatrix[8] *
spacing[2];
123 this->IndexToPhysicalMatrix[11] = origin[2];
124 this->IndexToPhysicalMatrix[12] = 0.0;
125 this->IndexToPhysicalMatrix[13] = 0.0;
126 this->IndexToPhysicalMatrix[14] = 0.0;
127 this->IndexToPhysicalMatrix[15] = 1.0;
135 template <
int Description = DataDescription>
136 typename std::enable_if<(Description == 9 ), ValueType>::type VTK_ALWAYS_INLINE
140 template <
int Description = DataDescription>
141 typename std::enable_if<(Description != 9 ), ValueType>::type VTK_ALWAYS_INLINE
148 template <
int Description = DataDescription>
149 typename std::enable_if<(Description == 9 ), ValueType>::type VTK_ALWAYS_INLINE
153 template <
int Description = DataDescription>
154 typename std::enable_if<(Description != 9 ), ValueType>::type VTK_ALWAYS_INLINE
161 template <
int Description = DataDescription>
162 typename std::enable_if<(Description == 9 ), ValueType>::type VTK_ALWAYS_INLINE
166 template <
int Description = DataDescription>
167 typename std::enable_if<(Description != 9 ), ValueType>::type VTK_ALWAYS_INLINE
174 template <
int Description = DataDescription>
175 typename std::enable_if<(Description == 9 ),
void>::type VTK_ALWAYS_INLINE
179 template <
int Description = DataDescription>
180 typename std::enable_if<(Description != 9 ),
void>::type VTK_ALWAYS_INLINE
187 template <
int Description = DataDescription>
188 typename std::enable_if<(Description == 9 ),
void>::type VTK_ALWAYS_INLINE
192 template <
int Description = DataDescription>
193 typename std::enable_if<(Description == 1 ),
void>::type VTK_ALWAYS_INLINE
197 template <
int Description = DataDescription>
198 typename std::enable_if<(Description == 2 ),
void>::type VTK_ALWAYS_INLINE
202 template <
int Description = DataDescription>
203 typename std::enable_if<(Description == 3 ),
void>::type VTK_ALWAYS_INLINE
207 template <
int Description = DataDescription>
208 typename std::enable_if<(Description == 4 ),
void>::type VTK_ALWAYS_INLINE
212 template <
int Description = DataDescription>
213 typename std::enable_if<(Description == 5 ),
void>::type VTK_ALWAYS_INLINE
217 template <
int Description = DataDescription>
218 typename std::enable_if<(Description == 6 ),
void>::type VTK_ALWAYS_INLINE
222 template <
int Description = DataDescription>
223 typename std::enable_if<(Description == 7 ),
void>::type VTK_ALWAYS_INLINE
227 template <
int Description = DataDescription>
228 typename std::enable_if<(Description == 8 ),
void>::type VTK_ALWAYS_INLINE
235 template <
int Description = DataDescription>
236 typename std::enable_if<(Description == 9 ), ValueType>::type VTK_ALWAYS_INLINE
240 template <
int Description = DataDescription>
241 typename std::enable_if<(Description == 1 ), ValueType>::type
246 template <
int Description = DataDescription>
247 typename std::enable_if<(Description == 2 ), ValueType>::type VTK_ALWAYS_INLINE
251 template <
int Description = DataDescription>
252 typename std::enable_if<(Description == 3 ), ValueType>::type VTK_ALWAYS_INLINE
256 template <
int Description = DataDescription>
257 typename std::enable_if<(Description == 4 ), ValueType>::type VTK_ALWAYS_INLINE
261 template <
int Description = DataDescription>
262 typename std::enable_if<(Description == 5 ), ValueType>::type VTK_ALWAYS_INLINE
266 template <
int Description = DataDescription>
267 typename std::enable_if<(Description == 6 ), ValueType>::type VTK_ALWAYS_INLINE
271 template <
int Description = DataDescription>
272 typename std::enable_if<(Description == 7 ), ValueType>::type VTK_ALWAYS_INLINE
276 template <
int Description = DataDescription>
277 typename std::enable_if<(Description == 8 ), ValueType>::type VTK_ALWAYS_INLINE