ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkDeformationFieldJacobianDeterminantFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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 itkDeformationFieldJacobianDeterminantFilter_h
19 #define itkDeformationFieldJacobianDeterminantFilter_h
20 
21 #include "itkImage.h"
22 #include "vnl/vnl_matrix.h"
23 #include "vnl/vnl_det.h"
24 
25 #ifndef ITKV3_COMPATIBILITY
26 #error "This file is only valid when ITKV3_COMPATIBILITY is turned on. Users are encouraged to convert to itk::DisplacementFieldJacobianDeterminantFilter in ITKv4"
27 #endif
28 
29 //This class now inherits from itkDisplacementFieldJacobianDeterminantFilter
30 //and simply overrides the EvaluateAtNeighborhood function.
32 
33 namespace itk
34 {
77 template< typename TInputImage,
78  typename TRealType = float,
79  typename TOutputImage = Image< TRealType,
80  TInputImage::ImageDimension >
81  >
83  public DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >
84 {
85 public:
89  TInputImage, TRealType, TOutputImage > Superclass;
90 
93 
95  itkNewMacro(Self);
96 
99 
102  typedef typename TOutputImage::PixelType OutputPixelType;
103  typedef typename TInputImage::PixelType InputPixelType;
104 
106  typedef TInputImage InputImageType;
107  typedef TOutputImage OutputImageType;
108  typedef typename InputImageType::Pointer InputImagePointer;
109  typedef typename OutputImageType::Pointer OutputImagePointer;
110 
112  itkStaticConstMacro(ImageDimension, unsigned int,
113  TOutputImage::ImageDimension);
114 
116  itkStaticConstMacro(VectorDimension, unsigned int,
118 
120  typedef TRealType RealType;
123  typedef Image<
124  RealVectorType, TInputImage::ImageDimension >
126 
131 
133  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
134 
135  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
136 
137  virtual TRealType EvaluateAtNeighborhood(const ConstNeighborhoodIteratorType & it) const ITK_OVERRIDE;
138 
139 protected:
142 
143 private:
144  ITK_DISALLOW_COPY_AND_ASSIGN(DeformationFieldJacobianDeterminantFilter);
145 };
146 } // end namespace itk
147 
148 #ifndef ITK_MANUAL_INSTANTIATION
149 #include "itkDeformationFieldJacobianDeterminantFilter.hxx"
150 #endif
151 
152 #endif
DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage > Superclass
Base class for all process objects that output image data.
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Image< RealVectorType, TInputImage::ImageDimension > RealVectorImageType
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
ConstNeighborhoodIterator< RealVectorImageType > ConstNeighborhoodIteratorType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Computes a scalar image from a vector image (e.g., deformation field) input, where each output scalar...
Templated n-dimensional image class.
Definition: itkImage.h:75
Computes a scalar image from a vector image (e.g., deformation field) input, where each output scalar...