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

Dženan Zukić dzenanz at gmail.com
Mon May 16 13:59:24 EDT 2016


Hi Robert,

if you want to modify an intermediate result, you should save it to a
variable, e.g.:
ImageType::Pointer fmOutput=fastMarching->GetOutput();
then call Set* methods on fmOutput. Otherwise the pipeline update
propagation mechanism might interfere with intermediate results and
overwrite your changes.

Regards,
Dženan

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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160516/8123418d/attachment.html>


More information about the Insight-users mailing list