Dear list,
I recently encountered a new problem with MITK when using images that are
stored in the DataStorage. Acquiring images using the image cast in
OnSelectionChanged() method of each plugin the following way
FloatingImageType3D::Pointer itkImage;
mitk::BaseData* data = node->GetData();
if(data)
{
mitk::Image* image = dynamic_cast<mitk::Image*>( data );
if(image)
mitk::CastToItkImage(image, itkImage);
}
if(itkImage.IsNotNull())
{
m_baseImage = itkImage;
m_parentNode = node;
}
I receive an error message selecting an image twice. The error message reads as
follows:
117.13 blueberry.ui.wrkbncPlg: LOG:
..\..\..\..\..\MITK_SOURCE\MITK-2013.06.0\Core\Code\DataManagement\mitkImageAccessorBase.cpp:174:
Prohibited image access: the requested image part is already in use and cannot
be requested recursively!
In each image cast one of the new write image accessor is created on the source
object. Why I don't know! Utilizing the image in a member context seems to
sustain that accessor until the object is deleted, which it usually wont for
quite some time. Because if an image is loaded one might apply many different
algorithms to it. The same behavior is true for const Images as well.
Anyway, how do I use images stored in the DataStorage in a multiple filter
context, so that I don't encounter the accessor problem. Utilizing the newly
introduced clone function would certainly be an option, but it will double the
memory usage. Additionally, one would need to keep track of all clones images,
which makes the whole image processing a bit uncomfortable.
It also will make it impossible that different algorithm parts work on the same
image.
Any comments? Or am I missing something
Best regards,
Matthias
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users