#include #include #include #include // ------------------------------------------------------------------------- cpPluginsITKImageInterpolators::LinearInterpolateImageFunction:: LinearInterpolateImageFunction( ) : Superclass( ) { } // ------------------------------------------------------------------------- cpPluginsITKImageInterpolators::LinearInterpolateImageFunction:: ~LinearInterpolateImageFunction( ) { } // ------------------------------------------------------------------------- void cpPluginsITKImageInterpolators::LinearInterpolateImageFunction:: CreateInterpolator( itk::LightObject* image, const std::string& precision_type ) { this->m_PrecisionType = precision_type; cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( image, _GD0 ) this->_Error( "Invalid input image." ); } // ------------------------------------------------------------------------- void cpPluginsITKImageInterpolators::LinearInterpolateImageFunction:: _GenerateData( ) { } // ------------------------------------------------------------------------- template< class _TImage > void cpPluginsITKImageInterpolators::LinearInterpolateImageFunction:: _GD0( _TImage* image ) { if( this->m_PrecisionType == "float" ) this->_GD1< _TImage, float >( image ); else if( this->m_PrecisionType == "double" ) this->_GD1< _TImage, double >( image ); } // ------------------------------------------------------------------------- template< class _TImage, class _TScalar > void cpPluginsITKImageInterpolators::LinearInterpolateImageFunction:: _GD1( _TImage* image ) { typedef itk::LinearInterpolateImageFunction< _TImage, _TScalar > _TFunction; auto function = this->_CreateITK< _TFunction >( ); this->GetOutput( "Output" )->SetITK( function ); } // eof - $RCSfile$