/*============================================================================= NOTE: THIS FILE IS A HANDMADE WRAPPER FOR THE ManagedITK PROJECT. Project: ManagedITK Program: Insight Segmentation & Registration Toolkit Module: itkManagedImageToImageMetric.cxx Language: C++/CLI Author: Dan Mueller Date: $Date: 2007-09-01 06:17:25 +1000 (Sat, 01 Sep 2007) $ Revision: $Revision: 2 $ Copyright (c) Queensland University of Technology (QUT) 2007. All rights reserved. Portions of this code are covered under the ITK and VTK copyright. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =============================================================================*/ #pragma once #pragma warning( disable : 4635 ) // Disable warnings about XML doc comments #ifndef __itkManagedImageToImageMetric_cxx #define __itkManagedImageToImageMetric_cxx // Use some managed namespaces #using #using using namespace System; using namespace System::IO; using namespace System::Reflection; using namespace System::Diagnostics; using namespace System::Collections::Generic; // Include some useful ManagedITK files #include "itkManagedSingleValuedCostFunction.cxx" #include "itkManagedImageBase.cxx" #include "itkManagedTransform.cxx" #include "itkManagedImageFunction.cxx" namespace itk { /// ///This class is a managed replacement for itk::ImageToImageMetric. /// /// ///ImageToImageMetric computes the similarity between regions of two images. ///It expects a Transform and an Interpolator to be plugged in. /// ///This class computes a value that measures the similarity between the Fixed ///image and the transformed Moving image. The Interpolator is used to compute ///intensity values on non-grid positions resulting from mapping points through ///the Transform. /// public ref class itkImageToImageMetric abstract : itkSingleValuedCostFunction { public: ///Set the fixed image. virtual void SetFixedImage( itkImageBase^ image ) = 0; ///Set the fixed image. virtual void SetFixedImage( System::IntPtr imagePtr ) = 0; ///Get the fixed image. ///The itkImageBase to become the fixed image. virtual void GetFixedImage( itkImageBase^ image ) = 0; ///Set the moving image. virtual void SetMovingImage( itkImageBase^ image ) = 0; ///Set the moving image. virtual void SetMovingImage( System::IntPtr imagePtr ) = 0; ///Get the moving image. ///The itkImageBase to become the moving image. virtual void GetMovingImage( itkImageBase^ image ) = 0; ///Set the transform. virtual void SetTransform( itkTransform^ transform ) = 0; ///Get the transform. ///The itkTransform to become the transform. virtual void GetTransform( itkTransform^ transform ) = 0; ///Set the interpolator. virtual void SetInterpolator( itkImageFunction^ interpolator ) = 0; ///Get the interpolator. ///The itkImageFuction to become the interpolator. virtual void GetInterpolator( itkImageFunction^ interpolator ) = 0; ///Get the number of pixels considered in the computation. property unsigned int NumberOfPixelsCounted { virtual unsigned int get() = 0; } ///Get/set whether the gradient should be computed or not. property bool ComputeGradient { virtual bool get() = 0; virtual void set( bool value ) = 0; } ///Get the gradient image. ///The itkImageBase to become the gradient image. virtual void GetGradientImage( itkImageBase^ image ) = 0; ///Set the parameters defining the Transform. virtual void SetTransformParameters( itkArray^ parameters ) = 0; /// ///Initialize the Metric by making sure that all the components are present ///and plugged together correctly. /// virtual void Initialize( ) = 0; }; // end ref class } // end namespace itk #endif