X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkSUVPeakGenericFilter.txx;h=127a071ce250346f84aa401eaed3191058b8ea40;hb=adcb66e6659f609eab388827c24f52280253db99;hp=8a41726c87ee40d990c6af82065950744a041744;hpb=f05cc2cf37d7ec960b73fa9d2393d5a888e1f87a;p=clitk.git diff --git a/tools/clitkSUVPeakGenericFilter.txx b/tools/clitkSUVPeakGenericFilter.txx index 8a41726..127a071 100644 --- a/tools/clitkSUVPeakGenericFilter.txx +++ b/tools/clitkSUVPeakGenericFilter.txx @@ -54,9 +54,9 @@ void SUVPeakGenericFilter::SetArgsInfo(const args_info_type & a) // Set value this->SetIOVerbose(mArgsInfo.verbose_flag); - + if (mArgsInfo.input_given) this->AddInputFilename(mArgsInfo.input_arg); - + if (mArgsInfo.mask_given) this->AddInputFilename(mArgsInfo.mask_arg); } //-------------------------------------------------------------------- @@ -88,7 +88,7 @@ void SUVPeakGenericFilter::UpdateWithInputImageType() double volume = 1000; //1 cc into mc const double PI = 3.141592653589793238463; double radius = std::pow(3*volume/(4*PI),1./3); - + typename ImageType::Pointer kernel = ComputeMeanFilterKernel(input->GetSpacing(), radius); // Perform the convolution @@ -98,8 +98,8 @@ void SUVPeakGenericFilter::UpdateWithInputImageType() filter->SetKernelImage(kernel); filter->Update(); typename ImageType::Pointer output = filter->GetOutput(); - - + + typedef itk::ImageRegionConstIteratorWithIndex IteratorType; typedef itk::ImageRegionConstIteratorWithIndex MIteratorType; IteratorType iters(output, output->GetLargestPossibleRegion()); @@ -128,7 +128,7 @@ void SUVPeakGenericFilter::UpdateWithInputImageType() //-------------------------------------------------------------------- template template -typename ImageType::Pointer +typename ImageType::Pointer SUVPeakGenericFilter::ComputeMeanFilterKernel(const typename ImageType::SpacingType & spacing, double radius) { // Some kind of cache to speed up a bit