connectFilter->SetBackgroundValue(0);
connectFilter->SetFullyConnected(true);
if (m_Verbose) std::cout<<"Labeling the connected components..."<<std::endl;
+ connectFilter->Update();
+ if (m_Verbose) std::cout<<"found "<< connectFilter->GetObjectCount() << std::endl;
//---------------------------------
// Sort the labels according to size
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