1 /*=========================================================================
3 Module: $RCSfile: bbitkTypedImageToAnyImage.h,v $
5 Date: $Date: 2009/05/18 10:45:44 $
6 Version: $Revision: 1.8 $
7 =========================================================================*/
9 /* ---------------------------------------------------------------------
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
14 * This software is governed by the CeCILL-B license under French law and
15 * abiding by the rules of distribution of free software. You can use,
16 * modify and/ or redistribute the software under the terms of the CeCILL-B
17 * license as circulated by CEA, CNRS and INRIA at the following URL
18 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
19 * or in the file LICENSE.txt.
21 * As a counterpart to the access to the source code and rights to copy,
22 * modify and redistribute granted by the license, users are provided only
23 * with a limited warranty and the software's author, the holder of the
24 * economic rights, and the successive licensors have only limited
27 * The fact that you are presently reading this means that you have had
28 * knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */
34 #ifndef __bbTypedItkImage2GenericItkImage_h__
35 #define __bbTypedItkImage2GenericItkImage_h__
37 #include "bbtkAtomicBlackBox.h"
38 #include "bbitkImage.h"
39 #include "bbtkSystem.h"
44 //=================================================================
45 // BlackBox declaration
46 template <class itkImageTypePointer>
47 class TypedImageToAnyImage : public bbtk::AtomicBlackBox
49 BBTK_TEMPLATE_BLACK_BOX_INTERFACE(TypedImageToAnyImage,
52 BBTK_DECLARE_INPUT(In,itkImageTypePointer);
53 BBTK_DECLARE_OUTPUT(Out,anyImagePointer);
55 void DoIt() { bbSetOutputOut( bbGetInputIn() ); bbGetInputIn()->Register(); }
57 //=================================================================
59 //===================================================
60 template <class T> void TypedImageToAnyImage<T>::bbUserSetDefaultValues()
62 template <class T> void TypedImageToAnyImage<T>::bbUserInitializeProcessing()
64 template <class T> void TypedImageToAnyImage<T>::bbUserFinalizeProcessing()
66 //===================================================
69 //=================================================================
70 // BlackBox description
71 BBTK_BEGIN_DESCRIBE_TEMPLATE_BLACK_BOX(TypedImageToAnyImage,
72 bbtk::AtomicBlackBox);
73 BBTK_NAME(bbtk::HumanTypeName<T>()
74 + "To" + bbtk::HumanTypeName<anyImagePointer>());
75 BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr");
76 BBTK_DESCRIPTION("Converts a typed itk image pointer ("
77 +bbtk::HumanTypeName<T>()+
78 ") into a generic itk image pointer ("+
79 bbtk::HumanTypeName<anyImagePointer>()+")");
80 BBTK_CATEGORY("adaptor");
81 BBTK_DEFAULT_ADAPTOR();
82 BBTK_TEMPLATE_INPUT(TypedImageToAnyImage,In,
83 "Input typed image",T);
84 BBTK_TEMPLATE_OUTPUT(TypedImageToAnyImage,Out,
85 "Output generic image",anyImagePointer);
86 BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(TypedImageToAnyImage);
87 //=================================================================