[Insight-developers] ITK 4.2.1: ITK_AUTOLOAD mechanism again
Wenzel, Fabian
fabian.wenzel at philips.com
Mon Nov 12 15:38:56 EST 2012
Hi Bill,
thanks for the quick reply. Actually, I found out that the severe problem I was reporting was indeed caused by another reason which I could fix in the meantime (had to do with locale settings that only occurred in the application scenario I depicted below via python; this has nothing to do with the ITK_AUTOLOAD plug-in mechanism and it seems that I was on the wrong track first).
Since things are now running here, there is no need for me to update to HEAD and do further tracings. I might do so with the next release to see whether the "this"-pointer and my other reported observation (multiple instantiations of built-ins) are still an issue.
Thanks again and best regards,
Fabian
-----Original Message-----
From: Bill Lorensen [mailto:bill.lorensen at gmail.com]
Sent: Montag, 12. November 2012 16:57
To: Wenzel, Fabian
Cc: insight-developers at itk.org
Subject: Re: [Insight-developers] ITK 4.2.1: ITK_AUTOLOAD mechanism again
We just merged a new patch from Brad. Try updating to HEAD. Let is know if it fixes your issues.
On Mon, Nov 12, 2012 at 10:26 AM, Wenzel, Fabian <fabian.wenzel at philips.com> wrote:
> Hi all,
>
> The autoload mechanism of ITK in 4.2.1. is causing me a lot of headaches in recent days.
>
> I have included the patch Bradley released a few weeks ago (since the autoload mechanism was completely broken).
>
> There are two observations which I do not understand:
>
> * If multiple files of an application intend to read itk images and include <itkFileReader.hxx>, the static factory mechanism is actually invoked a number of times and the built-in IO modules (jpg/gdcm/nifti/...) are present multiple times in the object factory list. Is this intended?
>
> * Whereas the issue above is more or less harmless (it will just
> produce some overhead), I cannot get my IO-plugin work as expected
> (MSVC9, x64). My application scenario is
>
> python -> python C-extension -> customDLL (that reads via ITK) -> ITK
> -> (autoLoad) myIO-plugin
>
> I have checked that everything is built for x64 and uses consistent MSVC Runtime Libraries.
>
> The problem is that even though "myImageIO" is created correctly in itkImageFileReader.hxx, image information (direction, spacing etc.) is not correct after the call to ReadimageInformation() (line 152). While debugging, I found out that the "this" pointer in the "ReadImageInformation() method" differs from m_imageIO.m_pointer, so the backend routine reads image information to uncorrect memory.
>
> Is there anyone who might have an explanation why a "this" pointer
> might be different during a function call without changing it
> explicitely? (Or is the Visual Studio 2008 debugger broken?)
>
> Best regards,
>
> Fabian
>
>
>
> ________________________________
> The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
>
> _______________________________________________
> 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://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://www.itk.org/mailman/listinfo/insight-developers
--
Unpaid intern in BillsBasement at noware dot com
More information about the Insight-developers
mailing list