34 #ifndef __QGoSynchronizedView3D_h
35 #define __QGoSynchronizedView3D_h
38 #include "itkCastImageFilter.h"
39 #include "itkSmartPointer.h"
42 #include "vtkSmartPointer.h"
43 #include "QGoGUILibConfigure.h"
47 class vtkEventQtSlotConnect;
78 template<
typename TPixel >
79 void SetImage(
typename itk::Image< TPixel, 3 >::Pointer iImage)
81 typedef itk::Image< TPixel, 3 > InputImageType;
83 typedef itk::CastImageFilter< InputImageType, VisuImageType >
85 typedef typename CastFilterType::Pointer CastFilterTypePointer;
87 CastFilterTypePointer castITKFilter = CastFilterType::New();
88 m_itkvtkConnector = itkvtkConnectorType::New();
90 castITKFilter->SetInput(iImage);
91 castITKFilter->Update();
92 m_itkvtkConnector->SetInput( castITKFilter->GetOutput() );
93 m_itkvtkConnector->Update();
95 SetImage( m_itkvtkConnector->GetOutput() );
112 void Render(
const int & iId);
147 int GetFullScreenView();
151 const QString & iBaseName =
tr(
"Snapshot-xy-") );
169 void SetFullScreenView(
const int & iId);
173 void SetFullXYScreenView();
177 void SetFullXZScreenView();
181 void SetFullYZScreenView();
185 void SetFullXYZScreenView();
208 #endif // QGoSynchronizedView3D_H
virtual void deleteViewer(void)=0
abstract class for QGoSynchronizedView2D and QGoSynchronizedView3D. Those classes are used to display...
virtual QString SnapshotViewXY(const GoFigure::FileType &iType, const QString &iBaseName=tr("Snapshot"))=0
Save a snapshot of the displaid view, in a iType file.
virtual void SetImage(vtkImageData *iImage)=0
Set image displayed by the SynchronizedView.
itkvtkConnectorType::Pointer m_itkvtkConnector
virtual vtkCamera * GetCamera(void)=0
get the camera of the current viewer
virtual void createViewer(void)=0
QString tr(const char *sourceText, const char *disambiguation, int n)
SmartPointer< Self > Pointer
class for the visualization of 3D Image represented by one vtkImageData*.
virtual void PrintOs(ostream &os)=0
print the SynchronizedView information : it consists in the image information if any.
virtual void Update(void)=0
Update the viewer contained in the widget.
Converts an ITK image into a VTK image and plugs a itk data pipeline to a VTK datapipeline.
itk::Image< unsigned char, 3 > VisuImageType
void SetImage(typename itk::Image< TPixel, 3 >::Pointer iImage)
Set ITK image displayed by the SynchronizedView.
itk::ImageToVTKImageFilter< VisuImageType > itkvtkConnectorType
class used to display a QWidget containing a two dimensional vtkimagedata* or itkimage*. QGoSynchronizedView3D provide the interface to synchronize cameras among several GoSynchronizedView3D.
Q_DISABLE_COPY(QGoSynchronizedView)
virtual bool HasViewer(void)=0
true if the widget has a viewer
virtual int GetSynchronizedViewType(void)=0
returns the type of SynchronizedView (2 for 2D, 3 for 3D)
virtual void Render(void)=0
render the viewer contained in the widget if any