]> Creatis software - cpPlugins.git/blobdiff - plugins/cpPluginsImageFilters/OtsuThresholdImageFilter.cxx
Now it compiles again on Windows.
[cpPlugins.git] / plugins / cpPluginsImageFilters / OtsuThresholdImageFilter.cxx
index 177d4645f219aa557cd7935680c519512073f3a4..b5dff63a9e44c9e76a26ad2abd36934c4a464cf5 100644 (file)
@@ -54,28 +54,26 @@ std::string cpPluginsImageFilters::OtsuThresholdImageFilter::
 _GD0( _TImage* image )
 {
   if( image != NULL )
-    return(
-      this->_GD1< _TImage, itk::Image< unsigned char, _TImage::ImageDimension > >( image )
-      );
+    return( this->_GD1< _TImage, unsigned char >( image ) );
   else
     return( "ImageFilters::OtsuThresholdImageFilter: No valid input image." );
 }
 
 // -------------------------------------------------------------------------
-template< class _TImage, class _TBinaryImage >
+template< class _TImage, class _TBinaryPixel >
 std::string cpPluginsImageFilters::OtsuThresholdImageFilter::
 _GD1( _TImage* image )
 {
-  typedef itk::OtsuThresholdImageFilter< _TImage, _TBinaryImage > _F;
-  typedef typename _TBinaryImage::PixelType _UP;
+  typedef itk::Image< _TBinaryPixel, _TImage::ImageDimension > _TBinaryImage;
+  typedef itk::OtsuThresholdImageFilter< _TImage, _TBinaryImage > _TFilter;
 
   // Get parameters
   unsigned int bins = this->m_Parameters.GetUint( "NumberOfHistogramBins" );
-  _UP in_val = _UP( this->m_Parameters.GetUint( "InsideValue" ) );
-  _UP out_val = _UP( this->m_Parameters.GetUint( "OutsideValue" ) );
+  _TBinaryPixel in_val = _TBinaryPixel( this->m_Parameters.GetUint( "InsideValue" ) );
+  _TBinaryPixel out_val = _TBinaryPixel( this->m_Parameters.GetUint( "OutsideValue" ) );
 
   // Configure filter
-  _F* filter = this->_CreateITK< _F >( );
+  _TFilter* filter = this->_CreateITK< _TFilter >( );
   filter->SetInput( image );
   filter->SetNumberOfHistogramBins( bins );
   filter->SetInsideValue( out_val ); // WARNING: these are inverted