BBTK_BLACK_BOX_IMPLEMENTATION(GetInfoGdcmReader,bbtk::AtomicBlackBox);
void GetInfoGdcmReader::Process()
{
-
+ // Reset de reader, f
+ bbUserFinalizeProcessing();
+
f = GDCM_NAME_SPACE::File::New();
f->SetFileName( bbGetInputIn() );
bool res = f->Load();
bbSetOutputOut( reader->GetOutput() );
}
-void GetInfoGdcmReader::bbUserConstructor()
+void GetInfoGdcmReader::bbUserSetDefaultValues()
{
+ reader=NULL;
+ f=NULL;
bbSetInputIn("");
}
-void GetInfoGdcmReader::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+void GetInfoGdcmReader::bbUserInitializeProcessing()
{
-
}
-void GetInfoGdcmReader::bbUserDestructor()
+
+
+
+void GetInfoGdcmReader::bbUserFinalizeProcessing()
{
- if(reader)
+ if(reader){
reader->Delete();
- if(f)
+ reader=NULL;
+ }
+ if(f){
f->Delete();
+ f=NULL;
+ }
+
}
}
public bbtk::AtomicBlackBox
{
BBTK_BLACK_BOX_INTERFACE(GetInfoGdcmReader,bbtk::AtomicBlackBox);
-//==================================================================
-/// User callback called in the box contructor
-virtual void bbUserConstructor();
-/// User callback called in the box copy constructor
-virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
-/// User callback called in the box destructor
-virtual void bbUserDestructor();
-//==================================================================
BBTK_DECLARE_INPUT(In, std::string);
BBTK_DECLARE_OUTPUT(Out, vtkImageData *);
-
- reader = vtkGdcmReader::New();
+ if (reader!=NULL)
+ {
+ reader->Delete();
+ reader=NULL;
+ }
+ reader = vtkGdcmReader::New();
//reader->SetFileName( bbGetInputIn().c_str() );
reader->SetCoherentFileList(l);
reader->Update();
bbSetOutputOut( reader->GetOutput() );
}
-void GetXCoherentInfoGdcmReader::bbUserConstructor()
+void GetXCoherentInfoGdcmReader::bbUserSetDefaultValues()
{
std::vector<std::string> init;
init.push_back("");
bbSetInputIn(init);
+ reader=NULL;
}
-void GetXCoherentInfoGdcmReader::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+void GetXCoherentInfoGdcmReader::bbUserInitializeProcessing()
{
-
+
}
-void GetXCoherentInfoGdcmReader::bbUserDestructor()
+void GetXCoherentInfoGdcmReader::bbUserFinalizeProcessing()
{
if(reader)
reader->Delete();
public bbtk::AtomicBlackBox
{
BBTK_BLACK_BOX_INTERFACE(GetXCoherentInfoGdcmReader,bbtk::AtomicBlackBox);
-//==================================================================
-/// User callback called in the box contructor
-virtual void bbUserConstructor();
-/// User callback called in the box copy constructor
-virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
-/// User callback called in the box destructor
-virtual void bbUserDestructor();
-//==================================================================
BBTK_DECLARE_INPUT(In, std::vector<std::string>);
BBTK_DECLARE_INPUT(IPPSort, bool);
Program: bbtk
Module: $RCSfile: bbitkvtkitkImage2vtkImageData.cxx,v $
Language: C++
- Date: $Date: 2008/11/25 11:17:17 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2009/05/14 16:21:15 $
+ Version: $Revision: 1.8 $
=========================================================================*/
/* ---------------------------------------------------------------------
}
- void itkImage2vtkImageData::bbUserConstructor()
+ void itkImage2vtkImageData::bbUserSetDefaultValues()
{
bbSetOutputOut(NULL);
mConverter = 0;
}
- void itkImage2vtkImageData::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
- {
- bbSetOutputOut(NULL);
- mConverter = 0;
- }
- void itkImage2vtkImageData::bbUserDestructor()
- {
- }
-
+ void GetXCoherentInfoGdcmReader::bbUserInitializeProcessing()
+ {
+ }
+
+ void GetXCoherentInfoGdcmReader::bbUserFinalizeProcessing()
+ {
+ }
+
+
}
// eo namespace bbitkvtk
Program: bbtk
Module: $RCSfile: bbitkvtkitkImage2vtkImageData.h,v $
Language: C++
- Date: $Date: 2008/11/25 11:17:18 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2009/05/14 16:21:15 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
BBTK_PROCESS(Convert);
void Convert();
- void bbUserConstructor();
- void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
- void bbUserDestructor();
private:
// Convert method template on type of the itk image
// embedded in the input itkImage*
Program: bbtk
Module: $RCSfile: bbitkvtkvtkImageData2itkImage.cxx,v $
Language: C++
- Date: $Date: 2008/11/25 11:17:18 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2009/05/14 16:21:15 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
- void vtkImageData2itkImage::bbUserConstructor()
+ void vtkImageData2itkImage::bbUserSetDefaultValues()
{
// bbSetOutputOut(NULL);
mConverter = 0;
}
- void vtkImageData2itkImage::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+ void vtkImageData2itkImage::bbUserInitializeProcessing()
{
- // bbSetOutputOut(NULL);
- mConverter = 0;
}
- void vtkImageData2itkImage::bbUserDestructor()
+ void vtkImageData2itkImage::bbUserFinalizeProcessing()
{
- // if (mConverter) mConverter->UnRegister();
}
Program: bbtk
Module: $RCSfile: bbqtLayoutLine.cxx,v $
Language: C++
- Date: $Date: 2009/04/08 08:35:59 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/14 16:21:19 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(qt, LayoutLine);
BBTK_BLACK_BOX_IMPLEMENTATION(LayoutLine,bbtk::QtBlackBox);
- void LayoutLine::bbUserConstructor()
+ void LayoutLine::bbUserSetDefaultValues()
{
bbSetInputOrientation("VERTICAL");
bbSetInputWidget1(NULL);
bbSetInputWidget9(NULL);
}
+ void LayoutLine::bbUserInitializeProcessing()
+ {
+ }
+
+ void LayoutLine::bbUserFinalizeProcessing()
+ {
+ }
+
+
void LayoutLine::Process()
{
}
Program: bbtk
Module: $RCSfile: bbqtLayoutLine.h,v $
Language: C++
- Date: $Date: 2009/04/08 08:35:59 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/14 16:21:19 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
void OnShowWidget();
protected:
- virtual void bbUserConstructor();
// void TryInsertWindow(QWidget *parent, QWidget *w,qtBoxSizer *sizer);
//
};
Program: bbtk
Module: $RCSfile: bbqtLayoutSplit.cxx,v $
Language: C++
- Date: $Date: 2009/04/08 08:35:59 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/14 16:21:19 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(qt,LayoutSplit);
BBTK_BLACK_BOX_IMPLEMENTATION(LayoutSplit,bbtk::QtBlackBox);
- void LayoutSplit::bbUserConstructor()
+
+ void LayoutSplit::bbUserSetDefaultValues()
{
bbSetInputOrientation("VERTICAL");
// bbSetInputProportion(50);
bbSetInputWeight9(1);
}
+
+ void LayoutSplit::bbUserInitializeProcessing()
+ {
+ }
+
+ void LayoutSplit::bbUserFinalizeProcessing()
+ {
+ }
+
+
+
+
void LayoutSplit::Process()
{
}
Program: bbtk
Module: $RCSfile: bbqtLayoutSplit.h,v $
Language: C++
- Date: $Date: 2009/04/08 08:35:59 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/14 16:21:19 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
void OnShowWidget();
protected:
- virtual void bbUserConstructor();
};
//=================================================================
BBTK_ADD_BLACK_BOX_TO_PACKAGE(qt,QOutputText)
BBTK_BLACK_BOX_IMPLEMENTATION(QOutputText,bbtk::QtBlackBox);
+
void QOutputText::Process()
{
-
std::string msg;
if (bbGetInputTitle()!="")
{
}
((QLabel*)bbGetOutputWidget())->setText( msg.c_str() );
//SetLabel( bbtk::std2wx( msg ) );
-
}
+
+
void QOutputText::CreateWidget(QWidget* parent)
{
-
bbSetOutputWidget( new
QLabel( parent ) );
//wxStaticText ( bbGetWxParent() , -1 , _T("") ) );
Process();
-
-}
-void QOutputText::bbUserConstructor()
-{
-
- bbSetInputIn("");
- bbSetInputTitle("");
-
}
-void QOutputText::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
-{
-
+
+
+ void QOutputText::bbUserSetDefaultValues()
+ {
+ bbSetInputIn("");
+ bbSetInputTitle("");
+ }
+
+ void QOutputText::bbUserInitializeProcessing()
+ {
+ }
+
+ void QOutputText::bbUserFinalizeProcessing()
+ {
+ }
+
-
-}
-void QOutputText::bbUserDestructor()
-{
-
-
-
-}
}
// EO namespace bbqt
public bbtk::QtBlackBox
{
BBTK_BLACK_BOX_INTERFACE(QOutputText,bbtk::QtBlackBox);
-//==================================================================
-/// User callback called in the box contructor
-virtual void bbUserConstructor();
-/// User callback called in the box copy constructor
-virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
-/// User callback called in the box destructor
-virtual void bbUserDestructor();
-//==================================================================
+
BBTK_DECLARE_INPUT(Title,std::string);
BBTK_DECLARE_INPUT(In,std::string);
BBTK_PROCESS(Process);
Program: bbtk
Module: $RCSfile: bbqtSlider.cxx,v $
Language: C++
- Date: $Date: 2009/04/08 08:36:00 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/14 16:21:19 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(qt,Slider);
//--------------------------------------------------------------------------
- void Slider::bbUserConstructor()
+ void Slider::bbUserSetDefaultValues()
{
bbSetInputIn(0);
bbSetInputMin(0);
}
//--------------------------------------------------------------------------
+
+ //--------------------------------------------------------------------------
+ void Slider::bbUserInitializeProcessing()
+ {
+ }
+ //--------------------------------------------------------------------------
+
+
+ //--------------------------------------------------------------------------
+ void Slider::bbUserFinalizeProcessing()
+ {
+ }
+ //--------------------------------------------------------------------------
+
+
+
//--------------------------------------------------------------------------
void Slider::Process()
{
Program: bbtk
Module: $RCSfile: bbqtSlider.h,v $
Language: C++
- Date: $Date: 2009/04/08 08:36:00 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/14 16:21:19 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
protected:
- virtual void bbUserConstructor();
// QSlider* mSlider;
};