[vtkusers] help please about vtkVolume16Reader
Sandarak
sandarak at wp.pl
Sat Apr 16 15:10:26 EDT 2005
Hi
You should pass a prefix of the files that compose a volume
to the SetFilePrefix() method, not a filename.
If you have let's say, five slices, they may look like:
quarter.1
quarter.2
quarter.3
quarter.4
quarter.5
and you pass:
SetFilePrefix( "C:\Data\quarter" )
assuming that files are in the Data directory on drive C:\
For details look at medical3.cxx example in VTK examples
Of course you can name your prefix as you like, but the ".1", ".2",...
extensions are important.
Michal
> hi,
> I am using Visual C++ &VTK on Windows platform to realize volume
> rendering. but when I use the following code to read volume
> data(*.raw,eg, a file named CTCalf178_212_100.RAW).It said that the
> code followed is used to read a series of 2D slices (images) that
> compose the volume, not used to read 3D volume data, is that riht?
> vtkVolume16Reader *v16 = vtkVolume16Reader::New();
v16->>SetDataDimensions(64,64);
v16->>SetDataByteOrderToLittleEndian();
v16->>SetFilePrefix ("CTCalf178_212_100.RAW");
v16->>SetImageRange(1, 1);
v16->>SetDataSpacing (3.2, 3.2, 1.5);
> the code is linked correctly, but when I run it, there are something wrong,like this:
> ERROR: In C:\martink\vtk42\VTK\IO\vtkVolume16Reader.cxx, line 269
> vtkVolume16Reader (0x013AD3B0): Can't open file: CTCalf178_212_100.RAW.1
> why? And could you tell me how to read volume data just like the file CTCalf178_212_100.RAW?
> VeelionChong
> ÓëÊÀ½ç¸÷µØµÄÁª»úµÄÅóÓѽøÐн»Á÷£¬Á¢¼´ÏÂÔØÃâ·ÑµÄ MSN Messenger
More information about the vtkusers
mailing list