//=====
void ColorLayerImageView::Process()
{
- if ( !( (bbGetInputWxVtkBaseView()==NULL) && (bbGetInputWxVtkBaseView1()==NULL) && (bbGetInputWxVtkBaseView2()==NULL)) )
- {
- ColorLayerImageViewPanel_widgetBox *clivp = (ColorLayerImageViewPanel_widgetBox*)bbGetOutputWidget();
- 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
+ if (bbGetInputIn()!=NULL) {
+ if ( !( (bbGetInputWxVtkBaseView()==NULL) && (bbGetInputWxVtkBaseView1()==NULL) && (bbGetInputWxVtkBaseView2()==NULL)) )
+ {
+ ColorLayerImageViewPanel_widgetBox *clivp = (ColorLayerImageViewPanel_widgetBox*)bbGetOutputWidget();
+ 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
+
+ } // if In
}
//=====
// Don't edit this file. This file is generated from xml description..
{
namespace view
{
- // ----------------------------------------------------------------------------------
-
+
+// ----------------------------------------------------------------------------------
ComboBox::ComboBox(wxWindow* parent, wxWindowID id, ItemsVector iVector,
TFunctor* functor)
: wxPanel(parent, id)
{
this->m_Functor = functor;
-
wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
-
this->SetSizer(sizer);
-
this->m_ComboBox = new wxComboBox(this, -1);
this->m_FunctorEnabled = true;
-
this->Connect(wxEVT_COMMAND_COMBOBOX_SELECTED,
wxCommandEventHandler(ComboBox::OnComboBoxEvent));
-
if (!iVector.empty())
{
for (ItemsVector::iterator it = iVector.begin(); it != iVector.end();
{
std::string key = it->first;
this->m_ComboBox->Append(wxString(key.c_str(), wxConvUTF8));
- }
- }
-
+ } // for
+ } // if
sizer->Add(this->m_ComboBox, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL);
-
}
- // ----------------------------------------------------------------------------------
-
+
+// ----------------------------------------------------------------------------------
ComboBox::ComboBox(wxWindow* parent, wxWindowID id, TFunctor* functor)
: wxPanel(parent, id)
{
this->m_Functor = functor;
-
wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
-
this->SetSizer(sizer);
-
this->m_ComboBox = new wxComboBox(this, -1);
this->m_FunctorEnabled = true;
-
this->Connect(wxEVT_COMMAND_COMBOBOX_SELECTED,
wxCommandEventHandler(ComboBox::OnComboBoxEvent));
-
sizer->Add(this->m_ComboBox, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL);
-
}
- // ----------------------------------------------------------------------------------
-
- ComboBox::~ComboBox()
+
+// ----------------------------------------------------------------------------------
+ ComboBox::~ComboBox()
{
-
}
// ----------------------------------------------------------------------------------
-
void ComboBox::OnComboBoxEvent(wxCommandEvent& event)
{
if (!this->IsFunctorEnabled())
{
std::cout << "MLER | ComboBox::OnComboBoxEvent( wxCommandEvent& event )"
<< std::endl;
-
int iSelection;
iSelection = this->m_ComboBox->GetSelection();
-
wxString itemNom = this->m_ComboBox->GetString(iSelection);
std::string itemNomC = std::string(itemNom.mb_str());
-
this->m_Functor->Call(itemNomC);
-
} //yrt
catch (const std::exception& e)
{
{
this->m_FunctorEnabled = enabled;
}
+
// ----------------------------------------------------------------------------------
bool ComboBox::IsFunctorEnabled() const
{
return this->m_FunctorEnabled;
}
-
+
// ----------------------------------------------------------------------------------
wxComboBox*
ComboBox::GetComboBox() const
{
return this->m_ComboBox;
}
-
} //ecapseman
} //ecapseman