ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkDisplacementFieldJacobianDeterminantFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkDisplacementFieldJacobianDeterminantFilter_h
19#define itkDisplacementFieldJacobianDeterminantFilter_h
20
23#include "itkVector.h"
24#include "vnl/vnl_matrix_fixed.h"
25#include "vnl/vnl_vector_fixed.h"
26#include "vnl/vnl_det.h"
27
28namespace itk
29{
107template <typename TInputImage,
108 typename TRealType = float,
109 typename TOutputImage = Image<TRealType, TInputImage::ImageDimension>>
111 : public ImageToImageFilter<TInputImage, TOutputImage>
112{
113public:
114 ITK_DISALLOW_COPY_AND_MOVE(DisplacementFieldJacobianDeterminantFilter);
115
121
123 itkNewMacro(Self);
124
126 itkOverrideGetNameOfClassMacro(DisplacementFieldJacobianDeterminantFilter);
127
130 using OutputPixelType = typename TOutputImage::PixelType;
131 using InputPixelType = typename TInputImage::PixelType;
132
134 using InputImageType = TInputImage;
135 using OutputImageType = TOutputImage;
136 using InputImagePointer = typename InputImageType::Pointer;
137 using OutputImagePointer = typename OutputImageType::Pointer;
138
140 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
141
143 static constexpr unsigned int VectorDimension = InputPixelType::Dimension;
144
146 using RealType = TRealType;
149
154
157
166 void
168
176 void
178 itkGetConstMacro(UseImageSpacing, bool);
179 itkBooleanMacro(UseImageSpacing);
181#if !defined(ITK_FUTURE_LEGACY_REMOVE)
187 void
188 SetUseImageSpacingOn()
189 {
190 this->SetUseImageSpacing(true);
191 }
192
197 void
198 SetUseImageSpacingOff()
199 {
200 this->SetUseImageSpacing(false);
201 }
202#endif
203
205
209 void
211 itkGetConstReferenceMacro(DerivativeWeights, WeightsType);
213protected:
216
220 void
222
235 void
236 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
237
238
239 void
240 PrintSelf(std::ostream & os, Indent indent) const override;
241
242 using ImageBaseType = typename InputImageType::Superclass;
243
245 itkGetConstObjectMacro(RealValuedInputImage, ImageBaseType);
246
249 itkGetConstReferenceMacro(NeighborhoodRadius, RadiusType);
250 itkSetMacro(NeighborhoodRadius, RadiusType);
252 virtual TRealType
254
257
261
262private:
265 using InternalMatrixType = vnl_matrix_fixed<TRealType, ImageDimension, ImageDimension>;
266
267 bool m_UseImageSpacing{ true };
268
270
271 typename ImageBaseType::ConstPointer m_RealValuedInputImage{};
272
274
276};
277} // end namespace itk
278
279#ifndef ITK_MANUAL_INSTANTIATION
280# include "itkDisplacementFieldJacobianDeterminantFilter.hxx"
281#endif
282
283#endif
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
~DisplacementFieldJacobianDeterminantFilter() override=default
typename OutputImageType::RegionType OutputImageRegionType
vnl_matrix_fixed< TRealType, ImageDimension, ImageDimension > InternalMatrixType
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
virtual TRealType EvaluateAtNeighborhood(const ConstNeighborhoodIteratorType &it) const
Image< RealVectorType, TInputImage::ImageDimension > RealVectorImageType
void PrintSelf(std::ostream &os, Indent indent) const override
ConstNeighborhoodIterator< RealVectorImageType > ConstNeighborhoodIteratorType
void SetDerivativeWeights(const WeightsType &)
Simulate a standard C array with copy semantics.
typename OutputImageType::RegionType OutputImageRegionType
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:51
Implements transparent reference counting.
A templated class holding a n-Dimensional vector.
Definition itkVector.h:63
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType