SCI Seg3D Mailing List

Text archives Help

[Seg3D] Re: loss of functionality? export segmentation to MetaImage format

Chronological Thread 
  • From: Ramón Casero Cañas <>
  • To:
  • Subject: [Seg3D] Re: loss of functionality? export segmentation to MetaImage format
  • Date: Fri, 25 Sep 2009 21:00:03 +0100

Kristen Zygmunt wrote:

On Sep 17, 2009, at 7:34 AM, Ramón Casero Cañas wrote:

Hi Kris,

I have been away at MICCAI in London, but I've got down to your reply as soon as I came back. Thanks for writing!

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

Oh, I see! Thanks for the explanation.

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.

OK, I have checked it to see how it works.

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.

Um, it'd probably be nice to see the extension, but it seems that you have a lot of work to switch to Qt!

The main location for all of this interaction is in src/Applications/Seg3D/ 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

Thanks for the info and pointers. I had a look, and I'm attaching a very minor patch.

The .mat format is in different places in the drop down menus for import and export. The patch simply moves the .mat format position in the import segmentation list so that it matches the location in the export list.

(Sorry I don't send more useful patches, but I'll try to improve :) I have recompiled and tested the application, and it seems the patch doesn't break it.)

Is this patch format convenient for you? Would you prefer another format? I generated it with

$ diff Seg3DFrame.old > Seg3DFrame.diff

OK, so the next thing I'll try is to add the test menu filter to the release_4.2 branch version, and see whether I can finally make it work. I'll report the results in the other mailing list thread.

Best regards,


Ramón Casero Cañas, DPhil

Computational Biology, Computing Laboratory
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD

tlf     +44 (0) 1865 610807
> 		       "|MAT files (*.mat;*.MAT)|*.mat;*.MAT"
< 		       "|MAT files (*.mat;*.MAT)|*.mat;*.MAT"

Archive powered by MHonArc 2.6.16.

Top of page