From f8f044ad85ca3361eb07333895215ee6670d4dca Mon Sep 17 00:00:00 2001 From: Agata Krason Date: Thu, 12 Jun 2014 20:37:32 +0200 Subject: [PATCH] Remove clitkDVH tool and add --dvhistogram option to clitkImageStatistics. --- tools/CMakeLists.txt | 5 - tools/clitkDVH.cxx | 47 --- tools/clitkDVH.ggo | 22 -- tools/clitkDVHGenericFilter.cxx | 120 ------- tools/clitkDVHGenericFilter.h | 136 -------- tools/clitkDVHGenericFilter.txx | 338 -------------------- tools/clitkImageStatistics.ggo | 1 + tools/clitkImageStatisticsGenericFilter.txx | 116 ++++++- 8 files changed, 100 insertions(+), 685 deletions(-) delete mode 100644 tools/clitkDVH.cxx delete mode 100644 tools/clitkDVH.ggo delete mode 100644 tools/clitkDVHGenericFilter.cxx delete mode 100644 tools/clitkDVHGenericFilter.h delete mode 100644 tools/clitkDVHGenericFilter.txx diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 107aafa..6bd72a3 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -232,11 +232,6 @@ if(CLITK_BUILD_TOOLS) target_link_libraries(clitkImageStatistics clitkCommon) set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageStatistics) - WRAP_GGO(clitkDVH_GGO_C clitkDVH.ggo) - add_executable(clitkDVH clitkDVH.cxx clitkDVHGenericFilter.cxx ${clitkDVH_GGO_C}) - target_link_libraries(clitkDVH clitkVectorArithmLib clitkCommon) - set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDVH) - WRAP_GGO(clitkVFConvert_GGO_C clitkVFConvert.ggo) add_executable(clitkVFConvert clitkVFConvert.cxx clitkVFConvertGenericFilter.cxx ${clitkVFConvert_GGO_C}) target_link_libraries(clitkVFConvert clitkCommon ) diff --git a/tools/clitkDVH.cxx b/tools/clitkDVH.cxx deleted file mode 100644 index bf069f4..0000000 --- a/tools/clitkDVH.cxx +++ /dev/null @@ -1,47 +0,0 @@ -/*========================================================================= - Program: vv http://www.creatis.insa-lyon.fr/rio/vv - - Authors belong to: - - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://www.centreleonberard.fr - - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the copyright notices for more information. - - It is distributed under dual licence - - - BSD See included LICENSE.txt file - - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -===========================================================================**/ - -/* ================================================= - * @file clitkHGenericFilter.txx - * @author Agata Krason - * @date 19 November 2013 - * - * @brief Dose Histogram - * - ===================================================*/ - -// clitk -#include "clitkDVH_ggo.h" -#include "clitkIO.h" -#include "clitkDVHGenericFilter.h" - -//-------------------------------------------------------------------- -int main(int argc, char * argv[]) -{ - - // Init command line - GGO(clitkDVH, args_info); - CLITK_INIT; - - // Filter - clitk::DVHGenericFilter::Pointer genericFilter=clitk::DVHGenericFilter::New(); - genericFilter->SetArgsInfo(args_info); - CLITK_TRY_CATCH_EXIT(genericFilter->Update()); - - return EXIT_SUCCESS; -}// end main diff --git a/tools/clitkDVH.ggo b/tools/clitkDVH.ggo deleted file mode 100644 index cc439fc..0000000 --- a/tools/clitkDVH.ggo +++ /dev/null @@ -1,22 +0,0 @@ -#File clitkDVH.ggo -package "clitkDVH" -version "2.0" -purpose "Dose volume histogram" - - -option "config" - "Config file" string no -option "verbose" v "Verbose" flag off - -option "input" i "Input image filename" string yes multiple -option "channel" c "Image channel to be used in statistics (-1 to process all channels)" int no default="-1" -option "mask" m "Mask image filename (uchar)" string yes -option "label" l "Label(s) in the mask image to consider" int no multiple default="1" -option "histogram" - "Compute histogram, allows median calculation" string no -option "dvhistogram" - "Compute dose volume histogram " string no -option "bins" - "Number of histogram bins" int no default="80" -option "lower" - "Lower histogram bound" double no default="0" -option "upper" - "Upper histogram bound" double no default="80" -option "allow_resize" r "Resize mask if different from input" flag off - - - diff --git a/tools/clitkDVHGenericFilter.cxx b/tools/clitkDVHGenericFilter.cxx deleted file mode 100644 index f781c49..0000000 --- a/tools/clitkDVHGenericFilter.cxx +++ /dev/null @@ -1,120 +0,0 @@ -/*========================================================================= - Program: vv http://www.creatis.insa-lyon.fr/rio/vv - - Authors belong to: - - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://www.centreleonberard.fr - - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the copyright notices for more information. - - It is distributed under dual licence - - - BSD See included LICENSE.txt file - - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -===========================================================================**/ -#ifndef clitkDVHGenericFilter_cxx -#define clitkDVHGenericFilter_cxx - -#include "clitkDVHGenericFilter.h" - -namespace clitk -{ - - //----------------------------------------------------------- - // Constructor - //----------------------------------------------------------- - DVHGenericFilter::DVHGenericFilter() - { - m_Verbose=false; - m_InputFileName=""; - } - //----------------------------------------------------------- - - //----------------------------------------------------------- - // Update - //----------------------------------------------------------- - void DVHGenericFilter::Update() - { - // Read the Dimension and PixelType - int Dimension, Components; - std::string PixelType; - ReadImageDimensionAndPixelType(m_InputFileName, Dimension, PixelType, Components); - - if (m_ArgsInfo.channel_arg < -1 || m_ArgsInfo.channel_arg >= Components) { - std::cout << "Invalid image channel" << std::endl; - return; - } - - if (m_ArgsInfo.mask_given) { - int maskDimension, maskComponents; - std::string maskPixelType; - ReadImageDimensionAndPixelType(m_ArgsInfo.mask_arg, maskDimension, maskPixelType, maskComponents); - if (!(maskDimension == Dimension || maskDimension == (Dimension - 1))) { - std::cout << "Dimension of label mask must be equal to the (d)imension of the input image or d-1." << std::endl; - return; - } - } - - - // Call UpdateWithDim - if (Dimension==2) { - switch (Components) { - case 1: - UpdateWithDim<2,1>(PixelType); - break; - case 2: - UpdateWithDim<2,2>(PixelType); - break; - case 3: - UpdateWithDim<2,3>(PixelType); - break; - default: - std::cout << "Unsupported number of channels" << std::endl; - break; - } - } - else if (Dimension==3) { - switch (Components) { - case 1: - UpdateWithDim<3,1>(PixelType); - break; - case 2: - UpdateWithDim<3,2>(PixelType); - break; - case 3: - UpdateWithDim<3,3>(PixelType); - break; - default: - std::cout << "Unsupported number of channels" << std::endl; - break; - } - } - else if (Dimension==4) { - switch (Components) { - case 1: - UpdateWithDim<4,1>(PixelType); - break; - case 2: - UpdateWithDim<4,2>(PixelType); - break; - case 3: - UpdateWithDim<4,3>(PixelType); - break; - default: - std::cout << "Unsupported number of channels" << std::endl; - break; - } - } - else { - std::cout<<"Error, Only for 2 or 3 Dimensions!!!"< -class ITK_EXPORT DVHGenericFilter: public itk::LightObject -{ - -public: - - - //-------------------------------------------------------------------- - typedef DVHGenericFilter Self; - typedef itk::LightObject Superclass; - typedef itk::SmartPointer Pointer; - typedef itk::SmartPointer ConstPointer; - - //-------------------------------------------------------------------- - // Method for creation through the object factory - // and Run-time type information (and related methods) - itkNewMacro(Self); - itkTypeMacro(DVHGenericFilter, LightObject); - - //-------------------------------------------------------------------- - void SetArgsInfo(const args_info_clitkDVH & a) - { - m_ArgsInfo=a; - m_Verbose=m_ArgsInfo.verbose_flag; - - if(m_ArgsInfo.input_given) - m_InputFileName=m_ArgsInfo.input_arg[0]; - else if(m_ArgsInfo.inputs_num>0) - m_InputFileName=m_ArgsInfo.inputs[0]; - else { - std::cerr << "You must give an input file name" << std::endl; - exit(1); - } - } - //-------------------------------------------------------------------- - // Main function called each time the filter is updated - //template - //void UpdateWithInputImageType(); - void Update(); - - // Set methods - void SetDefaultPixelValue (double value) { mDefaultPixelValue = value ;} - void SetTypeOfOperation (int value) { mTypeOfOperation = value ;} - void SetScalar (double value) { mScalar = value ;} - void EnableOverwriteInputImage(bool b); - - // Get methods - double GetDefaultPixelValue () { return mDefaultPixelValue ;} - int GetTypeOfOperation () { return mTypeOfOperation ;} - double GetScalar () { return mScalar ;} - -protected: - - //-------------------------------------------------------------------- - // Constructor & Destructor - DVHGenericFilter(); - ~DVHGenericFilter() {}; - // template void InitializeImageType(); - // args_info_type mArgsInfo; - - //-------------------------------------------------------------------- - // Tempated members - //-------------------------------------------------------------------- - template void UpdateWithDim(std::string PixelType); - template void UpdateWithDimAndPixelType(); - - //-------------------------------------------------------------------- - // Data members - //-------------------------------------------------------------------- - args_info_clitkDVH m_ArgsInfo; - bool m_Verbose; - std::string m_InputFileName; - - template void InitializeImageType(); - bool mIsOperationUseASecondImage; - double mScalar; - double mDefaultPixelValue; - int mTypeOfOperation; - bool mOverwriteInputImage; - bool mOutputIsFloat; - - template void ComputeImage(Iter1 it, Iter2 ito); - - template void ComputeImage(Iter1 it1, Iter2 it2, Iter3 ito); - - -}; // end class -//-------------------------------------------------------------------- - -} // end namespace clitk - -#ifndef ITK_MANUAL_INSTANTIATION -#include "clitkDVHGenericFilter.txx" -#endif - -#endif // #define clitkDVHGenericFilter_h diff --git a/tools/clitkDVHGenericFilter.txx b/tools/clitkDVHGenericFilter.txx deleted file mode 100644 index bd17a94..0000000 --- a/tools/clitkDVHGenericFilter.txx +++ /dev/null @@ -1,338 +0,0 @@ -/*========================================================================= - Program: vv http://www.creatis.insa-lyon.fr/rio/vv - - Authors belong to: - - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://www.centreleonberard.fr - - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the copyright notices for more information. - - It is distributed under dual licence - - - BSD See included LICENSE.txt file - - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -===========================================================================**/ -#ifndef clitkDVHGenericFilter_txx -#define clitkDVHGenericFilter_txx - -/* ================================================= - * @file clitkDVHGenericFilter.txx - * @author Agata Krason - * @date 20 November 2013 - * - * @brief Dose volume and image histogram - * - ===================================================*/ - -// itk include -#include "itkBinaryThresholdImageFilter.h" -#include "itkMaskImageFilter.h" -#include "itkMaskNegatedImageFilter.h" -#include "itkNthElementImageAdaptor.h" -#include "itkJoinSeriesImageFilter.h" -#include "itkMinimumMaximumImageCalculator.h" - -// clitk include -#include -#include "clitkImageCommon.h" -#include "clitkDVHGenericFilter.h" -#include "clitkCropLikeImageFilter.h" -#include "clitkResampleImageWithOptionsFilter.h" - -//------------------------------------------------------------------- -// -namespace clitk -{ - -//------------------------------------------------------------------- -template -void -DVHGenericFilter::UpdateWithDim(std::string PixelType) -{ - if (m_Verbose) std::cout << "Image was detected to be "<(); - } - else if(PixelType == "unsigned_short"){ - if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_short..." << std::endl; - UpdateWithDimAndPixelType(); - } - - else if (PixelType == "unsigned_char"){ - if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_char..." << std::endl; - UpdateWithDimAndPixelType(); - } - - else if(PixelType == "double"){ - if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and double..." << std::endl; - UpdateWithDimAndPixelType(); - } - else { - if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and float..." << std::endl; - UpdateWithDimAndPixelType(); - } -} - - -//------------------------------------------------------------------- -// Update with the number of dimensions and the pixeltype -//------------------------------------------------------------------- -template -void -DVHGenericFilter::UpdateWithDimAndPixelType() -{ - - // ImageTypes - typedef unsigned char LabelPixelType; - typedef itk::Image, Dimension> InputImageType; - typedef itk::Image LabelImageType; - - // Read the input - typedef itk::ImageFileReader InputReaderType; - typename InputReaderType::Pointer reader = InputReaderType::New(); - reader->SetFileName( m_InputFileName); - reader->Update(); - typename InputImageType::Pointer input= reader->GetOutput(); - - typedef itk::NthElementImageAdaptor InputImageAdaptorType; - typedef itk::Image OutputImageType; - - typename InputImageAdaptorType::Pointer input_adaptor = InputImageAdaptorType::New(); - input_adaptor->SetImage(input); - - // Filter - typedef itk::LabelStatisticsImageFilter StatisticsImageFilterType; - typename StatisticsImageFilterType::Pointer statisticsFilter=StatisticsImageFilterType::New(); - statisticsFilter->SetInput(input_adaptor); - - // Label image - typename LabelImageType::Pointer labelImage; - if (m_ArgsInfo.mask_given) { - int maskDimension, maskComponents; - std::string maskPixelType; - ReadImageDimensionAndPixelType(m_ArgsInfo.mask_arg, maskDimension, maskPixelType, maskComponents); - - if (maskDimension == Dimension - 1) { - // Due to a limitation of filter itk::LabelStatisticsImageFilter, InputImageType and LabelImageType - // must have the same image dimension. However, we want to support label images with Dl = Di - 1, - // so we need to replicate the label image as many times as the size along dimension Di. - if (m_Verbose) - std::cout << "Replicating label image to match input image's dimension... " << std::endl; - - typedef itk::Image ReducedLabelImageType; - typedef itk::ImageFileReader LabelImageReaderType; - typedef itk::JoinSeriesImageFilter JoinImageFilterType; - - - typename LabelImageReaderType::Pointer labelImageReader=LabelImageReaderType::New(); - labelImageReader->SetFileName(m_ArgsInfo.mask_arg); - labelImageReader->Update(); - - typename JoinImageFilterType::Pointer joinFilter = JoinImageFilterType::New(); - typename InputImageType::SizeType size = input->GetLargestPossibleRegion().GetSize(); - for (unsigned int i = 0; i < size[Dimension - 1]; i++) - joinFilter->PushBackInput(labelImageReader->GetOutput()); - - joinFilter->Update(); - labelImage = joinFilter->GetOutput(); - } - else { - typedef itk::ImageFileReader LabelImageReaderType; - typename LabelImageReaderType::Pointer labelImageReader=LabelImageReaderType::New(); - labelImageReader->SetFileName(m_ArgsInfo.mask_arg); - labelImageReader->Update(); - labelImage= labelImageReader->GetOutput(); - - // Check mask sampling/size - if (!HaveSameSizeAndSpacing(labelImage, input)) { - if (m_ArgsInfo.allow_resize_flag) { - if (m_ArgsInfo.verbose_flag) { - std::cout << "Resize mask image like input" << std::endl; - } - - typedef clitk::ResampleImageWithOptionsFilter ResamplerType; - typename ResamplerType::Pointer resampler = ResamplerType::New(); - resampler->SetInput(labelImage); - resampler->SetOutputSpacing(input->GetSpacing()); - resampler->SetGaussianFilteringEnabled(false); - resampler->Update(); - labelImage = resampler->GetOutput(); - labelImage->GetSpacing(); - typedef clitk::CropLikeImageFilter FilterType; - typename FilterType::Pointer crop = FilterType::New(); - crop->SetInput(labelImage); - crop->SetCropLikeImage(input); - crop->Update(); - labelImage = crop->GetOutput(); - //writeImage(labelImage, "test2.mha"); - - } - else { - std::cerr << "Mask image has a different size/spacing than input. Abort" << std::endl; - exit(-1); - } - } - - } - - } - else { - labelImage=LabelImageType::New(); - labelImage->SetRegions(input->GetLargestPossibleRegion()); - labelImage->SetOrigin(input->GetOrigin()); - labelImage->SetSpacing(input->GetSpacing()); - labelImage->Allocate(); - labelImage->FillBuffer(m_ArgsInfo.label_arg[0]); - } - statisticsFilter->SetLabelInput(labelImage); - - // Check/compute spacing - const typename LabelImageType::SpacingType& spacing = input->GetSpacing(); - double spacing_cc = (spacing[0]*spacing[1]*spacing[2])/1000; - // std::cout<<"Spacing x : "<SelectNthElement(c); - input_adaptor->Update(); - - for (unsigned int k=0; k< numberOfLabels; k++) { - label=m_ArgsInfo.label_arg[k]; - // Histogram - if (m_ArgsInfo.histogram_given) - { - std::cout<<"--------------"<SetUseHistograms(true); - statisticsFilter->SetHistogramParameters(m_ArgsInfo.bins_arg, m_ArgsInfo.lower_arg, m_ArgsInfo.upper_arg); - } - - // DVHistogram - if(m_ArgsInfo.dvhistogram_given) - { - statisticsFilter->SetUseHistograms(true); - statisticsFilter->SetHistogramParameters(m_ArgsInfo.bins_arg, m_ArgsInfo.lower_arg, m_ArgsInfo.upper_arg); - } - - statisticsFilter->Update(); - - // Histogram - if (m_ArgsInfo.histogram_given) - { - if (m_Verbose) std::cout<<"Median: "; - std::cout<GetMedian(label)<GetHistogram(label); - - // Screen - if (m_Verbose) std::cout<<"Histogram: "<GetBinMin(0,i)<<"\t"<GetMeasurement(i,0)<<"\t"<GetBinMax(0,i)<<"\t"<GetFrequency(i)<GetBinMin(0,i)<<"\t"<GetMeasurement(i,0)<<"\t"<GetBinMax(0,i)<<"\t"<GetFrequency(i)<GetHistogram(label); - - // Screen - std::cout<<"Total volume : "; - std::cout<GetCount(label)<<" [No. of voxels]"<GetCount(label))*spacing_cc)<<" [cc]"<GetMean(label)<<" [Gy]"<GetMinimum(label)<<" [Gy]"<GetMaximum(label)<<" [Gy]"<GetFrequency(i))*100)/(statisticsFilter->GetCount(label)); - double popCumulativeVolume = 0; - for(int j=0; jGetFrequency(j)); - } - double cumulativeVolume = popCumulativeVolume + (dvhistogram->GetFrequency(i)); - double percentCumulativeVolume =(cumulativeVolume*100)/(statisticsFilter->GetCount(label)) ; - double ccCumulativeVolume = (popCumulativeVolume + (dvhistogram->GetFrequency(i)))*spacing_cc; - std::cout<GetBinMax(0,i)<<"\t "<GetFrequency(i)<<"\t "<GetFrequency(i))*spacing_cc)<<"\t "<GetCount(label)<<" [No. of voxels]"<GetCount(label))*spacing_cc)<<" [cc]"<GetMean(label)<<" [Gy]"<GetMinimum(label)<<" [Gy]"<GetMaximum(label)<<" [Gy]"<GetFrequency(i))*100)/(statisticsFilter->GetCount(label)); - double popCumulativeVolume = 0; - for(int j=0; jGetFrequency(j)); - } - double cumulativeVolume = popCumulativeVolume + (dvhistogram->GetFrequency(i)); - double percentCumulativeVolume =(cumulativeVolume*100)/(statisticsFilter->GetCount(label)) ; - double ccCumulativeVolume = (popCumulativeVolume + (dvhistogram->GetFrequency(i)))*spacing_cc; - dvhistogramFile<GetBinMax(0,i)<<"\t "<GetFrequency(i)<<"\t "<GetFrequency(i))*spacing_cc)<<"\t "<SetLabelInput(labelImage); + // Check/compute spacing + const typename LabelImageType::SpacingType& spacing = input->GetSpacing(); + double spacing_cc = (spacing[0]*spacing[1]*spacing[2])/1000; + // std::cout<<"Spacing x : " << spacing[0]<SetUseHistograms(true); statisticsFilter->SetHistogramParameters(m_ArgsInfo.bins_arg, m_ArgsInfo.lower_arg, m_ArgsInfo.upper_arg); } + + // DVH + if(m_ArgsInfo.dvhistogram_given) + { + statisticsFilter->SetUseHistograms(true); + statisticsFilter->SetHistogramParameters(m_ArgsInfo.bins_arg, m_ArgsInfo.lower_arg, m_ArgsInfo.upper_arg); + } + statisticsFilter->Update(); // Output - if (m_Verbose) std::cout<<"N° of pixels: "; - std::cout<GetCount(label)<GetCount(label)<GetMean(label)<GetMean(label)<GetSigma(label)<GetSigma(label)<GetVariance(label)<GetVariance(label)<GetMinimum(label)<GetMinimum(label)<GetMaximum(label)<GetMaximum(label)<GetSum(label)<GetSum(label)<GetBoundingBox(label).size(); i++) - std::cout<GetBoundingBox(label)[i]<<" "; + std::cout<GetBoundingBox(label)[i]<<" "; std::cout<GetBinMin(0,i)<<"\t"<GetMeasurement(i,0)<<"\t"<GetBinMax(0,i)<<"\t"<GetFrequency(i)<GetHistogram(label); + + // Screen + std::cout<<"# Total volume : "; + std::cout<GetCount(label)<<" [No. of voxels]"<GetCount(label))*spacing_cc)<<" [cc]"<GetMean(label)<<" [Gy]"<GetMinimum(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 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 "<GetCount(label)<<" [No. of voxels]"<GetCount(label))*spacing_cc)<<" [cc]"<GetMean(label)<<" [Gy]"<GetMinimum(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 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 "<