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

Robert scorpiuni at gmail.com
Mon May 16 11:30:35 EDT 2016


Hi,
I have an error which I can't find a solution for (or even the origin of
it):

I have a 3D Volume, which I preprocess with several filters:

  smoothing->SetInput( reader->GetOutput() );

  gradientMagnitude->SetInput( smoothing->GetOutput() );

  sigmoid->SetInput( gradientMagnitude->GetOutput() );

  std::cout << "-------After sigmoid IMPORTANT--------"<< std::endl;
  const InternalImageType::PointType & origin2 =
sigmoid->GetOutput()->GetOrigin();
  std::cout << "Origin = ";
  std::cout << origin2[0] << ", "
  << origin2[1] << ", "
  << origin2[2] << std::endl;

The Origin Output here is 0,0,0 as expected.
Now I do this:

geodesicActiveContour->SetInput(  fastMarching->GetOutput() );


  std::cout << "-------After fastmarching -> GetOutput()
IMPORTANT--------"<< std::endl;
  const InternalImageType::PointType & origin3 =
fastMarching->GetOutput()->GetOrigin();
  std::cout << "Origin = ";
  std::cout << origin3[0] << ", "
  << origin3[1] << ", "
  << origin3[2] << std::endl;

//Output still is 0 0 0

  float ori[3] = {0, 0, 0};
  sigmoid->GetOutput()->SetOrigin(ori);
  geodesicActiveContour->SetFeatureImage( sigmoid->GetOutput() );
  const InternalImageType::PointType & originx =
sigmoid->GetOutput()->GetOrigin();
  std::cout << "Origin Important= ";
  std::cout << originx[0] << ", "
  << originx[1] << ", "
  << originx[2] << std::endl;

Again, here, the cout for the origin says 0,0,0, which should be correct,
and work with the filter.
Now when I execute the whole thing, this pops up:

Exception caught !

itk::ExceptionObject (0xfb0a10)
Location: "void itk::ImageToImageFilter<TInputImage,
TOutputImage>::VerifyInputInformation() [with TInputImage =
itk::Image<float, 3u>; TOutputImage = itk::Image<float, 3u>]" 
File: /usr/local/include/ITK-4.9/itkImageToImageFilter.hxx
Line: 250
Description: itk::ERROR: GeodesicActiveContourLevelSetImageFilter(0xf87d40):
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.0000000e-06
InputImage Spacing: [1.0000000e+00, 1.0000000e+00, 1.0000000e+00],
InputImage_1 Spacing: [1.6000000e-01, 1.6000000e-01, 1.5999985e-01]
	Tolerance: 1.0000000e-06
InputImage Direction: 1.0000000e+00 0.0000000e+00 0.0000000e+00
0.0000000e+00 1.0000000e+00 0.0000000e+00
0.0000000e+00 0.0000000e+00 1.0000000e+00
, InputImage_1 Direction: -1.0000000e+00 0.0000000e+00 0.0000000e+00
0.0000000e+00 -1.0000000e+00 0.0000000e+00
0.0000000e+00 0.0000000e+00 1.0000000e+00

	Tolerance: 1.0000000e-06

No matter what I set the origin to (called ori in the above code), this
output stays the same.

InputImage_1 should be my sigmoid Image, however, right? Why does the
spacing, origin, etc change here?
Any help is appreciated!

Robert



--
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-tp7588851.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list