[Insight-users] Help ImageReadWrite program

Gavin Baker gavinb+xtk at cs.mu.OZ.AU
Wed Jun 9 11:49:51 EDT 2004


Hello Yingli,

On Wed, Jun 09, 2004 at 11:14:32AM -0400, yingli fan wrote:

> I try to use the example/IO?ImageReadWrite.cxx , for my understanding , the
> output image should be exactly  same with the input image,
> 
> But the result what I got the output image is a empty image , empty means
> black image, nothing.

The image contents will be the same, as it connects the writer directly to
the reader.  However you can use this program to convert between file
formats, simply by giving a different file extension as the second argument.

First, what type of file did you read, and what format did you save it in?
Second, which program are you using to view the result?

It quite possible that you are trying to display a 16-bit data file, where
the data all lives in the lower end of the spectrum.  Many graphics programs
will not rescale the intensity, so the image may appear black even though
there is non-zero data.

The ImageViewer application (in InsightApplications) can view all supported
formats properly, including handling anisotropic data.

  :: Gavin

-- 
Gavin Baker                                      Complex Systems Group
http://www.cs.mu.oz.au/~gavinb             The University of Melbourne


More information about the Insight-users mailing list