//-------------------------------------------------------------
void ViewerNV::Process()
{
- point.clear();
- point.push_back((int)mwxwidget->GetX());
- point.push_back((int)mwxwidget->GetY());
- point.push_back((int)mwxwidget->GetZ());
- bbSetOutputPoint(point);
-
-// WxBlackBox::Process();
- mwxwidget->SetImage( bbGetInputIn() );
- 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 );
- bbSetOutputwxVtkBaseView3( wvbv3 );
- bbSetOutputwxVtkBaseView4( wvbv4 );
- if (wvbv1!=NULL) { bbSetOutputRenderer1( wvbv1->GetRenderer() ); }
- if (wvbv2!=NULL) { bbSetOutputRenderer2( wvbv2->GetRenderer() ); }
- if (wvbv3!=NULL) { bbSetOutputRenderer3( wvbv3->GetRenderer() ); }
- if (wvbv4!=NULL) { bbSetOutputRenderer4( wvbv4->GetRenderer() ); }
+ if (mwxwidget != NULL)
+ {
+ point.clear();
+ point.push_back((int)mwxwidget->GetX());
+ point.push_back((int)mwxwidget->GetY());
+ point.push_back((int)mwxwidget->GetZ());
+ bbSetOutputPoint(point);
+
+ // WxBlackBox::Process();
+ mwxwidget->SetImage( bbGetInputIn() );
+ 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 );
+ bbSetOutputwxVtkBaseView3( wvbv3 );
+ bbSetOutputwxVtkBaseView4( wvbv4 );
+ if (wvbv1!=NULL) { bbSetOutputRenderer1( wvbv1->GetRenderer() ); }
+ if (wvbv2!=NULL) { bbSetOutputRenderer2( wvbv2->GetRenderer() ); }
+ if (wvbv3!=NULL) { bbSetOutputRenderer3( wvbv3->GetRenderer() ); }
+ if (wvbv4!=NULL) { bbSetOutputRenderer4( wvbv4->GetRenderer() ); }
+ }
}
//-------------------------------------------------------------
//-------------------------------------------------------------
void ViewerNV::bbUserConstructor()
{
+ mwxwidget = NULL;
bbSetInputIn(NULL);
std::vector<int> vecNTypeViwer;