]> Creatis software - FrontAlgorithms.git/blob - appli/CTArteries/CTArteries.h
993f6ab4632daf50517d48acb93d6f2449b8f11e
[FrontAlgorithms.git] / appli / CTArteries / CTArteries.h
1 // =========================================================================
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // =========================================================================
4 #ifndef __CTArteries__h__
5 #define __CTArteries__h__
6
7 #include <itkImage.h>
8 #include <itkImageToVTKImageFilter.h>
9
10 #include <vtkSmartPointer.h>
11
12 #include <QMainWindow>
13
14 #include <ivq/ITK/Simple3DCurve.h>
15
16 #include <fpa/DataStructures/Image/Path.h>
17
18 class QDialog;
19 namespace Ui
20 {
21   class CTArteries;
22   class Parameters;
23 }
24 namespace ivq
25 {
26   namespace VTK
27   {
28     class PolyDataActor;
29     class SeedWidgetOverImageActor;
30   }
31 }
32
33 /**
34  */
35 class CTArteries
36   : public QMainWindow
37 {
38   Q_OBJECT;
39 public:
40   typedef CTArteries  Self;
41   typedef QMainWindow Superclass;
42
43   enum Constants
44   {
45     Dim = 3
46   };
47   typedef short                      TPixel;
48   typedef double                     TScalar;
49   typedef itk::Image< TPixel, Dim >  TImage;
50   typedef itk::Image< TScalar, Dim > TScalarImage;
51
52   typedef itk::ImageToVTKImageFilter< TImage >       TVTKImage;
53   typedef itk::ImageToVTKImageFilter< TScalarImage > TVTKScalarImage;
54   typedef fpa::DataStructures::Image::Path< Dim >    TAxis;
55   typedef ivq::ITK::Simple3DCurve< TScalar >         TCurve;
56
57 public:
58   explicit CTArteries(
59     int argc, char* argv[],
60     QWidget* parent = NULL
61     );
62   virtual ~CTArteries( );
63
64 protected:
65   template< class _TStrings >
66   void _openImage( const _TStrings& fnames );
67   void _openDicom( const std::string& dirname );
68   void _showInputImage( );
69
70   void _process( );
71   void _showProcessResults( );
72
73 protected slots:
74   void _sOpen( );
75   void _sConfig( );
76   void _sProcess( );
77
78 private:
79   Ui::CTArteries* m_UI;
80
81   // Dialog
82   QDialog*        m_DlgParameters;
83   Ui::Parameters* m_UIParameters;
84
85   // Input data
86   TImage::Pointer    m_Image;
87   TVTKImage::Pointer m_VTKImage;
88
89   // Output information
90   TScalarImage::Pointer    m_Segmentation;
91   TVTKScalarImage::Pointer m_VTKSegmentation;
92   TAxis::Pointer           m_Axis;
93   TCurve::Pointer          m_Curve;
94   vtkSmartPointer< ivq::VTK::PolyDataActor > m_Surface;
95
96   // Widgets
97   vtkSmartPointer< ivq::VTK::SeedWidgetOverImageActor > m_Seeds;
98 };
99
100 #endif // __CTArteries__h__
101
102 // eof - $RCSfile$