]> Creatis software - clitk.git/blob - vv/vvStructureSetActor.cxx
- add future structure set manager
[clitk.git] / vv / vvStructureSetActor.cxx
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://oncora1.lyon.fnclcc.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
19 #include "vvStructureSetActor.h"
20 #include "vvROIActor.h"
21
22 //------------------------------------------------------------------------------
23 vvStructureSetActor::vvStructureSetActor() {
24
25 }
26 //------------------------------------------------------------------------------
27
28
29 //------------------------------------------------------------------------------
30 vvStructureSetActor::~vvStructureSetActor() {
31 }
32 //------------------------------------------------------------------------------
33
34
35 //------------------------------------------------------------------------------
36 void vvStructureSetActor::SetStructureSet(clitk::DicomRT_StructureSet * s) {
37   mStructureSet = s;
38 }
39 //------------------------------------------------------------------------------
40
41
42 //------------------------------------------------------------------------------
43 void vvStructureSetActor::SetSlicerManager(vvSlicerManager * s) {
44   mSlicerManager = s;
45 }
46 //------------------------------------------------------------------------------
47
48
49 //------------------------------------------------------------------------------
50 void vvStructureSetActor::CreateNewROIActor(int n) {
51   DD("AddROIActor");
52   DD(n);
53
54   // Check
55   const clitk::DicomRT_ROI * roi = mStructureSet->GetROI(n);
56   if (roi == NULL) {
57     std::cerr << "Error. No ROI number " << n << std::endl;
58     exit(0);
59   }
60
61   // Add ROI Actors
62   vvROIActor * actor = new vvROIActor;
63   mROIActors.push_back(actor);
64   actor->SetROI(roi);
65   actor->SetSlicerManager(mSlicerManager);
66   actor->Initialize();
67   // 
68
69   actor->Update();
70 }
71 //------------------------------------------------------------------------------
72
73