]> Creatis software - bbtk.git/blob - packages/itk/src/bbitkImageSeriesReader.h
5e6c44e14fd5ced9b757d9ce491ec48bb83343a0
[bbtk.git] / packages / itk / src / bbitkImageSeriesReader.h
1 /*=========================================================================                                                                               
2   Program:   bbtk
3   Module:    $RCSfile: bbitkImageSeriesReader.h,v $
4   Language:  C++
5   Date:      $Date: 2009/05/15 14:57:58 $
6   Version:   $Revision: 1.11 $
7 =========================================================================*/
8
9 /* ---------------------------------------------------------------------
10
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
13 *
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.
20 *
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
25 *  liability. 
26 *
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 * ------------------------------------------------------------------------ */                                                                         
30
31
32 /**
33  * \file 
34  * \brief class ITKImageSeriesReader : generic ITKImage reader
35  */
36 /**
37  * \class bbtk::ITKImageSeriesReader
38  * \brief Generic ITKImage reader
39  */
40 #ifdef _USE_ITK_
41
42 #ifndef __bbitkImageSeriesReader_h_INCLUDED__
43 #define __bbitkImageSeriesReader_h_INCLUDED__
44
45 #include "bbtkAtomicBlackBox.h"
46 #include "bbitkImage.h"
47
48 namespace bbitk
49 {
50
51   //=================================================================
52   // BlackBox declaration
53   class ImageSeriesReader : public bbtk::AtomicBlackBox  
54   {
55     
56     BBTK_BLACK_BOX_INTERFACE(ImageSeriesReader,
57                              bbtk::AtomicBlackBox);
58     BBTK_DECLARE_INPUT(FileNames,std::vector<std::string>);
59     BBTK_DECLARE_INPUT(XSpacing,float);
60     BBTK_DECLARE_INPUT(YSpacing,float);    
61     BBTK_DECLARE_INPUT(ZSpacing,float);    
62     BBTK_DECLARE_OUTPUT(Out,anyImagePointer);
63     BBTK_PROCESS(Read);
64     void Read();
65
66   private:
67     // Template read method 
68     template<class T> void Read();
69   };
70   //=================================================================
71   
72
73   //=================================================================
74   // BlackBox description
75   BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageSeriesReader,bbtk::AtomicBlackBox);
76   BBTK_NAME("ImageSeriesReader");
77   BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr");
78   BBTK_DESCRIPTION("Generic itk image series reader");
79   BBTK_CATEGORY("image;read/write");
80   typedef std::vector<std::string> vectorofstring;
81   BBTK_INPUT(ImageSeriesReader,FileNames,
82              "vector of file names with complete paths",vectorofstring,"file names list");
83   BBTK_INPUT(ImageSeriesReader,XSpacing, "if images don't contain information",float,"");            
84   BBTK_INPUT(ImageSeriesReader,YSpacing, "if images don't contain information",float,"" );           
85   BBTK_INPUT(ImageSeriesReader,ZSpacing, "if images don't contain information",float,"");
86              
87   BBTK_OUTPUT(ImageSeriesReader,Out,"Output itk::image<T,D> with type T and dimension D determined by the content of the files + vector size",anyImagePointer,"");
88   
89   BBTK_END_DESCRIBE_BLACK_BOX(ImageSeriesReader);
90   //=================================================================
91   
92
93 }
94 //namespace bbtk
95 #endif
96
97 #endif