Import 2017-06-07 23:51:09: master a4f50fef

Author Committer Branch Timestamp Parent
jcfr jcfr master 2013-11-07 10:33:04 master d2a97a6d
Changeset

BUG: Properly support extension

Revert commit r22148 that was setting the path to saved MRB as MRMLScene URL.
The MRML scene URL knows remains associated with the mrml file after either
a read or save to mrml, or even export (MRB, Kiwi.zip, ...) operation.

To be able to properly switch between different available file formats
while supporting filename containing dots. The extension of a filename
needs to be removed based on a list of known extensions. For that purpose,
the following two functions have been introduced:

  • extractKnownExtension
  • stripKnownExtension

These functions rely on the existing IOManager function "fileWriterExtensions"
able to return a list of name filters associated with either a storage node
or a mrml scene.

For any fileName item, in order to get the associated storage node or mrml scene,
a new role named "UIDRole" has been introduced. For a given fileName item,
if a nodeID is set with the "UIDRole", it is understood that it will
be the nodeID of the corresponding storage node. If it is not set, it means
the fileName item is associated the scene.

See 0002948

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22687 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Base/QTGUI/qSlicerSaveDataDialog.cxx Diff File
mod - Base/QTGUI/qSlicerSaveDataDialog_p.h Diff File
mod - Modules/Loadable/Data/qSlicerSceneWriter.cxx Diff File