Support C++11 range based for loop for gdcm::DataSet
Cross-platform DICOM implementation
Brought to you by:
malat
By adding STL iterator api functions begin()
and end()
to gdm::DataSet, range for statements may be used for looping over its elements. This will allow using the following equivalent syntaxes:
// Current syntax for (auto it=ds.Begin(); it!= ds.End(); ++it) { const auto& el = *it; // do something with el } // equivalent shorthand dependeding on ds.begin() and ds.end() for (const auto& el: ds) // do something with el
cheers
Last edit: Mathieu Malaterre 2014-07-28
That's a nice hack, but it would be even prettier not to have to do it.