1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 #ifndef VTKPLANE2DVIEW_H_
27 #define VTKPLANE2DVIEW_H_
29 #include "vtkInteractorStylePlane2D.h"
30 #include "vtkInfoTextImageInteractorPlane2D.h"
31 #include "vtkInfoTextImage.h"
33 #include "wxMPRBaseData.h"
34 #include "wxVtk2DBaseView.h"
36 #include "vtkTransform.h"
37 #include "vtkImageChangeInformation.h"
38 #include "vtkStructuredPoints.h"
39 #include "vtkPlaneSource.h"
40 #include "vtkProbeFilter.h"
41 #include "vtkPolyDataMapper.h"
43 class vtkPlane2DView : public wxVtk2DBaseView
46 vtkPlane2DView(wxWindow *parent);
51 void SetImgSize( int imgSize );
54 void RotationDrag(double vx, double vy, bool ok_v, bool ok_ang);
56 virtual int GetActualSlice();
57 virtual void SetActualSlice(int slice);
59 virtual void Refresh( );
61 vtkMPRBaseData *GetVtkmprbasedata();
62 vtkInteractorStylePlane2D *GetInteractorstyleplane2D();
64 void SetActive(bool active);
65 void SetVisibleLine(bool ok);
67 void TransfromCoordViewWorld2(double &X, double &Y, double &Z);
70 void SetMipWidth(int value);
71 bool GetMipVisualization();
72 void SetMipVisualization(bool ok);
79 bool _mip_visualization;
84 double _backOrient[4];
89 double _n[3]; // Normal
97 vtkImageData * _imageResult;
101 vtkActor *_lineActor;
102 vtkPolyDataMapper *_lineMapper;
105 vtkProbeFilter *_3Dslices;
106 vtkPlaneSource *_pSource;
107 vtkStructuredPoints *_stPoints;
108 vtkImageChangeInformation *_change;
109 vtkTransform *_transform1;
110 vtkTransform *_transform2;
112 vtkInteractorStylePlane2D *_interactorstyleplane2D;
114 vtkInfoTextImage *_vtkInfoTextImage;
115 vtkInfoTextImageInteractorPlane2D *_vtkInfoTextImageInteractorPlane2D;
118 void SetPSource(int sizeIma);
119 void HorizontalLine();
121 void Extract_One_PlaneVTK();
122 void Extract_MIP_PlaneVTK();
127 #endif /*VTKPLANE2DVIEW_H_*/