manualViewBullEye.cpp

Go to the documentation of this file.
00001 #include "manualViewBullEye.h"
00002 
00003 // ----------------------------------------------------------------------------
00004 // ----------------------------------------------------------------------------
00005 // ----------------------------------------------------------------------------
00006 
00007 manualViewBullEye::manualViewBullEye()
00008 {
00009 }
00010 
00011 // ----------------------------------------------------------------------------
00012 manualViewBullEye::~manualViewBullEye()
00013 {
00014         // BullEye(s)
00015         int i,size=lstSectorBullEye.size();
00016         for (i=0;i<size;i++)
00017         {
00018                 delete lstSectorBullEye[i];
00019         }
00020         lstSectorBullEye.clear();
00021 }
00022 
00023 
00024 // ----------------------------------------------------------------------------
00025 manualViewBullEye * manualViewBullEye :: Clone()
00026 {
00027         manualViewBullEye * clone = new manualViewBullEye();
00028         CopyAttributesTo(clone);
00029         return clone;
00030 }
00031 
00032 // ---------------------------------------------------------------------------
00033 
00034 void manualViewBullEye::CopyAttributesTo( manualViewBullEye * cloneObject)
00035 {
00036         // Fathers object
00037         manualViewBaseContour::CopyAttributesTo(cloneObject);
00038 }
00039 
00040 
00041 // ----------------------------------------------------------------------------
00042 int manualViewBullEye::GetType() // virtual
00043 {
00044         return 4;
00045 }
00046 
00047 
00048 // ----------------------------------------------------------------------------
00049 void manualViewBullEye::RefreshContour() // virtual
00050 {
00051         // External Rectangle
00052         manualViewRoi::RefreshContour();
00053 
00054         _manContModel->UpdateSpline();
00055     int np      = GetNumberOfPoints( );
00056         // Refres sectors of BullEye(s)
00057 
00058         if (np>=2  )
00059         {
00060                 int i,size = lstSectorBullEye.size();
00061                 for (i=0;i<size;i++)
00062                 {
00063                         lstSectorBullEye[i]->RefreshContour();
00064                 } // for
00065         } // if
00066 
00067 
00068 }
00069 
00070 // ----------------------------------------------------------------------------
00071 void manualViewBullEye::ConstructVTKObjects() // virtual
00072 {
00073         manualViewRoi::ConstructVTKObjects();
00074 
00075         double spc[3];
00076         this->GetSpacing(spc);
00077         manualViewBullEyeSector *mvbc;
00078         manualContourModelBullEye *mcmbe = (manualContourModelBullEye*)this->_manContModel;
00079         int i,size = mcmbe->GetSizeOfSectorLst();
00080         for ( i=0 ; i<size ; i++ )
00081         {
00082                 mvbc = new manualViewBullEyeSector();
00083                 mvbc->SetModel( mcmbe->GetModelSector(i) );
00084                 mvbc->SetWxVtkBaseView( this->GetWxVtkBaseView()  );
00085                 mvbc->SetRange( 2 );
00086                 mvbc->SetZ( 1000 );
00087                 mvbc->SetSpacing(spc);
00088                 mvbc->SetColorNormalContour(1, 0, 0);
00089 //              mvbc->SetColorEditContour(0.5, 0.5, 0.5);
00090 //              mvbc->SetColorSelectContour(1, 0.8, 0);
00091                 mvbc->SetWidthLine( this->GetWidthLine()  );
00092 //EED004
00093                 mvbc->ConstructVTKObjects();
00094                 lstSectorBullEye.push_back( mvbc );
00095         }
00096 
00097 
00098 }
00099 
00100 // ----------------------------------------------------------------------------
00101 void manualViewBullEye::AddSplineActor()  // virtual
00102 {
00103         manualViewRoi::AddSplineActor();
00104         int i,size=lstSectorBullEye.size();
00105         for (i=0;i<size;i++)
00106         {
00107                 lstSectorBullEye[i]->AddSplineActor();
00108         }
00109 }
00110 
00111 // ----------------------------------------------------------------------------
00112 void manualViewBullEye::RemoveSplineActor()  // virtual
00113 {
00114         manualViewRoi::RemoveSplineActor();
00115         int i,size=lstSectorBullEye.size();
00116         for (i=0;i<size;i++)
00117         {
00118                 lstSectorBullEye[i]->RemoveSplineActor();
00119         }
00120 }

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1