namespace bbcreaMaracasVisu
{
+
+class ColorLayerImageView;
+
+class ColorLayerImageViewPanel_widgetBox : public ColorLayerImageViewPanel
+{
+ public:
+ ColorLayerImageViewPanel_widgetBox( wxWindow * parent, int min, int max,int opacity, int type );
+ void SetBox(ColorLayerImageView* box);
+ void ChangeOpacity();
+ private:
+ ColorLayerImageView *mBox;
+};
+
+ColorLayerImageViewPanel_widgetBox::ColorLayerImageViewPanel_widgetBox( wxWindow * parent, int min, int max,int opacity, int type )
+ : ColorLayerImageViewPanel( parent, min, max, opacity, type )
+{
+ mBox=NULL;
+}
+
+void ColorLayerImageViewPanel_widgetBox::ChangeOpacity()
+{
+ ColorLayerImageViewPanel::ChangeOpacity();
+ if (mBox!=NULL)
+ {
+ mBox->bbSetOutputOutOpacity( GetOpacity() );
+ mBox->bbSignalOutputModification();
+ } // if mBox
+}
+
+void ColorLayerImageViewPanel_widgetBox::SetBox(ColorLayerImageView* box)
+{
+ mBox=box;
+}
+
+
+
BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ColorLayerImageView)
BBTK_BLACK_BOX_IMPLEMENTATION(ColorLayerImageView,bbtk::WxBlackBox);
//=====
//=====
void ColorLayerImageView::Process()
{
- ColorLayerImageViewPanel *clivp = (ColorLayerImageViewPanel*)bbGetOutputWidget();
+ ColorLayerImageViewPanel_widgetBox *clivp = (ColorLayerImageViewPanel_widgetBox*)bbGetOutputWidget();
if (firsttime==true)
{
// firsttime=false;
clivp->SetImage( bbGetInputIn() );
bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) );
bbSetOutputLookupTable( clivp->GetColorLayerImageViewManager()->GetLookupTable(0) );
- if (firsttime==true)
- {
+ bbSetOutputOutOpacity( clivp->GetOpacity() );
+
+ if (firsttime==true)
+ {
firsttime=false;
clivp->ChangeOpacity();
- }
+ clivp->SetBox(this);
+ }
}
//=====
// Don't edit this file. This file is generated from xml description..
//=====
void ColorLayerImageView::CreateWidget(wxWindow* parent)
{
- ColorLayerImageViewPanel *clivp = new ColorLayerImageViewPanel(parent, 0, 100, bbGetInputOpacity() ,bbGetInputTypeControlsInterface() );
- bbSetOutputWidget( clivp );
+ ColorLayerImageViewPanel_widgetBox *clivp = new ColorLayerImageViewPanel_widgetBox(parent, 0, 100, bbGetInputOpacity() ,bbGetInputTypeControlsInterface() );
+ bbSetOutputWidget( (ColorLayerImageViewPanel*)clivp );
}
//=====
// Don't edit this file. This file is generated from xml description..
BBTK_DECLARE_INPUT(ColorBarPosition,std::vector<int>);
BBTK_DECLARE_OUTPUT(NewImage,vtkImageData*);
BBTK_DECLARE_OUTPUT(LookupTable,vtkScalarsToColors*);
+ BBTK_DECLARE_OUTPUT(OutOpacity,int);
BBTK_PROCESS(Process);
void Process();
BBTK_CREATE_WIDGET(CreateWidget);
BBTK_OUTPUT(ColorLayerImageView,NewImage,"Image with correct Spacing",vtkImageData*,"");
BBTK_OUTPUT(ColorLayerImageView,LookupTable,"LookupTable",vtkScalarsToColors*,"");
+ BBTK_OUTPUT(ColorLayerImageView,OutOpacity,"Opacity",int,"");
BBTK_END_DESCRIBE_BLACK_BOX(ColorLayerImageView);
//=====