1 /*=========================================================================
4 Module: $RCSfile: bbitkImageProperties.h,v $
6 Date: $Date: 2008/02/07 07:58:54 $
7 Version: $Revision: 1.4 $
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.
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.
17 =========================================================================*//**
20 * \brief class ITKImageProperties : generic ITKImage reader
23 * \class bbtk::ITKImageProperties
24 * \brief Generic ITKImage reader
28 #ifndef __bbtkITKImageProperties_h__
29 #define __bbtkITKImageProperties_h__
31 #include "bbtkAtomicBlackBox.h"
32 #include "bbitkImage.h"
33 #include "bbitkImageRegion.h"
38 //=================================================================
39 // BlackBox declaration
40 class ImageProperties : public bbtk::AtomicBlackBox
43 BBTK_USER_BLACK_BOX_INTERFACE(ImageProperties,
44 bbtk::AtomicBlackBox);
46 BBTK_DECLARE_INPUT(In,anyImagePointer);
47 BBTK_DECLARE_OUTPUT(TypeName,std::string);
48 BBTK_DECLARE_OUTPUT(Dimension,unsigned int);
49 BBTK_DECLARE_OUTPUT(LargestPossibleRegion,anyImageRegion);
50 BBTK_DECLARE_OUTPUT(Index,std::vector<int>);
51 BBTK_DECLARE_OUTPUT(Size,std::vector<int>);
52 BBTK_DECLARE_OUTPUT(Spacing,std::vector<float>);
57 // Template doit method
58 template<class ImageType> void DoIt();
60 //=================================================================
63 //=================================================================
64 // BlackBox description
65 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageProperties,bbtk::AtomicBlackBox);
66 BBTK_NAME("ImageProperties");
67 BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr");
68 BBTK_CATEGORY("image");
69 BBTK_DESCRIPTION("Outputs different properties of an image (type, dimension, size, spacing, ...)");
70 BBTK_INPUT(ImageProperties,In,"Input image",anyImagePointer);
71 BBTK_OUTPUT(ImageProperties,TypeName,"Pixel type name",std::string);
72 BBTK_OUTPUT(ImageProperties,Dimension,"Dimension",unsigned int);
73 BBTK_OUTPUT(ImageProperties,LargestPossibleRegion,"Global extent of the image",anyImageRegion);
74 BBTK_OUTPUT(ImageProperties,Index,"Origin of the image",std::vector<int>);
75 BBTK_OUTPUT(ImageProperties,Size,"Size in each dimension",std::vector<int>);
76 BBTK_OUTPUT(ImageProperties,Spacing,"Size of the voxels",std::vector<float>);
77 BBTK_END_DESCRIBE_BLACK_BOX(ImageProperties);
78 //=================================================================