]> Creatis software - clitk.git/blob - vv/vvMeshActor.h
removed headers
[clitk.git] / vv / vvMeshActor.h
1 #ifndef vvMeshActor_h
2 #define vvMeshActor_h
3 #include "vvMesh.h"
4 #include "vvImage.h"
5
6 class vtkActor;
7 class vtkPolyDataMapper;
8 class vtkMarchingSquares;
9 class vtkImageData;
10
11 /** An actor that takes a vvMesh as input, and displays it
12  ** sliced along the given slice plane */
13 class vvMeshActor
14 {
15 public:
16     vvMeshActor();
17     ///Sets slicing orientation
18     void SetSlicingOrientation(unsigned int d);
19     ///Changes the cut plane value in real world coordinates
20     void SetCutSlice(double slice);
21     /**Initialize the actor and set the inputs. If vf is not null, will use
22      **it to propagate the contour on all time frames */ 
23     void Init(vvMesh::Pointer mesh,int time_slice, vvImage::Pointer vf=NULL);
24     ///Set the time slice (only useful when using a 4D contour)
25     void SetTimeSlice(int time);
26     ///Toggles between normal 4D mode and superposition mode
27     void ToggleSuperposition();
28     vtkActor* GetActor() {return mActor;}
29     ~vvMeshActor();
30
31 protected:
32     ///0 for x, 1 for y, 2 for z
33     unsigned int mCutDimension;
34     vvMesh::Pointer mMesh;
35     vtkMarchingSquares * mMarching;
36     vtkPolyDataMapper* mMapper;
37     vtkActor* mActor;
38     double mCutPlaneValue;
39     bool mSuperpostionMode;
40     int mTimeSlice;
41     double mCutSlice;
42 };
43
44 #endif