Discussion:
[mitk-users] Root properties on MITK scene files
Federico Milano
2017-06-06 15:22:20 UTC
Permalink
Hi. I would need to store some data as general properties for the MITK
scene, I think of those like "root" properties.
What is the best way to do this? Should I create an invisible node just to
store these properties?
I would also like to retrieve those properties from any .mitk file without
the need of decompressing the whole file.
What do you think would be the best way to achieve this kind of
functionality?

Thanks in advance,

Federico
Dinkelacker, Stefan
2017-06-06 16:03:45 UTC
Permalink
Hi,

see the MITK Persistence Service [1]. I can remember that some users had issues with the service, though. Searching a little bit in the mailing list archive should shed light on this. I guess it isn’t possible with reasonable efforts to implement partial extraction.

Best,
Stefan

[1] http://docs.mitk.org/2016.03/PersistenceConceptPage.html#PersistenceMITKService

From: Federico Milano [mailto:***@gmail.com]
Sent: Dienstag, 6. Juni 2017 17:22
To: mitk-***@lists.sourceforge.net
Subject: [mitk-users] Root properties on MITK scene files

Hi. I would need to store some data as general properties for the MITK scene, I think of those like "root" properties.
What is the best way to do this? Should I create an invisible node just to store these properties?
I would also like to retrieve those properties from any .mitk file without the need of decompressing the whole file.
What do you think would be the best way to achieve this kind of functionality?

Thanks in advance,

Federico
Nil Goyette
2017-06-07 12:47:49 UTC
Permalink
Hi Frederico,

I'm pretty sure I am that user Stefan is talking about :) It was months
ago so you can be sceptical about some (or all) of the things I will
write. If I remember correctly, the "Persistence Service" is the same
as a QSettings object but in a non-UI module. This may be practical to
some users but it was totaly useless to me. There's also the Preferences
system but it's not what I had in mind because it applies to alll MITK's
instances instead of only to the current scene.

What I did was to modify the Persistence and SceneSerialization classes
of MITK to save properties in the scene. It wasn't really complicated
because these 2 classes almost already do what we want.

Sadly, I couldn't contribute this code to MITK because it's super
complicated to modify a feature as some users may be using it. I can't
share the code at the moment because I don't have it with me but I could
put it on my github account if you like. It was a WIP but it was working
quite well.

Nil Goyette
Post by Dinkelacker, Stefan
Hi,
see the MITK Persistence Service [1]. I can remember that some users
had issues with the service, though. Searching a little bit in the
mailing list archive should shed light on this. I guess it isn’t
possible with reasonable efforts to implement partial extraction.
Best,
Stefan
[1]
http://docs.mitk.org/2016.03/PersistenceConceptPage.html#PersistenceMITKService
*Sent:* Dienstag, 6. Juni 2017 17:22
*Subject:* [mitk-users] Root properties on MITK scene files
Hi. I would need to store some data as general properties for the MITK
scene, I think of those like "root" properties.
What is the best way to do this? Should I create an invisible node
just to store these properties?
I would also like to retrieve those properties from any .mitk file
without the need of decompressing the whole file.
What do you think would be the best way to achieve this kind of functionality?
Thanks in advance,
Federico
Loading...