#include <marImageData.h>
Public Member Functions | |
marImageData (vtkImageData *imagedata) | |
~marImageData () | |
void | SetSpcOriginal (double spc[3]) |
void | SetVoiOriginal (int voi[6]) |
void | AddImageData (vtkImageData *imagedata) |
void | removeImageData (int index) |
void | GetSpcOriginal (double spc[3]) |
void | GetVoiOriginal (int voi[6]) |
vtkImageData * | GetImageData () |
vtkImageData * | GetImageDataT (int t) |
int | GetMaxT () |
int | GetXOriginal (int value) |
int | GetYOriginal (int value) |
int | GetZOriginal (int value) |
Private Attributes | |
double | _spcOriginal [3] |
int | _voiOriginal [6] |
std::vector< vtkImageData * > | _imagedataLST |
Definition at line 12 of file marImageData.h.
marImageData::marImageData | ( | vtkImageData * | imagedata | ) |
Definition at line 8 of file marImageData.cpp.
References _spcOriginal, _voiOriginal, and AddImageData().
00009 { 00010 _spcOriginal[0] = 1; 00011 _spcOriginal[1] = 1; 00012 _spcOriginal[2] = 1; 00013 _voiOriginal[0] = 0; 00014 _voiOriginal[1] = 0; 00015 _voiOriginal[2] = 0; 00016 _voiOriginal[3] = 0; 00017 _voiOriginal[4] = 0; 00018 _voiOriginal[5] = 0; 00019 if(imagedata!=NULL){ 00020 AddImageData(imagedata); 00021 } 00022 }
marImageData::~marImageData | ( | ) |
Definition at line 24 of file marImageData.cpp.
References _imagedataLST.
00025 { 00026 int i,size=_imagedataLST.size(); 00027 for (i=0;i<size;i++) 00028 { 00029 // _imagedataLST[i]->Delete(); 00030 } 00031 _imagedataLST.clear(); 00032 }
void marImageData::AddImageData | ( | vtkImageData * | imagedata | ) |
Definition at line 51 of file marImageData.cpp.
References _imagedataLST.
Referenced by marDynData::loadData(), marImageData(), wxMaracas_ViewerWidget::SetImage(), and wxMPRWidget::setImageData().
00052 { 00053 if (imagedata!=NULL){ 00054 _imagedataLST.push_back( imagedata ); 00055 } 00056 }
vtkImageData * marImageData::GetImageData | ( | ) |
Definition at line 82 of file marImageData.cpp.
References _imagedataLST.
Referenced by wxVtk2DBaseView::Configure(), vtkMPRBaseData::Configure(), wxManualTree_MPRWidget::ConfigureContour(), wxSTLWidget_03::ConfigureProcessing(), wxQuantificationWidgetCT::ConfigureVTK(), wxProcessingCTWidget::ConfigureVTK(), wxEmptyPanel_3_Widget::ConfigureVTK(), wxMaracasImageBrowser02::LoadData(), wxQuantificationWidgetCT::MoveSlider(), wxMaracasImageBrowser02::OnBtSaveVOIData(), wxManualRegistration3D::OnTracking(), vtkInfoTextImage::PutPixelIntensity(), wxQuantificationWidgetCT::RefreshView(), wxManualRegistration3D::RefreshView(), vtkMPRBaseData::SetX(), vtkMPRBaseData::SetY(), and vtkBaseData::SetZ().
00083 { 00084 if(_imagedataLST.size()>0){ 00085 return _imagedataLST[0]; 00086 } 00087 return NULL; 00088 }
vtkImageData * marImageData::GetImageDataT | ( | int | t | ) |
Definition at line 74 of file marImageData.cpp.
References _imagedataLST.
Referenced by vtkBaseData::GetImageData().
00075 { 00076 if(_imagedataLST.size() > t){ 00077 return _imagedataLST[t]; 00078 } 00079 return NULL; 00080 }
int marImageData::GetMaxT | ( | ) |
Definition at line 151 of file marImageData.cpp.
References _imagedataLST.
Referenced by vtkBaseData::SetT().
00152 { 00153 return _imagedataLST.size(); 00154 }
void marImageData::GetSpcOriginal | ( | double | spc[3] | ) |
Definition at line 58 of file marImageData.cpp.
References _spcOriginal.
00059 { 00060 spc[0] = this->_spcOriginal[0]; 00061 spc[1] = this->_spcOriginal[1]; 00062 spc[2] = this->_spcOriginal[2]; 00063 }
void marImageData::GetVoiOriginal | ( | int | voi[6] | ) |
Definition at line 65 of file marImageData.cpp.
References _voiOriginal.
00066 { 00067 int i; 00068 for (i=0;i<6;i++) 00069 { 00070 voi[i] = this->_voiOriginal[i]; 00071 } 00072 }
int marImageData::GetXOriginal | ( | int | value | ) |
Definition at line 103 of file marImageData.cpp.
References _spcOriginal, _voiOriginal, and min.
Referenced by wxQuantificationWidgetCT::MoveSlider(), and vtkInfoTextImage::PutPosition().
00104 { 00105 double min=_spcOriginal[0]; 00106 if (_spcOriginal[1]<min) 00107 { 00108 min = _spcOriginal[1]; 00109 } 00110 if (_spcOriginal[2]<min) 00111 { 00112 min = _spcOriginal[2]; 00113 } 00114 double result = value / ( _spcOriginal[0] / min ) ; 00115 result=result + _voiOriginal[0]; 00116 return (int)result; 00117 }
int marImageData::GetYOriginal | ( | int | value | ) |
Definition at line 119 of file marImageData.cpp.
References _spcOriginal, _voiOriginal, and min.
Referenced by wxQuantificationWidgetCT::MoveSlider(), and vtkInfoTextImage::PutPosition().
00120 { 00121 double min=_spcOriginal[0]; 00122 if (_spcOriginal[1]<min) 00123 { 00124 min = _spcOriginal[1]; 00125 } 00126 if (_spcOriginal[2]<min) 00127 { 00128 min = _spcOriginal[2]; 00129 } 00130 double result = value / ( _spcOriginal[1] / min ) ; 00131 result=result + _voiOriginal[2]; 00132 return (int)result; 00133 }
int marImageData::GetZOriginal | ( | int | value | ) |
Definition at line 135 of file marImageData.cpp.
References _spcOriginal, _voiOriginal, and min.
Referenced by wxQuantificationWidgetCT::MoveSlider(), and vtkInfoTextImage::PutPosition().
00136 { 00137 double min=_spcOriginal[0]; 00138 if (_spcOriginal[1]<min) 00139 { 00140 min = _spcOriginal[1]; 00141 } 00142 if (_spcOriginal[2]<min) 00143 { 00144 min = _spcOriginal[2]; 00145 } 00146 double result = value / ( _spcOriginal[2] / min ) ; 00147 result=result + _voiOriginal[4]; 00148 return (int)result; 00149 }
void marImageData::removeImageData | ( | int | index | ) |
Definition at line 90 of file marImageData.cpp.
References _imagedataLST.
Referenced by wxMaracas_ViewerWidget::SetImage(), and wxMPRWidget::setImageData().
00091 { 00092 if(index < _imagedataLST.size()){ 00093 00094 //vtkImageData* img = _imagedataLST[index]; 00095 for(int i = index; i < _imagedataLST.size()-1; i++){ 00096 _imagedataLST[i] = _imagedataLST[i+1]; 00097 } 00098 _imagedataLST.pop_back(); 00099 //delete img; 00100 } 00101 }
void marImageData::SetSpcOriginal | ( | double | spc[3] | ) |
Definition at line 35 of file marImageData.cpp.
References _spcOriginal.
Referenced by marDynData::loadData().
00036 { 00037 this->_spcOriginal[0]=spc[0]; 00038 this->_spcOriginal[1]=spc[1]; 00039 this->_spcOriginal[2]=spc[2]; 00040 }
void marImageData::SetVoiOriginal | ( | int | voi[6] | ) |
Definition at line 42 of file marImageData.cpp.
References _voiOriginal.
Referenced by marDynData::loadData().
00043 { 00044 int i; 00045 for (i=0;i<6;i++) 00046 { 00047 this->_voiOriginal[i] = voi[i]; 00048 } 00049 }
std::vector<vtkImageData *> marImageData::_imagedataLST [private] |
Definition at line 37 of file marImageData.h.
Referenced by AddImageData(), GetImageData(), GetImageDataT(), GetMaxT(), removeImageData(), and ~marImageData().
double marImageData::_spcOriginal[3] [private] |
Definition at line 35 of file marImageData.h.
Referenced by GetSpcOriginal(), GetXOriginal(), GetYOriginal(), GetZOriginal(), marImageData(), and SetSpcOriginal().
int marImageData::_voiOriginal[6] [private] |
Definition at line 36 of file marImageData.h.
Referenced by GetVoiOriginal(), GetXOriginal(), GetYOriginal(), GetZOriginal(), marImageData(), and SetVoiOriginal().