ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkCompareHistogramImageToImageMetric.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 __itkCompareHistogramImageToImageMetric_h
19 #define __itkCompareHistogramImageToImageMetric_h
20 
22 
23 namespace itk
24 {
55 template< typename TFixedImage, typename TMovingImage >
57  public HistogramImageToImageMetric< TFixedImage, TMovingImage >
58 {
59 public:
65 
69 
71  typedef typename Superclass::RealType RealType;
74  typedef typename TransformType::ConstPointer TransformConstPointer;
75 
79 
87 
90  typedef typename HistogramType::MeasurementVectorType HistogramMeasurementVectorType;
91  typedef typename HistogramType::AbsoluteFrequencyType HistogramAbsoluteFrequencyType;
93 
94  typedef typename HistogramType::Iterator HistogramIteratorType;
96 
99 
100  typedef typename Superclass::FixedImageRegionType
102 
104  itkSetMacro(TrainingHistogram, HistogramPointerType);
105  itkGetConstReferenceMacro(TrainingHistogram, HistogramPointerType);
107 
109  itkSetConstObjectMacro(TrainingFixedImage, FixedImageType);
110 
112  itkSetConstObjectMacro(TrainingMovingImage, MovingImageType);
113  itkGetConstObjectMacro(TrainingMovingImage, MovingImageType);
115 
117  itkSetObjectMacro(TrainingTransform, TransformType);
118  itkGetModifiableObjectMacro(TrainingTransform, TransformType);
120 
122  itkSetObjectMacro(TrainingInterpolator, InterpolatorType);
123  itkGetModifiableObjectMacro(TrainingInterpolator, InterpolatorType);
125 
127  itkSetMacro(TrainingFixedImageRegion, FixedImageRegionType);
128  itkGetConstReferenceMacro(TrainingFixedImageRegion, FixedImageRegionType);
130 
132  unsigned int GetNumberOfParameters(void) const
133  { return this->GetTransform()->GetNumberOfParameters(); }
134 
137  void Initialize()
138  throw ( ExceptionObject );
139 
140 protected:
144  virtual ~CompareHistogramImageToImageMetric(){}
145  void PrintSelf(std::ostream & os, Indent indent) const;
147 
149  void FormTrainingHistogram()
150  throw ( ExceptionObject );
151 
154  virtual MeasureType EvaluateMeasure(HistogramType & histogram) const = 0;
155 
156 private:
157  // Purposely not implemented.
159  void operator=(Self const &); // Purposely not implemented.
160 
167 };
168 } // End namespace itk.
169 
170 #ifndef ITK_MANUAL_INSTANTIATION
171 #include "itkCompareHistogramImageToImageMetric.hxx"
172 #endif
173 
174 #endif // __itkCompareHistogramImageToImageMetric_h
Superclass::TransformPointer TransformPointer
HistogramImageToImageMetric< TFixedImage, TMovingImage > Superclass
Superclass::MovingImageConstPointer MovingImageConstPointer
HistogramType::MeasurementVectorType HistogramMeasurementVectorType
MovingImageType::ConstPointer MovingImageConstPointer
virtual const TransformType * GetTransform() const
virtual NumberOfParametersType GetNumberOfParameters(void) const
Definition: itkTransform.h:399
HistogramType::AbsoluteFrequencyType HistogramAbsoluteFrequencyType
Statistics::Histogram< double > HistogramType
Standard exception handling object.
Superclass::TransformParametersType TransformParametersType
InterpolatorType::Pointer InterpolatorPointer
Superclass::TransformParametersType TransformParametersType
void PrintSelf(std::ostream &os, Indent indent) const
InterpolateImageFunction< MovingImageType, CoordinateRepresentationType > InterpolatorType
Superclass::TransformJacobianType TransformJacobianType
Superclass::GradientPixelType GradientPixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
FixedImageType::ConstPointer FixedImageConstPointer
Compares Histograms between two images to be registered to a Training Histogram.
Computes similarity between two objects to be registered.
virtual MeasureType EvaluateMeasure(HistogramType &histogram) const =0
FixedImageType::RegionType FixedImageRegionType