]> Creatis software - clitk.git/blobdiff - segmentation/clitkMotionMaskGenericFilter.txx
Add ROI tab
[clitk.git] / segmentation / clitkMotionMaskGenericFilter.txx
old mode 100755 (executable)
new mode 100644 (file)
index 414a2f6..543bcdb
@@ -377,6 +377,8 @@ MotionMaskGenericFilter::GetLungsImage(typename itk::Image<PixelType, Dimension>
     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
@@ -384,7 +386,7 @@ MotionMaskGenericFilter::GetLungsImage(typename itk::Image<PixelType, Dimension>
     typename RelabelFilterType::Pointer relabelFilter=RelabelFilterType::New();
     relabelFilter->SetInput(connectFilter->GetOutput());
     if (m_Verbose) std::cout<<"Sorting the labels..."<<std::endl;
-    // writeImage<InternalImageType> (relabelFilter->GetOutput(), "/home/jef/tmp/labels.mhd");
+    // writeImage<InternalImageType> (relabelFilter->GetOutput(), "/home/vdelmon/tmp/labels.mhd");
 
     //---------------------------------
     // Keep the label