]> Creatis software - bbtk.git/blob - packages/itk/src/bbitkImageReader.h
=== MAJOR RELEASE ====
[bbtk.git] / packages / itk / src / bbitkImageReader.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbitkImageReader.h,v $
5   Language:  C++
6   Date:      $Date: 2008/04/18 12:59:50 $
7   Version:   $Revision: 1.5 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*//**
18 /**
19  * \file 
20  * \brief class ITKImageReader : generic ITKImage reader
21  */
22 /**
23  * \class bbtk::ITKImageReader
24  * \brief Generic ITKImage reader
25  */
26 #ifdef _USE_ITK_
27
28 #ifndef __bbitkImageReader_h_INCLUDED__
29 #define __bbitkImageReader_h_INCLUDED__
30
31 #include "bbtkAtomicBlackBox.h"
32 #include "bbitkImage.h"
33
34 namespace bbitk
35 {
36
37   //=================================================================
38   // BlackBox declaration
39   class ImageReader : public bbtk::AtomicBlackBox  
40   {
41     
42     BBTK_BLACK_BOX_INTERFACE(ImageReader,
43                              bbtk::AtomicBlackBox);
44
45     BBTK_DECLARE_INPUT(Filename,std::string);
46     BBTK_DECLARE_OUTPUT(Out,anyImagePointer);
47     BBTK_PROCESS(Read);
48     void Read();
49
50   private:
51     // Template read method 
52     template<class itkImageType> void Read();
53   };
54   //=================================================================  
55
56   //=================================================================
57   // BlackBox description
58   BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageReader,bbtk::AtomicBlackBox);
59   BBTK_NAME("ImageReader");
60   BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr");
61   BBTK_CATEGORY("image;read/write");
62   BBTK_DESCRIPTION("Generic itk image reader");
63   BBTK_INPUT(ImageReader,Filename,
64              "filename with complete path",std::string,"file name");
65   BBTK_OUTPUT(ImageReader,Out,"Output image",anyImagePointer,"");
66   BBTK_END_DESCRIBE_BLACK_BOX(ImageReader);
67   //=================================================================
68   
69
70 }
71 //namespace bbtk
72 #endif
73
74 #endif