[vtkusers] coordinate of vtkImagereader
zhangzhijun
zjzhang at ee.cuhk.edu.hk
Sat Dec 29 23:19:20 EST 2001
Dear all:
After I read a volume data using vtkImagereader then I use a
vtkImageviewer to
show it in a window. I see from the image content that my image beginning is
displayed
in the left top corner, but the data origin point
(-511*0.653595/2,-511*0.653595/2, -54)
seems in the lower left point. I don't know whether this is the conventiion
in the vtkimagereader.
Can anyone tell me the coordinate definition in the imagreader.
reader->SetDataExtent(0,511,0,511,1,28);
reader->SetDataSpacing(0.653595,0.653595,4.0);
reader->SetDataOrigin(-511*0.653595/2,-511*0.653595/2, -54);
// reader->SetFilePrefix("c:/vtk/vtk32/vtksrc/vtkdata/fullHead/headsq");
reader->SetFilePrefix("D:/regdata/patient_001/ct/image_m/ct");
reader->SetDataScalarTypeToShort();
More information about the vtkusers
mailing list