]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/OtsuThresholdImageFilter.cxx
...
[cpPlugins.git] / lib / cpPlugins / Plugins / OtsuThresholdImageFilter.cxx
index a23bc12cce5bb739e655017d70972465a9c8bc9c..efc7d6ace500028a371393bf6264314ecb833a3e 100644 (file)
@@ -1,20 +1,6 @@
 #include <cpPlugins/Plugins/OtsuThresholdImageFilter.h>
 #include <cpPlugins/Interface/Image.h>
 
-#include <complex>
-
-#define ITK_MANUAL_INSTANTIATION
-#include <itkImage.h>
-
-#include <itkCovariantVector.h>
-#include <itkDiffusionTensor3D.h>
-#include <itkPoint.h>
-#include <itkRGBPixel.h>
-#include <itkRGBAPixel.h>
-#include <itkSymmetricSecondRankTensor.h>
-#include <itkVector.h>
-
-#undef ITK_MANUAL_INSTANTIATION
 #include <itkOtsuThresholdImageFilter.h>
 
 // -------------------------------------------------------------------------
@@ -29,7 +15,9 @@ OtsuThresholdImageFilter( )
   this->_MakeOutput< cpPlugins::Interface::Image >( 0 );
 
   using namespace cpPlugins::Interface;
-  this->m_DefaultParameters.Configure( Parameters::Uint, "NumberOfHistogramBins" );
+  this->m_DefaultParameters.Configure(
+    Parameters::Uint, "NumberOfHistogramBins"
+    );
   this->m_DefaultParameters.Configure( Parameters::Real, "InsideValue" );
   this->m_DefaultParameters.Configure( Parameters::Real, "OutsideValue" );
   this->m_DefaultParameters.SetValueAsUint( "NumberOfHistogramBins", 100 );
@@ -120,53 +108,4 @@ _RealGD( itk::DataObject* image )
     return( "OtsuThresholdImageFilter: output not correctly created." );
 }
 
-// -------------------------------------------------------------------------
-/* TODO
-   namespace cpPlugins
-   {
-   namespace Plugins
-   {
-   cpPlugins_Image_Demangle_Methods_Code_Only_Scalars(
-   OtsuThresholdImageFilter, _DemangleInput
-   );
-   }
-   }
-
-   // -------------------------------------------------------------------------
-   template< class I >
-   std::string cpPlugins::Plugins::OtsuThresholdImageFilter::
-   _DemangleInput( itk::DataObject* image )
-   {
-   }
-
-   // -------------------------------------------------------------------------
-   template< class I, class O >
-   std::string cpPlugins::Plugins::OtsuThresholdImageFilter::
-   _RealGD( itk::DataObject* image )
-   {
-   typedef itk::OtsuThresholdImageFilter< I, O > _F;
-   typedef typename O::PixelType _OP;
-
-   unsigned int bins = this->m_Parameters.GetValueAsUint( "NumberOfHistogramBins" );
-   _OP in = _OP( this->m_Parameters.GetValueAsReal( "InsideValue" ) );
-   _OP out = _OP( this->m_Parameters.GetValueAsReal( "OutsideValue" ) );
-
-   _F* filter = dynamic_cast< _F* >( this->m_RealProcessObject.GetPointer( ) );
-   if( filter == NULL )
-   {
-   this->m_RealProcessObject = _F::New( );
-   filter = dynamic_cast< _F* >( this->m_RealProcessObject.GetPointer( ) );
-
-   } // fi
-   filter->SetInput( dynamic_cast< I* >( image ) );
-   filter->SetNumberOfHistogramBins( bins );
-   filter->SetInsideValue( in );
-   filter->SetOutsideValue( out );
-   filter->Update( );
-   this->m_Outputs[ 0 ]->SetITKDataObject( filter->GetOutput( ) );
-
-   return( "" );
-   }
-*/
-
 // eof - $RCSfile$