Hi guys,

it seems to me that if a data object needs multiple files to be saved, 
it cannot be serialized now without many additional steps. Imagine an 
image that is saved in mhd format - which consists of two - an mhd file 
and a raw file.

This is due to the fact that the Serialize() method is only allowed to 
return a single filename. So there are two options - manually creating 
an archive and returning it, or create support for multi-file 
serialization - which would just include replacing return value from 
std::string to std::vector<std::string> and some minor changes to the 
project saving procedure.

Obviously just replacing the return value would likely induce some 
annoying compile-time errors for the external users of serailizers. So 
just introducing a new virtual method, named something like SerializeAll 
with the default implementation of "call Serialize(), make std::vector 
with one element, and return that vector" would be an easy and 
backward-compatible approach.

What do you think about this? Should I quickly hack this and make yet 
another pull request?

Cheers,
    Rostislav.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to