Hi Dr. Maleike, I finally solved it by calling it.Value()->GetName() inside my loop.
Cheers, Albert. 2016-08-01 15:13 GMT+02:00 Daniel Maleike <d.male...@mint-medical.de>: > Hi Albert, > > > have you tried calling "it->GetName()" inside your loop? Unless there are > syntax errors (perhaps it would be "(*it)->GetName()"), this should work > and give you the name for each object. > > > Regards, > Daniel > > > -- > > Dr. Daniel Maleike, Mint Medical GmbH > Friedrich-Ebert-Straße 2, 69221 Dossenheim/Heidelberg > Geschäftsführer: Dr. Matthias Baumhauer, Registergericht Mannheim, HRB > 709351 > ------------------------------ > *From:* Albert Alises <ironicpsy...@gmail.com> > *Sent:* Monday, August 1, 2016 2:35 PM > *To:* mitk-users@lists.sourceforge.net > *Subject:* [mitk-users] Iterate through nodes of the data Storage > > Hello, > > I want to check if a node with a certain name is already on the data > Storage. So far, I retrieve all the nodes on the data storage using: > > mitk::DataStorage::SetOfObjects::ConstPointer allNodes = > this->GetDataStorage()->GetAll(); > > > However, I do not know how to iterate through the set of objects. I have > tried creating a loop with a constant iterator, like: > > for ( mitk::DataStorage::SetOfObjects::ConstIterator it = > allNodes->Begin(); it != allNodes->End(); ++it){ > > > } > > > I do not know how to iterathe through the different names of the objects > and compare with a string, given the iterator. How could I do it? > > Cheers, > Albert. > > > ------------------------------------------------------------------------------ > > _______________________________________________ > mitk-users mailing list > mitk-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mitk-users > >
------------------------------------------------------------------------------
_______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users