void bbwxMaracas_N_ViewersWidget::OnRefreshView(wxCommandEvent & event)
{
//printf("CPR: bbwxMaracas_N_ViewersWidget::OnRefreshView -> actualiza X, Y y Z\n");
- mbbViewerNV->point.clear();
+ mbbViewerNV->_point.clear();
- mbbViewerNV->point.push_back( (int)GetX() );
- mbbViewerNV->point.push_back( (int)GetY() );
- mbbViewerNV->point.push_back( (int)GetZ() );
- mbbViewerNV->bbSetOutputPoint( mbbViewerNV->point );
+ mbbViewerNV->_point.push_back( (int)GetX() );
+ mbbViewerNV->_point.push_back( (int)GetY() );
+ mbbViewerNV->_point.push_back( (int)GetZ() );
+ mbbViewerNV->bbSetOutputPoint( mbbViewerNV->_point );
mbbViewerNV->bbSignalOutputModification(std::string("Point"));
wxMaracas_N_ViewersWidget::OnRefreshView(event);
//-------------------------------------------------------------
void ViewerNV::Process()
{
-
- printf("EED ViewerNV::Process start \n");
-
vtkImageData* img = bbGetInputIn();
/*
double spc[3];
std::vector<int> type = bbGetInputnTypeView();
- if(img != NULL && mwxwidget != NULL){
- if(!compareVectors(type, currenttype)){
- mwxwidget->SetType(&type);
- mwxwidget->UpdateLayout(img);
- }else if (img != currentimg){
- mwxwidget->SetImage(img);
- //mwxwidget->UpdateLayout(img);
+ if(img != NULL && _mwxwidget != NULL){
+ if(!compareVectors(type, _currenttype)){
+ _mwxwidget->SetType(&type);
+ _mwxwidget->UpdateLayout(img);
+ }else if (img != _currentimg){
+ _mwxwidget->SetImage(img);
}
-// if (firsttime==true) // EED 21 aout 2010
-// {
-// firsttime=false;
-// mwxwidget->ConfigureVTK();
-// }
+ _mwxwidget->RefreshView();
- mwxwidget->RefreshView();
+ _currenttype = type;
+ _currentimg = img;
- 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);
+ _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(img );
- wxVtkBaseView *wvbv1 = mwxwidget->GetwxVtkBaseView(1);
- wxVtkBaseView *wvbv2 = mwxwidget->GetwxVtkBaseView(2);
- wxVtkBaseView *wvbv3 = mwxwidget->GetwxVtkBaseView(3);
- wxVtkBaseView *wvbv4 = mwxwidget->GetwxVtkBaseView(4);
+ wxVtkBaseView *wvbv1 = _mwxwidget->GetwxVtkBaseView(1);
+ wxVtkBaseView *wvbv2 = _mwxwidget->GetwxVtkBaseView(2);
+ wxVtkBaseView *wvbv3 = _mwxwidget->GetwxVtkBaseView(3);
+ wxVtkBaseView *wvbv4 = _mwxwidget->GetwxVtkBaseView(4);
//wxwidget->RefreshView();
if(bbGetInputColorFunction()!=NULL)
{
- mwxwidget->setColorTransferFunction(bbGetInputColorFunction());
+ _mwxwidget->setColorTransferFunction(bbGetInputColorFunction());
}
if(bbGetInputWindowLevel()!=-1)
{
- mwxwidget->setWindowLevel(bbGetInputWindowLevel());
+ _mwxwidget->setWindowLevel(bbGetInputWindowLevel());
}
if(bbGetInputColorLevel()!=-1)
if(bbGetInputColorLevel() == 0)
{
std::cout<<"colorlevel "<<bbGetInputColorLevel()<<std::endl;
- mwxwidget->setColorLevel(0.1);
+ _mwxwidget->setColorLevel(0.1);
}else{
- mwxwidget->setColorLevel(bbGetInputColorLevel());
+ _mwxwidget->setColorLevel(bbGetInputColorLevel());
}
}
}// mwxwidget != NULL
-
- printf("EED ViewerNV::Process end\n");
}
//-------------------------------------------------------------
void ViewerNV::CreateWidget(wxWindow* parent)
{
- printf("EED ViewerNV::CreateWidget start\n");
-
bbtkDebugMessageInc("Core",9,"ViewerNV::CreateWidget()"<<std::endl);
- mwxwidget = new bbwxMaracas_N_ViewersWidget( this, parent );
+ _mwxwidget = new bbwxMaracas_N_ViewersWidget( this, parent );
bbtkDebugDecTab("Core",9);
- bbSetOutputWidget( mwxwidget );
-
- printf("EED ViewerNV::CreateWidget end\n");
-
+ bbSetOutputWidget( _mwxwidget );
//this->bbSignalOutputModification();
//Process();
}
//-------------------------------------------------------------
void ViewerNV::bbUserSetDefaultValues()
{
-// firsttime=true;
- mwxwidget = NULL;
+ _currentimg = NULL;
+ _mwxwidget = NULL;
bbSetInputIn(NULL);
bbSetInputObs1(NULL);