X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkFilterBase.txx;h=fe175e12af72773578a2c775694f2e2b64e43b2d;hb=543b72e23ad001ac2a7743b9beacf48e2d0054ac;hp=064f3bea8c9ef647190860dacf006d2f09e0be93;hpb=8e9577b513e5c23835d0e2cb58e5ccc04e90544a;p=clitk.git diff --git a/common/clitkFilterBase.txx b/common/clitkFilterBase.txx index 064f3be..fe175e1 100644 --- a/common/clitkFilterBase.txx +++ b/common/clitkFilterBase.txx @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html - ======================================================================-====*/ + ===========================================================================**/ #include "clitkImageCommon.h" #include "clitkMemoryUsage.h" @@ -59,7 +59,7 @@ void clitk::FilterBase::VerboseOptionV(std::string name, int nb, OptionType * va //-------------------------------------------------------------------- template -void clitk::FilterBase::StopCurrentStep(typename TInternalImageType::Pointer p) +void clitk::FilterBase::StopCurrentStep(typename TInternalImageType::Pointer p, std::string txt) { StopCurrentStep(); if (m_WriteStepFlag) { @@ -68,6 +68,19 @@ void clitk::FilterBase::StopCurrentStep(typename TInternalImageType::Pointer p) clitk::writeImage(p, name.str()); } clitk::PrintMemory(GetVerboseMemoryFlag(), "End of step"); + if (GetVerboseImageSizeFlag()) { + std::ostream & os = std::cout; + unsigned int dim = p->GetImageDimension(); + int nb = 1; + os << txt << " size = "; + for(unsigned int i=0; iGetLargestPossibleRegion().GetSize()[i] << "x"; + nb *= p->GetLargestPossibleRegion().GetSize()[i]; + } + os << p->GetLargestPossibleRegion().GetSize()[dim-1] << " "; + nb *= p->GetLargestPossibleRegion().GetSize()[dim-1]; + os << " pixels = " << nb << std::endl; + } } //--------------------------------------------------------------------