/*========================================================================= Program: bbtk Module: $RCSfile: bbitkImageProperties.h,v $ Language: C++ Date: $Date: 2008/07/23 12:02:15 $ Version: $Revision: 1.7 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ /** * \file * \brief class ITKImageProperties : generic ITKImage reader */ /** * \class bbtk::ITKImageProperties * \brief Generic ITKImage reader */ #ifdef _USE_ITK_ #ifndef __bbtkITKImageProperties_h__ #define __bbtkITKImageProperties_h__ #include "bbtkAtomicBlackBox.h" #include "bbitkImage.h" #include "bbitkImageRegion.h" namespace bbitk { //================================================================= // BlackBox declaration class ImageProperties : public bbtk::AtomicBlackBox { BBTK_BLACK_BOX_INTERFACE(ImageProperties, bbtk::AtomicBlackBox); BBTK_DECLARE_INPUT(In,anyImagePointer); BBTK_DECLARE_OUTPUT(TypeName,std::string); BBTK_DECLARE_OUTPUT(Dimension,unsigned int); BBTK_DECLARE_OUTPUT(LargestPossibleRegion,anyImageRegion); BBTK_DECLARE_OUTPUT(Index,std::vector); BBTK_DECLARE_OUTPUT(Size,std::vector); BBTK_DECLARE_OUTPUT(Spacing,std::vector); BBTK_PROCESS(DoIt); void DoIt(); private: // Template doit method template void DoIt(); }; //================================================================= //================================================================= // BlackBox description BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageProperties,bbtk::AtomicBlackBox); BBTK_NAME("ImageProperties"); BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr"); BBTK_CATEGORY("image"); BBTK_DESCRIPTION("Outputs different properties of an image (type, dimension, size, spacing, ...)"); BBTK_INPUT(ImageProperties,In,"Input image",anyImagePointer,""); BBTK_OUTPUT(ImageProperties,TypeName,"Pixel type name",std::string,"pixel type"); BBTK_OUTPUT(ImageProperties,Dimension,"Dimension",unsigned int,"image dimension"); BBTK_OUTPUT(ImageProperties,LargestPossibleRegion,"Global extent of the image",anyImageRegion,""); BBTK_OUTPUT(ImageProperties,Index,"Origin of the image",std::vector,"image index"); BBTK_OUTPUT(ImageProperties,Size,"Size in each dimension",std::vector,"image size"); BBTK_OUTPUT(ImageProperties,Spacing,"Size of the voxels",std::vector,"voxel size"); BBTK_END_DESCRIBE_BLACK_BOX(ImageProperties); //================================================================= } //namespace bbitk #endif #endif