SCI Seg3D Mailing List

Text archives Help


[Seg3D] Re: Segmentation export format


Chronological Thread 
  • From: Ramón Casero Cañas <rcasero@gmail.com>
  • To: seg3d@sci.utah.edu
  • Subject: [Seg3D] Re: Segmentation export format
  • Date: Tue, 29 May 2012 11:01:48 +0100

On 29/05/12 09:52, Sergio Vera wrote:

Dear Seg3D Devs,

the old Seg3D (v1) allowed to export segmentation mask in several image
formats (mha, mhd, nrrd and many others)
Currently Seg3D2 only allows to export in nrrd format. This sometimes
generates the need to transform nnrd into other formats to be read by
other applications.

It is possible to add other formats to export segmentations?
Each time you have to convert an image from a format to another there is
a chance that some info on the header may end up messed badly.

Hi Segio,

Actually, Seg3D2 allows to export to other formats other than nrrd. But for example, the exporter to mat is broken and doesn't export the header information, only the segmentation itself.

Or you can read mha files, but the exporter is not provided.

So yes, at the moment it's a bit unusable.

I'm getting along by exporting to mat, then loading it in Matlab, reconstructing the header, then saving it back.

A couple of days ago, Gregory Jefferies posted in the teem list about some code to load nrrd files in Matlab, I haven't tried it, but it's maybe worth having a look

<QUOTE>
I posted some code here a few months back that could perhaps be of interest to people wanting to access nrrd files in matlab

https://github.com/jefferis/MatlabSupport/tree/master/nrrdio [1]
https://github.com/jefferis/MatlabSupport/tree/master/teem [2]

[1] is a very basic pure matlab nrrd reader. There are many limitations, but sometimes compiling teem etc is more effort than necessary to a read a couple of simple 3D raw or gzipped files.
[2] is just the matlab mex code from the teem library but includes a more intelligent compilethis.m script that pretty reliably finds the location of teem libraries (ie no need to manually edit to point at teem location). Perhaps this would be worth adding to teem.

I use these in conjunction with this:

https://github.com/jefferis/FruCloneClustering/blob/master/src/read3dimage.m

which calls whichever version is available (preferring [2]) and provides similar return values and image orientations. All this code also works fine from GNU Octave.
</QUOTE>

Cheers,

Ramon.

--
Dr. Ramón Casero Cañas

Computational Biology
Department of Computer Science
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD

tlf     +44 (0) 1865 610737
web     http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
photos  http://www.flickr.com/photos/rcasero/



Archive powered by MHonArc 2.6.16.

Top of page