]> Creatis software - clitk.git/commitdiff
option to output the distance map in motion mask
authorRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Thu, 8 Mar 2012 10:41:30 +0000 (11:41 +0100)
committerRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Thu, 8 Mar 2012 10:41:30 +0000 (11:41 +0100)
segmentation/clitkMotionMask.ggo
segmentation/clitkMotionMaskGenericFilter.txx

index c60afb01fccee5cedeeccb44ade6642c51ac0f9b..f879a36ade6c53a71cfd5d8f123b208b67d8ff6c 100644 (file)
@@ -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"
index 543bcdb830f61de6537c5537e7204a59023f3433..56fadac84f5e977f016677a0cd68bce42470e62c 100644 (file)
@@ -946,6 +946,10 @@ MotionMaskGenericFilter::UpdateWithDimAndPixelType()
     distanceMapImageFilter->SetInsideIsPositive(false);
     if (m_Verbose) std::cout<<"Calculating the distance map..."<<std::endl;
     distanceMapImageFilter->Update();
+    if (m_ArgsInfo.writeDistMap_given) {
+      writeImage<LevelSetImageType>(distanceMapImageFilter->GetOutput(), m_ArgsInfo.writeDistMap_arg, m_Verbose);
+      
+    }
 
     //---------------------------------
     // Grow while monitoring detection point