[Insight-users] imageserieswriter

Felix Schwenk felix.schwenk at nme.at
Sat Jun 19 13:38:38 EDT 2004


i'm actually passing a metaimage  file. 
this file is correctly read and displayed by the imageviewer contained
in 
the itkapplications directory so i assume it is set up correct.
the resulting metaimage files i get when writing series of raw files are
also 
displayed correct. it only happens for the other formats. 

felix.

> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
> Sent: Saturday, June 19, 2004 7:13 PM
> To: Felix Schwenk
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] imageserieswriter
> 
> 
> 
> Hi Felix,
> 
> How are you passing your RAW file to ITK ?
> 
> A pure raw file cannot be read using the ImageFileReader.
> You probably have to create a MetaImage header for it.
> 
> Chances are that the shift problems that you observe in
> the output images are simply due to the lack of a correct 
> definition of image origin coordinates in the input image.
> 
> 
> 
> Please let us know,
> 
> 
> 
>     Thanks
> 
> 
> 
>        Luis
> 
> 
> 
> ---------------------
> Felix Schwenk wrote:
> 
> > hi all,
> > when using imageserieswriter to transfer one raw file into 
> a series of 
> > jpg, png or bmp files i get the problem, that the resulting 
> 2d slices 
> > alway display the content, but shifted by picturelength/2 and 
> > picturewidth/2 when writing raw slices everything is ok. 
> any hint what 
> > i'm doing wrong? this is my code:
> > 
> > from InsightToolkit import *
> > 
> > from sys import argv
> > 
> > 
> > reader = itkImageFileReaderUS3_New()
> > writer = itkImageSeriesWriterUS3US2_New()
> > 
> > reader.SetFileName( argv[1] )
> > 
> > writer.SetInput( reader.GetOutput() )
> > 
> > writer.SetSeriesFormat( argv[2] )
> > writer.SetStartIndex( 0 )
> > writer.SetIncrementIndex( 1 )
> > 
> > writer.Update()
> > 
> > 
> > regards,
> > Felix
> > 
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org 
> > http://www.itk.org/mailman/listinfo/insight-users
> > 
> 
> 
> 
> 



More information about the Insight-users mailing list