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

Bill Lorensen bill.lorensen at gmail.com
Mon May 16 13:54:48 EDT 2016


You cannot set the origin, direciton and spacing directly. Use the
itkChangeInformationImageFilter. It does not copy the data, just
changes the meta information.



On Mon, May 16, 2016 at 1:49 PM, Robert <scorpiuni at gmail.com> wrote:
> 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.
> _____________________________________
> 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



-- 
Unpaid intern in BillsBasement at noware dot 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