]> Creatis software - clitk.git/blob - vv/vvMeshActor.h
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvMeshActor.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://www.centreleonberard.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef vvMeshActor_h
19 #define vvMeshActor_h
20 #include "vvMesh.h"
21 #include "vvImage.h"
22
23 class vtkActor;
24 class vtkPolyDataMapper;
25 class vtkMarchingSquares;
26 class vtkImageData;
27
28 /** An actor that takes a vvMesh as input, and displays it
29  ** sliced along the given slice plane */
30 class vvMeshActor
31 {
32 public:
33     vvMeshActor();
34     ///Sets slicing orientation
35     void SetSlicingOrientation(unsigned int d);
36     ///Changes the cut plane value in real world coordinates
37     void SetCutSlice(double slice);
38     /**Initialize the actor and set the inputs. If vf is not null, will use
39      **it to propagate the contour on all time frames */ 
40     void Init(vvMesh::Pointer mesh,int time_slice, vvImage::Pointer vf=ITK_NULLPTR);
41     ///Set the time slice (only useful when using a 4D contour)
42     void SetTimeSlice(int time);
43     ///Toggles between normal 4D mode and superposition mode
44     void ToggleSuperposition();
45     vtkActor* GetActor() {return mActor;}
46     ~vvMeshActor();
47
48 protected:
49     ///0 for x, 1 for y, 2 for z
50     unsigned int mCutDimension;
51     vvMesh::Pointer mMesh;
52     vtkMarchingSquares * mMarching;
53     vtkPolyDataMapper* mMapper;
54     vtkActor* mActor;
55     double mCutPlaneValue;
56     bool mSuperpostionMode;
57     int mTimeSlice;
58     double mCutSlice;
59 };
60
61 #endif