From f01b78381f6345ec64618c01c8b9655961bb33d0 Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Mon, 23 Jul 2012 15:48:42 +0200 Subject: [PATCH] Form output in column --- itk/clitkLabelImageOverlapMeasureFilter.h | 2 ++ itk/clitkLabelImageOverlapMeasureFilter.txx | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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; } //-------------------------------------------------------------------- -- 2.47.1