[Insight-users] Re: How to process image until image is loaded?

Luis Ibanez luis.ibanez at kitware.com
Fri Oct 15 13:14:10 EDT 2004


Hi Wenmin,

This is a very common issue that new
users find when they start with ITK.


Here is the common answer:

   ITK is intended to be used for Medical Applications.

The PixelType used for representing a Medical Image
is a *very critical* aspect of the processing you
perform on an image.

Just to cite two examples:

    You cannot do mamography with 8 bits
    You cannot do CT scans with 8 bits nor with unsiged types.


PixelType makes the difference between detecting a tumor
or not detecting a tumor. That's not a decision that you
should leave at random. It is a decision that requires
careful evaluation of your entire application.

If you are developping an application for processing Medical
Images, you *must* already have in mind a particular Image
Modality (e.g. CT, MRI, PET, Fluoroscopy, UltraSound, DTI...).

If you don't have yet an idea of what image modality you are
going to process... then you have a serious problem for
starting your project... and you should solve that issue
before you start writing code for processing the images.

If, on the other hand, you already defined the image modality
that you are going to use, then you already solved the PixelType
issue becase every Medical Imaging modality has very specific
pixel types associated with it.

---

If what you want to develop is a sort of generic image processing
application, (not Medical) then you can encapsulate the processing
pipeline in a class that is templated over the pixel type.
Then, in the Reading process, you use a switch statement for selecting
the appropriate instantiation of that templated class.




   Please let us konw if you have further questions,


     Thanks


        Luis



------------
?? ? wrote:

> Hi,Luis£¡
>    Sorry to interrupt you again!
> Actually I met a difficult problem that is How to process  image until 
> image is loaded?.In my project I need to process image that the image's 
> data type is unknown until the image is loaded into memory and after my 
> judgement.So problem occurs: the definition of ImageType such as
> typedef itk::Image< PixelType, Dimension >  ImageType
> will need a preKnown data type that is You must define PixelType 
> first.But once you define PixelType,how to realize the aim of processing 
> data according to their real type on runtime?
> (Using template seems a method ,but I failed to pass the compilation 
> always,I'm wondering)
> 
> Meanwhile,often in the example of the ITK doccumentation, PixelType is 
> always defined as
> typedef unsigned short       PixelType seeming to be without the need to 
> consider  reai type of the file in the disk,so how ITK realises the 
> IO?Is it concering with my question above?
> Thank you!
> Regards!
> 
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡pwm at dsp.whu.edu.cn
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2004-10-15
> /*********************************************
> Wenmin Peng
> Signal processing lab of Wuhan univ
> ********************************************/
> 
> _________________________________________________________________
> FREE pop-up blocking with the new MSN Toolbar - get it now! 
> http://toolbar.msn.com/
> 
> 
> 








More information about the Insight-users mailing list