[Insight-users] metaDataDictionaryArray in python

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Mar 1 14:53:47 EST 2013


Hello,

I have some ideas about your crash. I have had odd behavior with aliasing problems with some objects in WrapITK. Specifically, in my case I was calling ImageFileReader.GetLargestPossibleRegion(), and then manipulating that returned object. It took me quite a while to track down a bug, which was cause by manipulating the actual internal ImageRegion from that method, as an implicit copy was not created even though the C++ method return a const reference. I have a felling your problem, causing a segfault, is related.

Brad

On Mar 1, 2013, at 1:58 PM, "Li, Wen" <WLi at childrensnational.org> wrote:

> Thank you for your response.
> 
> I figured that out the second day I posted it.
> yes, itk.MetaDataDictionary() will create an instance for MetaDataDictionary.
> 
> If you want to create your own array, it is
> outputArray=itk.vector.itkMetaDataDictionary()
> 
> My current problem is that after a loop of outputArray.push_back(outDict), itk.ImageSeriesWriter.Update() crashes (seg fault). In this case, I have to use ITK c++ to make it work. 
> 
> Not sure if you have run into the same problem in python.
> 
> Wen
> ________________________________________
> From: insight-users-bounces at itk.org [insight-users-bounces at itk.org] on behalf of jp [cervellone at gmail.com]
> Sent: Friday, March 01, 2013 1:23 PM
> To: insight-users at itk.org
> Subject: Re: [Insight-users] metaDataDictionaryArray in python
> 
> i am in no way an expert but try
> 
> itk.MetaDataDictionary()
> then use the methods associated to that class
> Jp
> 
> 
> 
> 
> --
> View this message in context: http://itk-users.7.n7.nabble.com/metaDataDictionaryArray-in-python-tp30831p30882.html
> Sent from the ITK - 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://www.itk.org/mailman/listinfo/insight-users
> _____________________________________
> 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://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list