- 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 <iostream>
+#include <cmath>
+#include <cassert>
+
#include <vtkPoints.h>
#include <vtkCellArray.h>
#include <vtkPointData.h>
#include <vtkPNGReader.h>
#include <vtkPolyData.h>
#include <vtkCellLocator.h>
-#include <iostream>
-#include <cmath>
-#include <cassert>
-using std::endl;
-using std::cout;
-#include "clitkGammaIndex_ggo.h"
-
-#include <clitkIO.h>
#include <vvImage.h>
#include <vvImageReader.h>
#include <vvImageWriter.h>
typedef itk::Image<double> OutputImageType;
typedef itk::ImageRegionIterator<OutputImageType> OutputImageIterator;
+using std::endl;
+using std::cout;
+
vtkImageData* loadImage(const std::string& filename)
{
vvImageReader::Pointer reader = vvImageReader::New();
// 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
{
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);
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);
return 0;
}
-