X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkImageStatisticsGenericFilter.txx;h=b3eff93ce1082304554c03f1a71589a41d2fa059;hb=15ebed734d7ef4727dff24b21d00d929b9162f90;hp=4b940ffb41f0c66ad026e2cfab68343be54630db;hpb=f2c64390f6e7a98a2299c580006a21f8cb631f9e;p=clitk.git diff --git a/tools/clitkImageStatisticsGenericFilter.txx b/tools/clitkImageStatisticsGenericFilter.txx index 4b940ff..b3eff93 100644 --- a/tools/clitkImageStatisticsGenericFilter.txx +++ b/tools/clitkImageStatisticsGenericFilter.txx @@ -156,7 +156,7 @@ namespace clitk } else { - std::cerr << "Mask image has a different size/spacing than input. Abort" << std::endl; + std::cerr << "Mask image has a different size/spacing than input. Abort. (Use option to resize)" << std::endl; exit(-1); } } @@ -166,9 +166,11 @@ namespace clitk } else { labelImage=LabelImageType::New(); + labelImage->SetDirection(input->GetDirection()); labelImage->SetRegions(input->GetLargestPossibleRegion()); labelImage->SetOrigin(input->GetOrigin()); labelImage->SetSpacing(input->GetSpacing()); + labelImage->SetDirection(input->GetDirection()); labelImage->Allocate(); labelImage->FillBuffer(m_ArgsInfo.label_arg[0]); } @@ -212,7 +214,7 @@ namespace clitk std::cout<GetMaximum(label)<GetSum(label)<GetCount(label)*spacing_cc<GetBoundingBox(label).size(); i++) std::cout<GetBoundingBox(label)[i]<<" "; @@ -303,13 +307,7 @@ namespace clitk 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) - { - 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 "<<"\t "<GetBinMax(0,i)<<"\t "<GetFrequency(i)<<"\t "<GetFrequency(i))*spacing_cc)<<"\t "<<"\t "<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 "<GetBinMax(0,i)<<"\t "<GetFrequency(i)<<"\t "<GetFrequency(i))*spacing_cc)<<"\t "<