]> Creatis software - clitk.git/commitdiff
Form output in column
authorDavid Sarrut <david.sarrut@gmail.com>
Mon, 23 Jul 2012 13:48:42 +0000 (15:48 +0200)
committerDavid Sarrut <david.sarrut@gmail.com>
Mon, 23 Jul 2012 13:48:42 +0000 (15:48 +0200)
itk/clitkLabelImageOverlapMeasureFilter.h
itk/clitkLabelImageOverlapMeasureFilter.txx

index 17581f633ad9bb94d815b1e549ca19615dabaa58..17b7c21fce67e7f95f5b44e004d4e598caeda384 100644 (file)
@@ -29,6 +29,8 @@
 #include <itkImageToImageFilter.h>
 #include <itkLabelStatisticsImageFilter.h>
 
+#include <iomanip>
+
 namespace clitk {
   
   //--------------------------------------------------------------------
index 57516bb41634db8996e3822aa0d91ad748b2c110..a29aa6a3f810eb1987a8adbd2f62b82bc7d1e4a2 100644 (file)
@@ -121,8 +121,13 @@ GenerateData()
   statFilter->Update();
   int in2 = statFilter->GetCount(GetLabel1());
 
-  std::cout << in1 << " " << in2 << " " << inter << " " << u << " " 
-            << 2.0*(double)inter/(double)(in1+in2) << std::endl;
+  double dice = 2.0*(double)inter/(double)(in1+in2);
+  int width = 6;
+  std::cout << std::setw(width) << in1 << " "
+            << std::setw(width) << in2 << " "
+            << std::setw(width) << inter  << " "
+            << std::setw(width) << u  << " "
+            << std::setw(width) << dice << " "; //std::endl;
 }
 //--------------------------------------------------------------------