From 8d1b013bf256345b2e7a60687c200e02a6210f13 Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Tue, 4 Nov 2014 11:33:31 +0100 Subject: [PATCH] Add dosenormafactor parameter --- tools/clitkGammaIndex.cxx | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/tools/clitkGammaIndex.cxx b/tools/clitkGammaIndex.cxx index 7e5a92e..1f5fd03 100644 --- a/tools/clitkGammaIndex.cxx +++ b/tools/clitkGammaIndex.cxx @@ -15,6 +15,15 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html ===========================================================================*/ + +#include "clitkGammaIndex_ggo.h" +#include "clitkIO.h" +#include "clitkDD.h" + +#include +#include +#include + #include #include #include @@ -24,15 +33,7 @@ #include #include #include -#include -#include -#include -using std::endl; -using std::cout; -#include "clitkGammaIndex_ggo.h" - -#include #include #include #include @@ -42,6 +43,9 @@ using std::cout; typedef itk::Image OutputImageType; typedef itk::ImageRegionIterator OutputImageIterator; +using std::endl; +using std::cout; + vtkImageData* loadImage(const std::string& filename) { vvImageReader::Pointer reader = vvImageReader::New(); @@ -224,7 +228,7 @@ int main(int argc,char * argv[]) // load reference vtkImageData* reference = loadImage(reference_filename); assert(reference); - + // translate target with arguments values // reference is translated instead of target so that the output space stay the same as target { @@ -248,10 +252,13 @@ int main(int argc,char * argv[]) vtkAbstractCellLocator *locator = vtkCellLocator::New(); locator->SetDataSet(data); - data->Delete(); + DD("here"); + // data->Delete(); locator->CacheCellBoundsOn(); locator->AutomaticOn(); + DD("BuildLocator"); locator->BuildLocator(); + DD("end BuildLocator"); // load target vtkImageData* target = loadImage(target_filename); @@ -277,6 +284,7 @@ int main(int argc,char * argv[]) unsigned long over_one = 0; OutputImageIterator iter(output,output->GetLargestPossibleRegion()); iter.GoToBegin(); + DD("loop"); while (!iter.IsAtEnd()) { double *point = target->GetPoint(kk); double value = target->GetPointData()->GetScalars()->GetTuple1(kk); @@ -315,4 +323,3 @@ int main(int argc,char * argv[]) return 0; } - -- 2.47.1