Hi Ralf,

you can go via FileReaderRegistry, so instead of using:

std::vector<mitk::BaseData::Pointer> networkFile =
   mitk::IOUtil::Load( networkName);

you could use:

mitk::FileReaderRegistry fileReaderRegistry;
std::vector<mitk::IFileReader*> readerVector = 
fileReaderRegistry.GetReaders(fileReaderRegistry.GetMimeTypeForFile(networkName)
 );
readerVector[0]->SetInput(networkName);
std::vector<mitk::BaseData::Pointer> networkFile = readerVector[0]->Read();

However I am not aware of an easy way of distinguishing the registered readers, 
apart from trying to read the file and deciding based on the resulting base 
datas.

Best,
Caspar

-----Ursprüngliche Nachricht-----
Von: Floca, Ralf Omar [mailto:r.fl...@dkfz-heidelberg.de] 
Gesendet: Donnerstag, 13. April 2017 22:00
An: mitk-users@lists.sourceforge.net
Betreff: [mitk-users] Change priority of IO Services at rumtime

Hi,

I have a question, regarding the IO micro services.

Using mitk:IOutil in a command line app to load dicom data utilizes the legacy 
DicomSeriesReader, because it is the first suitable service option sorted by 
name and wie have No selection dialog like in the workbench.

I would like to use the new service implementation instead.

What would be the best strategy to control/change it at rumtime from the 
mitk::IOUtil using cli app?

Best regards,
Ralf Floca
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! http://sdm.link/slashdot 
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to