#include <vtkPlane2DView.h>
Public Member Functions | |
vtkPlane2DView (wxWindow *parent) | |
~vtkPlane2DView () | |
void | Configure () |
void | ExtractPlane () |
int | GetImgSize () |
void | SetImgSize (int imgSize) |
void | RotationStart () |
void | RotationDrag (double vx, double vy, bool ok_v, bool ok_ang) |
virtual int | GetActualSlice () |
virtual void | SetActualSlice (int slice) |
virtual void | Refresh () |
vtkMPRBaseData * | GetVtkmprbasedata () |
vtkInteractorStylePlane2D * | GetInteractorstyleplane2D () |
void | SetActive (bool active) |
void | SetVisibleLine (bool ok) |
void | TransfromCoordViewWorld2 (double &X, double &Y, double &Z) |
int | GetMipWidth () |
void | SetMipWidth (int value) |
bool | GetMipVisualization () |
void | SetMipVisualization (bool ok) |
void | ResetBack () |
virtual void | Configure (bool okimage=true) |
vtkBaseData * | GetVtkBaseData () |
void | SetVtkBaseData (vtkBaseData *vtkbasedata) |
virtual void | ResetView () |
void | SetInteractorStyleImage (vtkInteractorStyleBaseView *interactorstylebaseview) |
virtual vtkRenderer * | GetRenderer () |
virtual vtkRenderWindow * | GetRenWin () |
virtual void | TransformCoordinate_spacing_ViewToModel (double &X, double &Y, double &Z) |
virtual void | TransformCoordinate_spacing_ModelToView (double &X, double &Y, double &Z) |
virtual void | GetSpacing (double spc[3]) |
void | setColorTransferFunction (vtkColorTransferFunction *colortable) |
void | setWindowLevel (double level) |
void | setColorLevel (double level) |
wxVTKRenderWindowInteractor * | GetWxVTKRenderWindowInteractor () throw (char*) |
virtual void | RefreshView () |
virtual void | TransFromCoordScreenToWorld (double &X, double &Y, double &Z, bool keepNormalDirection=false, int type=2) |
void | SetInteractorStyleBaseView (vtkInteractorStyleImage *interactorStyle) |
vtkInteractorStyleImage * | GetInteractorStyleBaseView () |
Public Attributes | |
vtkImageViewer2_XYZ * | _imageViewer2XYZ |
Private Member Functions | |
void | SetPSource (int sizeIma) |
void | HorizontalLine () |
void | ResetPlane () |
void | Extract_One_PlaneVTK () |
void | Extract_MIP_PlaneVTK () |
Private Attributes | |
bool | _active |
int | _mip_width |
bool | _mip_visualization |
double | _backX |
double | _backY |
double | _backZ |
double | _backOrient [4] |
double | _ang |
double | _vxb |
double | _vyb |
double | _n [3] |
double | _cx |
double | _cy |
double | _cz |
int | _sizeIma |
vtkImageData * | _imageResult |
vtkPoints * | _pts |
vtkActor * | _lineActor |
vtkPolyDataMapper * | _lineMapper |
vtkPolyData * | _pd |
vtkProbeFilter * | _3Dslices |
vtkPlaneSource * | _pSource |
vtkStructuredPoints * | _stPoints |
vtkImageChangeInformation * | _change |
vtkTransform * | _transform1 |
vtkTransform * | _transform2 |
vtkInteractorStylePlane2D * | _interactorstyleplane2D |
vtkInfoTextImage * | _vtkInfoTextImage |
vtkInfoTextImageInteractorPlane2D * | _vtkInfoTextImageInteractorPlane2D |
Definition at line 17 of file vtkPlane2DView.h.
vtkPlane2DView::vtkPlane2DView | ( | wxWindow * | parent | ) |
Definition at line 9 of file vtkPlane2DView.cxx.
References _3Dslices, _active, _backOrient, _backX, _backY, _backZ, _change, _imageResult, _interactorstyleplane2D, _lineActor, _lineMapper, _mip_visualization, _mip_width, _pd, _pSource, _pts, _sizeIma, _stPoints, _transform1, and _transform2.
00010 : wxVtk2DBaseView(parent) 00011 { 00012 00013 _backX = -99999; 00014 _backY = -99999; 00015 _backZ = -99999; 00016 00017 _backOrient[0] = -99999; 00018 _backOrient[1] = -99999; 00019 _backOrient[2] = -99999; 00020 _backOrient[3] = -99999; 00021 00022 _active = true; 00023 _mip_visualization = true; 00024 _mip_width = 2; 00025 00026 _transform1 = vtkTransform::New(); 00027 _transform2 = vtkTransform::New(); 00028 _transform1->Identity(); 00029 _transform2->Identity(); 00030 00031 _sizeIma = 200; 00032 00033 _pSource = NULL; 00034 _3Dslices = NULL; 00035 _stPoints = NULL; 00036 _change = NULL; 00037 _imageResult = NULL; 00038 00039 // line horizontal 00040 _pts = NULL; 00041 _lineActor = NULL; 00042 _lineMapper = NULL; 00043 _pd = NULL; 00044 00045 _interactorstyleplane2D = false; 00046 }
vtkPlane2DView::~vtkPlane2DView | ( | ) |
Definition at line 48 of file vtkPlane2DView.cxx.
References _lineActor, _lineMapper, _pd, _pts, _transform1, _transform2, and ResetPlane().
00049 { 00050 ResetPlane(); 00051 00052 // Horizontal Line 00053 if (_pts != NULL) { _pts -> Delete(); } 00054 if (_lineActor != NULL) { _lineActor -> Delete(); } 00055 if (_lineMapper != NULL) { _lineMapper -> Delete(); } 00056 if (_pd != NULL) { _pd -> Delete(); } 00057 00058 _transform1 -> Delete(); 00059 _transform2 -> Delete(); 00060 }
void wxVtk2DBaseView::Configure | ( | bool | okimage = true |
) | [virtual, inherited] |
Definition at line 84 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_imageViewer2XYZ, wxVtk2DBaseView::_vtkIinfoTextImage, wxVtk2DBaseView::_vtkIinfoTextImageInteractor, vtkInfoTextImage::Configure(), wxVtkBaseView::Configure(), marImageData::GetImageData(), wxVtkBaseView::GetInteractorStyleBaseView(), vtkBaseData::GetMarImageData(), wxVtk2DBaseView::GetVtkBaseData(), vtkImageViewer2_XYZ::GetVtkImageViewer2(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), vtkInteractorStyleBaseView2D::New(), vtkImageViewer2_XYZ::SetExtentDimension(), wxVtk2DBaseView::SetInteractorStyleImage(), vtkInfoTextImage::SetMarImageData(), vtkInfoTextImageInteractor::SetModelVtkInfoTextImage(), and vtkInfoTextImage::SetWxVtk2DBaseView().
Referenced by wxQuantificationWidgetCT::ConfigureVTK(), wxProcessingCTWidget::ConfigureVTK(), wxEmptyPanel_3_Widget::ConfigureVTK(), and wxMaracasImageBrowser02::LoadData().
00085 { 00086 double spx,spy,spz; 00087 int x1,x2,y1,y2,z1,z2; 00088 wxVtkBaseView::Configure(); 00089 00090 // EED 17 Oct 2007 00091 if (_imageViewer2XYZ==NULL) 00092 { 00093 _imageViewer2XYZ = new vtkImageViewer2_XYZ(); 00094 wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor(); 00095 _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren ); 00096 SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() ); 00097 } 00098 00099 00100 vtkImageData *imageData = GetVtkBaseData()->GetMarImageData()->GetImageData(); 00101 if (imageData!=NULL){ 00102 imageData->UpdateInformation(); 00103 imageData->SetUpdateExtent( imageData->GetWholeExtent()); 00104 imageData->Update(); 00105 if (okimage==true){ 00106 imageData->GetSpacing (spx,spy,spz); 00107 imageData->GetExtent (x1,x2,y1,y2,z1,z2); 00108 00109 00110 _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData ); 00111 _imageViewer2XYZ->SetExtentDimension(x1,x2,y1,y2,z1,z2); 00112 double range[2]; 00113 imageData->GetScalarRange(range); 00114 if (range[1]<20000){ 00115 _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( (range[1]-range[0])/2 ); 00116 _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( (range[1]+range[0])/4 ); 00117 } else { 00118 _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow( 1000 ); 00119 _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel( 500 ); 00120 } 00121 // EED 31 Janvier 2007 00122 //vtkImageActor *vtkimageactor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor (); 00123 //vtkimageactor->InterpolateOff (); 00124 //vtkLookupTable * _collookup = vtkLookupTable::New( ); 00125 //_collookup->SetNumberOfColors( 256 ); 00126 //_collookup->SetTableRange( 0 , 255 ); 00127 //_collookup->Build( ); 00128 //_collookup->SetTableValue( 0 , 1 , 0 , 0 , 1 ); 00129 //_collookup->SetTableValue(128 , 0 , 0 , 1 , 1 ); 00130 //_collookup->SetTableValue(255 , 0 , 1 , 0 , 1 ); 00131 //_imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel ()->SetLookupTable(_collookup ); 00132 00133 00134 // EED 17 Oct 2007 00135 // SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() ); 00136 00137 00138 vtkImageViewer2 *IV2=_imageViewer2XYZ->GetVtkImageViewer2(); 00139 vtkCamera *camera = IV2->GetRenderer()->GetActiveCamera(); 00140 00141 //EED 17Avril2009 00142 /* 00143 camera->SetViewUp ( spx*0 , -spy*1 , spz*0 ); 00144 camera->SetPosition ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , -spz*10000 ); 00145 camera->SetFocalPoint ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0 ); 00146 */ 00147 camera->SetViewUp ( spx*0 , spy*1 , spz*0 ); 00148 camera->SetPosition ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*10000 ); 00149 camera->SetFocalPoint ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0 ); 00150 00151 00152 camera->SetClippingRange( 0.01 , 1000000 ); 00153 camera->ComputeViewPlaneNormal(); 00154 camera->SetParallelScale( spx*(x2-x1)/3.0 ); 00155 00156 // text information over the graphic window 00157 if(_vtkIinfoTextImage == NULL){ 00158 _vtkIinfoTextImage = new vtkInfoTextImage(); 00159 _vtkIinfoTextImageInteractor = new vtkInfoTextImageInteractor(); 00160 ((vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView())->AddInteractorStyleMaracas(_vtkIinfoTextImageInteractor); 00161 } 00162 _vtkIinfoTextImage->SetWxVtk2DBaseView(this); 00163 _vtkIinfoTextImage->SetMarImageData( GetVtkBaseData()->GetMarImageData() ); 00164 _vtkIinfoTextImageInteractor->SetModelVtkInfoTextImage(_vtkIinfoTextImage); 00165 _vtkIinfoTextImage->Configure(); 00166 00167 } // okimage 00168 } // imageData 00169 00170 }
void vtkPlane2DView::Configure | ( | ) | [virtual] |
Reimplemented from wxVtkBaseView.
Definition at line 329 of file vtkPlane2DView.cxx.
References _3Dslices, _change, wxVtk2DBaseView::_imageViewer2XYZ, _interactorstyleplane2D, _pSource, _sizeIma, _stPoints, _vtkInfoTextImage, _vtkInfoTextImageInteractorPlane2D, vtkInfoTextImage::Configure(), ExtractPlane(), wxVtkBaseView::GetInteractorStyleBaseView(), vtkImageViewer2_XYZ::GetVtkImageViewer2(), GetVtkmprbasedata(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), HorizontalLine(), vtkInteractorStyleBaseView2D::New(), wxVtk2DBaseView::SetInteractorStyleImage(), vtkInfoTextImage::SetMarImageData(), vtkInfoTextImageInteractor::SetModelVtkInfoTextImage(), and vtkInfoTextImage::SetWxVtk2DBaseView().
00330 { 00331 wxVtk2DBaseView::Configure(false); 00332 00333 HorizontalLine(); 00334 // Borrame 00335 // CircleLine(); 00336 00337 _pSource = vtkPlaneSource::New( ); 00338 _3Dslices = vtkProbeFilter::New( ) ; 00339 _stPoints = vtkStructuredPoints::New( ); 00340 _change = vtkImageChangeInformation::New(); 00341 00342 wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor(); 00343 ExtractPlane(); 00344 // SetActive(false); 00345 _imageViewer2XYZ -> GetVtkImageViewer2() -> SetupInteractor ( iren ); 00346 00347 SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() ); 00348 00349 _interactorstyleplane2D = new vtkInteractorStylePlane2D(); 00350 ((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _interactorstyleplane2D ); 00351 00352 vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera(); 00353 00354 camera->SetViewUp ( 0 , 1 , 0 ); 00355 camera->SetPosition ((0+_sizeIma)/2 , (0+_sizeIma)/2 , 10000 ); 00356 00357 camera->SetFocalPoint ((0+_sizeIma)/2 , (0+_sizeIma)/2 , 0 ); 00358 camera->SetClippingRange(0.01, 100000); 00359 camera->ComputeViewPlaneNormal(); 00360 camera->SetParallelScale( _sizeIma/3.0 ); 00361 00362 // text information over the graphic window 00363 _vtkInfoTextImage = new vtkInfoTextImage(); 00364 _vtkInfoTextImageInteractorPlane2D = new vtkInfoTextImageInteractorPlane2D(); 00365 _vtkInfoTextImage->SetWxVtk2DBaseView(this); 00366 _vtkInfoTextImage->SetMarImageData( GetVtkmprbasedata()->GetMarImageData() ); 00367 _vtkInfoTextImageInteractorPlane2D->SetModelVtkInfoTextImage(_vtkInfoTextImage); 00368 _vtkInfoTextImage->Configure(); 00369 ((vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView())->AddInteractorStyleMaracas(_vtkInfoTextImageInteractorPlane2D); 00370 00371 00372 }
void vtkPlane2DView::Extract_MIP_PlaneVTK | ( | ) | [private] |
Definition at line 223 of file vtkPlane2DView.cxx.
References _imageResult, wxVtk2DBaseView::_imageViewer2XYZ, _mip_width, _pSource, _sizeIma, vtkBaseData::GetImageData(), vtkImageViewer2_XYZ::GetVtkImageViewer2(), GetVtkmprbasedata(), and SetPSource().
Referenced by ExtractPlane().
00224 { 00225 00226 int mipWidth; 00227 double sp; 00228 int sizeWidth = (_mip_width*2)+1 ; 00229 int deltaPixel; 00230 int iWidth,itmp,tmpSizeWith; 00231 00232 double spc[3]; 00233 vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData(); 00234 SetPSource(_sizeIma); 00235 imagedata->GetSpacing(spc); 00236 00237 bool heightDefinition=false; 00238 if (_mip_width<3) 00239 { 00240 heightDefinition=true; 00241 } 00242 00243 if (heightDefinition==true) 00244 { 00245 mipWidth = _mip_width; 00246 sp = spc[0]; 00247 deltaPixel = 1; 00248 } else { 00249 mipWidth = 2; 00250 tmpSizeWith = (mipWidth*2) + 1; 00251 sp = (spc[0]*sizeWidth)/tmpSizeWith; 00252 sizeWidth = tmpSizeWith; 00253 deltaPixel = 4; 00254 } 00255 00256 00257 00258 std::vector< vtkProbeFilter* > slicesLST; 00259 00260 _pSource->Push( -mipWidth * sp ); 00261 _pSource->Update(); 00262 00263 for ( iWidth=0 ; iWidth<sizeWidth ; iWidth++ ) 00264 { 00265 vtkProbeFilter *slice = vtkProbeFilter::New(); 00266 slice -> SetInput( ( vtkDataSet* )_pSource->GetOutput( ) ); 00267 slice -> SetSource( imagedata ); 00268 slice -> Update( ); 00269 slicesLST.push_back( slice ); 00270 _pSource->Push( sp ); 00271 } 00272 00273 if (_imageResult ==NULL) 00274 { 00275 _imageResult = vtkImageData::New(); 00276 _imageResult -> SetDimensions(_sizeIma,_sizeIma,1); 00277 _imageResult -> SetSpacing(1,1,1); 00278 _imageResult -> SetScalarType( imagedata->GetScalarType() ); 00279 _imageResult -> SetExtent(0,_sizeIma-1,0,_sizeIma-1,0,0); 00280 _imageResult -> SetWholeExtent(0,_sizeIma-1,0,_sizeIma-1,0,0); 00281 _imageResult -> AllocateScalars(); 00282 _imageResult -> Update(); 00283 } 00284 00285 unsigned short *pTemp; 00286 unsigned short *pResult; 00287 pResult = (unsigned short*)_imageResult->GetScalarPointer( 0 , 0 , 0 ); 00288 00289 int iPixels , sizePixels = _sizeIma*_sizeIma; 00290 for(iPixels=0 ; iPixels<sizePixels ; iPixels=iPixels+deltaPixel) 00291 { 00292 00293 pTemp = (unsigned short*)slicesLST[0]->GetOutput()->GetPointData()->GetScalars()->GetVoidPointer(0); 00294 00295 pResult = (unsigned short*)_imageResult->GetScalarPointer( 0 , 0 , 0 ); 00296 pResult[iPixels] = pTemp[iPixels]; 00297 00298 for (iWidth=1;iWidth<sizeWidth;iWidth++) 00299 { 00300 pTemp = (unsigned short*)slicesLST[iWidth]->GetOutput()->GetPointData()->GetScalars()->GetVoidPointer(0); 00301 00302 if (pResult[iPixels]< pTemp[iPixels]) 00303 { 00304 pResult[iPixels] = pTemp[iPixels]; 00305 } 00306 } 00307 00308 if (deltaPixel!=1) 00309 { 00310 for (itmp=1;itmp<deltaPixel;itmp++) 00311 { 00312 pResult[iPixels+itmp] = pResult[iPixels]; 00313 } 00314 } 00315 00316 } 00317 00318 for (iWidth=0;iWidth<sizeWidth;iWidth++) 00319 { 00320 slicesLST[iWidth]->Delete(); 00321 } 00322 00323 _imageResult->Modified(); 00324 _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _imageResult ); 00325 00326 }
void vtkPlane2DView::Extract_One_PlaneVTK | ( | ) | [private] |
Definition at line 202 of file vtkPlane2DView.cxx.
References _3Dslices, wxVtk2DBaseView::_imageViewer2XYZ, _pSource, _sizeIma, _stPoints, vtkBaseData::GetImageData(), vtkImageViewer2_XYZ::GetVtkImageViewer2(), GetVtkmprbasedata(), and SetPSource().
Referenced by ExtractPlane().
00203 { 00204 vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData(); 00205 SetPSource(_sizeIma); 00206 _3Dslices -> SetInput( ( vtkDataSet* )_pSource->GetOutput( ) ); 00207 _3Dslices -> SetSource( imagedata ); 00208 _3Dslices -> Update( ); 00209 _stPoints -> GetPointData( )->SetScalars( _3Dslices->GetOutput()->GetPointData()->GetScalars() ); 00210 _stPoints -> SetDimensions( _sizeIma, _sizeIma, 1 ); 00211 _stPoints -> SetScalarType( imagedata->GetScalarType() ); 00212 _stPoints -> SetScalarTypeToShort(); 00213 _stPoints -> Update(); 00214 // _change -> SetInput( _stPoints ); 00215 // _change -> Update(); //important 00216 _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _stPoints ); 00217 // _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _change->GetOutput() ); 00218 // vtkImageActor *imageActor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor(); 00219 }
void vtkPlane2DView::ExtractPlane | ( | ) |
Definition at line 134 of file vtkPlane2DView.cxx.
References _active, _backOrient, _backX, _backY, _backZ, _interactorstyleplane2D, _mip_visualization, Extract_MIP_PlaneVTK(), Extract_One_PlaneVTK(), vtkBaseData::GetImageData(), vtkInteractorStylePlane2D::GetStateRotate(), vtkMPRBaseData::GetTransformOrientation(), GetVtkmprbasedata(), vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), and vtkBaseData::GetZ().
Referenced by Configure(), and Refresh().
00135 { 00136 00137 double x = GetVtkmprbasedata()->GetX(); 00138 double y = GetVtkmprbasedata()->GetY(); 00139 double z = GetVtkmprbasedata()->GetZ(); 00140 00141 double spc[3]; 00142 vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData(); 00143 imagedata->GetSpacing(spc); 00144 x=x*spc[0]; 00145 y=y*spc[1]; 00146 z=z*spc[2]; 00147 00148 vtkTransform *transform = GetVtkmprbasedata()->GetTransformOrientation(); 00149 double orientation[4]; 00150 transform->GetOrientationWXYZ(orientation); 00151 00152 bool okOrientation=true; 00153 if ((orientation[0]!=_backOrient[0]) || (orientation[1]!=_backOrient[1]) || 00154 (orientation[2]!=_backOrient[2]) || (orientation[3]!=_backOrient[3])) 00155 { 00156 okOrientation=false; 00157 } 00158 00159 bool okPosicion=true; 00160 if ( (x!=_backX) || (y!=_backY) || (z!=_backZ) ) 00161 { 00162 okPosicion=false; 00163 } 00164 00165 if ((okPosicion==false) || (okOrientation==false) ) { 00166 if (_active==true){ 00167 00168 bool ok = false; 00169 00170 if ( _mip_visualization==true ) 00171 { 00172 if (_interactorstyleplane2D!=NULL) 00173 { 00174 if (_interactorstyleplane2D->GetStateRotate()==false ) 00175 { 00176 ok=true; 00177 } 00178 } 00179 } 00180 // ok=true; 00181 00182 if (ok==true) 00183 { 00184 Extract_MIP_PlaneVTK(); 00185 } else { 00186 Extract_One_PlaneVTK(); 00187 } // ok 00188 00189 } // active 00190 _backX=x; 00191 _backY=y; 00192 _backZ=z; 00193 _backOrient[0]=orientation[0]; 00194 _backOrient[1]=orientation[1]; 00195 _backOrient[2]=orientation[2]; 00196 _backOrient[3]=orientation[3]; 00197 } //okPosition okOrientation 00198 }
int vtkPlane2DView::GetActualSlice | ( | ) | [virtual] |
Reimplemented from wxVtk2DBaseView.
Definition at line 455 of file vtkPlane2DView.cxx.
References _cx, _cy, _cz, GetVtkmprbasedata(), vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), and vtkBaseData::GetZ().
00456 { 00457 _cx = GetVtkmprbasedata()->GetX(); 00458 _cy = GetVtkmprbasedata()->GetY(); 00459 _cz = GetVtkmprbasedata()->GetZ(); 00460 return 0; 00461 }
int vtkPlane2DView::GetImgSize | ( | ) |
Definition at line 450 of file vtkPlane2DView.cxx.
References _sizeIma.
Referenced by wxWidgetMesure2D_Plane::ConfigureCircleLine(), manualViewPerpPlaneContour::FilterCordinateXYZ(), manualViewPerpPlaneContour::RefreshContour(), and TransfromCoordViewWorld2().
00451 { 00452 return _sizeIma; 00453 }
vtkInteractorStyleImage * wxVtkBaseView::GetInteractorStyleBaseView | ( | ) | [inherited] |
Definition at line 134 of file wxVtkBaseView.cxx.
References wxVtkBaseView::_interactorStyle.
Referenced by wxWidgetMesure2D::ActiveMessureTool(), wxQuantificationWidgetCT::addManualContours(), wxMaracasRenderTabbedPanel::addMPROptions(), wxVtkMPR2DView::Configure(), wxVtk2DBaseView::Configure(), wxSphereView::Configure(), Configure(), wxWidgetMesure2D::ConfigureA(), wxManualTree_MPRWidget::ConfigureContour(), wxMPRWidget::ConfigureVTK(), wxManualTree_MPRWidget::ConfigureVTK(), wxSegmentationFM3DWidget::ConfigureVTK(), wxManualSegmentation_MPRWidget::ConfigureVTK(), wxManualRegistration3D::ConfigureVTK(), wxEmptyPanel_3_Widget::ConfigureVTK(), ContourVOIWidget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), wxManualRegistration3D::ConfigureVTK_B(), wxImageViewerWidget::ConstructVTK(), vtkmyPWCallback_3DPointWidget::Execute(), wxMaracasImageBrowser02::LoadData(), wxQuantificationWidgetCT::OnContourLumen(), wxQuantificationWidgetCT::OnContourWall(), wxVTKRenderWindowInteractorPlus::OnLeftDClick(), wxVTKRenderWindowInteractorPlus::OnMiddleDClick(), wxVTKRenderWindowInteractorPlus::OnMouseWheel(), wxVTKRenderWindowInteractorPlus::OnRightDClick(), manualContourContainer::refreshCalc(), manualContourContainer::refreshHypo(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), and wxVtkBaseView::TransFromCoordScreenToWorld().
00135 { 00136 return _interactorStyle; 00137 }
vtkInteractorStylePlane2D * vtkPlane2DView::GetInteractorstyleplane2D | ( | ) |
Definition at line 485 of file vtkPlane2DView.cxx.
References _interactorstyleplane2D.
Referenced by wxManualTree_MPRWidget::ConfigureContour().
00486 { 00487 return this->_interactorstyleplane2D; 00488 }
bool vtkPlane2DView::GetMipVisualization | ( | ) |
Definition at line 465 of file vtkPlane2DView.cxx.
References _mip_visualization.
00466 { 00467 return _mip_visualization; 00468 }
int vtkPlane2DView::GetMipWidth | ( | ) |
Definition at line 471 of file vtkPlane2DView.cxx.
References _mip_width.
00472 { 00473 return _mip_width; 00474 }
vtkRenderer * wxVtk2DBaseView::GetRenderer | ( | ) | [virtual, inherited] |
Reimplemented from wxVtkBaseView.
Definition at line 229 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_imageViewer2XYZ, and vtkImageViewer2_XYZ::GetVtkImageViewer2().
Referenced by vtkInfoTextImage::Create_Text_Label().
00230 { 00231 return _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer(); 00232 }
vtkRenderWindow * wxVtk2DBaseView::GetRenWin | ( | ) | [virtual, inherited] |
Reimplemented from wxVtkBaseView.
Definition at line 234 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_imageViewer2XYZ, and vtkImageViewer2_XYZ::GetVtkImageViewer2().
Referenced by wxMaracasSuperpositionPanel::Refresh().
00235 { 00236 return _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderWindow(); 00237 }
void wxVtk2DBaseView::GetSpacing | ( | double | spc[3] | ) | [virtual, inherited] |
Reimplemented from wxVtkBaseView.
Definition at line 241 of file wxVtk2DBaseView.cxx.
References vtkBaseData::GetImageData(), and wxVtk2DBaseView::GetVtkBaseData().
00242 { 00243 vtkImageData *imageData = GetVtkBaseData()->GetImageData(); 00244 imageData->GetSpacing(spc); 00245 }
vtkBaseData * wxVtk2DBaseView::GetVtkBaseData | ( | ) | [inherited] |
Definition at line 187 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_vtkbasedata.
Referenced by wxVtk2DBaseView::Configure(), wxSphereView::DefineImageSphere(), wxMaracasCoutourTool::GetDataValue(), wxVtk2DBaseView::GetSpacing(), ContourVOIWidget::GetVOI(), wxVtkMPR2DView::GetVtkmprbasedata(), GetVtkmprbasedata(), wxWidgetSliderMinMaxVOI::onActualChange_Bar(), wxWidgetSliderMinMaxVOI::onEndChange_Bar(), wxMaracasCoutourTool::OnSaveContour(), wxMaracasCoutourTool::OnSaveControlPoints(), wxWidgetSliderMinMaxVOI::onStartChange_Bar(), wxVtk2DBaseView::Refresh(), wxVtk2DBaseView::ResetView(), RotationDrag(), RotationStart(), SetPSource(), and wxVtkMPR2DView::TransFromCoordScreenToWorld().
00188 { 00189 return _vtkbasedata; 00190 }
vtkMPRBaseData * vtkPlane2DView::GetVtkmprbasedata | ( | ) |
Definition at line 82 of file vtkPlane2DView.cxx.
References wxVtk2DBaseView::GetVtkBaseData().
Referenced by Configure(), Extract_MIP_PlaneVTK(), Extract_One_PlaneVTK(), ExtractPlane(), manualViewPerpPlaneContour::FilterCordinateXYZ(), GetActualSlice(), vtkInteractorStylePlane2D::OnLeftDClick(), SetActualSlice(), SetPSource(), and TransfromCoordViewWorld2().
00083 { 00084 return (vtkMPRBaseData*)GetVtkBaseData(); 00085 }
wxVTKRenderWindowInteractor * wxVtkBaseView::GetWxVTKRenderWindowInteractor | ( | ) | throw (char*) [inherited] |
Reimplemented in wxVtk2DView_TMP.
Definition at line 38 of file wxVtkBaseView.cxx.
References wxVtkBaseView::_iren.
Referenced by wxMaracasRenderTabbedPanel::addRemoveActorMPR(), wxVtkClipping3DView::Configure(), wxVtk3DBaseView::Configure(), wxVtk2DBaseView::Configure(), Configure(), wxWidgetMesure2D::ConfigureA(), wxManualRegistration3D::Create3DView(), wxManualTree_MPRWidget::Create3DViewContour(), wxSegmentationFM3DWidget::Create3DViewContour(), wxManualSegmentation_MPRWidget::Create3DViewContour(), wxMPRWidget::CreateMPRPanel4View(), wxPanelCuttingImageData::CreatePlotHistogrammeInterface(), wxMaracas_ManualContour_Panel::CreateSplitePanel(), wxMPRWidget::CreateView(), wxQuantificationWidgetCT::CreateView2DPanel(), wxProcessingCTWidget::CreateViewPanel(), wxEmptyPanelWidget::CreateViewPanel(), wxEmptyPanel_3_Widget::CreateViewPanel(), vtkInteractorStyleBaseView::EvaluateToRefresh(), wxMaracasImageBrowser02::LoadData(), wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(), wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(), wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(), manualContourBaseControler::OnChar(), wxVtkClipping3DViewCntrlPanel::OnColor(), wxPanelCuttingImageData::OnExtract(), wxVtkClipping3DViewCntrlPanel::OnIsoValue(), manualContourBaseControler::OnLeftButtonDown(), manualContour3DControler::OnLeftButtonDown(), vtkInteractorStyleSphere::OnLeftButtonUp(), manualContourBaseControler::OnLeftButtonUp(), vtkInteractorStyleMPRView::OnLeftDClick(), manualContourBaseControler::OnLeftDClick(), manualInteractorWindowLevel::OnMiddleButtonDown(), manualContourBaseControler::OnMiddleButtonDown(), vtkInfoTextImageInteractorPlane2D::OnMouseMove(), vtkInfoTextImageInteractor::OnMouseMove(), manualInteractorWindowLevel::OnMouseMove(), manualContourBaseControler::OnMouseMove(), wxVtkClipping3DViewCntrlPanel::OnOpacity(), wxVtkMPR3DViewCntrlPanel::OnPositionX(), wxVtkMPR3DViewCntrlPanel::OnPositionY(), wxVtkMPR3DViewCntrlPanel::OnPositionZ(), wxMaracasRenderTabbedPanel::OnRefreshView(), wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame(), manualContourBaseControler::OnRightButtonDown(), wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX(), wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY(), wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ(), wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(), wxVtkClipping3DViewVolCntrlPanel::OnVisibleVolume(), wxVtkClipping3DViewCntrlPanel::OnVisibleVolume(), wxVtkBaseView::Refresh(), wxVtk3DBaseView::Refresh(), manualViewBaseContour::Refresh(), wxVtk2DBaseView::ResetView(), vtkInteractorStyle3DView::SelectMarchibCubePoint(), wxVtk2DBaseView::SetInteractorStyleImage(), wxVtkMPR3DViewCntrlPanel::SetVisibleX(), wxVtkMPR3DViewCntrlPanel::SetVisibleY(), wxVtkMPR3DViewCntrlPanel::SetVisibleZ(), and wxMaracas_ViewerWidget::wxMaracas_ViewerWidget().
void vtkPlane2DView::HorizontalLine | ( | ) | [private] |
Definition at line 375 of file vtkPlane2DView.cxx.
References wxVtk2DBaseView::_imageViewer2XYZ, _lineActor, _lineMapper, _pd, _pts, and vtkImageViewer2_XYZ::GetVtkImageViewer2().
Referenced by Configure().
00376 { 00377 // Axe Horizontal 00378 _pts = vtkPoints::New(); 00379 _pts->SetNumberOfPoints(2); 00380 _pts->SetPoint(0, -1000 , -1000 , -1000 ); 00381 _pts->SetPoint(1, 1000 , 1000 , 1000 ); 00382 vtkCellArray *lines = vtkCellArray::New(); 00383 lines->InsertNextCell(2); 00384 lines->InsertCellPoint(0); 00385 lines->InsertCellPoint(1); 00386 _pd = vtkPolyData::New(); 00387 _pd->SetPoints( _pts ); 00388 _pd->SetLines( lines ); 00389 lines->Delete(); //do not delete lines ?? 00390 _lineActor = vtkActor::New(); 00391 _lineMapper = vtkPolyDataMapper::New(); 00392 _lineMapper->SetInput(_pd); 00393 _lineMapper->ImmediateModeRenderingOn(); 00394 _lineActor->SetMapper(_lineMapper); 00395 _lineActor->GetProperty()->BackfaceCullingOn(); 00396 _lineActor->GetProperty()->SetDiffuseColor(0,0,1); 00397 _lineActor->GetProperty()->SetLineWidth(2); 00398 _lineActor->GetProperty()->SetOpacity(0); 00399 _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineActor ); 00400 }
void vtkPlane2DView::Refresh | ( | ) | [virtual] |
Reimplemented from wxVtk2DBaseView.
Definition at line 439 of file vtkPlane2DView.cxx.
References ExtractPlane().
Referenced by wxWidgetMesure2D_Plane_in_MPR::OnActiveLink(), and wxMaracas_ManualContour_Panel::OnRefreshView().
00440 { 00441 ExtractPlane(); 00442 wxVtkBaseView::Refresh(); 00443 }
void wxVtkBaseView::RefreshView | ( | ) | [virtual, inherited] |
Reimplemented in wxSphereView.
Definition at line 70 of file wxVtkBaseView.cxx.
References wxVtkBaseView::GetRenWin().
Referenced by wxQuantificationWidgetCT::CreateManualContours(), wxWidgetMesure2D_Plane::OnActiveCirlcle(), wxWidgetMesure2D_Plane::OnActiveLine(), wxWidgetMesure2D_Plane_in_MPR::OnActiveLink(), wxWidgetMesure2D::OnActiveMessureTool(), wxWidgetMesure2D::OnCloseContour(), wxMaracas_ManualContour_Panel::OnRefreshView(), wxQuantificationWidgetCT::OnShowCalc(), wxQuantificationWidgetCT::OnShowHypo(), wxQuantificationWidgetCT::OnShowLumen(), wxQuantificationWidgetCT::OnShowWall(), wxWidgetMesure2D::OnVisibleInformation(), wxWidgetMesure2D::OnVisibleMessureTool(), and wxProcessingCTWidget::Refresh().
00071 { 00072 // EED 10 Oct 2007 00073 00074 #if defined(WIN32) 00075 GetRenWin()->Render(); 00076 #else 00077 //GetRenWin()->Render(); 00078 #endif 00079 00080 }
void vtkPlane2DView::ResetBack | ( | ) |
Definition at line 63 of file vtkPlane2DView.cxx.
References _backOrient, _backX, _backY, and _backZ.
Referenced by vtkInteractorStylePlane2D::OnLeftButtonUp().
00064 { 00065 _backX=-1; 00066 _backY=-1; 00067 _backZ=-1; 00068 _backOrient[0]=-1; 00069 _backOrient[1]=-1; 00070 _backOrient[2]=-1; 00071 _backOrient[3]=-1; 00072 }
void vtkPlane2DView::ResetPlane | ( | ) | [private] |
Definition at line 75 of file vtkPlane2DView.cxx.
References _3Dslices, _change, _pSource, and _stPoints.
Referenced by ~vtkPlane2DView().
00075 { 00076 if (_pSource !=NULL) { _pSource -> Delete(); } 00077 if (_3Dslices !=NULL) { _3Dslices -> Delete(); } 00078 if (_stPoints !=NULL) { _stPoints -> Delete(); } 00079 if (_change !=NULL) { _change -> Delete(); } 00080 }
void wxVtk2DBaseView::ResetView | ( | ) | [virtual, inherited] |
Definition at line 59 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_imageViewer2XYZ, wxVtkBaseView::Configure(), vtkBaseData::GetImageData(), wxVtk2DBaseView::GetVtkBaseData(), vtkImageViewer2_XYZ::GetVtkImageViewer2(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), vtkInteractorStyleBaseView2D::New(), and wxVtk2DBaseView::SetInteractorStyleImage().
Referenced by wxQuantificationWidgetCT::RefreshView().
00060 { 00061 double spx,spy,spz; 00062 int x1,x2,y1,y2,z1,z2; 00063 wxVtkBaseView::Configure(); 00064 00065 wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor(); 00066 vtkImageData *imageData = GetVtkBaseData()->GetImageData(); 00067 imageData->UpdateInformation(); 00068 imageData->SetUpdateExtent( imageData->GetWholeExtent()); 00069 imageData->Update(); 00070 00071 _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData ); 00072 imageData->GetSpacing (spx,spy,spz); 00073 imageData->GetExtent (x1,x2,y1,y2,z1,z2); 00074 _imageViewer2XYZ -> SetExtentDimension(x1,x2,y1,y2,z1,z2); 00075 _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren ); 00076 00077 _imageViewer2XYZ->GetVtkImageViewer2()->Render(); 00078 SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() ); 00079 00080 }
void vtkPlane2DView::RotationDrag | ( | double | vx, | |
double | vy, | |||
bool | ok_v, | |||
bool | ok_ang | |||
) |
Definition at line 410 of file vtkPlane2DView.cxx.
References _ang, _pts, _sizeIma, _transform1, _transform2, _vxb, _vyb, wxVtk2DBaseView::GetVtkBaseData(), and vtkMPRBaseData::InitTransformOrientation().
Referenced by vtkInteractorStylePlane2D::OnMouseMove().
00411 { 00412 if (ok_ang==false) 00413 { 00414 _ang =sqrt( vx*vx + vy*vy ) / 1.5; 00415 } 00416 00417 if (ok_v==false){ 00418 _vxb=-vy; 00419 _vyb=vx; 00420 } 00421 _transform2->Identity(); 00422 _transform2->RotateWXYZ(_ang,0,_vxb,_vyb); 00423 00424 vtkMPRBaseData *mprbasedata = (vtkMPRBaseData*)this->GetVtkBaseData(); 00425 vtkTransform *transform = vtkTransform::New(); 00426 transform->Identity(); 00427 transform->Concatenate(_transform1); 00428 transform->Concatenate(_transform2); 00429 mprbasedata->InitTransformOrientation(transform); 00430 transform->Delete(); 00431 00432 // Refresh Horizontal Line 00433 _pts->SetPoint( 0 , (_sizeIma/2) - _vxb*2 , (_sizeIma/2) - _vyb*2 , 1 ); 00434 _pts->SetPoint( 1 , (_sizeIma/2) + _vxb*2 , (_sizeIma/2) + _vyb*2 , 1 ); 00435 // RefreshCircleLine(); 00436 }
void vtkPlane2DView::RotationStart | ( | ) |
Definition at line 403 of file vtkPlane2DView.cxx.
References _transform1, vtkMPRBaseData::GetTransformOrientation(), and wxVtk2DBaseView::GetVtkBaseData().
Referenced by vtkInteractorStylePlane2D::OnLeftButtonDown().
00404 { 00405 vtkMPRBaseData *mprbasedata = (vtkMPRBaseData*)this->GetVtkBaseData(); 00406 vtkTransform *transform = mprbasedata->GetTransformOrientation(); 00407 _transform1->SetMatrix( transform->GetMatrix() ); 00408 }
void vtkPlane2DView::SetActive | ( | bool | active | ) |
Definition at line 490 of file vtkPlane2DView.cxx.
References _active.
Referenced by wxWidgetMesure2D_Plane_in_MPR::OnActiveLink(), and wxWidgetMesure2D_Plane_in_MPR::SetActiveLink().
00491 { 00492 _active = active; 00493 }
void vtkPlane2DView::SetActualSlice | ( | int | slice | ) | [virtual] |
Reimplemented from wxVtk2DBaseView.
Definition at line 477 of file vtkPlane2DView.cxx.
References _cx, _cy, _cz, _n, GetVtkmprbasedata(), vtkMPRBaseData::SetX(), vtkMPRBaseData::SetY(), and vtkBaseData::SetZ().
00478 { 00479 double dir=(double)slice/3.0; 00480 GetVtkmprbasedata()->SetX( _cx + (_n[0]*dir) ); 00481 GetVtkmprbasedata()->SetY( _cy + (_n[1]*dir) ); 00482 GetVtkmprbasedata()->SetZ( _cz + (_n[2]*dir) ); 00483 }
void wxVtk2DBaseView::setColorLevel | ( | double | level | ) | [inherited] |
Definition at line 262 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_imageViewer2XYZ, vtkImageViewer2_XYZ::GetVtkImageViewer2(), and wxVtk2DBaseView::Refresh().
Referenced by wxMaracas_ViewerWidget::setColorLevel().
00262 { 00263 // _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel(level); 00264 vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel(); 00265 imagemaptowindowlevel->SetLevel(level); 00266 this->Refresh(); 00267 }
void wxVtk2DBaseView::setColorTransferFunction | ( | vtkColorTransferFunction * | colortable | ) | [inherited] |
Definition at line 247 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_imageViewer2XYZ, wxVtk2DBaseView::Refresh(), and vtkImageViewer2_XYZ::setColorTransferFunction().
Referenced by wxMaracas_ViewerWidget::setColorTransferFunction().
00247 { 00248 if(_imageViewer2XYZ!=NULL){ 00249 _imageViewer2XYZ->setColorTransferFunction(colortable); 00250 this->Refresh(); 00251 } 00252 }
void vtkPlane2DView::SetImgSize | ( | int | imgSize | ) |
Definition at line 445 of file vtkPlane2DView.cxx.
References _sizeIma.
Referenced by wxMPRWidget::CreateMPRPanel4View(), wxMaracas_ManualContour_Panel::CreateSplitePanel(), wxMPRWidget::CreateView(), and wxPnlSearchStenosisAutomatic::OnBtAxisMPR().
00446 { 00447 _sizeIma = imgSize; 00448 }
void wxVtkBaseView::SetInteractorStyleBaseView | ( | vtkInteractorStyleImage * | interactorStyle | ) | [inherited] |
Definition at line 142 of file wxVtkBaseView.cxx.
References wxVtkBaseView::_interactorStyle.
Referenced by wxVtk3DBaseView::Configure(), wxVtk2DView_TMP::Configure(), and wxVtk2DBaseView::SetInteractorStyleImage().
00143 { 00144 _interactorStyle = interactorStyle; 00145 }
void wxVtk2DBaseView::SetInteractorStyleImage | ( | vtkInteractorStyleBaseView * | interactorstylebaseview | ) | [inherited] |
Definition at line 211 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_imageViewer2XYZ, vtkImageViewer2_XYZ::GetVtkImageViewer2(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), vtkMaracasImageViewer2Callback::IV, vtkMaracasImageViewer2Callback::New(), wxVtkBaseView::SetInteractorStyleBaseView(), and vtkInteractorStyleBaseView::SetwxVtkBaseView().
Referenced by wxVtk2DBaseView::Configure(), Configure(), and wxVtk2DBaseView::ResetView().
00212 { 00213 SetInteractorStyleBaseView(interactorstylebaseview); 00214 00215 wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor(); 00216 interactorstylebaseview->SetInteractor ( iren ); 00217 iren->SetInteractorStyle(interactorstylebaseview); 00218 interactorstylebaseview->SetwxVtkBaseView(this); 00219 00220 vtkMaracasImageViewer2Callback * cbk = vtkMaracasImageViewer2Callback::New(); 00221 cbk->IV = _imageViewer2XYZ->GetVtkImageViewer2(); 00222 interactorstylebaseview->AddObserver( vtkCommand::WindowLevelEvent, cbk ); 00223 interactorstylebaseview->AddObserver( vtkCommand::StartWindowLevelEvent, cbk ); 00224 interactorstylebaseview->AddObserver( vtkCommand::ResetWindowLevelEvent, cbk ); 00225 cbk->Delete(); 00226 }
void vtkPlane2DView::SetMipVisualization | ( | bool | ok | ) |
Definition at line 497 of file vtkPlane2DView.cxx.
References _mip_visualization.
00498 { 00499 _mip_visualization=ok; 00500 }
void vtkPlane2DView::SetMipWidth | ( | int | value | ) |
Definition at line 504 of file vtkPlane2DView.cxx.
References _mip_width.
00505 { 00506 _mip_width=value; 00507 }
void vtkPlane2DView::SetPSource | ( | int | sizeIma | ) | [private] |
Definition at line 88 of file vtkPlane2DView.cxx.
References _n, _pSource, vtkBaseData::GetImageData(), vtkMPRBaseData::GetTransformOrientation(), wxVtk2DBaseView::GetVtkBaseData(), GetVtkmprbasedata(), vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), and vtkBaseData::GetZ().
Referenced by Extract_MIP_PlaneVTK(), and Extract_One_PlaneVTK().
00088 { 00089 int dimIma = sizeIma; 00090 00091 double x = GetVtkmprbasedata()->GetX(); 00092 double y = GetVtkmprbasedata()->GetY(); 00093 double z = GetVtkmprbasedata()->GetZ(); 00094 00095 double spc[3]; 00096 vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData(); 00097 imagedata->GetSpacing(spc); 00098 x=x*spc[0]; 00099 y=y*spc[1]; 00100 z=z*spc[2]; 00101 00102 00103 vtkMPRBaseData *mprbasedata = (vtkMPRBaseData*)this->GetVtkBaseData(); 00104 vtkTransform *transform = mprbasedata->GetTransformOrientation(); 00105 00106 double in[3]; // temp 00107 double pA[3]; 00108 double pB[3]; 00109 in[0]=1; in[1]=0; in[2]=0; 00110 transform->TransformPoint(in,_n); 00111 00112 in[0]=0; in[1]=dimIma-1; in[2] = 0; 00113 transform->TransformPoint(in,pA); 00114 00115 in[0]=0; in[1]=0; in[2]=dimIma-1; 00116 transform->TransformPoint(in,pB); 00117 00118 _pSource -> SetPoint1( pA ); 00119 _pSource -> SetPoint2( pB ); 00120 00121 _pSource -> SetOrigin( 0 , 0 , 0 ); 00122 _pSource -> SetResolution( sizeIma-1 , sizeIma -1 ); 00123 _pSource -> Update(); 00124 _pSource -> SetCenter( x, y, z ); 00125 _pSource -> SetNormal( _n ); 00126 _pSource -> Update( ); 00127 00128 // EED Borrame 00129 // transform->Delete(); 00130 00131 }
void vtkPlane2DView::SetVisibleLine | ( | bool | ok | ) |
Definition at line 510 of file vtkPlane2DView.cxx.
References _lineActor.
Referenced by wxWidgetMesure2D_Plane::OnActiveLine().
00511 { 00512 double opacity; 00513 if (ok==true) 00514 { 00515 opacity=1; 00516 } else { 00517 opacity=0; 00518 } 00519 _lineActor->GetProperty()->SetOpacity(opacity); 00520 }
void wxVtk2DBaseView::SetVtkBaseData | ( | vtkBaseData * | vtkbasedata | ) | [inherited] |
Definition at line 194 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_vtkbasedata.
Referenced by wxQuantificationWidgetCT::ConfigureVTK(), wxProcessingCTWidget::ConfigureVTK(), wxEmptyPanel_3_Widget::ConfigureVTK(), wxMPRWidget::CreateMPRPanel4View(), wxMPRWidget::CreateView(), wxMaracasImageBrowser02::LoadData(), wxMaracas_ViewerWidget::wxMaracas_ViewerWidget(), and wxSphereView::wxSphereView().
00195 { 00196 _vtkbasedata=vtkbasedata; 00197 }
void wxVtk2DBaseView::setWindowLevel | ( | double | level | ) | [inherited] |
Definition at line 254 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_imageViewer2XYZ, vtkImageViewer2_XYZ::GetVtkImageViewer2(), and wxVtk2DBaseView::Refresh().
Referenced by wxMaracas_ViewerWidget::setWindowLevel().
00254 { 00255 // _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow(level); 00256 00257 vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel(); 00258 imagemaptowindowlevel->SetWindow(level); 00259 this->Refresh(); 00260 }
void wxVtk2DBaseView::TransformCoordinate_spacing_ModelToView | ( | double & | X, | |
double & | Y, | |||
double & | Z | |||
) | [virtual, inherited] |
Definition at line 45 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_imageViewer2XYZ, and vtkImageViewer2_XYZ::GetVtkImageViewer2().
00046 { 00047 //EEDx5 00048 double spc[3]; 00049 // GetVtkBaseData()->GetImageData()->GetSpacing(spc); 00050 this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc); 00051 00052 X=X*spc[0]; 00053 Y=Y*spc[1]; 00054 Z=Z*spc[2]; 00055 00056 }
void wxVtk2DBaseView::TransformCoordinate_spacing_ViewToModel | ( | double & | X, | |
double & | Y, | |||
double & | Z | |||
) | [virtual, inherited] |
Definition at line 31 of file wxVtk2DBaseView.cxx.
References wxVtk2DBaseView::_imageViewer2XYZ, and vtkImageViewer2_XYZ::GetVtkImageViewer2().
Referenced by wxVtkBaseView::TransFromCoordScreenToWorld().
00032 { 00033 //EEDx5 00034 double spc[3]; 00035 // GetVtkBaseData()->GetImageData()->GetSpacing(spc); 00036 this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc); 00037 00038 X = X / spc[0]; 00039 Y = Y / spc[1]; 00040 Z = Z / spc[2]; 00041 00042 }
void wxVtkBaseView::TransFromCoordScreenToWorld | ( | double & | X, | |
double & | Y, | |||
double & | Z, | |||
bool | keepNormalDirection = false , |
|||
int | type = 2 | |||
) | [virtual, inherited] |
Reimplemented in wxVtkMPR2DView.
Definition at line 94 of file wxVtkBaseView.cxx.
References wxVtkBaseView::GetInteractorStyleBaseView(), wxVtkBaseView::GetRenderer(), vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), and wxVtk2DBaseView::TransformCoordinate_spacing_ViewToModel().
Referenced by manualViewPerpPlaneContour::ifTouchContour(), vtkInfoTextImageInteractor::OnMouseMove(), manualViewBaseContour::TransfromCoordViewWorld(), and TransfromCoordViewWorld2().
00095 { 00096 GetRenderer()->SetDisplayPoint((int)X, (int)Y, (int)Z); 00097 GetRenderer()->DisplayToWorld(); 00098 double fP[4]; 00099 GetRenderer()->GetWorldPoint( fP ); 00100 if ( fP[3] ){ 00101 fP[0] /= fP[3]; 00102 fP[1] /= fP[3]; 00103 fP[2] /= fP[3]; 00104 } 00105 00106 // EEDx5 00107 //JCP 13/05/2009 00108 vtkInteractorStyleBaseView* interactorstyle = (vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView(); 00109 wxVtk2DBaseView* baseview = (wxVtk2DBaseView*)interactorstyle->GetWxVtk2DBaseView(); 00110 baseview->TransformCoordinate_spacing_ViewToModel( fP[0] , fP[1] , fP[2] ); 00111 //JCP 13/05/2009 00112 00113 if (type!=0) 00114 { 00115 X=fP[0]; 00116 } 00117 if (type!=1) 00118 { 00119 Y=fP[1]; 00120 } 00121 if (type!=2) 00122 { 00123 Z=fP[2]; 00124 } 00125 }
void vtkPlane2DView::TransfromCoordViewWorld2 | ( | double & | X, | |
double & | Y, | |||
double & | Z | |||
) |
Definition at line 522 of file vtkPlane2DView.cxx.
References vtkBaseData::GetImageData(), GetImgSize(), vtkMPRBaseData::GetTransformOrientation(), GetVtkmprbasedata(), vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), vtkBaseData::GetZ(), and wxVtkBaseView::TransFromCoordScreenToWorld().
Referenced by vtkInteractorStylePlane2D::OnLeftDClick(), vtkInfoTextImageInteractorPlane2D::OnMouseMove(), and manualViewPerpPlaneContour::TransfromCoordViewWorld().
00523 { 00524 double spc[3]; 00525 GetVtkmprbasedata()->GetImageData()->GetSpacing(spc); 00526 00527 double xx = X; 00528 double yy = Y; 00529 double zz = 0; 00530 00531 TransFromCoordScreenToWorld(xx,yy,zz); 00532 00533 00534 vtkTransform *transf1 = vtkTransform::New(); 00535 transf1->Identity(); 00536 vtkTransform *transf2 = GetVtkmprbasedata()->GetTransformOrientation(); 00537 transf1->Concatenate(transf2->GetMatrix()); 00538 double in[4], out[4]; 00539 double center = GetImgSize() / 2; 00540 in[0] = 0; 00541 in[1] = xx - center; 00542 in[2] = yy - center; 00543 in[3] = 0; 00544 00545 transf1->MultiplyPoint(in,out); 00546 transf1->Delete(); 00547 00548 X = out[0] + GetVtkmprbasedata()->GetX() ; 00549 Y = out[1] + GetVtkmprbasedata()->GetY() ; 00550 Z = out[2] + GetVtkmprbasedata()->GetZ() ; 00551 00552 }
vtkProbeFilter* vtkPlane2DView::_3Dslices [private] |
Definition at line 79 of file vtkPlane2DView.h.
Referenced by Configure(), Extract_One_PlaneVTK(), ResetPlane(), and vtkPlane2DView().
bool vtkPlane2DView::_active [private] |
Definition at line 51 of file vtkPlane2DView.h.
Referenced by ExtractPlane(), SetActive(), and vtkPlane2DView().
double vtkPlane2DView::_ang [private] |
Definition at line 60 of file vtkPlane2DView.h.
Referenced by RotationDrag().
double vtkPlane2DView::_backOrient[4] [private] |
Definition at line 58 of file vtkPlane2DView.h.
Referenced by ExtractPlane(), ResetBack(), and vtkPlane2DView().
double vtkPlane2DView::_backX [private] |
Definition at line 55 of file vtkPlane2DView.h.
Referenced by ExtractPlane(), ResetBack(), and vtkPlane2DView().
double vtkPlane2DView::_backY [private] |
Definition at line 56 of file vtkPlane2DView.h.
Referenced by ExtractPlane(), ResetBack(), and vtkPlane2DView().
double vtkPlane2DView::_backZ [private] |
Definition at line 57 of file vtkPlane2DView.h.
Referenced by ExtractPlane(), ResetBack(), and vtkPlane2DView().
vtkImageChangeInformation* vtkPlane2DView::_change [private] |
Definition at line 82 of file vtkPlane2DView.h.
Referenced by Configure(), ResetPlane(), and vtkPlane2DView().
double vtkPlane2DView::_cx [private] |
Definition at line 65 of file vtkPlane2DView.h.
Referenced by GetActualSlice(), and SetActualSlice().
double vtkPlane2DView::_cy [private] |
Definition at line 66 of file vtkPlane2DView.h.
Referenced by GetActualSlice(), and SetActualSlice().
double vtkPlane2DView::_cz [private] |
Definition at line 67 of file vtkPlane2DView.h.
Referenced by GetActualSlice(), and SetActualSlice().
vtkImageData* vtkPlane2DView::_imageResult [private] |
Definition at line 71 of file vtkPlane2DView.h.
Referenced by Extract_MIP_PlaneVTK(), and vtkPlane2DView().
vtkImageViewer2_XYZ* wxVtk2DBaseView::_imageViewer2XYZ [inherited] |
Definition at line 22 of file wxVtk2DBaseView.h.
Referenced by wxWidgetMesure2D_Plane::CircleLine(), wxVtkMPR2DView::Configure(), wxVtk2DBaseView::Configure(), Configure(), Extract_MIP_PlaneVTK(), Extract_One_PlaneVTK(), wxVtk2DBaseView::GetRenderer(), wxVtk2DBaseView::GetRenWin(), HorizontalLine(), wxMaracasImageBrowser02::OnBtnResetRoi(), vtkInfoTextImage::PutColorLevel(), vtkInfoTextImage::PutWindowLevel(), wxVtkMPR2DView::Refresh(), wxVtk2DBaseView::Refresh(), wxVtk2DBaseView::ResetView(), wxVtk2DBaseView::setColorLevel(), wxVtk2DBaseView::setColorTransferFunction(), wxVtk2DBaseView::SetInteractorStyleImage(), wxVtkMPR2DView::SetVisibleAxis(), wxVtk2DBaseView::setWindowLevel(), wxVtk2DBaseView::TransformCoordinate_spacing_ModelToView(), wxVtk2DBaseView::TransformCoordinate_spacing_ViewToModel(), wxVtk2DBaseView::wxVtk2DBaseView(), and wxVtk2DBaseView::~wxVtk2DBaseView().
Definition at line 86 of file vtkPlane2DView.h.
Referenced by Configure(), ExtractPlane(), GetInteractorstyleplane2D(), and vtkPlane2DView().
vtkActor* vtkPlane2DView::_lineActor [private] |
Definition at line 75 of file vtkPlane2DView.h.
Referenced by HorizontalLine(), SetVisibleLine(), vtkPlane2DView(), and ~vtkPlane2DView().
vtkPolyDataMapper* vtkPlane2DView::_lineMapper [private] |
Definition at line 76 of file vtkPlane2DView.h.
Referenced by HorizontalLine(), vtkPlane2DView(), and ~vtkPlane2DView().
bool vtkPlane2DView::_mip_visualization [private] |
Definition at line 53 of file vtkPlane2DView.h.
Referenced by ExtractPlane(), GetMipVisualization(), SetMipVisualization(), and vtkPlane2DView().
int vtkPlane2DView::_mip_width [private] |
Definition at line 52 of file vtkPlane2DView.h.
Referenced by Extract_MIP_PlaneVTK(), GetMipWidth(), SetMipWidth(), and vtkPlane2DView().
double vtkPlane2DView::_n[3] [private] |
Definition at line 63 of file vtkPlane2DView.h.
Referenced by SetActualSlice(), and SetPSource().
vtkPolyData* vtkPlane2DView::_pd [private] |
Definition at line 77 of file vtkPlane2DView.h.
Referenced by HorizontalLine(), vtkPlane2DView(), and ~vtkPlane2DView().
vtkPlaneSource* vtkPlane2DView::_pSource [private] |
Definition at line 80 of file vtkPlane2DView.h.
Referenced by Configure(), Extract_MIP_PlaneVTK(), Extract_One_PlaneVTK(), ResetPlane(), SetPSource(), and vtkPlane2DView().
vtkPoints* vtkPlane2DView::_pts [private] |
Definition at line 74 of file vtkPlane2DView.h.
Referenced by HorizontalLine(), RotationDrag(), vtkPlane2DView(), and ~vtkPlane2DView().
int vtkPlane2DView::_sizeIma [private] |
Definition at line 69 of file vtkPlane2DView.h.
Referenced by Configure(), Extract_MIP_PlaneVTK(), Extract_One_PlaneVTK(), GetImgSize(), RotationDrag(), SetImgSize(), and vtkPlane2DView().
vtkStructuredPoints* vtkPlane2DView::_stPoints [private] |
Definition at line 81 of file vtkPlane2DView.h.
Referenced by Configure(), Extract_One_PlaneVTK(), ResetPlane(), and vtkPlane2DView().
vtkTransform* vtkPlane2DView::_transform1 [private] |
Definition at line 83 of file vtkPlane2DView.h.
Referenced by RotationDrag(), RotationStart(), vtkPlane2DView(), and ~vtkPlane2DView().
vtkTransform* vtkPlane2DView::_transform2 [private] |
Definition at line 84 of file vtkPlane2DView.h.
Referenced by RotationDrag(), vtkPlane2DView(), and ~vtkPlane2DView().
Definition at line 88 of file vtkPlane2DView.h.
Referenced by Configure().
Definition at line 89 of file vtkPlane2DView.h.
Referenced by Configure().
double vtkPlane2DView::_vxb [private] |
Definition at line 61 of file vtkPlane2DView.h.
Referenced by RotationDrag().
double vtkPlane2DView::_vyb [private] |
Definition at line 62 of file vtkPlane2DView.h.
Referenced by RotationDrag().