[Insight-users] Simultaneous 8-bit/16-bit image compatibility

Robert Maroon robertmaroon at yahoo.com
Wed May 25 12:25:15 EDT 2005


I have an algorithm which is designed to work with
8-bit image volumes from RAW (+MHD) files, so I use
typedef's like so:

typedef unsigned char VoxelType;
typedef itk::Image<DataType,3> VolumeType;

Unfortunately, some of the incoming data may also be
16-bit, and I want to be able to process these volumes
identically without worrying if the incoming data is
actually 16-bit (versus 8-bit).

However, so far I've only seen ITK examples where a
specific datatype (e.g., unsigned char/unsigned
short/float) is used *globally*; I'm not sure if
there's a way to further abstract the datatype for the
type of application I'm designing. Is there any
elegant way of doing this? (i.e., without duplicating
code to handle the different cases.)

Thanks,

Robert



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/


More information about the Insight-users mailing list