X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkImageStatisticsGenericFilter.txx;h=b87114d6d591008f715c8d20989fdc3c6fd7b49d;hb=ae2e1c75a6d57bc14e30e3205b6b1f2d8e5cf50c;hp=8bc99d0e423831da2245968635cd766c64c2aab1;hpb=f8f044ad85ca3361eb07333895215ee6670d4dca;p=clitk.git diff --git a/tools/clitkImageStatisticsGenericFilter.txx b/tools/clitkImageStatisticsGenericFilter.txx index 8bc99d0..b87114d 100644 --- a/tools/clitkImageStatisticsGenericFilter.txx +++ b/tools/clitkImageStatisticsGenericFilter.txx @@ -276,12 +276,14 @@ namespace clitk if(m_ArgsInfo.dvhistogram_given) { typename StatisticsImageFilterType::HistogramPointer dvhistogram = statisticsFilter->GetHistogram(label); + double totalVolumeCC = ((statisticsFilter->GetCount(label))*spacing_cc); + double totalVolume = statisticsFilter->GetCount(label); // Screen std::cout<<"# Total volume : "; - std::cout<GetCount(label)<<" [No. of voxels]"<GetCount(label))*spacing_cc)<<" [cc]"<GetMean(label)<<" [Gy]"<GetMaximum(label)<<" [Gy]"<GetFrequency(j)); } - double cumulativeVolume = popCumulativeVolume + (dvhistogram->GetFrequency(i)); + double cumulativeVolume = (totalVolume - (popCumulativeVolume + (dvhistogram->GetFrequency(i)))); double percentCumulativeVolume =(cumulativeVolume*100)/(statisticsFilter->GetCount(label)) ; - double ccCumulativeVolume = (popCumulativeVolume + (dvhistogram->GetFrequency(i)))*spacing_cc; + double ccCumulativeVolume = (totalVolumeCC -((popCumulativeVolume + (dvhistogram->GetFrequency(i)))*spacing_cc)); double percentDiffVolume = dvhistogram->GetFrequency(i)*100/(statisticsFilter->GetCount(label)); - if(i == 0) - { - std::cout<GetBinMax(0,i)<<"\t "<GetFrequency(i)<<"\t "<GetFrequency(i))*spacing_cc)<<"\t "<GetBinMax(0,i)<<"\t "<GetFrequency(i)<<"\t "<GetFrequency(i))*spacing_cc)<<"\t "<GetBinMin(0,m_ArgsInfo.bins_arg-i)<<"\t "<GetBinMax(0,i)<<"\t "<GetFrequency(i)<<"\t "<GetFrequency(i))*spacing_cc)<<"\t "<<"\t "<GetCount(label)<<" [No. of voxels]"<GetCount(label))*spacing_cc)<<" [cc]"<GetMean(label)<<" [Gy]"<GetMaximum(label)<<" [Gy]"<GetFrequency(j)); } - double cumulativeVolume = popCumulativeVolume + (dvhistogram->GetFrequency(i)); - double percentCumulativeVolume =(cumulativeVolume*100)/(statisticsFilter->GetCount(label)) ; - double ccCumulativeVolume = (popCumulativeVolume + (dvhistogram->GetFrequency(i)))*spacing_cc; + double cumulativeVolume = (totalVolume - (popCumulativeVolume + (dvhistogram->GetFrequency(i)))); + double percentCumulativeVolume =(cumulativeVolume*100)/(statisticsFilter->GetCount(label)); + double ccCumulativeVolume = (totalVolumeCC -((popCumulativeVolume + (dvhistogram->GetFrequency(i)))*spacing_cc)); double percentDiffVolume = ((dvhistogram->GetFrequency(i))*100)/(statisticsFilter->GetCount(label)); - if(i == 0) - { - dvhistogramFile<GetBinMax(0,i)<<"\t "<GetFrequency(i)<<"\t "<GetFrequency(i))*spacing_cc)<<"\t "<GetBinMax(0,i)<<"\t "<GetFrequency(i)<<"\t "<GetFrequency(i))*spacing_cc)<<"\t "<GetBinMin(0,m_ArgsInfo.bins_arg-i)<<"\t "<GetBinMax(0,i)<<"\t "<GetFrequency(i)<<"\t "<GetFrequency(i))*spacing_cc)<<"\t "<