bbtkItkBlackBoxMacros.h

Go to the documentation of this file.
00001 /*=========================================================================                                                                               
00002   Program:   bbtk
00003   Module:    $RCSfile: bbtkItkBlackBoxMacros.h,v $
00004   Language:  C++
00005   Date:      $Date: 2008/10/17 08:18:13 $
00006   Version:   $Revision: 1.4 $
00007 =========================================================================*/
00008 
00009 /* ---------------------------------------------------------------------
00010 
00011 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
00012 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
00013 *
00014 *  This software is governed by the CeCILL-B license under French law and 
00015 *  abiding by the rules of distribution of free software. You can  use, 
00016 *  modify and/ or redistribute the software under the terms of the CeCILL-B 
00017 *  license as circulated by CEA, CNRS and INRIA at the following URL 
00018 *  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
00019 *  or in the file LICENSE.txt.
00020 *
00021 *  As a counterpart to the access to the source code and  rights to copy,
00022 *  modify and redistribute granted by the license, users are provided only
00023 *  with a limited warranty  and the software's author,  the holder of the
00024 *  economic rights,  and the successive licensors  have only  limited
00025 *  liability. 
00026 *
00027 *  The fact that you are presently reading this means that you have had
00028 *  knowledge of the CeCILL-B license and that you accept its terms.
00029 * ------------------------------------------------------------------------ */                                                                         
00030 
00031 
00032 
00037 #ifndef __bbtkItkBlackBoxMacros_h__
00038 #define __bbtkItkBlackBoxMacros_h__
00039 //===========================================================================
00040 //============================================================================
00041 // ITK Specific macros
00042 //===========================================================================
00043 //===========================================================================
00044 
00045 //===========================================================================
00046 #define BBTK_ITK_DELETE()                                               \
00047   void bbDelete() {                                                     \
00048     itkParent::UnRegister();                                            \
00049   }
00050 //===========================================================================
00051 
00052 //===========================================================================
00053 #define BBTK_ITK_BLACK_BOX_INTERFACE(CLASS,PARENTBLACKBOX,ITKPARENT)    \
00054   BBTK_BLACK_BOX_INTERFACE(CLASS,PARENTBLACKBOX);                       \
00055   typedef ITKPARENT itkParent;                                          \
00056   BBTK_ITK_DELETE();
00057 //===========================================================================
00058 
00059 //===========================================================================
00061 #define BBTK_DECLARE_ITK_INPUT(NAME,TYPE)                               \
00062   public:                                                               \
00063   TYPE bbGetInput##NAME ()                                              \
00064   { return itkParent::GetInput(); }                                     \
00065   void bbSetInput##NAME (TYPE d)                                        \
00066   { itkParent::SetInput(d);                                             \
00067     /*bbSetModifiedStatus();*/ }                                                       
00068 //===========================================================================
00069 
00070 //===========================================================================
00071 #define BBTK_DECLARE_ITK_OUTPUT(NAME,TYPE)                      \
00072   public:                                                               \
00073   TYPE bbGetOutput##NAME ()                                             \
00074   { return itkParent::GetOutput(); }                                    \
00075   void bbSetOutput##NAME (TYPE d)                                       \
00076   { /*PARENT::GetOutput() = d;*/ }                                      
00077 //===========================================================================
00078 
00079 //===========================================================================
00083 #define BBTK_DECLARE_ITK_PARAM(NAME,TYPE)                       \
00084   public:                                                               \
00085   TYPE bbGetInput##NAME ()                                              \
00086   { return itkParent::Get##NAME(); }                                    \
00087   void bbSetInput##NAME (TYPE d)                                        \
00088   { itkParent::Set##NAME(d);                                            \
00089     /*bbSetModifiedStatus();*/ }
00090 //===========================================================================
00091 
00092 //============================================================================
00095 #define BBTK_ITK_PROCESS()                                              \
00096   public:                                                               \
00097   inline void bbUserProcess()                                           \
00098   {                                                                     \
00099     bbtkDebugMessage("process",1,"**> Processing ["<<bbGetFullName()    \
00100                      <<"]"<<std::endl);                                 \
00101     itkParent::Update();                                                \
00102     bbtkDebugMessage("process",2,"<** Processing ["<<bbGetFullName()    \
00103                      <<"]"<<std::endl);                                 \
00104   }
00105 //============================================================================
00106 
00107 //===========================================================================
00109 //===========================================================================
00110 #endif

Generated on Wed Nov 12 11:37:08 2008 for BBTK by  doxygen 1.5.6