1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
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
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.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
19 #include "vvStructureSetActor.h"
20 #include "vvROIActor.h"
22 //------------------------------------------------------------------------------
23 vvStructureSetActor::vvStructureSetActor() {
26 //------------------------------------------------------------------------------
29 //------------------------------------------------------------------------------
30 vvStructureSetActor::~vvStructureSetActor() {
32 //------------------------------------------------------------------------------
35 //------------------------------------------------------------------------------
36 void vvStructureSetActor::SetStructureSet(clitk::DicomRT_StructureSet * s) {
39 //------------------------------------------------------------------------------
42 //------------------------------------------------------------------------------
43 void vvStructureSetActor::SetSlicerManager(vvSlicerManager * s) {
46 //------------------------------------------------------------------------------
49 //------------------------------------------------------------------------------
50 vvROIActor * vvStructureSetActor::GetROIActor(int n) {
51 if (mMapROIIndex.find(n) == mMapROIIndex.end()) {
52 std::cerr << "No ROI number " << n << std::endl;
55 return mROIActors[mMapROIIndex[n]];
57 //------------------------------------------------------------------------------
60 //------------------------------------------------------------------------------
61 void vvStructureSetActor::CreateNewROIActor(int n) {
63 clitk::DicomRT_ROI * roi = mStructureSet->GetROI(n);
65 std::cerr << "Error. No ROI number " << n << std::endl;
70 vvROIActor * actor = new vvROIActor;
71 mROIActors.push_back(actor);
73 actor->SetSlicerManager(mSlicerManager);
75 mMapROIIndex[n] = mROIActors.size()-1;
79 //------------------------------------------------------------------------------