[vtkusers] vtkImageNotReader??

Glen Lehmann glehmann at imaging.robarts.ca
Fri Nov 14 08:30:57 EST 2003


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




More information about the vtkusers mailing list