//-------------------------------------------------------------
void ViewerNV::Process()
{
- vtkImageData* img = bbGetInputIn();
- std::vector<int> type = bbGetInputnTypeView();
+ vtkImageData* img = bbGetInputIn();
+ std::vector<int> type = bbGetInputnTypeView();
if(img != NULL && _mwxwidget != NULL)
{
if(!compareVectors(type, _currenttype))
_currenttype = type;
_currentimg = img;
_point.clear();
- _point.push_back((int)_mwxwidget->GetX());
- _point.push_back((int)_mwxwidget->GetY());
- _point.push_back((int)_mwxwidget->GetZ());
- bbSetOutputPoint(_point);
-
- wxVtkBaseView *wvbv1 = _mwxwidget->GetwxVtkBaseView(1);
- wxVtkBaseView *wvbv2 = _mwxwidget->GetwxVtkBaseView(2);
- wxVtkBaseView *wvbv3 = _mwxwidget->GetwxVtkBaseView(3);
- wxVtkBaseView *wvbv4 = _mwxwidget->GetwxVtkBaseView(4);
+ _point.push_back( (int)_mwxwidget->GetX() );
+ _point.push_back( (int)_mwxwidget->GetY() );
+ _point.push_back( (int)_mwxwidget->GetZ() );
+ bbSetOutputPoint( _point );
+
+ wxVtkBaseView *wvbv1 = _mwxwidget->GetwxVtkBaseView( 1 );
+ wxVtkBaseView *wvbv2 = _mwxwidget->GetwxVtkBaseView( 2 );
+ wxVtkBaseView *wvbv3 = _mwxwidget->GetwxVtkBaseView( 3 );
+ wxVtkBaseView *wvbv4 = _mwxwidget->GetwxVtkBaseView( 4 );
//wxwidget->RefreshView();
bbSetOutputwxVtkBaseView1( wvbv1 );
bbSetOutputwxVtkBaseView2( wvbv2 );
}
}
_mwxwidget->SetInterpolate( bbGetInputInterpolate() );
+
+/* Borrame
+ if (wvbv1!=NULL)
+ {
+ wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
+ wvbv1->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
+ #else
+ wvbv1->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
+ #endif
+ }
+
+*/
+
+
+
+
}// mwxwidget != NULL
}
if (mvtkmpr2Dview_X!=NULL)
{
mvtkmpr2Dview_X->SetImageToVtkViewer(image);
+ mvtkmpr2Dview_X->ResetBackXYZ();
}
if (mvtkmpr2Dview_Y!=NULL)
{
mvtkmpr2Dview_Y->SetImageToVtkViewer(image);
+ mvtkmpr2Dview_Y->ResetBackXYZ();
}
if (mvtkmpr2Dview_Z!=NULL)
{
mvtkmpr2Dview_Z->SetImageToVtkViewer(image);
+ mvtkmpr2Dview_Z->ResetBackXYZ();
}
if (mvtkplane2Dview!=NULL)
{
void wxVtkMPR2DView::SetVisibleAxis(bool ok)
{
- if (ok!=_visibleAxis)
+ if (ok != _visibleAxis)
{
- _visibleAxis=ok;
+ _visibleAxis = ok;
if (_visibleAxis==true)
{
_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
} // ok
}
+
+//-------------------------------------------------------------------
+void wxVtkMPR2DView::ResetBackXYZ()
+{
+ _backX=-9999;
+ _backY=-9999;
+ _backZ=-9999;
+}
+
+
//-------------------------------------------------------------------
void wxVtkMPR2DView::Refresh()
{
y2 += origin[1];
z1 += origin[2];
z2 += origin[2];
- xx1 = x1*spc[0];
- yy1 = y1*spc[1];
- zz1 = z1*spc[2];
- xx2 = x2*spc[0];
- yy2 = y2*spc[1];
- zz2 = z2*spc[2];
+ xx1 = x1*spc[0];
+ yy1 = y1*spc[1];
+ zz1 = z1*spc[2];
+ xx2 = x2*spc[0];
+ yy2 = y2*spc[1];
+ zz2 = z2*spc[2];
x1 = (int)(x1*spc[0]);
y1 = (int)(y1*spc[1]);
z1 = (int)(z1*spc[2]);
xx = (int)(GetVtkmprbasedata()->GetX());
yy = (int)(GetVtkmprbasedata()->GetY());
zz = (int)(GetVtkmprbasedata()->GetZ());
-//EED 02/08/2013
-// x = round(xx*spc[0]);
-// y = round(yy*spc[1]);
-// z = round(zz*spc[2]);
x = xx*spc[0];
y = yy*spc[1];
z = zz*spc[2];