[vtkusers] vtkImageNotReader??

John Vard jvard at tcd.ie
Fri Nov 14 08:57:37 EST 2003


Thanks for that Glen, but it made no change to the output

On Friday 14 November 2003 13:30, you wrote:
> Hello John,
>
> > elp in explaining this problem... Could it be my vtk version
> >
> > # Read .raw file
> > reader = vtkImageReader2()
> > reader.SetFileName("file.raw")
> > reader.SetDataScalarTypeToUnsignedShort()
> > reader.SetDataByteOrderToLittleEndian()
> > reader.SetDataOrigin(<PosX>,<PosY>,0.0)
> > reader.SetDataSpacing(<PSpacX>,<PSpacY>,1.0)
> > reader.SetDataExtent(0,<Col-1>,0,<Row-1>,0,0)
>
> try calling;
>
> reader.UpdateWholeExtent()
>
> before you call GetOutput().
>
> > data = reader.GetOutput()
> > data.Update()
>
> hth,
> glen

-- 
Regards
John Vard

Trinity Centre for Bioengineering
Mechanical Engineering Dept.
Trinity College
Dublin 2
Ireland

e-mail: jvard at tcd.ie
www.biomechanics.ie




More information about the vtkusers mailing list