// ========================================================================= // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) // ========================================================================= #ifndef __CTArteries__h__ #define __CTArteries__h__ #include #include #include #include #include #include #include "FourierSeries.h" class vtkPolyData; class vtkSplineWidget; class QDialog; namespace Ui { class CTArteries; class Parameters; } namespace ivq { namespace VTK { class PolyDataActor; class SeedWidgetOverImageActor; } } /** */ class CTArteries : public QMainWindow { Q_OBJECT; public: typedef CTArteries Self; typedef QMainWindow Superclass; enum Constants { Dim = 3 }; typedef short TPixel; typedef double TScalar; typedef itk::Image< TPixel, Dim > TImage; typedef itk::Image< TScalar, Dim > TScalarImage; typedef itk::ImageToVTKImageFilter< TImage > TVTKImage; typedef itk::ImageToVTKImageFilter< TScalarImage > TVTKScalarImage; typedef fpa::DataStructures::Image::Path< Dim > TAxis; typedef ivq::ITK::Simple3DCurve< TScalar > TCurve; typedef FourierSeries< TScalar, 2 > TFourier; public: explicit CTArteries( int argc, char* argv[], QWidget* parent = NULL ); virtual ~CTArteries( ); protected: template< class _TStrings > void _openImage( const _TStrings& fnames ); void _openDicom( const std::string& dirname ); void _showInputImage( ); void _process( ); void _prepareQuantification( ); void _showProcessResults( ); protected slots: void _sOpen( ); void _sConfig( ); void _sProcess( ); private: template< class _TImagePtr, class _TVTKImagePtr, class _TCurvePtr > void _CPR( _TImagePtr& output, _TVTKImagePtr& vtk_output, const _TImagePtr& input, const _TCurvePtr& curve ); private: Ui::CTArteries* m_UI; // Dialog QDialog* m_DlgParameters; Ui::Parameters* m_UIParameters; // Input data TImage::Pointer m_Image; TVTKImage::Pointer m_VTKImage; // Output information TScalarImage::Pointer m_Segmentation; TVTKScalarImage::Pointer m_VTKSegmentation; TAxis::Pointer m_Axis; TCurve::Pointer m_Curve; vtkSmartPointer< ivq::VTK::PolyDataActor > m_Surface; // CPRs TImage::Pointer m_CPRImage; TScalarImage::Pointer m_CPRSegmentation; TVTKImage::Pointer m_VTKCPRImage; TVTKScalarImage::Pointer m_VTKCPRSegmentation; // Quantification data std::vector< vtkSmartPointer< vtkPolyData > > m_Contours; std::vector< vtkSmartPointer< ivq::VTK::PolyDataActor > > m_ContoursActors; ivq::VTK::PolyDataActor* m_ContourActor; std::vector< TFourier > m_Fourier; // Widgets vtkSmartPointer< ivq::VTK::SeedWidgetOverImageActor > m_Seeds; vtkSmartPointer< vtkSplineWidget > m_Spline; friend class ContourCallback; }; #endif // __CTArteries__h__ // eof - $RCSfile$