[ITK-users] Geodesic Active Contour Error: Inputs do not occupy the same physical space!

Robert scorpiuni at gmail.com
Mon May 16 13:49:56 EDT 2016


Ooops, you're right.
But I still don't get it.
Now the last error persisting is this one:

terminate called after throwing an instance of 'itk::ExceptionObject'
  what():  /usr/local/include/ITK-4.9/itkImageToImageFilter.hxx:250:
itk::ERROR: GeodesicActiveContourLevelSetImageFilter(0x2127d40): Inputs do
not occupy the same physical space! 
InputImage Origin: [0.0000000e+00, 0.0000000e+00, 0.0000000e+00],
InputImage_1 Origin: [7.2991424e+00, 1.0553263e+01, -7.8717673e+00]
	Tolerance: 1.6000000e-07

Why doesn't the Origin change?! I tried GetOrigin etc as well, nothing
worked. It always sets the Origin as 0 0 0. Spacing and Direction now seem
to work. Is there some order that needs to be respected? If I change the
order of the commands, it seems like the first ont called always fails... Or
is it simply impossible to get all 3 arguments correct without modifying the
Tolerance somewhere? When 2 Args seem to be right, the 3rd one always
fails....

InternalImageType::PointType newOrigin;
  //newOrigin.Fill(0.0);
  newOrigin[0] = 7.2991424;
  newOrigin[1] = 10.553263;
  newOrigin[2] = -7.8717673;

  fastMarching->GetOutput()->SetOrigin(newOrigin);
  fastMarching->Update();
  fastMarching->GetOutput()->SetSpacing(sigmoid->GetOutput()->GetSpacing());
  fastMarching->Update();
 
fastMarching->GetOutput()->SetDirection(sigmoid->GetOutput()->GetDirection());
  //fastMarching->GetOutput()->Update();
  fastMarching->Update();



--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-Error-Inputs-do-not-occupy-the-same-physical-space-tp7588851p7588858.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.


More information about the Insight-users mailing list