users > Trouble with reformatting
Showing 1-5 of 5 posts
Display:
Results per page:
Sep 16, 2010  09:09 AM | Rob Campbell
Trouble with reformatting
Hi,

I am trying to use munger.pl to coordinate image registration. I am stating off with the example data from the Stanford site. Everything seems to go well on a Mac but I'm having problems under Linux. Although I supply the "-r 01" flag, which requests for the image to be re-formatted using the calculated parameters, no re-formatting is taking place. It does, however, calculate the registration parameters.

At the start of the registration I see a warning message:
WARNING: image does not have valid orientation meta information; cannot reorient.

Could this be the reason? Oddly, I don't see this message on the Mac even through I am using the same example data. This led me to think that the meta information truly is absent but that the Mac build of registration doesn't report this. Any ideas?

Thanks
Sep 16, 2010  10:09 AM | Torsten Rohlfing - Google LLC
RE: Trouble with reformatting
Hi Rob:

In general, only "medical" images have valid orientation information in terms of CMTK's I/O functions.

Since you are using Greg's script for registration and reformatting, I am going to assume you are working on "biological" data instead.

As a bit of background, CMTK attempts to orient all images it reads such that they are in "RAS" orientation. That is, the registration code can then assume that the fastest moving index in the pixel array goes from patient Left to Right, the second-fastest from Posterior to Anterior, and the third-fastest from Inferior to Superior. The actual storage order of the pixels on disk is typically deduced from fields of the input file format, such as DICOM orientation tags, NIFTI direction cosines or quaternions, etc.

For microscopy data, there aren't usually any such data fields, and even if there were, they aren't usually represented by R/L, A/P, and S/I orientations, because your specimen simply aren't people ;)

All that said, there is no reason why you should get a warning on one platform and not on the other. If the image file doesn't have orientation information, it doesn't on any platform.

Speaking of which - what *is* the image format you are reading?

Second, I cannot see of a reason why the reformat tool shouldn't read and properly use an image that the registration tool can. Both tools are using the exact same I/O functions to read their inputs.

That said, I'd be happy to do some debugging if you could send me (i.e., upload somewhere) the images you are having problems with, preferably together with a transformation file that you said the script does compute.

Best,
Torsten

Originally posted by Rob Campbell:
Hi,
At the start of the registration I see a warning message:
WARNING: image does not have valid orientation meta information; cannot reorient.

Could this be the reason? Oddly, I don't see this message on the Mac even through I am using the same example data. This led me to think that the meta information truly is absent but that the Mac build of registration doesn't report this. Any ideas?

Thanks[/userquote]
Sep 16, 2010  11:09 AM | Greg Jefferis
RE: Trouble with reformatting
The reason the error only appears on linux is that you are using CMTK binaries downloaded from NITRC on linux and much older binaries downloaded from flybrain.stanford.edu on mac. Greg.
Sep 16, 2010  09:09 PM | Greg Jefferis
RE: Trouble with reformatting
Torsten has answered the second part of the question. The first part concerns use of my munger.pl script to coordinate many registrations. The basic problem is that the registration software and control scripts available from flybrain.stanford.edu at the moment (Sep 2010) are still those released in 2007 when CMTK was closed source. Many changes have happened in the interim. You should now obviously prefer the CMTK binaries available from this site. You should also prefer the most up to date version of munger.pl which lives here:

http://github.com/jefferis/AnalysisSuite...

I hope that the README at the bottom of that page explains things well enough.
Sep 17, 2010  12:09 AM | Torsten Rohlfing - Google LLC
RE: Trouble with reformatting
Greg:

Just to confirm - in your experience your current script should work properly with the current CMTK tools, correct?

Thanks!
Torsten

Originally posted by Greg Jefferis:
Torsten has answered the second part of the question. The first part concerns use of my munger.pl script to coordinate many registrations. The basic problem is that the registration software and control scripts available from flybrain.stanford.edu at the moment (Sep 2010) are still those released in 2007 when CMTK was closed source. Many changes have happened in the interim. You should now obviously prefer the CMTK binaries available from this site. You should also prefer the most up to date version of munger.pl which lives here:

http://github.com/jefferis/AnalysisSuite...

I hope that the README at the bottom of that page explains things well enough.[/userquote]