34 #ifndef __QGoSynchronizedView2D_h
35 #define __QGoSynchronizedView2D_h
38 #include "itkCastImageFilter.h"
39 #include "itkSmartPointer.h"
43 #include "vtkSmartPointer.h"
47 class vtkEventQtSlotConnect;
101 template<
typename TPixel >
102 void SetImage(
typename itk::Image< TPixel, 2 >::Pointer iImage)
104 typedef itk::Image< TPixel, 2 > InputImageType;
106 typedef itk::CastImageFilter< InputImageType, VisuImageType >
108 typedef typename CastFilterType::Pointer CastFilterTypePointer;
110 CastFilterTypePointer castITKFilter = CastFilterType::New();
113 castITKFilter->SetInput(iImage);
114 castITKFilter->Update();
130 const QString & iBaseName =
tr(
"Snapshot") );
147 #endif // __QGoSynchronizedView2D_h
abstract class for QGoSynchronizedView2D and QGoSynchronizedView3D. Those classes are used to display...
class used to display a QWidget containing a two dimensional a vtkimagedata* or an itkimage*...
itkvtkConnectorType::Pointer m_itkvtkConnector
void PrintOs(ostream &os)
Print self informations.
QString tr(const char *sourceText, const char *disambiguation, int n)
QString SnapshotViewXY(const GoFigure::FileType &iType, const QString &iBaseName=tr("Snapshot"))
Save a screenshot of the viewer's content.
SmartPointer< Self > Pointer
Converts an ITK image into a VTK image and plugs a itk data pipeline to a VTK datapipeline.
itk::Image< unsigned char, 2 > VisuImageType
QGoImageView2D * GetImageView(void)
Returns the imageview managed by this SynchronizedView.
void SetImage(typename itk::Image< TPixel, 2 >::Pointer iImage)
Set ITK image displayed by the SynchronizedView.
bool HasViewer(void)
true if the widget has a viewer
QGoSynchronizedView2D(QString iViewName, QWidget *iParent=0)
Q_DISABLE_COPY(QGoSynchronizedView2D)
void Render(void)
render the viewer contained in the widget if any
itk::ImageToVTKImageFilter< VisuImageType > itkvtkConnectorType
int GetSynchronizedViewType(void)
returns the type of SynchronizedView (2 for 2D, 3 for 3D)
void createViewer(void)
create the viewer contained in the widget
vtkCamera * GetCamera(void)
get the camera of the current viewer
void SetImage(vtkImageData *iImage)
Set image displayed by the SynchronizedView.
Widget to visualize a 2D image (represented as vtkImageData).
void Update(void)
Update the viewer contained in the widget.