From 5c12672d37638f6bdad31a7af3668ec77ed0d737 Mon Sep 17 00:00:00 2001 From: Romulo Pinho Date: Thu, 8 Mar 2012 11:41:30 +0100 Subject: [PATCH] option to output the distance map in motion mask --- segmentation/clitkMotionMask.ggo | 1 + segmentation/clitkMotionMaskGenericFilter.txx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/segmentation/clitkMotionMask.ggo b/segmentation/clitkMotionMask.ggo index c60afb0..f879a36 100644 --- a/segmentation/clitkMotionMask.ggo +++ b/segmentation/clitkMotionMask.ggo @@ -35,6 +35,7 @@ option "ellips" - "Input ellipsoide image (=1, at half resolution)" stri option "offset" - "Offset for ellips center from body center of gravity (default= 0,-50,0 mm)" double no multiple option "axes" - "Half axes of the ellips (default= 100,30,150)" double no multiple option "writeEllips" - "Write the initial ellipsoide image" string no +option "writeDistMap" - "Write the distance map" string no section "Ellipsoide growing" diff --git a/segmentation/clitkMotionMaskGenericFilter.txx b/segmentation/clitkMotionMaskGenericFilter.txx index 543bcdb..56fadac 100644 --- a/segmentation/clitkMotionMaskGenericFilter.txx +++ b/segmentation/clitkMotionMaskGenericFilter.txx @@ -946,6 +946,10 @@ MotionMaskGenericFilter::UpdateWithDimAndPixelType() distanceMapImageFilter->SetInsideIsPositive(false); if (m_Verbose) std::cout<<"Calculating the distance map..."<Update(); + if (m_ArgsInfo.writeDistMap_given) { + writeImage(distanceMapImageFilter->GetOutput(), m_ArgsInfo.writeDistMap_arg, m_Verbose); + + } //--------------------------------- // Grow while monitoring detection point -- 2.47.1