[Insight-users] Re: Problems with templated image

Jarek Sacha galicjan at yahoo . com
Mon, 27 May 2002 21:09:49 -0700 (PDT)


Unfortunately ITK has a serious deficiency in handling image types at
runtime. ImageFileReader templated over image type is the primary example.
Similarly as you, I would like to be able use the library to write code
that can dynamically assign image types (and matching types of image
processing objects) at run time without need for scaling and casting of
image data which in many cases is unacceptable. Dynamic type processing is
not possible with current version of the library, but few modifications to
DataObject inheritance hierarchy and addition of non-templated
"dispatches" for specific templated processor objects, e.g. image filters,
can make it possible. As an added benefit, it can simplify wrapping in
Java, Python, or other languages.

Jarek

--- Mark Hastenteufel <M.Hastenteufel@dkfz-heidelberg.de> wrote:
> Dear ITK community, dear ITK developers,
> 
> I'm using ITK for some weeks now and I like it. I use it for some
> registration tasks. But I encountered now a problem using the templated
> ITK image type. I wanted to implement a image converter to convert our
> inhouse image format to the itk image format. Our inhouse image format
> store internally the datatype and the dimension of the image, like vtk.
> But when I want to declare an itk image, I have to know before the
> dataype and the dimension. The same thing is when reading a raw image, I
> have to know the dataype and the dimension before.
> 
> It should be possible to read or convert an image without knowing its
> datatype and dimension. Do you have any suggestions how to handle this? 
> 

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com