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 /*=========================================================================
30 Module: $RCSfile: bbitkImageProperties.h,v $
32 Date: $Date: 2012/11/16 08:50:39 $
33 Version: $Revision: 1.11 $
34 =========================================================================*/
40 * \brief class ITKImageProperties : generic ITKImage reader
43 * \class bbtk::ITKImageProperties
44 * \brief Generic ITKImage reader
48 #ifndef __bbtkITKImageProperties_h__
49 #define __bbtkITKImageProperties_h__
51 #include "bbtkAtomicBlackBox.h"
52 #include "bbitkImage.h"
53 #include "bbitkImageRegion.h"
58 //=================================================================
59 // BlackBox declaration
60 class ImageProperties : public bbtk::AtomicBlackBox
63 BBTK_BLACK_BOX_INTERFACE(ImageProperties,
64 bbtk::AtomicBlackBox);
66 BBTK_DECLARE_INPUT(In,anyImagePointer);
67 BBTK_DECLARE_OUTPUT(TypeName,std::string);
68 BBTK_DECLARE_OUTPUT(Dimension,unsigned int);
69 BBTK_DECLARE_OUTPUT(LargestPossibleRegion,anyImageRegion);
70 BBTK_DECLARE_OUTPUT(Index,std::vector<int>);
71 BBTK_DECLARE_OUTPUT(Size,std::vector<int>);
72 BBTK_DECLARE_OUTPUT(Origin,std::vector<float>);
73 BBTK_DECLARE_OUTPUT(Spacing,std::vector<double>);
75 BBTK_DECLARE_OUTPUT(MinMax,std::vector<float>);
80 // Template doit method
81 template<class ImageType> void DoIt();
83 //=================================================================
85 //=================================================================
86 // BlackBox description
87 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageProperties,bbtk::AtomicBlackBox);
88 BBTK_NAME("ImageProperties");
89 BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr");
90 BBTK_CATEGORY("image");
91 BBTK_DESCRIPTION("Outputs different properties of an image (type, dimension, size, spacing, ...)");
92 BBTK_INPUT(ImageProperties,In,"Input image",anyImagePointer,"");
93 BBTK_OUTPUT(ImageProperties,TypeName,"Pixel type name",std::string,"pixel type");
94 BBTK_OUTPUT(ImageProperties,Dimension,"Dimension",unsigned int,"image dimension");
95 BBTK_OUTPUT(ImageProperties,LargestPossibleRegion,"Global extent of the image",anyImageRegion,"");
96 BBTK_OUTPUT(ImageProperties,Index,"Index of the image",std::vector<int>,"image index");
97 BBTK_OUTPUT(ImageProperties,Size,"Size in each dimension",std::vector<int>,"image size");
98 BBTK_OUTPUT(ImageProperties,Origin,"Origin of the image",std::vector<float>,"image origin");
99 BBTK_OUTPUT(ImageProperties,Spacing,"Size of the voxels",std::vector<double>,"voxel size");
100 BBTK_OUTPUT(ImageProperties,MinMax,"Minimum and the maximum intensity values of an image",std::vector<float>,"");
101 BBTK_END_DESCRIBE_BLACK_BOX(ImageProperties);
102 //=================================================================