void QmitkFunctionalityComponentContainer::SetWizardText(const QString &)
{
  GetImageContent()->updateGeometry();
  GetImageContent()->repaint();
  m_GUI->updateGeometry();
  m_GUI->layout()->activate();
  m_GUI->repaint();
}
void QmitkFunctionalityComponentContainer::SetWizardText(const QString& /*text*/)
{
  //m_FunctionalityComponentContainerGUI->GetWizardTextLabel()->setText(text);
  //m_FunctionalityComponentContainerGUI->GetWizardTextLabel()->setAlignment(Qt::WordBreak);
  GetImageContent()->updateGeometry();
  GetImageContent()->repaint();
  m_GUI->updateGeometry();
  //m_GUI->layout()->AlignTop;
  m_GUI->layout()->activate();
  m_GUI->repaint();

}
void fast_BilateralFilter::doBilateralFilter( const IplImage *SrcImageL, IplImage *result )
{
	m_ImageHeight = SrcImageL->height;
	m_ImageWidth  = SrcImageL->width;

	unsigned int temp = m_KernelSize / 2 + 1;

	double *UnitedImageL  = new double[m_ImageHeight * m_ImageWidth];
	double *UnitedResult  = new double[m_ImageHeight * m_ImageWidth];
	double *ParamDistance = new double[temp * temp];
	double *Wk  = new double[m_ImageHeight * m_ImageWidth * (m_BinNum + 1)];
	double *Jk  = new double[m_ImageHeight * m_ImageWidth * (m_BinNum + 1)];
	double *JkB = new double[m_ImageHeight * m_ImageWidth * (m_BinNum + 1)];

	m_ResultImg = result;

	GetImageContent( SrcImageL, UnitedImageL );
	GetParamDistance( ParamDistance );
	GetWkJk( UnitedImageL, Wk, Jk );
	GetJkB( Wk, Jk, ParamDistance, JkB );
	delete ParamDistance;
	delete Wk;
	delete Jk;
	GetUnitedResult( UnitedImageL, JkB, UnitedResult );
	delete UnitedImageL;
	delete JkB;
	ExtractImage( UnitedResult );
	delete UnitedResult;
}
void QmitkFunctionalityComponentContainer::CreateNavigationButtons()
{
  //QBoxLayout * buttonLayout = new QHBoxLayout(GetImageContent()->layout());
  QWidget* funcWidget = (QWidget*)m_FunctionalityComponentContainerGUI;
  QLayout *functionalityLayout = funcWidget->layout();
  QBoxLayout * buttonLayout = new QHBoxLayout(funcWidget);
  if ( QBoxLayout* boxLayout = dynamic_cast<QBoxLayout*>(functionalityLayout) )
  {
    boxLayout->addLayout( buttonLayout );
  }
  //if(m_BackButton==NULL)
  //{
  //  m_BackButton = new QPushButton("<<", GetImageContent());
  //}
  //if(m_NextButton==NULL)
  //{
  //  m_NextButton = new QPushButton(">>", GetImageContent());
  //}
  if(m_BackButton==NULL)
  {
    m_BackButton = new QPushButton("<<", (QWidget*)(m_FunctionalityComponentContainerGUI));
  }
  if(m_NextButton==NULL)
  {
    m_NextButton = new QPushButton(">>", (QWidget*)(m_FunctionalityComponentContainerGUI));
  }
  buttonLayout->addWidget(m_BackButton);
  buttonLayout->addWidget(m_NextButton);
  //m_GUI->layout()->addChildLayout(buttonLayout);
  m_BackButton->setShown(true);
  m_NextButton->setShown(true);
  //m_GUI->layout()->AlignTop;
  m_GUI->layout()->activate();
  m_GUI->repaint();

//  connect( (QObject*)(m_NextButton),  SIGNAL(pressed()), (QObject*) this, SLOT(NextButtonPressed()));
//  connect( (QObject*)(m_BackButton),  SIGNAL(pressed()), (QObject*) this, SLOT(BackButtonPressed()));

  m_FunctionalityComponentContainerGUI->m_WidgetStack->setCurrentIndex(1);
  SetWizardText("");
  GetImageContent()->updateGeometry();
  if(m_Spacer != NULL)
  {
    m_GUI->layout()->removeItem(m_Spacer);
  }
  QSpacerItem*  spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
  m_Spacer = spacer;
  m_GUI->layout()->addItem( m_Spacer );
  m_GUI->updateGeometry();
  m_GUI->repaint();
}
/************* SET SHOW TREE NODE SELECTOR ***********/
void QmitkFunctionalityComponentContainer::SetShowTreeNodeSelector(bool show)
{
  GetImageContent()->setShown(show);
}