00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00039 #ifdef _USE_ITK_
00040
00041 #ifndef __bbtkITKImageProperties_h__
00042 #define __bbtkITKImageProperties_h__
00043
00044 #include "bbtkAtomicBlackBox.h"
00045 #include "bbitkImage.h"
00046 #include "bbitkImageRegion.h"
00047
00048 namespace bbitk
00049 {
00050
00051
00052
00053 class ImageProperties : public bbtk::AtomicBlackBox
00054 {
00055
00056 BBTK_BLACK_BOX_INTERFACE(ImageProperties,
00057 bbtk::AtomicBlackBox);
00058
00059 BBTK_DECLARE_INPUT(In,anyImagePointer);
00060 BBTK_DECLARE_OUTPUT(TypeName,std::string);
00061 BBTK_DECLARE_OUTPUT(Dimension,unsigned int);
00062 BBTK_DECLARE_OUTPUT(LargestPossibleRegion,anyImageRegion);
00063 BBTK_DECLARE_OUTPUT(Index,std::vector<int>);
00064 BBTK_DECLARE_OUTPUT(Size,std::vector<int>);
00065 BBTK_DECLARE_OUTPUT(Spacing,std::vector<float>);
00066 BBTK_PROCESS(DoIt);
00067 void DoIt();
00068
00069 private:
00070
00071 template<class ImageType> void DoIt();
00072 };
00073
00074
00075
00076
00077
00078 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageProperties,bbtk::AtomicBlackBox);
00079 BBTK_NAME("ImageProperties");
00080 BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr");
00081 BBTK_CATEGORY("image");
00082 BBTK_DESCRIPTION("Outputs different properties of an image (type, dimension, size, spacing, ...)");
00083 BBTK_INPUT(ImageProperties,In,"Input image",anyImagePointer,"");
00084 BBTK_OUTPUT(ImageProperties,TypeName,"Pixel type name",std::string,"pixel type");
00085 BBTK_OUTPUT(ImageProperties,Dimension,"Dimension",unsigned int,"image dimension");
00086 BBTK_OUTPUT(ImageProperties,LargestPossibleRegion,"Global extent of the image",anyImageRegion,"");
00087 BBTK_OUTPUT(ImageProperties,Index,"Origin of the image",std::vector<int>,"image index");
00088 BBTK_OUTPUT(ImageProperties,Size,"Size in each dimension",std::vector<int>,"image size");
00089 BBTK_OUTPUT(ImageProperties,Spacing,"Size of the voxels",std::vector<float>,"voxel size");
00090 BBTK_END_DESCRIBE_BLACK_BOX(ImageProperties);
00091
00092
00093
00094 }
00095
00096 #endif
00097
00098 #endif