ColorLayerImageViewPanel_widgetBox::ColorLayerImageViewPanel_widgetBox( wxWindow * parent, int min, int max,int opacity, int type )
: ColorLayerImageViewPanel( parent, min, max, opacity, type )
{
- mBox=NULL;
+ mBox = NULL;
}
void ColorLayerImageViewPanel_widgetBox::ChangeOpacity()
void ColorLayerImageViewPanel_widgetBox::SetBox(ColorLayerImageView* box)
{
- mBox=box;
+ mBox = box;
}
BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ColorLayerImageView)
if ( !( (bbGetInputWxVtkBaseView()==NULL) && (bbGetInputWxVtkBaseView1()==NULL) && (bbGetInputWxVtkBaseView2()==NULL)) )
{
ColorLayerImageViewPanel_widgetBox *clivp = (ColorLayerImageViewPanel_widgetBox*)bbGetOutputWidget();
- if (firsttime==true)
- {
- // firsttime=false;
- clivp->SetActive( bbGetInputActive() );
- }
- clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 0 , bbGetInputWxVtkBaseView() );
- clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 1 , bbGetInputWxVtkBaseView1() );
- clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 2 , bbGetInputWxVtkBaseView2() );
- std::vector<double> range = bbGetInputlstRangeForColorBar();
- clivp->GetColorLayerImageViewManager()->SetRangeForColorBar( range );
- std::vector<int> colorbarposition = bbGetInputColorBarPosition();
- clivp->GetColorLayerImageViewManager()->SetColorBarPosition( colorbarposition );
- std::vector<double> base_color = bbGetInputlstBaseColor();
- clivp->GetColorLayerImageViewManager()->SetBaseColors( base_color );
- std::vector<double> grey_level_boundaries = bbGetInputlstGreyLevelBoundaries();
- clivp->GetColorLayerImageViewManager()->SetGreyLevelBoundaries( grey_level_boundaries );
- std::vector<double> transparence_level_boundaries = bbGetInputlstTransparenceBoundaries();
- clivp->GetColorLayerImageViewManager()->SetBaseTransparence( transparence_level_boundaries );
- clivp->GetColorLayerImageViewManager()->SetPlainOrGradientColor( bbGetInputPlainOrGradientColor() );
- clivp->SetFittingMode( bbGetInputFittingMode() );
- clivp->SetImage( bbGetInputIn() );
- bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) );
- bbSetOutputLookupTable( clivp->GetColorLayerImageViewManager()->GetLookupTable(0) );
- bbSetOutputOutOpacity( clivp->GetOpacity() );
- if (firsttime==true)
- {
- firsttime=false;
- clivp->ChangeOpacity();
- clivp->SetBox(this);
- }
+ if (clivp!=NULL) {
+
+ if (firsttime==true)
+ {
+ // firsttime=false;
+ clivp->SetActive( bbGetInputActive() );
+ }
+ clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 0 , bbGetInputWxVtkBaseView() );
+ clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 1 , bbGetInputWxVtkBaseView1() );
+ clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 2 , bbGetInputWxVtkBaseView2() );
+ std::vector<double> range = bbGetInputlstRangeForColorBar();
+ clivp->GetColorLayerImageViewManager()->SetRangeForColorBar( range );
+ std::vector<int> colorbarposition = bbGetInputColorBarPosition();
+ clivp->GetColorLayerImageViewManager()->SetColorBarPosition( colorbarposition );
+ std::vector<double> base_color = bbGetInputlstBaseColor();
+ clivp->GetColorLayerImageViewManager()->SetBaseColors( base_color );
+ std::vector<double> grey_level_boundaries = bbGetInputlstGreyLevelBoundaries();
+ clivp->GetColorLayerImageViewManager()->SetGreyLevelBoundaries( grey_level_boundaries );
+ std::vector<double> transparence_level_boundaries = bbGetInputlstTransparenceBoundaries();
+ clivp->GetColorLayerImageViewManager()->SetBaseTransparence( transparence_level_boundaries );
+ clivp->GetColorLayerImageViewManager()->SetPlainOrGradientColor( bbGetInputPlainOrGradientColor() );
+ clivp->SetFittingMode( bbGetInputFittingMode() );
+ clivp->SetImage( bbGetInputIn() );
+ bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) );
+ bbSetOutputLookupTable( clivp->GetColorLayerImageViewManager()->GetLookupTable(0) );
+ bbSetOutputOutOpacity( clivp->GetOpacity() );
+ if (firsttime==true)
+ {
+ firsttime=false;
+ clivp->ChangeOpacity();
+ clivp->SetBox(this);
+ }
+ } // if clivp
} else {
printf("EED Error!!! ColorLayerImageView::Process (%s) Missing Inputs: WxVtkBaseView , WxVtkBaseView1 , WxVtkBaseView2 \n", bbGetFullName().c_str() );
}// if xxVtkBaseView
lstColorBarPosition.push_back(10);
lstColorBarPosition.push_back(105);
bbSetInputColorBarPosition(lstColorBarPosition);
+ bbSetOutputWidget(NULL);
}
//=====