Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkMetricFactory.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKMETRICFACTORY_H
18 #define MITKMETRICFACTORY_H
19 
20 #include "itkImage.h"
21 #include "itkImageMaskSpatialObject.h"
22 #include "itkImageToImageMetric.h"
23 #include "mitkMetricParameters.h"
24 
25 namespace mitk
26 {
45  template <class TPixelType, unsigned int VImageDimension>
46  class MetricFactory : public itk::Object
47  {
48  public:
50 
52  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
53 
54  typedef typename itk::Image<TPixelType, VImageDimension> FixedImageType;
55  typedef typename itk::Image<unsigned char, VImageDimension> FixedMaskImageType;
56  typedef typename itk::ImageMaskSpatialObject<VImageDimension> FixedImageMaskType;
57  typedef typename itk::Image<TPixelType, VImageDimension> MovingImageType;
58  typedef typename itk::Image<unsigned char, VImageDimension> MovingMaskImageType;
59  typedef typename itk::ImageMaskSpatialObject<VImageDimension> MovingImageMaskType;
60 
61  typedef typename itk::ImageToImageMetric<FixedImageType, MovingImageType> MetricType;
62  typedef typename MetricType::Pointer MetricPointer;
63 
68  MetricPointer GetMetric();
69 
73  void SetMetricParameters(MetricParameters::Pointer metricParameters) { m_MetricParameters = metricParameters; }
78  protected:
79  MetricFactory();
81 
83  };
84 
85 } // namespace mitk
86 
87 #include "mitkMetricFactory.txx"
88 
89 #endif // MITKMETRICFACTORY_H
itk::SmartPointer< Self > Pointer
itk::ImageToImageMetric< FixedImageType, MovingImageType > MetricType
mitkClassMacroItkParent(MetricFactory, itk::Object)
void SetMetricParameters(MetricParameters::Pointer metricParameters)
Sets the instance to the metric parameters class which holds all parameters for the new metric...
itk::Image< unsigned char, VImageDimension > FixedMaskImageType
DataCollection - Class to facilitate loading/accessing structured data.
MetricPointer GetMetric()
Returns the metric which then can be used in combination with a transform, an optimizer and an interp...
MetricParameters::Pointer m_MetricParameters
itk::Image< TPixelType, VImageDimension > MovingImageType
itk::Image< TPixelType, VImageDimension > FixedImageType
Image class for storing images.
Definition: mitkImage.h:76
itk::ImageMaskSpatialObject< VImageDimension > FixedImageMaskType
MetricParameters::Pointer GetMetricParameters()
Returns the instance to the metric parameters class which holds all parameters for the new metric...
itk::Image< unsigned char, VImageDimension > MovingMaskImageType
This class creates a metric for a rigid registration process.
This class is used to hold all metric parameters needed for a rigid registration process.
MetricType::Pointer MetricPointer
itk::ImageMaskSpatialObject< VImageDimension > MovingImageMaskType