[vtkusers] vtk *.raw Can't read vtkVolume16Reader ERROR !!!Help!!!!

Felix Schwenk felix.schwenk at nme.at
Tue Aug 30 17:29:28 EDT 2005


Hi Joshua,
i'm not sure, but as far as i know the range is set as the extension, so 
all the raw files have to be named something like:
im.1
im.2
...
im.123

at least this works for me.

but what i find much easier to read raw files is to use the 
metaimagereader 
(http://www.vtk.org/doc/nightly/html/classvtkMetaImageReader.html)

you simply create a .mhd textfile that defines all that stuff.
eg:

NDims = 3
DimSize = 128 128 128
ElementSpacing = 1 1 1
Position = 0 0 0
ElementByteOrderMSB = False
ElementType = MET_USHORT
ElementDataFile = i%d.raw 1 128 1

this would read files with the names:
i1.raw
i2.raw
...

hope that helped.

regards,
felix.


Joshua Thomas wrote:
> Dear All,
> 
> I am using Vtk with TCL. doing an assignment.
> 
> i converted  all the imagefiles with *.dc into *.raw using windows wildcard. 
> E.g C:\>temp> dicom2 --to=temp -r *
> 
> Currently the files are in (im001,im002 .....im123) with no
> extensions. I am i using the correct way to call the files in the temp
> folder by using "im" ?
> 
> Now i am using  vtkVolume16Reader  to map the data
> 
> vtkVolume16Reader v16
>   v16 SetDataDimensions 512 512
>   v16 SetDataByteOrderToLittleEndian 
>   v16 SetFilePrefix  "$VTK_DATA_ROOT/Data/temp/im"
>   v16 SetImageRange 1 123
>   v16 SetDataSpacing  20 20 10
> 
> The error i am facing right now is 
> ERROR:
> vtkVolume16Reader Can't find file
> ERROR:
> vtkPolyDataNormals.....no data to generate.
> 
> I changed the dataspacing into 20 20 10 and the image size is 512 x 512 x123
> 
> I am trying for one week to figure it out. i really need someones help
> 
> Regards
> JJ
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list