[ITK] [ITK-dev] help itk::GDCMImageIO / itk::ExposeMetaData

Williams, Norman K norman-k-williams at uiowa.edu
Tue Sep 16 13:15:48 EDT 2014


I’ll have a look when review.source.kitware.com comes back up.

It would be OK to replaces the [] operator with using the iterator directly.  The only reason I can think of not to is that even with a DICOM file, the time spent in writing and reading the MetaDataDictionary is not going to have a significant computational cost, since it only happens when you read or write a DICOM file.  It’s not something done in the inner loop of a big computation.


From: Arnaud Gelas <arnaudgelas at gmail.com<mailto:arnaudgelas at gmail.com>>
Date: Monday, September 15, 2014 at 5:05 AM
To: ITK <insight-developers at itk.org<mailto:insight-developers at itk.org>>
Subject: [ITK-dev] help itk::GDCMImageIO / itk::ExposeMetaData

Hi guys,

I have been looking at GDCMImageIO this morning and I thought it would be great if it was possible to iterate directly on the Dictionary and do not use ExposeMetaData cause internally there are 2 finds (HasKeys and [] ) per iterator (in which we already know both keys and values).

https://github.com/Kitware/ITK/blob/master/Modules/IO/GDCM/src/itkGDCMImageIO.cxx#L700
https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/include/itkMetaDataObject.h#L171-L189

I have tried to create a new function which would take an iterator as parameter, I have compilation error or a failing dynamic_cast… I guess I am missing something obvious…

I have been testing something like that:

http://review.source.kitware.com/#/c/17026/

Any idea on how to fix the code ( both compilation & dynamic_cast ), please?

Thanks,
Arnaud


________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140916/6b0fc0b3/attachment-0002.html>
-------------- next part --------------
_______________________________________________
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://public.kitware.com/mailman/listinfo/insight-developers


More information about the Community mailing list