]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Plugins/BasicFilters/MacheteFilter.h
Machete filter with interactive plane: it now supports images and meshes. Not yet...
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / MacheteFilter.h
1 #ifndef __CPPLUGINS__PLUGINS__MACHETEFILTER__H__
2 #define __CPPLUGINS__PLUGINS__MACHETEFILTER__H__
3
4 #include <cpPlugins/BasicFilters/cpPluginsBasicFilters_Export.h>
5 #include <cpPlugins/Interface/BaseProcessObjects.h>
6
7 // Some forward declarations
8 class vtkPlaneWidget;
9
10 namespace cpPlugins
11 {
12   // Some forward declarations
13   namespace Interface
14   {
15     class Image;
16     class Mesh;
17
18   } // ecapseman
19
20   namespace BasicFilters
21   {
22     /**
23      */
24     class cpPluginsBasicFilters_EXPORT MacheteFilter
25       : public cpPlugins::Interface::FilterObject
26     {
27     public:
28       typedef MacheteFilter                      Self;
29       typedef cpPlugins::Interface::FilterObject Superclass;
30       typedef itk::SmartPointer< Self >          Pointer;
31       typedef itk::SmartPointer< const Self >    ConstPointer;
32
33     public:
34       itkNewMacro( Self );
35       itkTypeMacro( MacheteFilter, FilterObject );
36       cpPlugins_Id_Macro(
37         cpPlugins::BasicFilters::MacheteFilter, "FilterObject"
38         );
39
40     public:
41       virtual DialogResult ExecConfigurationDialog( QWidget* parent );
42
43     protected:
44       MacheteFilter( );
45       virtual ~MacheteFilter( );
46
47       virtual std::string _GenerateData( );
48
49       std::string _FromImage( cpPlugins::Interface::Image* image );
50       std::string _FromMesh( cpPlugins::Interface::Mesh* mesh );
51
52       template< class I >
53         inline std::string _RealImage( itk::DataObject* dobj );
54
55     private:
56       // Purposely not implemented
57       MacheteFilter( const Self& );
58       Self& operator=( const Self& );
59
60     protected:
61       vtkPlaneWidget* m_PlaneWidget;
62     };
63
64     // ---------------------------------------------------------------------
65     CPPLUGINS_INHERIT_PROVIDER( MacheteFilter );
66
67   } // ecapseman
68
69 } // ecapseman
70
71 #endif // __CPPLUGINS__PLUGINS__MACHETEFILTER__H__
72
73 // eof - $RCSfile$