X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkImageStatisticsGenericFilter.txx;h=b87114d6d591008f715c8d20989fdc3c6fd7b49d;hb=2239ff118ba4e88d3b4c3ad35853b572d75f468e;hp=5d462407437554b29aa753d6fffce21c2f5d5c39;hpb=1fb2899e9bf563670147c36ce7e4034dc1d86221;p=clitk.git diff --git a/tools/clitkImageStatisticsGenericFilter.txx b/tools/clitkImageStatisticsGenericFilter.txx index 5d46240..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 "<