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

Author Committer Branch Timestamp Parent
naucoin naucoin 2145-support-for-installing-extension-from-file 2013-04-12 16:05:26 2145-support-for-installing-extension-from-file 03752112
Affected Issues 0003036: Can't save as .stl or .ply from Grayscale Model Maker in Windows 64 bit version
Changeset

BUG: Fix saving of models from GrayscaleModelMaker

When the models were being read back into Slicer by the vtkSlicerApplicationLogic,
it would check first if .vtk was a supported read type in the FreeSurfer
model storage node. Due to a copy/paste error in that class, it's SupportedReadFileTypes
string array was empty, which was interpreted as supporting all types and the
application logic would assign a FS model storage node to it. Because the
SupportedWriteFileTypes array was initialised with the supported read file types, the
grey scale model would come up in the save dialog as being able to be written in
FS formats.
It's a known interoperability issue that the FS model storage node doesn't support
writing FS formats, so the storage node inhertis from the model storage node superclass's
list of supported write types and uses it's WriteDataInternal to save FS models as .vtk
files.

Changes:
Initialize the SupportedReadFileTypes string array with just FS model file types.
Removed .vtk and .vtp as supported read types, Slicer should default to a regular
model storage node for those files.
Fixed some debugging string print outs.

Issue 0003036

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

mod - Libs/MRML/Core/vtkMRMLFreeSurferModelStorageNode.cxx Diff File