]> Creatis software - FrontAlgorithms.git/blobdiff - appli/CTArteries/CTArteries.h
...
[FrontAlgorithms.git] / appli / CTArteries / CTArteries.h
index 993f6ab4632daf50517d48acb93d6f2449b8f11e..90d9e09987e5e0d1ee4731a0ebf433299e9e230f 100644 (file)
 
 #include <ivq/ITK/Simple3DCurve.h>
 
-#include <fpa/DataStructures/Image/Path.h>
+#include <ivq/ITK/ImagePath.h>
 
+#include "FourierSeries.h"
+
+class vtkPolyData;
+class vtkSplineWidget;
 class QDialog;
 namespace Ui
 {
@@ -51,8 +55,9 @@ public:
 
   typedef itk::ImageToVTKImageFilter< TImage >       TVTKImage;
   typedef itk::ImageToVTKImageFilter< TScalarImage > TVTKScalarImage;
-  typedef fpa::DataStructures::Image::Path< Dim >    TAxis;
+  typedef ivq::ITK::ImagePath< Dim >                 TAxis;
   typedef ivq::ITK::Simple3DCurve< TScalar >         TCurve;
+  typedef FourierSeries< TScalar, 2 >                TFourier;
 
 public:
   explicit CTArteries(
@@ -67,14 +72,24 @@ protected:
   void _openDicom( const std::string& dirname );
   void _showInputImage( );
 
-  void _process( );
+  void _process( const std::vector< TImage::PointType >& seeds );
+  void _prepareQuantification( );
   void _showProcessResults( );
 
+  void _ExecuteLog( const std::string& fname );
+
 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;
 
@@ -93,8 +108,23 @@ private:
   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__