[Insight-users] Running ImageReadWrite in VS.Net
Ulrike Rinehart
ulriker at pathwaymri.com
Thu Aug 12 13:42:14 EDT 2004
Renaming the output file, e.g. output.jpg, was the key to getting this to
work. Thanks.
Ulrike
-----Original Message-----
From: Atwood, Robert C [mailto:r.atwood at imperial.ac.uk]
Sent: Thursday, August 12, 2004 9:35 AM
To: Ulrike Rinehart; insight-users at itk.org
Subject: RE: [Insight-users] Running ImageReadWrite in VS.Net
I had a problem like that when first starting with ITK , it was because
my output image file name did not have an extension corresponding to a
supported format. A careful reading of section 7.1, specifically a
paragraph which appears to be about the low level I/O architecture,
reveals this tid-bit. Probably, it should also be mentioned in section
4.1.2. Also this paragraph could be written more like that give below,
judging from the number of times this problem arises on the list.
Robert
*****modified paragraph ****
The ImageFileReader and ImageFileWriter, by default, determine the file
format from the filename extension. The user may instead specify the
data format explicitly, by using the appropriate itk::ImageIO subclass.
Additionally, the artchitecture supports arbitrarily complex processes
to determine whether a file can be read or written.
However I am not sure what the third sentence means, in either context.
Does it mean it can incorporate a *user provided* algorithm for testing
the file? Then it should say so:
*****modified paragraph ****
The ImageFileReader and ImageFileWriter, by default, determine the data
format from the filename extension. The user may instead specify the
data format explicitly, by using the appropriate itk::ImageIO subclass,
or provide any arbitrarily complex algorithm to determine the data
format, as described in chapter ??.
**************original paragraph *******
The IO architecture of the toolkit makes it possible to avoid explicit
specification of the file format used to read or write images.(1) The
object factory mechanism enables the ImageFileReader and ImageFileWriter
to determine (at run-time) with which file format it is working with.
Typically, file formats are chosen based on the filename extension, but
the architecture supports arbitrarily complex processes to determine
whether a file can be read or written. Alternatively, the user can
specify the data file format by explicit instantiation and assignment
the appropriate itk::ImageIO subclass.
*************
-----Original Message-----
From: insight-users-bounces at itk.org
[mailto:insight-users-bounces at itk.org] On Behalf Of Ulrike Rinehart
Sent: 12 August 2004 18:03
To: insight-users at itk.org
Subject: [Insight-users] Running ImageReadWrite in VS.Net
Hi,
I am new to the ITK and tried getting the ImageReadWrite sample to work.
It builds fine in Visual Studio .Net 2003, but throws an exception when
calling writer->Update(). The sample image I am using is a jpg that came
with Windows XP. I am basically running the sample unmodified and have
it write the image back as 'sunset.out'. Would appreciate any
suggestions.
Ulrike
More information about the Insight-users
mailing list