}
*/
- if (_direction==0) {
+ if (_direction==0) { // YZ
camera->SetViewUp ( 0 , 1 , 0 );
camera->SetPosition ( 10000,(y1+y2)/2 , (z1+z2)/2 );
camera->SetFocalPoint ( 0 , (y1+y2)/2 , (z1+z2)/2 );
camera->SetParallelScale( (z2-z1)/3.0 );
}
- if (_direction==1) {
+ if (_direction==1) { // XZ
camera->SetViewUp ( 0 , 0 , -1 );
camera->SetPosition ((x1+x2)/2 , 10000 , (z1+z2)/2 );
camera->SetFocalPoint ((x1+x2)/2 , 0 , (z1+z2)/2 );
camera->SetParallelScale( (x2-x1)/3.0 );
}
- if (_direction==2) {
+ if (_direction==2) { // XY
camera->SetViewUp ( 0 , 1 , 0 );
camera->SetPosition ((x1+x2)/2 , (y1+y2)/2 , 10000);
camera->SetFocalPoint ((x1+x2)/2 , (y1+y2)/2 , 0 );
y = (int)(y*spc[1]);
z = (int)(z*spc[2]);
-
-
if ((x!=_backX) || (y!=_backY) || (z!=_backZ)) {
- if (_direction==0) {
+ if (_direction==0) { // YZ
_imageViewer2XYZ->SetXSlice( (int)(GetVtkmprbasedata()->GetX()) );
- _ptsA->SetPoint(0, -x2, y1 , z );
- _ptsA->SetPoint(1, -x2, y2 , z );
- _ptsB->SetPoint(0, -x2, y , z1);
- _ptsB->SetPoint(1, -x2, y , z2);
+ _ptsA->SetPoint(0, x2, y1 , z );
+ _ptsA->SetPoint(1, x2, y2 , z );
+ _ptsB->SetPoint(0, x2, y , z1);
+ _ptsB->SetPoint(1, x2, y , z2);
}
- if (_direction==1) {
+ if (_direction==1) { // XZ
_imageViewer2XYZ->SetYSlice( (int)(GetVtkmprbasedata()->GetY()) );
_ptsA->SetPoint(0, x1 , y2 , z );
_ptsA->SetPoint(1, x2 , y2 , z );
_ptsB->SetPoint(0, x , y2 , z1);
_ptsB->SetPoint(1, x , y2 , z2);
}
- if (_direction==2) {
+ if (_direction==2) { // XY
_imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) );
_imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) );
// _ptsA->SetPoint(0, x1 , y , -z2 );
}
Refresh();
}
+
//-------------------------------------------------------------------
+//EED 5 juin 2009
+//void wxVtkMPR2DView::TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type) // virtual
void wxVtkMPR2DView::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type) // virtual
{
+
wxVtkBaseView::TransfromeCoordScreenToWorld(X,Y,Z,_direction);
if (_direction==0)