00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef MITKMETRICFACTORY_H 00019 #define MITKMETRICFACTORY_H 00020 00021 #include "itkImageToImageMetric.h" 00022 #include "itkImage.h" 00023 #include "mitkMetricParameters.h" 00024 #include "itkImageMaskSpatialObject.h" 00025 00026 namespace mitk { 00027 00046 template < class TPixelType, unsigned int VImageDimension > 00047 class MetricFactory : public itk::Object 00048 { 00049 public: 00050 mitkClassMacro(MetricFactory, itk::Object); 00051 00053 itkNewMacro(Self); 00054 00055 typedef typename itk::Image< TPixelType, VImageDimension > FixedImageType; 00056 typedef typename itk::Image< unsigned char, VImageDimension > FixedMaskImageType; 00057 typedef typename itk::ImageMaskSpatialObject< VImageDimension > FixedImageMaskType; 00058 typedef typename itk::Image< TPixelType, VImageDimension > MovingImageType; 00059 typedef typename itk::Image< unsigned char, VImageDimension > MovingMaskImageType; 00060 typedef typename itk::ImageMaskSpatialObject< VImageDimension > MovingImageMaskType; 00061 00062 typedef typename itk::ImageToImageMetric< FixedImageType, MovingImageType > MetricType; 00063 typedef typename MetricType::Pointer MetricPointer; 00064 00069 MetricPointer GetMetric( ); 00070 00074 void SetMetricParameters(MetricParameters::Pointer metricParameters) 00075 { 00076 m_MetricParameters = metricParameters; 00077 } 00078 00082 MetricParameters::Pointer GetMetricParameters() 00083 { 00084 return m_MetricParameters; 00085 } 00086 00087 protected: 00088 MetricFactory(); 00089 ~MetricFactory() {}; 00090 00091 MetricParameters::Pointer m_MetricParameters; 00092 }; 00093 00094 } // namespace mitk 00095 00096 #include "mitkMetricFactory.txx" 00097 00098 #endif // MITKMETRICFACTORY_H