2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------ */
28 /*=========================================================================
31 Module: $RCSfile: bbitkvtkvtkImageDataVector2itkImageVector.h,v $
33 Date: $Date: 2012/11/16 08:50:49 $
34 Version: $Revision: 1.2 $
37 =========================================================================*/
40 * \brief class vtkImageDataVector2itkImageVector : Converts a vtkImageData to a generic itkImage
43 * \class vtkImageDataVector2itkImageVector
44 * \brief Converts a vtkImageData to a generic itkImage
49 #ifndef __bbitkvtkvtkImageDataVector2itkImageVector_h__
50 #define __bbvitkvtktkImageData2itkImage_h__
52 #include "bbtkAtomicBlackBox.h"
53 #include "bbitkImage.h"
54 #include "vtkImageData.h"
55 #include "itkProcessObject.h"
60 class /*BBTK_EXPORT*/ vtkImageDataVector2itkImageVector : public bbtk::AtomicBlackBox
63 BBTK_BLACK_BOX_INTERFACE(vtkImageDataVector2itkImageVector,
64 bbtk::AtomicBlackBox);
66 BBTK_DECLARE_INPUT(In,std::vector<vtkImageData*>);
67 BBTK_DECLARE_OUTPUT(Out,std::vector<bbitk::anyImagePointer>);
68 BBTK_PROCESS(Convert);
72 // Convert method : template on type of the itk image to be created
73 template<class T, unsigned int D> void Convert();
74 // stores the pointer on the template itk::VTKImageToImageFilter
75 itk::ProcessObject::Pointer mConverter;
76 std::vector<bbitk::anyImagePointer> m_Output_Vector;
80 //=================================================================
81 // AtomicBlackBox description
82 BBTK_BEGIN_DESCRIBE_BLACK_BOX(vtkImageDataVector2itkImageVector,bbtk::AtomicBlackBox);
83 BBTK_NAME("vtkImageDataVector2itkImageVector");
84 BBTK_AUTHOR("jpr@creatis.insa-lyon.fr");
85 BBTK_DESCRIPTION("Converts a std::vector of vtkImageData* to a std::vector of generic itkImage pointer");
86 BBTK_DEFAULT_ADAPTOR();
87 BBTK_INPUT(vtkImageDataVector2itkImageVector,In,
88 "Input std::vector of vtkImageData*",std::vector<vtkImageData*>,"");
89 BBTK_OUTPUT(vtkImageDataVector2itkImageVector,Out,
90 "Output std::vector of generic itkImage pointer",
91 std::vector<bbitk::anyImagePointer>,"");
92 BBTK_END_DESCRIBE_BLACK_BOX(vtkImageDataVector2itkImageVector);
93 //=================================================================