1 // =========================================================================
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // =========================================================================
4 #ifndef __CTArteries__h__
5 #define __CTArteries__h__
8 #include <itkImageToVTKImageFilter.h>
10 #include <vtkSmartPointer.h>
12 #include <QMainWindow>
14 #include <ivq/ITK/Simple3DCurve.h>
16 #include <ivq/ITK/ImagePath.h>
18 #include "FourierSeries.h"
21 class vtkSplineWidget;
33 class SeedWidgetOverImageActor;
44 typedef CTArteries Self;
45 typedef QMainWindow Superclass;
52 typedef double TScalar;
53 typedef itk::Image< TPixel, Dim > TImage;
54 typedef itk::Image< TScalar, Dim > TScalarImage;
56 typedef itk::ImageToVTKImageFilter< TImage > TVTKImage;
57 typedef itk::ImageToVTKImageFilter< TScalarImage > TVTKScalarImage;
58 typedef ivq::ITK::ImagePath< Dim > TAxis;
59 typedef ivq::ITK::Simple3DCurve< TScalar > TCurve;
60 typedef FourierSeries< TScalar, 2 > TFourier;
64 int argc, char* argv[],
65 QWidget* parent = NULL
67 virtual ~CTArteries( );
70 template< class _TStrings >
71 void _openImage( const _TStrings& fnames );
72 void _openDicom( const std::string& dirname );
73 void _showInputImage( );
75 void _process( const std::vector< TImage::PointType >& seeds );
76 void _prepareQuantification( );
77 void _showProcessResults( );
79 void _ExecuteLog( const std::string& fname );
87 template< class _TImagePtr, class _TVTKImagePtr, class _TCurvePtr >
89 _TImagePtr& output, _TVTKImagePtr& vtk_output,
90 const _TImagePtr& input, const _TCurvePtr& curve
97 QDialog* m_DlgParameters;
98 Ui::Parameters* m_UIParameters;
101 TImage::Pointer m_Image;
102 TVTKImage::Pointer m_VTKImage;
104 // Output information
105 TScalarImage::Pointer m_Segmentation;
106 TVTKScalarImage::Pointer m_VTKSegmentation;
107 TAxis::Pointer m_Axis;
108 TCurve::Pointer m_Curve;
109 vtkSmartPointer< ivq::VTK::PolyDataActor > m_Surface;
112 TImage::Pointer m_CPRImage;
113 TScalarImage::Pointer m_CPRSegmentation;
114 TVTKImage::Pointer m_VTKCPRImage;
115 TVTKScalarImage::Pointer m_VTKCPRSegmentation;
117 // Quantification data
118 std::vector< vtkSmartPointer< vtkPolyData > > m_Contours;
119 std::vector< vtkSmartPointer< ivq::VTK::PolyDataActor > > m_ContoursActors;
120 ivq::VTK::PolyDataActor* m_ContourActor;
121 std::vector< TFourier > m_Fourier;
124 vtkSmartPointer< ivq::VTK::SeedWidgetOverImageActor > m_Seeds;
125 vtkSmartPointer< vtkSplineWidget > m_Spline;
127 friend class ContourCallback;
130 #endif // __CTArteries__h__