On Sep 17, 2009, at 7:34 AM, Ramón Casero Cañas wrote:
Ramón Casero Cañas wrote:
In my opinion, it's useful to show all the formats in the drop-down menu, because otherwise the user may get confused.
I agree to an extent. Seg3D uses the ITK file reader/writer for all file I/O. ITK uses a factory-based approach so that the base ITK file reader just queries its list of specific file readers asking each of
I can change so that the default type is All files, so that if the user wants to change the extension from the default filename(which is still .nrrd), they can either type it in or select the appropriate type from the drop down menu. A default file extension needs to be provided because ITK does not know how to write to a file with no extension. I believe the user needs to be able to press enter when the save dialog first pops up and have the save work successfully with the defaults provided.
If an invalid file extension is provided, Seg3D will provide an option to either select the .nrrd file type or cancel.
I have not checked photoshop yet for its implementation, but as far as I can tell, the current behavior where the extension is enforced by the file type selected by the user is consistent with user interface style guidelines for both Mac and Windows. I can modify the display in the wxWidgets dialog box I am using to better show this to the user by having the file extension displayed. The wxWidgets dialog will then show the change in extension as the different file types are selected. However, the dialog will not update the displayed extension if the user overwrites it manually even though the user-supplied extension will be changed by the software. This behavior cannot be changed without writing a custom dialog which is not desired at this point since we are planning on switching to Qt shortly.
The main location for all of this interaction is in src/Applications/Seg3D/Seg3DFrame.cc Search for export_formats_ and export_exts_ in this file.
To try out the changes mentioned above, check out the most recent revision from the release_4.2 branch (4.2 is the new version of SCIRun where v1.12 of Seg3D lives)
svn checkout https://code.sci.utah.edu/svn/cibc/cibc/branches/release_4.2/SCIRun
579a580 > "|MAT files (*.mat;*.MAT)|*.mat;*.MAT" 587d587 < "|MAT files (*.mat;*.MAT)|*.mat;*.MAT"
Archive powered by MHonArc 2.6.16.