[Insight-users] Re: Reading RAW Files -- reading single slices

Luis Ibanez luis.ibanez@kitware.com
Sat, 22 Mar 2003 20:23:56 -0500


Hi Neha,

The factory mechanism is used by all the filters in ITK.
However the factories are not exposed to the API. They
are used internally by the New() method of each class.

Only in the case of the ImageIO objects the factories
are relatively exposed. Note, by the way, that the
ImageIO objects are not filters per se.

---

ITK filters do not care about the file format of your images,
they are not exposed in any way to the notion of 'file format'.
Not even the ImageFileReader nor ImageFilteWriter are aware
of file formats. Only the ImageIO objects deal with file formats.

Once the ImageIO object loads and image from a file into the
ImageFileReader, your image is managed in memory as an "itk::Image"
object. At that point, it doesn't matter if the image was obtained
from a RAW file, a MetaImage file, an Analyze file, or a Dicom file.

Once the ImageFileReader has obtained your image, you can apply on
it any of the ITK image filters.

Multiple examples on the sequence:

  FILE --> ImageFileReader --> FilterX --> ImageFileWriter --> FILE

are availabe in the directory

   Insight/Examples/Filtering

all of them are covered in the "Filtering" Chapter of the
SoftwareGuide.pdf

     http://www.itk.org/ItkSoftwareGuide.pdf

----

Let me insist once again:

    RAW is not a format, it is insuficient, inconsistent and
    simply dangerous. A RAW file without a header is useless,
    and once you add a header, it is not RAW anymore.

    Please consider any of the multiple file formats that are
    now available in the toolkit. Many of them allow you to
    manage your raw file by adding a text header file so you
    don't have to duplicate your data.



Regards,


    Luis



-------------------------
 > Neha D wrote:
 > Hi Luis,
 >
 > Does all the filters make use of IOFactory Mechanism ? If not and I
 > want to use other filters on my raw images, how can i proceed ?
 >
 > Thanks,
 >
 > Neha