]> Creatis software - bbtk.git/blob - packages/itk/src/bbitkImageProperties.h
missing comma
[bbtk.git] / packages / itk / src / bbitkImageProperties.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbitkImageProperties.h,v $
5   Language:  C++
6   Date:      $Date: 2008/02/05 13:48:00 $
7   Version:   $Revision: 1.3 $
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 ITKImageProperties : generic ITKImage reader
21  */
22 /**
23  * \class bbtk::ITKImageProperties
24  * \brief Generic ITKImage reader
25  */
26 #ifdef _USE_ITK_
27
28 #ifndef __bbtkITKImageProperties_h__
29 #define __bbtkITKImageProperties_h__
30
31 #include "bbtkUserBlackBox.h"
32 #include "bbitkImage.h"
33 #include "bbitkImageRegion.h"
34
35 namespace bbitk
36 {
37
38   class ImageProperties : public bbtk::UserBlackBox  
39   {
40     
41     BBTK_USER_BLACK_BOX_INTERFACE(ImageProperties,
42                                   bbtk::UserBlackBox);
43
44     BBTK_DECLARE_INPUT(In,anyImagePointer);
45     BBTK_DECLARE_OUTPUT(TypeName,std::string);
46     BBTK_DECLARE_OUTPUT(Dimension,unsigned int);
47     BBTK_DECLARE_OUTPUT(LargestPossibleRegion,anyImageRegion);
48     BBTK_DECLARE_OUTPUT(Index,std::vector<int>);
49     BBTK_DECLARE_OUTPUT(Size,std::vector<int>);
50     BBTK_DECLARE_OUTPUT(Spacing,std::vector<float>);
51     BBTK_PROCESS(DoIt);
52     void DoIt();
53
54   private:
55     // Template doit method 
56     template<class ImageType> void DoIt();
57   };
58   
59
60   //=================================================================
61   // UserBlackBox description
62   BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageProperties,bbtk::UserBlackBox);
63   BBTK_NAME("ImageProperties");
64   BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr");
65   BBTK_CATEGORY("image");
66   BBTK_DESCRIPTION("Outputs different properties of an image (type, dimension, size, spacing, ...)");
67   BBTK_INPUT(ImageProperties,In,"Input image",anyImagePointer);
68   BBTK_OUTPUT(ImageProperties,TypeName,"Pixel type name",std::string);
69   BBTK_OUTPUT(ImageProperties,Dimension,"Dimension",unsigned int);
70   BBTK_OUTPUT(ImageProperties,LargestPossibleRegion,"Global extent of the image",anyImageRegion);
71   BBTK_OUTPUT(ImageProperties,Index,"Origin of the image",std::vector<int>);
72   BBTK_OUTPUT(ImageProperties,Size,"Size in each dimension",std::vector<int>);
73   BBTK_OUTPUT(ImageProperties,Spacing,"Size of the voxels",std::vector<float>);
74   BBTK_END_DESCRIBE_BLACK_BOX(ImageProperties);
75   //=================================================================
76   
77
78 }
79 //namespace bbitk
80 #endif
81
82 #endif