[Insight-developers] astronomy images, SpecialCoordinatesImage and ImageIO

Michael Halle mhalle at bwh.harvard.edu
Tue Aug 29 15:57:02 EDT 2006


Kent Williams wrote:
> You seem to be conflating two things that should be considered as 
> separate issues.
> 
> For ImageIO you need to do these things to produce properly oriented 
> images.
> 
> 1. Set the image origin in world (or patient) coordinates. This is 
> well-defined for medical images; for Astronomy, you need to choose a 
> convention and stick with it.
> 2. Set the Direction Cosines for the image. This is 3 vectors 
> representing the orthogonal X,Y, and Z images -- basically describing 
> the way the local coordinate system of the image data is rotated from 
> the canonical world coordinate system vectors.

The point of distinction between astronomy and medical imaging is that 
the coordinate systems in astronomy are usually spherical (right 
ascension and declination), and that there are fifteen different 
projections that convert from index to physical.  There is no direction 
cosine approximation that works well enough for us, and the projections 
are exceedingly complex and specialized.

That's why, ultimately, we need to delegate to an implementation library 
to do that work for us using function/method calls.  It may not be as 
fast as the direction cosine approach, but for many non-linear spaces 
it's basically what you need.

It's not so hard to use the metadata dictionary to pass parameters from 
  ImageIO to a new Image subclass, which will then set up its 
transforms.  It's just less generic then the current direction 
cosine-based approach (since you need to have new ImageIO and Image 
subclasses).

Thanks.

--Mike


More information about the Insight-developers mailing list