ITK  4.3.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 itkDisplacementFieldJacobianDeterminantFilter.h 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,
117  InputPixelType::Dimension);
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;
136 
137  virtual TRealType EvaluateAtNeighborhood(const ConstNeighborhoodIteratorType & it) const;
138 
139 protected:
142 
143 private:
144  DeformationFieldJacobianDeterminantFilter(const Self &); //purposely not
145  // implemented
146  void operator=(const Self &); //purposely not
147 
148  // implemented
149 };
150 } // end namespace itk
151 
152 #ifndef ITK_MANUAL_INSTANTIATION
153 #include "itkDeformationFieldJacobianDeterminantFilter.hxx"
154 #endif
155 
156 #endif
157