[Insight-developers] Where to put PhysicalToIndex method?

Paul Hughett hughett@mercur.uphs.upenn.edu
Thu, 18 Jan 2001 14:33:00 -0500


I want to provide a method which will return the AffineTransforms
implied by the origin and spacing fields of an image; that is, the
AffineTransforms that will transform from physical coordinates (using
origin and spacing) to index coordinates (raw lookup indices), and the
reverse.  Each of these methods could plausibly be provided either as
a static member function of the AffineTransform class, taking an image
as the argument, or as a method of the Image class, taking no
arguments.  One advantage of doing it as an Image method is that it can
inherit the image dimensions.  Which do people feel is more reasonable?

static AffineTransform::PhysicalToIndexTransform(const Image *);

AffineTransform Image::PhysicalToIndexTransform(void);


Paul Hughett