From: David Sarrut Date: Mon, 23 Jul 2012 13:48:42 +0000 (+0200) Subject: Form output in column X-Git-Tag: v1.4.0~313 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=f01b78381f6345ec64618c01c8b9655961bb33d0;p=clitk.git Form output in column --- diff --git a/itk/clitkLabelImageOverlapMeasureFilter.h b/itk/clitkLabelImageOverlapMeasureFilter.h index 17581f6..17b7c21 100644 --- a/itk/clitkLabelImageOverlapMeasureFilter.h +++ b/itk/clitkLabelImageOverlapMeasureFilter.h @@ -29,6 +29,8 @@ #include #include +#include + namespace clitk { //-------------------------------------------------------------------- diff --git a/itk/clitkLabelImageOverlapMeasureFilter.txx b/itk/clitkLabelImageOverlapMeasureFilter.txx index 57516bb..a29aa6a 100644 --- a/itk/clitkLabelImageOverlapMeasureFilter.txx +++ b/itk/clitkLabelImageOverlapMeasureFilter.txx @@ -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; } //--------------------------------------------------------------------