]> Creatis software - bbtk.git/commitdiff
New widget pipeline : progressing ...
authorguigues <guigues>
Tue, 25 Nov 2008 11:16:51 +0000 (11:16 +0000)
committerguigues <guigues>
Tue, 25 Nov 2008 11:16:51 +0000 (11:16 +0000)
29 files changed:
kernel/appli/bbfy/bbfy.cpp
kernel/src/bbtkAtomicBlackBox.cxx
kernel/src/bbtkAtomicBlackBox.h
kernel/src/bbtkAtomicBlackBoxGetSetFunctor.h
kernel/src/bbtkAtomicBlackBoxMacros.h
kernel/src/bbtkBlackBox.cxx
kernel/src/bbtkWxBlackBox.cxx
kernel/src/bbtkWxBlackBox.h
packages/itk/src/bbitkBinaryThresholdImageFilter.h
packages/itk/src/bbitkResampleImageFilter.h
packages/itkvtk/src/bbitkvtkitkImage2vtkImageData.cxx
packages/itkvtk/src/bbitkvtkitkImage2vtkImageData.h
packages/itkvtk/src/bbitkvtkvtkImageData2itkImage.cxx
packages/itkvtk/src/bbitkvtkvtkImageData2itkImage.h
packages/std/src/bbstdASCII.cxx
packages/std/src/bbstdASCII.h
packages/vtk/src/bbvtkImagePlanes.cxx
packages/vtk/src/bbvtkImagePlanes.h
packages/vtk/src/bbvtkIsoSurfaceExtractor.cxx
packages/vtk/src/bbvtkIsoSurfaceExtractor.h
packages/vtk/src/bbvtkMIPCreator.cxx
packages/vtk/src/bbvtkMIPCreator.h
packages/vtk/src/bbvtkVecImageGaussianSmooth.cxx
packages/vtk/src/bbvtkVecImageGaussianSmooth.h
packages/vtk/src/bbvtkVecIsoSurfaceExtractor.cxx
packages/vtk/src/bbvtkVecIsoSurfaceExtractor.h
packages/wx/src/bbwxColourSelectorButton.cxx
packages/wx/src/bbwxColourSelectorButton.h
packages/wxvtk/src/bbwxvtkViewer3D.cxx

index db4161b..c22be32 100644 (file)
@@ -589,7 +589,7 @@ void bbfy::CreateHeader()
 
   mFile << "virtual void bbUserConstructor();"<<std::endl;
   mFile << "/// User callback called in the box copy constructor"<<std::endl;
-  mFile << "virtual void bbUserCopyConstructor();"<<std::endl;
+  mFile << "virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);"<<std::endl;
   mFile << "/// User callback called in the box destructor"<<std::endl;
   mFile << "virtual void bbUserDestructor();"<<std::endl;
   mFile << "//=================================================================="<<std::endl; 
@@ -1052,7 +1052,8 @@ void bbfy::CreateCode()
   mFile << mUserConstructor << std::endl;
   mFile << "}" << std::endl;
 
-  mFile <<"void "<<mName<<"::bbUserCopyConstructor()"<<std::endl;
+  mFile <<"void "<<mName<<"::bbUserCopyConstructor(bbtk::BlackBox::Pointer)"
+       <<std::endl;
   mFile << "{"<<std::endl;
   //mFile<<"bbtkDebugMessage(\"Kernel\",9,\""<<mName<<::bbUserCopyConstructor()"<<std::endl);"<<std::endl;
   mFile << mUserCopyConstructor << std::endl;
index 1b11dcf..3ee7d62 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:43 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/11/25 11:17:13 $
+  Version:   $Revision: 1.10 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -227,7 +227,7 @@ namespace bbtk
                 Data data, 
                 bool setModified )
   {
-    bbtkDebugMessageInc("Data",7,
+    bbtkDebugMessageInc("data",7,
             "AtomicBlackBox::bbSetInput(\""<<name<<"\",data) ["
             <<bbGetFullName()<<"]"
             <<std::endl);  
@@ -238,7 +238,7 @@ namespace bbtk
             bbSetModifiedStatus();
         }
     
-    bbtkDebugDecTab("Data",7);
+    bbtkDebugDecTab("data",7);
   }
   //=========================================================================
   
@@ -251,7 +251,7 @@ namespace bbtk
                     bool setModified
     )
   {
-    bbtkDebugMessageInc("Data",7,
+    bbtkDebugMessageInc("data",7,
             "AtomicBlackBox::bbBruteForceSetInputPointer(\""
             <<name<<"\",data) ["
             <<bbGetFullName()<<"]"
@@ -265,7 +265,7 @@ namespace bbtk
         bbSetModifiedStatus();
       }
     
-    bbtkDebugDecTab("Data",7);
+    bbtkDebugDecTab("data",7);
   }
   //=========================================================================
  
index fa31111..34d8507 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:12 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2008/11/25 11:17:13 $
+  Version:   $Revision: 1.6 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -166,7 +166,7 @@ namespace bbtk
     /// User callback called in the box contructor
     virtual void bbUserConstructor() {}
     /// User callback called in the box copy constructor
-    virtual void bbUserCopyConstructor() {}
+    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer) {}
     /// User callback called in the box destructor
     virtual void bbUserDestructor() {}
     //==================================================================    
index f480c61..ecc5680 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBoxGetSetFunctor.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:12 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2008/11/25 11:17:13 $
+  Version:   $Revision: 1.5 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -123,7 +123,7 @@ namespace bbtk
     AtomicBlackBoxTGetFunctor(GetMethodPointerType g) :
       mGetMethodPointer(g)
       {
-       bbtkDebugMessage("Data",9,"AtomicBlackBoxTGetFunctor<"<<
+       bbtkDebugMessage("data",9,"AtomicBlackBoxTGetFunctor<"<<
                         TypeName<UBB>()<<","<<
                         TypeName<T>()<<","<<
                         TypeName<TRETURN>()<<
@@ -133,7 +133,7 @@ namespace bbtk
     /// Concrete application of the Get method of object o
     Data Get(AtomicBlackBox* o) 
     {
-      bbtkDebugMessage("Data",9,"AtomicBlackBoxTGetFunctor<"<<
+      bbtkDebugMessage("data",9,"AtomicBlackBoxTGetFunctor<"<<
                       TypeName<UBB>()<<","<<
                       TypeName<T>()<<","<<
                       TypeName<TRETURN>()<<
@@ -170,7 +170,7 @@ namespace bbtk
     AtomicBlackBoxTSetFunctor(SetMethodPointerType s) :
       mSetMethodPointer(s) 
       {
-       bbtkDebugMessage("Data",9,"AtomicBlackBoxTSetFunctor<"<<
+       bbtkDebugMessage("data",9,"AtomicBlackBoxTSetFunctor<"<<
                        TypeName<UBB>()<<","<<
                        TypeName<T>()<<","<<
                        TypeName<TACCESS>()<<
@@ -180,7 +180,7 @@ namespace bbtk
     /// Concrete application of the Set method of object o
     void Set(AtomicBlackBox* o, const Data& d)
     { 
-      bbtkDebugMessage("Data",9,"AtomicBlackBoxTSetfunctor<"<<
+      bbtkDebugMessage("data",9,"AtomicBlackBoxTSetfunctor<"<<
                        TypeName<UBB>()<<","<<
                        TypeName<T>()<<","<<
                        TypeName<TACCESS>()<<
@@ -231,7 +231,7 @@ namespace bbtk
     AtomicBlackBoxTSetFunctor(SetMethodPointerType s) :
       mSetMethodPointer(s) 
     {
-      bbtkDebugMessage("Data",9,"AtomicBlackBoxTSetFunctor<"<<
+      bbtkDebugMessage("data",9,"AtomicBlackBoxTSetFunctor<"<<
                       TypeName<UBB>()<<","<<
                       TypeName<T*>()<<","<<
                       TypeName<TACCESS*>()<<
@@ -241,7 +241,7 @@ namespace bbtk
     /// Concrete application of the Set method of object o
     void Set(AtomicBlackBox* o, const Data& d)
     { 
-      bbtkDebugMessage("Data",9,"AtomicBlackBoxTSetfunctor<"<<
+      bbtkDebugMessage("data",9,"AtomicBlackBoxTSetfunctor<"<<
                       TypeName<UBB>()<<","<<
                       TypeName<T*>()<<","<<
                       TypeName<TACCESS*>()<<
@@ -260,7 +260,7 @@ namespace bbtk
  
     virtual void BruteForceSetPointer(AtomicBlackBox* o, void* p) 
     {  
-      bbtkDebugMessage("Data",9,"AtomicBlackBoxTSetFunctor<"
+      bbtkDebugMessage("data",9,"AtomicBlackBoxTSetFunctor<"
                       <<TypeName<UBB>()<<","
                       <<TypeName<T*>()<<","
                       <<TypeName<TACCESS*>()
index 8c026f2..69bcc7c 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBoxMacros.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:43 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2008/11/25 11:17:13 $
+  Version:   $Revision: 1.13 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
     : PARENT(from,name,false)                                          \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors); \
-    CLASS::bbUserCopyConstructor();                                    \
+    CLASS::bbUserCopyConstructor(from.GetThisPointer<bbtk::BlackBox>()); \
     BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from);                   \
   }                                                                    \
   CLASS::~CLASS()                                                      \
     : PARENT(from,name,false)                                          \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors); \
-    CLASS<T>::bbUserCopyConstructor();                                 \
+    CLASS<T>::bbUserCopyConstructor(from.GetThisPointer<bbtk::BlackBox>()); \
     BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from);                   \
   }                                                                    \
   template <class T>                                                   \
     : PARENT(from,name,false)                                          \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors); \
-    CLASS<T1,T2>::bbUserCopyConstructor();                             \
+    CLASS<T1,T2>::bbUserCopyConstructor(from.GetThisPointer<bbtk::BlackBox>());        \
     BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from);                   \
   }                                                                    \
   template <class T1, class T2>                                                \
index 3b39556..ddfc3ed 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:43 $
-  Version:   $Revision: 1.28 $
+  Date:      $Date: 2008/11/25 11:17:13 $
+  Version:   $Revision: 1.29 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -343,7 +343,7 @@ namespace bbtk
   /// Copies the input / output values from another box
   void BlackBox::bbCopyIOValues(BlackBox& from)
   {
-    bbtkDebugMessageInc("Kernel",9,
+    bbtkDebugMessageInc("Kernel",1,
                        "BlackBox::bbCopyIOValues("
                        <<from.bbGetFullName()<<") ["
                        <<bbGetFullName()<<"]"<<std::endl);
@@ -355,6 +355,7 @@ namespace bbtk
       {                
        if (! i->second->GetCopyConstruct() ) continue;
        std::string input = i->second->GetName();
+       bbtkDebugMessage("Kernel",2,"* Copying input "<<input<<std::endl);
        this->bbSetInput(input, from.bbGetInput(input) );
       }                                                                        
     // copies the output values
@@ -365,6 +366,7 @@ namespace bbtk
       {                                                        
        if (! o->second->GetCopyConstruct() ) continue;
        std::string output = o->second->GetName();
+       bbtkDebugMessage("Kernel",2,"* Copying output "<<output<<std::endl);
        this->bbSetOutput(output, from.bbGetOutput(output) );
       }
 
index a5f2ce0..01ee471 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/24 15:45:48 $
-  Version:   $Revision: 1.30 $
+  Date:      $Date: 2008/11/25 11:17:13 $
+  Version:   $Revision: 1.31 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -357,7 +357,7 @@ namespace bbtk
   //=========================================================================
 
   //=========================================================================
-  void WxBlackBox::bbUserCopyConstructor()
+  void WxBlackBox::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
   {
     bbtkDebugMessage("Kernel",9,"WxBlackBox::bbUserCopyConstructor()"
                     <<std::endl);
index e8acc44..e2857e0 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/24 15:45:48 $
-  Version:   $Revision: 1.20 $
+  Date:      $Date: 2008/11/25 11:17:13 $
+  Version:   $Revision: 1.21 $
 ========================================================================*/
 
 
@@ -136,7 +136,7 @@ namespace bbtk
     /// User callback called in the box contructor
     virtual void bbUserConstructor();
     /// User callback called in the box copy constructor
-    virtual void bbUserCopyConstructor();
+    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
     /// User callback called in the box destructor
     virtual void bbUserDestructor();
     //==================================================================    
index 066f602..eb26cab 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkBinaryThresholdImageFilter.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/12 12:47:03 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/11/25 11:17:15 $
+  Version:   $Revision: 1.10 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -58,7 +58,7 @@ namespace bbitk
     BBTK_ITK_DELETE();
 
     void bbUserConstructor() { Init(); }
-    void bbUserCopyConstructor() { Init(); }
+    void bbUserCopyConstructor(bbtk::BlackBox::Pointer) { Init(); }
     void Init();
 
   };
@@ -102,7 +102,7 @@ namespace bbitk
     inline void ProcessSwitch();
     template <class T> void Process();
     void bbUserConstructor() { Init(); }
-    void bbUserCopyConstructor() { Init(); }
+    void bbUserCopyConstructor(bbtk::BlackBox::Pointer) { Init(); }
     void Init();
   };
   
index 127e229..0dae92d 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkResampleImageFilter.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:21 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2008/11/25 11:17:15 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -58,7 +58,7 @@ namespace bbitk
     inline void ProcessSwitch();
     template <class T> void Process();
     void bbUserConstructor() { Init(); }
-    void bbUserCopyConstructor() { Init(); }
+    void bbUserCopyConstructor(bbtk::BlackBox::Pointer) { Init(); }
     void Init();
     itk::Object* mOutput;
   };
index ac14914..e3a4631 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkvtkitkImage2vtkImageData.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/12 12:47:05 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/11/25 11:17:17 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -138,7 +138,7 @@ namespace bbitkvtk
     bbSetOutputOut(NULL);
     mConverter = 0;
   }
-  void itkImage2vtkImageData::bbUserCopyConstructor()
+  void itkImage2vtkImageData::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
   {
     bbSetOutputOut(NULL);
     mConverter = 0;
index 476cddc..8e52ec6 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkvtkitkImage2vtkImageData.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:24 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2008/11/25 11:17:18 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -60,7 +60,7 @@ namespace bbitkvtk
     BBTK_PROCESS(Convert);
     void Convert();
     void bbUserConstructor();
-    void bbUserCopyConstructor();
+    void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
     void bbUserDestructor();
   private:
     // Convert method template on type of the itk image 
index d8cde9d..a378afe 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkvtkvtkImageData2itkImage.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/05/14 07:01:00 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/11/25 11:17:18 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -137,7 +137,7 @@ namespace bbitkvtk
     mConverter = 0;
   }
   
-  void vtkImageData2itkImage::bbUserCopyConstructor()
+  void vtkImageData2itkImage::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
   {
     //    bbSetOutputOut(NULL);
     mConverter = 0;
index 1ee762b..2af1182 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkvtkvtkImageData2itkImage.h,v $
   Language:  C++
-  Date:      $Date: 2008/07/23 12:02:15 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2008/11/25 11:17:18 $
+  Version:   $Revision: 1.6 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -48,7 +48,7 @@ namespace bbitkvtk
     BBTK_PROCESS(Convert);
     void Convert();
     void bbUserConstructor();
-    void bbUserCopyConstructor();
+    void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
     void bbUserDestructor();
 
   private:
index 69b5047..10e630f 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdASCII.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:26 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2008/11/25 11:17:20 $
+  Version:   $Revision: 1.6 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -88,7 +88,7 @@ namespace bbstd
     bbSetInputType(0);
   }
   
-  void ASCII::bbUserCopyConstructor()
+  void ASCII::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
   {    
   }
   
index a76b034..cd28637 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdASCII.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:26 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2008/11/25 11:17:20 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -46,7 +46,7 @@ namespace bbstd
     /// User callback called in the box contructor
     virtual void bbUserConstructor();
     /// User callback called in the box copy constructor
-    virtual void bbUserCopyConstructor();
+    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
     /// User callback called in the box destructor
     virtual void bbUserDestructor();
     //==================================================================
index 0f5e34b..191fcfa 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkImagePlanes.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:30 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/11/25 11:17:23 $
+  Version:   $Revision: 1.10 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -77,7 +77,7 @@ namespace bbvtk
      bbSetInputWindowLevel (vect);
    }
    
-   void ImagePlanes::bbUserCopyConstructor() 
+   void ImagePlanes::bbUserCopyConstructor(bbtk::BlackBox::Pointer) 
    { 
      planeWidgetX = planeWidgetY = planeWidgetZ = 0;
    }
index c12a49c..3121529 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkImagePlanes.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:30 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/11/25 11:17:23 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -85,7 +85,7 @@ namespace bbvtk
     
   protected:
     virtual void bbUserConstructor();
-    virtual void bbUserCopyConstructor();
+    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
     virtual void bbUserDestructor();
     void Init();
   private:
index 6db4697..3aa3a37 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkIsoSurfaceExtractor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/21 12:25:42 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/11/25 11:17:23 $
+  Version:   $Revision: 1.10 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -55,9 +55,8 @@ namespace bbvtk
      colour.push_back(1.0);
      colour.push_back(0.5);
      bbSetInputColour(colour);
-        bbSetInputTransform(NULL);
    }
-   void IsoSurfaceExtractor::bbUserCopyConstructor() 
+   void IsoSurfaceExtractor::bbUserCopyConstructor(bbtk::BlackBox::Pointer from) 
    { 
      Init();
    }
@@ -76,6 +75,7 @@ namespace bbvtk
      bbSetInputIn(NULL);
      //     bbSetInputInVtkObject(NULL);
      bbSetInputRenderer(NULL);
+     bbSetInputTransform(NULL);
      bbSetInputIsovalue(400);
      bbSetInputOpacity(1);
         
@@ -94,8 +94,6 @@ namespace bbvtk
 
    void IsoSurfaceExtractor::DoProcess()
    {
-     //   bbGetInputIn()->Print(std::cout);
-     // Visualisation - result volume
      marchingcubes->SetInput( bbGetInputIn() );
      marchingcubes->SetValue(0,  bbGetInputIsovalue() );
      marchingcubes->Update();
@@ -106,19 +104,19 @@ namespace bbvtk
      
      
      vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
-       
-        if ( bbGetInputTransform()!=NULL )
-        {
-                vtkactor->SetUserTransform( bbGetInputTransform() );
-        }
+     
+     if ( bbGetInputTransform()!=NULL )
+       {
+        vtkactor->SetUserTransform( bbGetInputTransform() );
+       }
 
      bbSetOutputOut( vtkactor );
-     
+
      // Interface Update
      if ((firsttime==true) && (bbGetInputRenderer()!=NULL ))
      {
-               firsttime=false;
-           bbGetInputRenderer()->AddActor( vtkactor );
+       firsttime=false;
+       bbGetInputRenderer()->AddActor( vtkactor );
      }
    }
 } // EO namespace bbtk
index 8052927..554ca8c 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkIsoSurfaceExtractor.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/20 17:41:48 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2008/11/25 11:17:23 $
+  Version:   $Revision: 1.11 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -90,7 +90,7 @@ namespace bbvtk
     
   protected:
     virtual void bbUserConstructor();
-    virtual void bbUserCopyConstructor();
+    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
     virtual void bbUserDestructor();
     void Init();
   };
index c4a04b8..a398952 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkMIPCreator.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:30 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2008/11/25 11:17:23 $
+  Version:   $Revision: 1.5 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -58,7 +58,7 @@ namespace bbvtk
      bbSetInputShift(0);
      bbSetInputScale(1.);
    }
-   void MIPCreator::bbUserCopyConstructor() 
+   void MIPCreator::bbUserCopyConstructor(bbtk::BlackBox::Pointer) 
    { 
      Init();
    }
index acf229a..6481ef8 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkMIPCreator.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:30 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2008/11/25 11:17:23 $
+  Version:   $Revision: 1.6 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -80,7 +80,7 @@ namespace bbvtk
     
   protected:
     virtual void bbUserConstructor();
-    virtual void bbUserCopyConstructor();
+    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
     virtual void bbUserDestructor();
     void Init();
   private:
index 3a634eb..01b9019 100644 (file)
@@ -54,7 +54,7 @@ void VecImageGaussianSmooth::bbUserConstructor()
 
 }
 
-void VecImageGaussianSmooth::bbUserCopyConstructor()
+void VecImageGaussianSmooth::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
 { 
 }
 
index 1acb573..d5fc226 100644 (file)
@@ -19,7 +19,7 @@ class /*BBTK_EXPORT*/ VecImageGaussianSmooth
 /// User callback called in the box contructor
 virtual void bbUserConstructor();
 /// User callback called in the box copy constructor
-virtual void bbUserCopyConstructor();
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
 /// User callback called in the box destructor
 virtual void bbUserDestructor();
 //==================================================================
index 4ba55a1..f4575b5 100644 (file)
@@ -126,7 +126,7 @@ void VecIsoSurfaceExtractor::bbUserConstructor()
         bbSetInputTransform(NULL);
 }
 
-void VecIsoSurfaceExtractor::bbUserCopyConstructor()
+void VecIsoSurfaceExtractor::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
 {
        Init();
 }
index e0e4b84..060eb14 100644 (file)
@@ -24,7 +24,7 @@ class /*BBTK_EXPORT*/ VecIsoSurfaceExtractor
 /// User callback called in the box contructor
 virtual void bbUserConstructor();
 /// User callback called in the box copy constructor
-virtual void bbUserCopyConstructor();
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
 /// User callback called in the box destructor
 virtual void bbUserDestructor();
 //==================================================================
index 9328d6a..9a4cafd 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxColourSelectorButton.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/24 15:45:51 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/11/25 11:17:25 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -119,14 +119,22 @@ void wxColourPickerCtrlWidget::UpdateBox()
   void ColourSelectorButton::bbUserConstructor() 
   { 
     bbSetInputIn("1 1 1");
+    bbSetOutputOut("1 1 1");
+    bbSetOutputWidget(0);
   }
 
 
   void ColourSelectorButton::Process() 
   { 
-    bbtkDebugMessageInc("Process",9,"ColourSelectorButton::Process()"<<std::endl);
-      pickerWidget->UpdateBox();
-    bbtkDebugDecTab("Process",9);
+    wxColourPickerCtrlWidget* w = ( wxColourPickerCtrlWidget* )bbGetOutputWidget();
+    if (w) 
+      {
+       w->UpdateBox();
+      }
+    else 
+      {
+       bbSetOutputOut(bbGetInputIn());
+      }
   }
 
 
@@ -137,7 +145,6 @@ void wxColourPickerCtrlWidget::UpdateBox()
    */
   void ColourSelectorButton::CreateWidget(wxWindow* parent)
   {
-    bbtkDebugMessage("Process",9,"=> ColourSelectorButton::CreateWidget()"<<std::endl);
     
     float r,g,b;
     sscanf( bbGetInputIn().c_str(), "%f %f %f", &r, &g ,&b);
@@ -146,13 +153,11 @@ void wxColourPickerCtrlWidget::UpdateBox()
     cg = (unsigned char)(255.*g);
     cb = (unsigned char)(255.*b);
 
-    pickerWidget = new wxColourPickerCtrlWidget(this, //bbGetWxParent() , 
+    wxColourPickerCtrlWidget* w = new wxColourPickerCtrlWidget(this, //bbGetWxParent() , 
                                                                                                parent,
                                                                                                cr , cg , cb );    
     
-    bbtkDebugMessage("Process",9,"<= ColourSelectorButton::CreateWidget()"<<std::endl);
-
-    bbSetOutputWidget( pickerWidget );
+    bbSetOutputWidget( w );
   }
 
 
index c8deb65..aef50a2 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxColourSelectorButton.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/24 15:45:51 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2008/11/25 11:17:25 $
+  Version:   $Revision: 1.9 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -99,9 +99,10 @@ private:
 
   protected:
     virtual void bbUserConstructor();
-
+    /*
   private:
      wxColourPickerCtrlWidget* pickerWidget;
+    */
   };
 
   //=================================================================
index 228e9a4..41e76ab 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxvtkViewer3D.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/24 15:45:54 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2008/11/25 11:17:28 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -147,12 +147,14 @@ void Viewer3DWidget::Refresh(bool eraseBackground , const wxRect* rect )
     bbSetInputStereo(false);
     bbSetOutputRenderer( NULL );
     bbSetOutputInteractor( NULL );
+    bbSetOutputWidget(NULL);
   }
 
 
   void Viewer3D::Process() 
   { 
-    ((Viewer3DWidget*)bbGetOutputWidget())->Update();
+    Viewer3DWidget* w = (Viewer3DWidget*)bbGetOutputWidget();
+    if (w) w->Update();
   }
   
 
@@ -225,7 +227,8 @@ void Viewer3DWidget::Refresh(bool eraseBackground , const wxRect* rect )
   // when window is shown
   void  Viewer3D::OnShowWidget()
   {
-    ((Viewer3DWidget*)bbGetOutputWidget())->Update();
+    Viewer3DWidget* w = (Viewer3DWidget*)bbGetOutputWidget();
+    if (w) w->Update();
   }