[Insight-developers] Raw image IO factory?

Miller, James V (Research) millerjv@crd.ge.com
Fri, 31 Jan 2003 14:09:25 -0500


Luis,

Using the meta image format as an output factory worked 
for me.  So I'll use that.

What extension should I use?  It seems to respond to both
"mha" and "mhd".

Jim



> -----Original Message-----
> From: Miller, James V (Research) 
> Sent: Friday, January 31, 2003 2:03 PM
> To: 'Luis Ibanez'
> Cc: Insight-developers (E-mail)
> Subject: RE: [Insight-developers] Raw image IO factory?
> 
> 
> I guess what I what is to be able to write 
> out a raw image using a factory.  I want a command
> line program that does
> 
> ./MyProgram input.png output.raw
> 
> and have it write out a raw image.  And if I do
> 
> ./MyProgram input.png output.png
> 
> it would write a png file.
> 
> I agree that you loose the spacing and size, etc. But I am 
> trying to do a quick and dirty integration of an ITK algorithm
> to a legacy system and want to just rig up an IPC process.  So
> my existing app tells my ITK app to run on a particular input
> file and output a particular output file which it will then 
> read (since they app already knows the size and spacing, it can 
> just do a bulk read).
> 
> Can I use the Meta image as an output factory?  If so, that will
> do what I want.
> 
> 
> 
> 
> > -----Original Message-----
> > From: Luis Ibanez [mailto:luis.ibanez@kitware.com]
> > Sent: Friday, January 31, 2003 1:53 PM
> > To: Miller, James V (Research)
> > Cc: Insight-developers (E-mail)
> > Subject: Re: [Insight-developers] Raw image IO factory?
> > 
> > 
> > Hi Jim,
> > 
> > The problem with Raw is that even if we set a factory
> > that figures out the correct ImageIO from the file
> > extension, there is no easy way to arrange for the
> > additional image information to be passed to the
> > ImageIO.
> > 
> > In the current mode for raw, the user has to instantiate
> > the RawImageIO object, pass the spacing, size and origin
> > of the image, and then trigger the execution of the reader.
> > 
> > I personaly think that being so easy to create a MetaImage
> > header or a VTK header for a raw file, we should rather
> > encourage users to use those mechanism as a way of 'wrapping'
> > a raw file.
> > 
> > At the end of the day, a 'raw' image is an incomplete
> > file and there is no way to figure out the content
> > without the additional information.
> > 
> > 
> > 
> >    Luis
> > 
> > 
> > -----------------------------------------
> > 
> > Miller, James V (Research) wrote:
> > 
> > > Should there be a raw image IO factory for raw images?
> > > 
> > >  
> > > 
> > > There is no RawImageIOFactory in the system.  Currently the 
> > RawImageIO 
> > > object says it can write a file as long as there is a 
> > filename.  So I 
> > > imagine this is why there is not a corresponding 
> RawImageIOFactory 
> > > (since it would respond yes to everything). 
> > > 
> > >  
> > > 
> > > But when running in factory mode, could a RawImageIOFactory 
> > respond to 
> > > being able to read/write files if the extension is ".raw"?
> > > 
> > >  
> > > 
> > >  
> > > 
> > > *Jim Miller*
> > > */_____________________________________/*
> > > /Visualization & Computer Vision//
> > > /GE Research/
> > > /Bldg. KW, Room C218B/
> > > /P.O. Box 8, Schenectady NY 12301/
> > > 
> > > //_millerjv@research.ge.com <mailto:millerjv@research.ge.com>_/
> > > 
> > > /_james.miller@research.ge.com_/
> > > /(518) 387-4005, Dial Comm: 8*833-4005, /
> > > /Cell: (518) 505-7065, Fax: (518) 387-6981/
> > > 
> > >  
> > > 
> > >  
> > > 
> > 
> > 
> > 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
>