]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/ImageWriter.h
...
[cpPlugins.git] / lib / cpPlugins / Plugins / ImageWriter.h
index 78f00efc0985c3da4772dcff57e99acc12dd9328..31bdad1abb6486202c24600403f997273319b70a 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef __CPPLUGINS__PLUGINS__IMAGEWRITER__H__
 #define __CPPLUGINS__PLUGINS__IMAGEWRITER__H__
 
-#include <cpPlugins/Interface/SinkObject.h>
-#include <itkProcessObject.h>
+#include <cpPlugins/cpPlugins_Export.h>
+#include <cpPlugins/Interface/ImageSink.h>
 
 namespace cpPlugins
 {
@@ -10,37 +10,38 @@ namespace cpPlugins
   {
     /**
      */
-    class ImageWriter
-      : public cpPlugins::Interface::SinkObject
+    class cpPlugins_EXPORT ImageWriter
+      : public cpPlugins::Interface::ImageSink
     {
     public:
-      typedef ImageWriter                      Self;
-      typedef cpPlugins::Interface::SinkObject Superclass;
-
-      typedef Superclass::TParameter  TParameter;
-      typedef Superclass::TParameters TParameters;
+      typedef ImageWriter                     Self;
+      typedef cpPlugins::Interface::ImageSink Superclass;
+      typedef itk::SmartPointer< Self >       Pointer;
+      typedef itk::SmartPointer< const Self > ConstPointer;
 
     public:
+      itkNewMacro( Self );
+      itkTypeMacro( ImageWriter, cpPluginsInterfaceImageSink );
+
+    protected:
       ImageWriter( );
       virtual ~ImageWriter( );
 
-      virtual std::string GetClassName( ) const;
-
-    protected:
       virtual std::string _GenerateData( );
 
-      template< unsigned int D >
-      std::string _GenerateData0( );
+      cpPlugins_Image_Demangle_Methods( ImageWriter );
 
-      template< class P, unsigned int D >
-      std::string _GenerateData1( );
+      template< class I >
+        std::string _RealGD( itk::DataObject* image );
 
-    protected:
-      itk::ProcessObject::Pointer m_Writer;
+    private:
+      // Purposely not implemented
+      ImageWriter( const Self& );
+      Self& operator=( const Self& );
     };
 
     // ---------------------------------------------------------------------
-    PLUMA_INHERIT_PROVIDER( ImageWriter, cpPlugins::Interface::Object );
+    CPPLUGINS_INHERIT_PROVIDER( ImageWriter );
 
   } // ecapseman