]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Plugins/BasicFilters/MacheteFilter.h
...
[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 #include <cpPlugins/Interface/Config.h>
8
9 #ifdef cpPlugins_Interface_QT4
10 #include <QDialog>
11 #include <QGridLayout>
12 #include <QLabel>
13 #include <QVBoxLayout>
14 #endif // cpPlugins_Interface_QT4
15
16 // Some forward declarations
17 class vtkPlaneWidget;
18
19 namespace cpPlugins
20 {
21   // Some forward declarations
22   namespace Interface
23   {
24     class Image;
25     class Mesh;
26
27   } // ecapseman
28
29   namespace BasicFilters
30   {
31 #ifdef cpPlugins_Interface_QT4
32     class MacheteFilter;
33
34     /**
35      */
36     class MacheteFilter_Dialog
37       : public QDialog
38     {
39       Q_OBJECT;
40
41     public:
42       MacheteFilter_Dialog(
43         QWidget* parent, MacheteFilter* filter, Qt::WindowFlags f = 0
44         );
45       virtual ~MacheteFilter_Dialog( );
46
47     public slots:
48       void accept( );
49       void reject( );
50
51     protected:
52       MacheteFilter* m_Filter;
53       QLabel* m_Title;
54       QGridLayout* m_MainLayout;
55       QVBoxLayout* m_ToolsLayout;
56     };
57 #endif // cpPlugins_Interface_QT4
58
59     /**
60      */
61     class cpPluginsBasicFilters_EXPORT MacheteFilter
62       : public cpPlugins::Interface::FilterObject
63     {
64       friend class MacheteFilter_Dialog;
65
66     public:
67       typedef MacheteFilter                      Self;
68       typedef cpPlugins::Interface::FilterObject Superclass;
69       typedef itk::SmartPointer< Self >          Pointer;
70       typedef itk::SmartPointer< const Self >    ConstPointer;
71
72     public:
73       itkNewMacro( Self );
74       itkTypeMacro( MacheteFilter, FilterObject );
75       cpPlugins_Id_Macro(
76         cpPlugins::BasicFilters::MacheteFilter, "FilterObject"
77         );
78
79     public:
80       virtual DialogResult ExecConfigurationDialog( QWidget* parent );
81
82     protected:
83       MacheteFilter( );
84       virtual ~MacheteFilter( );
85
86       virtual std::string _GenerateData( );
87
88       std::string _FromImage( cpPlugins::Interface::Image* image );
89       std::string _FromMesh( cpPlugins::Interface::Mesh* mesh );
90
91       template< class I >
92         inline std::string _RealImage( itk::DataObject* dobj );
93
94     private:
95       // Purposely not implemented
96       MacheteFilter( const Self& );
97       Self& operator=( const Self& );
98
99     protected:
100 #ifdef cpPlugins_Interface_QT4
101       vtkPlaneWidget*       m_PlaneWidget;
102       MacheteFilter_Dialog* m_Dialog;
103 #endif // cpPlugins_Interface_QT4
104     };
105
106     // ---------------------------------------------------------------------
107     CPPLUGINS_INHERIT_PROVIDER( MacheteFilter );
108
109   } // ecapseman
110
111 } // ecapseman
112
113 #endif // __CPPLUGINS__PLUGINS__MACHETEFILTER__H__
114
115 // eof - $RCSfile$