]> Creatis software - bbtk.git/commitdiff
defaultBalues InitializeProcessing FinalizeProcessing
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Thu, 14 May 2009 16:21:13 +0000 (16:21 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Thu, 14 May 2009 16:21:13 +0000 (16:21 +0000)
15 files changed:
packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.cxx
packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.h
packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx
packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.h
packages/itkvtk/src/bbitkvtkitkImage2vtkImageData.cxx
packages/itkvtk/src/bbitkvtkitkImage2vtkImageData.h
packages/itkvtk/src/bbitkvtkvtkImageData2itkImage.cxx
packages/qt/src/bbqtLayoutLine.cxx
packages/qt/src/bbqtLayoutLine.h
packages/qt/src/bbqtLayoutSplit.cxx
packages/qt/src/bbqtLayoutSplit.h
packages/qt/src/bbqtOutputText.cxx
packages/qt/src/bbqtOutputText.h
packages/qt/src/bbqtSlider.cxx
packages/qt/src/bbqtSlider.h

index d99d025eb48e08d2c65721f36d0749baa6db7937..07da598549592d325533c17d2c0a8562c57c2218 100644 (file)
@@ -14,7 +14,9 @@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(gdcmvtk,GetInfoGdcmReader)
 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();  
@@ -61,21 +63,30 @@ void GetInfoGdcmReader::Process()
    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;
+       }
+       
 }
 
 }
index f676af2c0ebbab04235d056faa0f36a79f3e07c1..d5dd7a08c57910e2ffe57464105bf353fb9242e3 100644 (file)
@@ -17,14 +17,6 @@ class bbgdcmvtk_EXPORT GetInfoGdcmReader
    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 *);
index 93437d05ba9d780521c5ca3de4f26153abc7dd64..924048da37c094762fd710d6d33e8ef065af8275 100644 (file)
@@ -74,8 +74,12 @@ void GetXCoherentInfoGdcmReader::Process()
        
        
 
-   
-   reader = vtkGdcmReader::New();
+       if (reader!=NULL)
+       { 
+               reader->Delete();
+               reader=NULL;
+       }
+       reader = vtkGdcmReader::New();
    //reader->SetFileName( bbGetInputIn().c_str() );
    reader->SetCoherentFileList(l);
    reader->Update();
@@ -84,19 +88,20 @@ void GetXCoherentInfoGdcmReader::Process()
    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();
index 224bdcca070b705966074798fe4a86b9105cdd7d..d0e470fe69c2a63eb0342daeb60b3b1679f943fe 100644 (file)
@@ -19,14 +19,6 @@ class bbgdcmvtk_EXPORT GetXCoherentInfoGdcmReader
    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);
index e3a46313c24142846caca6d1ccea18810fabe9ae..653664176a0ff3d82a34826798ec20c1a9d4fb8d 100644 (file)
@@ -2,8 +2,8 @@
   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 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -133,21 +133,21 @@ namespace bbitkvtk
 
  }
 
-  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
 
index 8e52ec69e114be3d143a979e19e6f2a23d887c97..dd773b90a222f246915a4ed4dc364602c5af8337 100644 (file)
@@ -2,8 +2,8 @@
   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 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -59,9 +59,6 @@ namespace bbitkvtk
     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*
index a378afea06d396cfb407e3c5ad69e4fb226d4f80..c1fb03458bac6e8685c2e70e35bf7c3a606cba86 100644 (file)
@@ -3,8 +3,8 @@
   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
@@ -131,21 +131,18 @@ namespace bbitkvtk
   }
 
   
-  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();
   }
   
 
index 031fff96a5e58b7e25da250859d4c9149883fd8d..1919d15abe55cd8c9cf46f214cdb619704fe7f09 100644 (file)
@@ -2,8 +2,8 @@
   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 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -48,7 +48,7 @@ namespace bbqt
   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);
@@ -62,6 +62,15 @@ namespace bbqt
     bbSetInputWidget9(NULL);
   }
   
+       void LayoutLine::bbUserInitializeProcessing()
+       {
+       }
+
+       void LayoutLine::bbUserFinalizeProcessing()
+       {
+       }
+       
+       
   void LayoutLine::Process()
   {
   }
index 3265a19de76e4a55bafda79df94556aa35689c26..ae26cc489367ab5400533d731f627c13f603e875 100644 (file)
@@ -2,8 +2,8 @@
   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 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -84,7 +84,6 @@ namespace bbqt
     void OnShowWidget();
     
   protected:
-    virtual void bbUserConstructor();
     // void TryInsertWindow(QWidget *parent, QWidget *w,qtBoxSizer *sizer);
     //
   };
index 7e3cfdc3a08346bf7d005a83742d3da94fde3c8b..a7c6ba1517439c4a621bea4fa5c08c6407c207d9 100644 (file)
@@ -2,8 +2,8 @@
   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 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -47,7 +47,8 @@ namespace bbqt
   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);
@@ -73,6 +74,18 @@ namespace bbqt
     bbSetInputWeight9(1);
   }
 
+       
+       void LayoutSplit::bbUserInitializeProcessing()
+       {
+       }
+       
+       void LayoutSplit::bbUserFinalizeProcessing()
+       {
+       }
+       
+       
+       
+       
   void LayoutSplit::Process()
   {
   }
index b9d9b1b919713a41a1b6df1926e8a0850cd43f67..6c90362b344d4f9824a7ebbbd10411b01b1fb58f 100644 (file)
@@ -2,8 +2,8 @@
   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 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -92,7 +92,6 @@ namespace bbqt
     void OnShowWidget();
 
   protected:
-    virtual void bbUserConstructor();
 
   };
   //=================================================================
index aa8a14b295646d777bf840e18a6f3d7196519f8b..170cdf7d7de36a8234f3f2c8b351af7f516795ca 100644 (file)
@@ -7,9 +7,9 @@ namespace bbqt
 
 BBTK_ADD_BLACK_BOX_TO_PACKAGE(qt,QOutputText)
 BBTK_BLACK_BOX_IMPLEMENTATION(QOutputText,bbtk::QtBlackBox);
+
 void QOutputText::Process()
 {
-
    std::string msg;
     if (bbGetInputTitle()!="")
       {
@@ -21,36 +21,33 @@ void QOutputText::Process()
       }
     ((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
 
index d61db3c713a185f56b7b96f940cbd8b2fb5668cd..bef500b160adaa309349984cc9f7a50704f12900 100644 (file)
@@ -13,14 +13,7 @@ class bbqt_EXPORT QOutputText
    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);
index c456c7ce2cbc808cadecbc2914555afb5cb9eb55..913697d915024bc69f1fe6eace763d152fd05256 100644 (file)
@@ -2,8 +2,8 @@
   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 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -59,7 +59,7 @@ namespace bbqt
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(qt,Slider);
   
   //--------------------------------------------------------------------------
-  void Slider::bbUserConstructor() 
+  void Slider::bbUserSetDefaultValues() 
   { 
     bbSetInputIn(0);
     bbSetInputMin(0);
@@ -72,6 +72,22 @@ namespace bbqt
   }
   //--------------------------------------------------------------------------
   
+       
+       //--------------------------------------------------------------------------
+       void Slider::bbUserInitializeProcessing()
+       {
+       }
+       //--------------------------------------------------------------------------
+
+       
+       //--------------------------------------------------------------------------
+       void Slider::bbUserFinalizeProcessing()
+       {
+       }
+       //--------------------------------------------------------------------------
+       
+       
+       
   //--------------------------------------------------------------------------
   void Slider::Process() 
   {
index 66b38231dd78b812041306f4803b6125813a23ad..dbba16847aef128367c1ad08b11e356254b2e960 100644 (file)
@@ -2,8 +2,8 @@
   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 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -95,7 +95,6 @@ namespace bbqt
 
 
   protected:
-    virtual void bbUserConstructor();
 
     //   QSlider* mSlider;
   };