]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/ImageReader.cxx
Logical class reordering
[cpPlugins.git] / lib / cpPlugins / Plugins / ImageReader.cxx
index 2d25301b04ba35fcbba36d0dc1b32b04ef706e1f..8838bf469f12a8f3f80bfefaaa4d4a1486f2c034 100644 (file)
@@ -46,23 +46,23 @@ _GenerateData( )
   if( dIt == this->m_Parameters.end( ) )
     dIt = this->m_DefaultParameters.find( "ImageDimension" );
 
-  std::string ret = "itk::Image dimension not supported.";
-  if     ( dIt->second.second == "1" ) ret = this->_GenerateData0< 1 >( );
-  else if( dIt->second.second == "2" ) ret = this->_GenerateData0< 2 >( );
-  else if( dIt->second.second == "3" ) ret = this->_GenerateData0< 3 >( );
-  else if( dIt->second.second == "4" ) ret = this->_GenerateData0< 4 >( );
+  std::string r = "itk::Image dimension not supported.";
+  if     ( dIt->second.second == "1" ) r = this->_GD0< 1 >( );
+  else if( dIt->second.second == "2" ) r = this->_GD0< 2 >( );
+  else if( dIt->second.second == "3" ) r = this->_GD0< 3 >( );
+  else if( dIt->second.second == "4" ) r = this->_GD0< 4 >( );
 
-  return( ret );
+  return( r );
 }
 
 // -------------------------------------------------------------------------
 template< unsigned int D >
 std::string cpPlugins::Plugins::ImageReader::
-_GenerateData0( )
+_GD0( )
 {
   TParameters::const_iterator tIt, cIt;
 
-  // Get image pixelType
+  // Get image pixel type
   tIt = this->m_Parameters.find( "PixelType" );
   if( tIt == this->m_Parameters.end( ) )
     tIt = this->m_DefaultParameters.find( "PixelType" );
@@ -70,64 +70,64 @@ _GenerateData0( )
   if( cIt == this->m_Parameters.end( ) )
     cIt = this->m_DefaultParameters.find( "IsColorImage" );
 
-  std::string ret = "itk::Image pixel type not supported";
+  std::string r = "itk::Image pixel type not supported";
   if( cIt->second.second == "0" )
   {
     if( tIt->second.second == "char" )
-      ret = this->_GenerateData1< char, D >( );
+      r = this->_GD1< char, D >( );
     else if( tIt->second.second == "short" )
-      ret = this->_GenerateData1< short, D >( );
+      r = this->_GD1< short, D >( );
     else if( tIt->second.second == "int" )
-      ret = this->_GenerateData1< int, D >( );
+      r = this->_GD1< int, D >( );
     else if( tIt->second.second == "long" )
-      ret = this->_GenerateData1< long, D >( );
+      r = this->_GD1< long, D >( );
     else if( tIt->second.second == "uchar" )
-      ret = this->_GenerateData1< unsigned char, D >( );
+      r = this->_GD1< unsigned char, D >( );
     else if( tIt->second.second == "ushort" )
-      ret = this->_GenerateData1< unsigned short, D >( );
+      r = this->_GD1< unsigned short, D >( );
     else if( tIt->second.second == "uint" )
-      ret = this->_GenerateData1< unsigned int, D >( );
+      r = this->_GD1< unsigned int, D >( );
     else if( tIt->second.second == "ulong" )
-      ret = this->_GenerateData1< unsigned long, D >( );
+      r = this->_GD1< unsigned long, D >( );
     else if( tIt->second.second == "float" )
-      ret = this->_GenerateData1< float, D >( );
+      r = this->_GD1< float, D >( );
     else if( tIt->second.second == "double" )
-      ret = this->_GenerateData1< double, D >( );
+      r = this->_GD1< double, D >( );
   }
   else if( cIt->second.second == "1" )
   {
     if( tIt->second.second == "char" )
-      ret = this->_GenerateData1< itk::RGBPixel< char >, D >( );
+      r = this->_GD1< itk::RGBPixel< char >, D >( );
     else if( tIt->second.second == "short" )
-      ret = this->_GenerateData1< itk::RGBPixel< short >, D >( );
+      r = this->_GD1< itk::RGBPixel< short >, D >( );
     else if( tIt->second.second == "int" )
-      ret = this->_GenerateData1< itk::RGBPixel< int >, D >( );
+      r = this->_GD1< itk::RGBPixel< int >, D >( );
     else if( tIt->second.second == "long" )
-      ret = this->_GenerateData1< itk::RGBPixel< long >, D >( );
+      r = this->_GD1< itk::RGBPixel< long >, D >( );
     else if( tIt->second.second == "uchar" )
-      ret = this->_GenerateData1< itk::RGBPixel< unsigned char >, D >( );
+      r = this->_GD1< itk::RGBPixel< unsigned char >, D >( );
     else if( tIt->second.second == "ushort" )
-      ret = this->_GenerateData1< itk::RGBPixel< unsigned short >, D >( );
+      r = this->_GD1< itk::RGBPixel< unsigned short >, D >( );
     else if( tIt->second.second == "uint" )
-      ret = this->_GenerateData1< itk::RGBPixel< unsigned int >, D >( );
+      r = this->_GD1< itk::RGBPixel< unsigned int >, D >( );
     else if( tIt->second.second == "ulong" )
-      ret = this->_GenerateData1< itk::RGBPixel< unsigned long >, D >( );
+      r = this->_GD1< itk::RGBPixel< unsigned long >, D >( );
     else if( tIt->second.second == "float" )
-      ret = this->_GenerateData1< itk::RGBPixel< float >, D >( );
+      r = this->_GD1< itk::RGBPixel< float >, D >( );
     else if( tIt->second.second == "double" )
-      ret = this->_GenerateData1< itk::RGBPixel< double >, D >( );
+      r = this->_GD1< itk::RGBPixel< double >, D >( );
   } // fi
-  return( ret );
+  return( r );
 }
 
 // -------------------------------------------------------------------------
 template< class P, unsigned int D >
 std::string cpPlugins::Plugins::ImageReader::
-_GenerateData1( )
+_GD1( )
 {
   TParameters::const_iterator fIt;
 
-  // Get image pixelType
+  // Get filename
   fIt = this->m_Parameters.find( "FileName" );
   if( fIt == this->m_Parameters.end( ) )
     fIt = this->m_DefaultParameters.find( "FileName" );