Discussion:
[mitk-users] AccessByItk_n
Nil Goyette
2017-04-05 15:09:37 UTC
Permalink
Hi all,

I have this error: "Prohibited image access: the requested image part is
already in use and cannot be requested recursively!" and I'm not sure
what it means. It's caused by the AccessByItk_n in
mitkCorrectorAlgorithm.cpp in GenerateData().

I did modify the [old] segmentation plugin so I'm probably to blame
here. I replaced all mitk::LabelSetImage usages with mitk::Image because
the plugin can do nothing with them anyway. Everything still works as it
should except the +/- Correction button.

I tried reducing the number of smart pointers pointing to
m_WorkingImage but GenerateData() itself makes it go up by one so I
don't see how I could make it stay at 1 in my own code. Any ideas what I
can do to fix this?

Nil
Nil Goyette
2017-04-26 19:22:46 UTC
Permalink
Hi all,

So, someone knows something about this problem?

Nil

Le 2017-04-05 à 11:09, Nil Goyette a écrit :
> Hi all,
>
> I have this error: "Prohibited image access: the requested image part is
> already in use and cannot be requested recursively!" and I'm not sure
> what it means. It's caused by the AccessByItk_n in
> mitkCorrectorAlgorithm.cpp in GenerateData().
>
> I did modify the [old] segmentation plugin so I'm probably to blame
> here. I replaced all mitk::LabelSetImage usages with mitk::Image because
> the plugin can do nothing with them anyway. Everything still works as it
> should except the +/- Correction button.
>
> I tried reducing the number of smart pointers pointing to
> m_WorkingImage but GenerateData() itself makes it go up by one so I
> don't see how I could make it stay at 1 in my own code. Any ideas what I
> can do to fix this?
>
> Nil
Dinkelacker, Stefan
2017-04-26 19:57:49 UTC
Permalink
Hi Nil,

the image is locked by another accessor (see [1]). You may step into ImageAccessorBase or similar to understand who is blocking the image access.

Best,
Stefan

[1] http://docs.mitk.org/2016.03/MitkImagePage.html#MitkImagePage_AccessImageData

________________________________________
Von: Nil Goyette <***@imeka.ca>
Gesendet: Mittwoch, 26. April 2017 21:22
An: mitk-***@lists.sourceforge.net
Betreff: Re: [mitk-users] AccessByItk_n

Hi all,

So, someone knows something about this problem?

Nil

Le 2017-04-05 à 11:09, Nil Goyette a écrit :
> Hi all,
>
> I have this error: "Prohibited image access: the requested image part is
> already in use and cannot be requested recursively!" and I'm not sure
> what it means. It's caused by the AccessByItk_n in
> mitkCorrectorAlgorithm.cpp in GenerateData().
>
> I did modify the [old] segmentation plugin so I'm probably to blame
> here. I replaced all mitk::LabelSetImage usages with mitk::Image because
> the plugin can do nothing with them anyway. Everything still works as it
> should except the +/- Correction button.
>
> I tried reducing the number of smart pointers pointing to
> m_WorkingImage but GenerateData() itself makes it go up by one so I
> don't see how I could make it stay at 1 in my own code. Any ideas what I
> can do to fix this?
>
> Nil

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
mitk-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users
y***@pollen-metrology.com
2017-04-27 06:24:27 UTC
Permalink
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Miklos Espak
2017-04-27 10:30:05 UTC
Permalink
Note that if you declare the image argument as 'const', only a read lock
will be applied. In case you are just reading the image but get this error,
you should check the constness of your function arguments.

Hope it helps.

Miklos


On 27 April 2017 at 07:24, <***@pollen-metrology.com> wrote:

> Hello,
>
> It seems as the image was already locked by another access (by an accessor
> for example) and the lock is not released before you try to lock it again.
>
> Yann
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> mitk-users mailing list
> mitk-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
>
Loading...