Slicer: 2145-support-for-installing-extension-from-file a4f50fef

Author Committer Branch Timestamp Parent
jcfr jcfr 2145-support-for-installing-extension-from-file 2013-11-07 10:33:04 2145-support-for-installing-extension-from-file 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