7 #include <itkImageToVTKImageFilter.h>
9 #include <vtkOrientationMarkerWidget.h>
10 #include <vtkRenderer.h>
11 #include <vtkSmartPointer.h>
13 #include <cpm/DataStructures/QuadEdgeMesh.h>
15 #include <cpmPluginsInterface/Interface.h>
16 #include <cpmPluginsInterface/Filter.h>
18 #include "InteractorStyleImage.h"
19 #include "VolumeActors.h"
22 #include <cpm/VTK/MeshMapper.h>
23 #include <cpm/Algorithms/QuadEdge/MeshPlaneCutterFilter.h>
26 // -------------------------------------------------------------------------
32 // -------------------------------------------------------------------------
42 typedef cpmPluginsInterface::FilterProvider TFilterProvider;
43 typedef cpmPluginsInterface::Filter TFilterObject;
44 typedef TFilterObject::TParameters TParameters;
46 cpmPluginsInterface::Interface< TFilterProvider, TFilterObject >
50 static const unsigned int Dimension = 3;
52 typedef double TScalar;
53 typedef itk::Image< TPixel, Dimension > TImage;
54 typedef itk::ImageToVTKImageFilter< TImage > TVTKImage;
56 typedef cpm::DataStructures::QuadEdgeMesh< TScalar, Dimension > TMesh;
59 typedef cpm::VTK::MeshMapper< TTriangulation > TTriangulationMapper;
61 cpm::Algorithms::QuadEdge::MeshPlaneCutterFilter< TTriangulation >
66 explicit MainWnd( QWidget* parent = 0 );
70 void _UpdateEnabledFlags( );
71 bool _ParametersDialog( TParameters& parameters );
74 bool _LoadImage( typename I::Pointer& image );
77 void _SliceMesh( int axis );
78 static void _SliceEventCallback(
80 long unsigned int eventId,
81 void* clientData, void* callData
86 void triggered_aSwitchMode( );
87 void triggered_aReloadPlugins( );
88 void triggered_aOpenInputImage( );
89 void triggered_aOpenSegmentedImage( );
90 void triggered_aFilterSegmentedImage( );
91 void triggered_aSegmentedImageToMesh( );
93 void triggered_aLoadInputImage( );
94 void triggered_aLoadSegmentedImage( );
101 std::string m_PluginsConfigurationFile;
102 TFilterPlugins m_FilterPlugins;
105 std::string m_LastOpenedFile;
106 TImage::Pointer m_Image;
107 TImage::Pointer m_Segmentation;
108 TMesh::Pointer m_Mesh;
109 TVTKImage::Pointer m_VTKImage;
110 TVTKImage::Pointer m_VTKSegmentation;
113 vtkSmartPointer< vtkRenderer > m_3DRenderer;
114 vtkSmartPointer< vtkRenderer > m_XPlaneRenderer;
115 vtkSmartPointer< vtkRenderer > m_YPlaneRenderer;
116 vtkSmartPointer< vtkRenderer > m_ZPlaneRenderer;
117 vtkSmartPointer< vtkRenderer > m_AuxRenderer;
118 vtkSmartPointer< idms::VolumeActors > m_ImageActors;
119 vtkSmartPointer< idms::InteractorStyleImage > m_XStyle;
120 vtkSmartPointer< idms::InteractorStyleImage > m_YStyle;
121 vtkSmartPointer< idms::InteractorStyleImage > m_ZStyle;
123 vtkSmartPointer< vtkOrientationMarkerWidget > m_3DOrientationWidget;
125 TTriangulation::Pointer m_Mesh;
126 vtkSmartPointer< TTriangulationMapper > m_MeshMapper;
127 vtkSmartPointer< vtkActor > m_MeshActor;
128 TCutter::Pointer m_ZCutter;
132 #endif // __MAINWND__H__