]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Wed, 7 May 2008 06:31:36 +0000 (06:31 +0000)
committerguigues <guigues>
Wed, 7 May 2008 06:31:36 +0000 (06:31 +0000)
kernel/appli/bbfy/bbfy.cpp
kernel/src/bbtkAtomicBlackBoxMacros.h
kernel/src/bbtkItkBlackBoxMacros.h [new file with mode: 0644]
kernel/src/bbtkVtkBlackBoxMacros.h [new file with mode: 0644]
packages/itk/src/bbitkBinaryThresholdImageFilter.h
packages/itk/src/bbitkExtractImageFilter.h
packages/vtk/src/bbvtkMarchingCubes.h
packages/vtk/src/bbvtkMetaImageReader.xml

index a315ed9c314620297de9852a4c213b830bfc0ee7..e67bce9600757ff3c9c60d927a9cb56a9954b553 100644 (file)
@@ -492,6 +492,15 @@ void bbfy::CreateHeader()
   if (mGeneric) mFile << "#include \"bbitkImage.h\"\n";
   mFile << "\n";
 
+  if (mType == itkImageToImageFilter )
+    {
+      mFile << "#include \"bbtkItkBlackBoxMacros.h\"\n";
+    }
+  else if ( (mType == vtkImageAlgorithm) ||
+           (mType == vtkPolyDataAlgorithm) )
+    {
+      mFile << "#include \"bbtkVtkBlackBoxMacros.h\"\n";
+    }
   // Namespace
   BeginNamespace();
 
index 2162b4cab326df9fa3bac6756ff1fafafd0a3803..cdbf459ecae949a39f2e75d8a66ed1b1fc9e4b3f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBoxMacros.h,v $
   Language:  C++
-  Date:      $Date: 2008/05/06 07:36:42 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2008/05/07 06:31:37 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 
 
 
-//===========================================================================
-//============================================================================
-// ITK Specific macros
-//===========================================================================
-//===========================================================================
-
-
-//===========================================================================
-/// Declares an itk-inherited AtomicBlackBox input 
-#define BBTK_DECLARE_ITK_INPUT(PARENT,NAME,TYPE)                       \
-  public:                                                              \
-  TYPE bbGetInput##NAME ()                                             \
-  { return PARENT::GetInput(); }                                       \
-  void bbSetInput##NAME (TYPE d)                                       \
-  { PARENT::SetInput(d);                                               \
-    /*bbSetModifiedStatus();*/ }                                                      
-//===========================================================================
-
-//===========================================================================
-#define BBTK_DECLARE_ITK_OUTPUT(PARENT,NAME,TYPE)                      \
-  public:                                                              \
-  TYPE bbGetOutput##NAME ()                                            \
-  { return PARENT::GetOutput(); }                                      \
-  void bbSetOutput##NAME (TYPE d)                                      \
-  { /*PARENT::GetOutput() = d;*/ }                                     
-//===========================================================================
-
-//===========================================================================
-/// Declares an AtomicBlackBox input corresponding to an inherited itk parameter
-/// which was declared by itkSetMacro/itkGetMacro
-/// The NAME **MUST** be the same than the itk parameter name
-#define BBTK_DECLARE_ITK_PARAM(PARENT,NAME,TYPE)                       \
-  public:                                                              \
-  TYPE bbGetInput##NAME ()                                             \
-  { return PARENT::Get##NAME(); }                                      \
-  void bbSetInput##NAME (TYPE d)                                       \
-  { PARENT::Set##NAME(d);                                              \
-    /*bbSetModifiedStatus();*/ }
-//===========================================================================
-
 
 
 
-//===========================================================================
-//============================================================================
-// VTK Specific macros
-//===========================================================================
-//===========================================================================
-
-
-//===========================================================================
-
-// EED sept 04                                                  \
-//  { return GetInput(); /*PARENT::GetInput();*/ }             \
-//  { PARENT::SetInput( /*(vtkDataObject*)*/ d);                               \
-
-
-
-/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox input 
-#define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(PARENT,NAME,TYPE)                       \
-  public:                                                              \
-  TYPE bbGetInput##NAME ()                                             \
-  { return GetImageDataInput(0); /*PARENT::GetInput();*/ }             \
-  void bbSetInput##NAME (TYPE d)                                       \
-  { PARENT::SetInput( (vtkDataObject*) d);                             \
-    /*bbSetModifiedStatus();*/ }                                                      
-//===========================================================================
-/// Declares a vtkPolyDataAlgorithm-inherited AtomicBlackBox input 
-#define BBTK_DECLARE_VTK_POLY_DATA_ALGORITHM_INPUT(PARENT,NAME,TYPE)   \
-  public:                                                              \
-  TYPE bbGetInput##NAME ()                                             \
-  { return GetPolyDataInput(0); /*PARENT::GetInput();*/ }              \
-  void bbSetInput##NAME (TYPE d)                                       \
-  { PARENT::SetInput( (vtkDataObject*) d);                             \
-    /*bbSetModifiedStatus();*/ }                                                      
-//===========================================================================
-
-//===========================================================================
-/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox output 
-#define BBTK_DECLARE_VTK_OUTPUT(PARENT,NAME,TYPE)                      \
-  public:                                                              \
-  TYPE bbGetOutput##NAME ()                                            \
-  { return PARENT::GetOutput(); }                                      \
-  void bbSetOutput##NAME (TYPE d)                                      \
-  { /*PARENT::GetOutput() = d;*/ }                                     
-//===========================================================================
-
-//===========================================================================
-/// Declares a vtkAlgorithm-inherited AtomicBlackBox input 
-#define BBTK_DECLARE_VTK_INPUT(PARENT,NAME,TYPE)                       \
-  public:                                                              \
-  TYPE bbGetInput##NAME ()                                             \
-  { return dynamic_cast<TYPE>(PARENT::GetInput()); }                   \
-  void bbSetInput##NAME (TYPE d)                                       \
-  { PARENT::SetInput( (vtkDataObject*) d); /*PARENT::GetOutput() = d;*/ }
-
-//===========================================================================
-
-//===========================================================================
-/// Declares an AtomicBlackBox input corresponding to an inherited vtk parameter
-/// which was declared by vtkSetMacro/vtkGetMacro
-/// The NAME **MUST** be the same than the vtk parameter name
-#define BBTK_DECLARE_VTK_PARAM(PARENT,NAME,TYPE)                       \
-  public:                                                              \
-  TYPE bbGetInput##NAME ()                                             \
-  { return PARENT::Get##NAME(); }                                      \
-  void bbSetInput##NAME (TYPE d)                                       \
-  { PARENT::Set##NAME(d);                                              \
-    /*bbSetModifiedStatus();*/ }
-//===========================================================================
-
-#define BBTK_VTK_DELETE(VTKPARENT)                     \
-  void bbDelete() { VTKPARENT::Delete(); }
 
 //===========================================================================
 /// EOF
diff --git a/kernel/src/bbtkItkBlackBoxMacros.h b/kernel/src/bbtkItkBlackBoxMacros.h
new file mode 100644 (file)
index 0000000..52cd4f8
--- /dev/null
@@ -0,0 +1,70 @@
+/*=========================================================================
+                                                                                
+  Program:   bbtk
+  Module:    $RCSfile: bbtkItkBlackBoxMacros.h,v $
+  Language:  C++
+  Date:      $Date: 2008/05/07 06:31:37 $
+  Version:   $Revision: 1.1 $
+                                                                                
+  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+  l'Image). All rights reserved. See Doc/License.txt or
+  http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
+                                                                                
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+                                                                                
+=========================================================================*/
+
+
+/**
+ *  \file 
+ *  \brief Defines macros for the creation of itk object inherited black boxes
+ */
+#ifndef __bbtkItkBlackBoxMacros_h__
+#define __bbtkItkBlackBoxMacros_h__
+//===========================================================================
+//============================================================================
+// ITK Specific macros
+//===========================================================================
+//===========================================================================
+
+
+//===========================================================================
+/// Declares an itk-inherited AtomicBlackBox input 
+#define BBTK_DECLARE_ITK_INPUT(PARENT,NAME,TYPE)                       \
+  public:                                                              \
+  TYPE bbGetInput##NAME ()                                             \
+  { return PARENT::GetInput(); }                                       \
+  void bbSetInput##NAME (TYPE d)                                       \
+  { PARENT::SetInput(d);                                               \
+    /*bbSetModifiedStatus();*/ }                                                      
+//===========================================================================
+
+//===========================================================================
+#define BBTK_DECLARE_ITK_OUTPUT(PARENT,NAME,TYPE)                      \
+  public:                                                              \
+  TYPE bbGetOutput##NAME ()                                            \
+  { return PARENT::GetOutput(); }                                      \
+  void bbSetOutput##NAME (TYPE d)                                      \
+  { /*PARENT::GetOutput() = d;*/ }                                     
+//===========================================================================
+
+//===========================================================================
+/// Declares an AtomicBlackBox input corresponding to an inherited itk parameter
+/// which was declared by itkSetMacro/itkGetMacro
+/// The NAME **MUST** be the same than the itk parameter name
+#define BBTK_DECLARE_ITK_PARAM(PARENT,NAME,TYPE)                       \
+  public:                                                              \
+  TYPE bbGetInput##NAME ()                                             \
+  { return PARENT::Get##NAME(); }                                      \
+  void bbSetInput##NAME (TYPE d)                                       \
+  { PARENT::Set##NAME(d);                                              \
+    /*bbSetModifiedStatus();*/ }
+//===========================================================================
+
+
+//===========================================================================
+/// EOF
+//===========================================================================
+#endif
diff --git a/kernel/src/bbtkVtkBlackBoxMacros.h b/kernel/src/bbtkVtkBlackBoxMacros.h
new file mode 100644 (file)
index 0000000..4fce673
--- /dev/null
@@ -0,0 +1,108 @@
+/*=========================================================================
+                                                                                
+  Program:   bbtk
+  Module:    $RCSfile: bbtkVtkBlackBoxMacros.h,v $
+  Language:  C++
+  Date:      $Date: 2008/05/07 06:31:37 $
+  Version:   $Revision: 1.1 $
+                                                                                
+  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+  l'Image). All rights reserved. See Doc/License.txt or
+  http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
+                                                                                
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+                                                                                
+=========================================================================*/
+
+
+/**
+ *  \file 
+ *  \brief Defines macros for the creation of vtk object inherited black boxes
+ */
+#ifndef __bbtkVtkBlackBoxMacros_h__
+#define __bbtkVtkBlackBoxMacros_h__
+
+//===========================================================================
+//============================================================================
+// VTK Specific macros
+//===========================================================================
+//===========================================================================
+
+
+//===========================================================================
+
+// EED sept 04                                                  \
+//  { return GetInput(); /*PARENT::GetInput();*/ }             \
+//  { PARENT::SetInput( /*(vtkDataObject*)*/ d);                               \
+
+
+
+/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox input 
+#define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(PARENT,NAME,TYPE)                       \
+  public:                                                              \
+  TYPE bbGetInput##NAME ()                                             \
+  { return GetImageDataInput(0); /*PARENT::GetInput();*/ }             \
+  void bbSetInput##NAME (TYPE d)                                       \
+  { PARENT::SetInput( (vtkDataObject*) d);                             \
+    /*bbSetModifiedStatus();*/ }                                                      
+//===========================================================================
+/// Declares a vtkPolyDataAlgorithm-inherited AtomicBlackBox input 
+#define BBTK_DECLARE_VTK_POLY_DATA_ALGORITHM_INPUT(PARENT,NAME,TYPE)   \
+  public:                                                              \
+  TYPE bbGetInput##NAME ()                                             \
+  { return GetPolyDataInput(0); /*PARENT::GetInput();*/ }              \
+  void bbSetInput##NAME (TYPE d)                                       \
+  { PARENT::SetInput( (vtkDataObject*) d);                             \
+    /*bbSetModifiedStatus();*/ }                                                      
+//===========================================================================
+
+//===========================================================================
+/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox output 
+#define BBTK_DECLARE_VTK_OUTPUT(PARENT,NAME,TYPE)                      \
+  public:                                                              \
+  TYPE bbGetOutput##NAME ()                                            \
+  { return PARENT::GetOutput(); }                                      \
+  void bbSetOutput##NAME (TYPE d)                                      \
+  { /*PARENT::GetOutput() = d;*/ }                                     
+//===========================================================================
+
+//===========================================================================
+/// Declares a vtkAlgorithm-inherited AtomicBlackBox input 
+#define BBTK_DECLARE_VTK_INPUT(PARENT,NAME,TYPE)                       \
+  public:                                                              \
+  TYPE bbGetInput##NAME ()                                             \
+  { return dynamic_cast<TYPE>(PARENT::GetInput()); }                   \
+  void bbSetInput##NAME (TYPE d)                                       \
+  { PARENT::SetInput( (vtkDataObject*) d); /*PARENT::GetOutput() = d;*/ }
+
+//===========================================================================
+
+//===========================================================================
+/// Declares an AtomicBlackBox input corresponding to an 
+/// inherited vtk parameter
+/// which was declared by vtkSetMacro/vtkGetMacro
+/// The NAME **MUST** be the same than the vtk parameter name
+#define BBTK_DECLARE_VTK_PARAM(PARENT,NAME,TYPE)                       \
+  public:                                                              \
+  TYPE bbGetInput##NAME ()                                             \
+  { return PARENT::Get##NAME(); }                                      \
+  void bbSetInput##NAME (TYPE d)                                       \
+  { PARENT::Set##NAME(d);                                              \
+    /*bbSetModifiedStatus();*/ }
+//===========================================================================
+
+
+//===========================================================================
+#define BBTK_VTK_DELETE(VTKPARENT)                             \
+  void bbDelete() {                                            \
+    bbGetOutputOut()->SetSource(NULL);                         \
+    VTKPARENT::Delete(); }
+//===========================================================================
+
+
+//===========================================================================
+/// EOF
+//===========================================================================
+#endif
index 3e6e75ef6d8a2de0250bfef184f64ac629aeaeac..aeea6b27d948c6997305cb165a2bda6e98a877ac 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "bbtkAtomicBlackBox.h"
 #include "itkBinaryThresholdImageFilter.h"
+#include "bbtkItkBlackBoxMacros.h"
 #include "bbitkImage.h"
 
 namespace bbitk
index 12d07bf3e3de1949b4d6499e7412c9952aa76478..b7ebbebda42a13da14bda51420cbe100b2eae9eb 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "bbtkAtomicBlackBox.h"
 #include "itkExtractImageFilter.h"
+#include "bbtkItkBlackBoxMacros.h"
 #include "bbitkImage.h"
 #include "bbitkImageRegion.h"
 
index c02ffb76b59ced7abfdc4a21ebe2cab72e1c0f7e..bd4f55256af1a04bcf53ef0e3ca14cb2e9eaf0cd 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkMarchingCubes.h,v $
   Language:  C++
-  Date:      $Date: 2008/05/06 07:36:42 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2008/05/07 06:31:37 $
+  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
@@ -37,6 +37,7 @@
 
 
 #include "bbtkAtomicBlackBox.h"
+#include "bbtkVtkBlackBoxMacros.h"
 #include "vtkMarchingCubes.h"
 #include "vtkImageData.h"
 
index 891912fecabc6f4a5a81c6f203b0e90c29516904..ff2fd334b3e3d91836e8a6897d6bc80b6ff00e7c 100644 (file)
@@ -18,7 +18,7 @@
    Update();
  </PRE></process>
 
-/*   bbGetOutputOut()->SetSource(NULL);*/
+
 <serconstructor><PRE>
 std::cout << "$$$$$$ constructing $$$$$"<<std::endl; 
 </PRE></serconstructor>