From 20147f097d36f54eae548368df24f577e5567677 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Thu, 15 Nov 2018 16:57:53 +0100 Subject: [PATCH] Add option to define the volume of the filter in clitkSUVPeak in cc Before, the volume was fixed to 1cc Now, if the volume option is set, multiply the given volume by 1000 to have in mc --- tools/clitkSUVPeak.ggo | 1 + tools/clitkSUVPeakGenericFilter.txx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/tools/clitkSUVPeak.ggo b/tools/clitkSUVPeak.ggo index 860fae3..20e75a0 100644 --- a/tools/clitkSUVPeak.ggo +++ b/tools/clitkSUVPeak.ggo @@ -12,3 +12,4 @@ option "verbose" v "Verbose" flag off option "input" i "Input first image filename" string yes option "mask" m "Mask image filename (uchar)" string no option "allow_resize" r "Resize mask if different from input" flag off +option "volume" - "Volume of the filter in cc" double default="1" no diff --git a/tools/clitkSUVPeakGenericFilter.txx b/tools/clitkSUVPeakGenericFilter.txx index 8bf1f00..893750d 100644 --- a/tools/clitkSUVPeakGenericFilter.txx +++ b/tools/clitkSUVPeakGenericFilter.txx @@ -117,6 +117,8 @@ void SUVPeakGenericFilter::UpdateWithInputImageType() } double volume = 1000; //1 cc into mc + if (mArgsInfo.volume_given) + volume *= mArgsInfo.volume_arg; const double PI = 3.141592653589793238463; double radius = std::pow(3*volume/(4*PI),1./3); -- 2.47.1