]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/ImageWriter.cxx
Garbage collector added
[cpPlugins.git] / lib / cpPlugins / Plugins / ImageWriter.cxx
index 41fdb301f0f67dc4375ef714d805e5794ab38bdf..aea4a21e7d42914c01d9f7d33d5cf05abf8eae98 100644 (file)
     )                                                                   \
     r = this->f< itk::RGBPixel< p >, d >( )
 
+// -------------------------------------------------------------------------
+std::string cpPlugins::Plugins::ImageWriter::
+GetClassName( ) const
+{
+  return( "cpPlugins::Plugins::ImageWriter" );
+}
+
 // -------------------------------------------------------------------------
 cpPlugins::Plugins::ImageWriter::
 ImageWriter( )
@@ -40,13 +47,6 @@ cpPlugins::Plugins::ImageWriter::
 {
 }
 
-// -------------------------------------------------------------------------
-std::string cpPlugins::Plugins::ImageWriter::
-GetClassName( ) const
-{
-  return( "cpPlugins::Plugins::ImageWriter" );
-}
-
 // -------------------------------------------------------------------------
 std::string cpPlugins::Plugins::ImageWriter::
 _GenerateData( )
@@ -99,7 +99,7 @@ std::string cpPlugins::Plugins::ImageWriter::
 _GD1( )
 {
   typedef itk::Image< P, D > _TImage;
-  typedef itk::ImageFileWriter< _TImage > _TImageWriter;
+  typedef itk::ImageFileWriter< _TImage > _TWriter;
 
   TParameters::const_iterator fIt;
 
@@ -108,12 +108,13 @@ _GD1( )
   if( fIt == this->m_Parameters.end( ) )
     fIt = this->m_DefaultParameters.find( "FileName" );
 
-  _TImageWriter* writer =
-    dynamic_cast< _TImageWriter* >( this->m_Writer.GetPointer( ) );
+  _TWriter* writer =
+    dynamic_cast< _TWriter* >( this->m_RealProcessObject.GetPointer( ) );
   if( writer == NULL )
   {
-    this->m_Writer = _TImageWriter::New( );
-    writer = dynamic_cast< _TImageWriter* >( this->m_Writer.GetPointer( ) );
+    this->m_RealProcessObject = _TWriter::New( );
+    writer =
+      dynamic_cast< _TWriter* >( this->m_RealProcessObject.GetPointer( ) );
 
   } // fi
   writer->SetFileName( fIt->second.second );