[vtkusers] HELP -- vtkImageReader2 vtkVolume16Reader and vtk

Janna balling at diego.sci.utah.edu
Thu Jul 10 14:05:52 EDT 2003


Christos-
We have developed an image reader for CT data.  (the codes
makeVolumeReader.tcl and makePointsReader.tcl are attached or you can
get them online).  We are currently working on the fastest, best way to
visualize this data.  We've used vtkVolume16Reader and
vtkStructuredPointsReader.  You're welcome to try either.  Let us know
if you have a better solution.

Janna and Jenny
Sci Institute, University of Utah
balling at sci.utah.edu
http://www.sci.utah.edu/~simpson/documentation/annotation/webdocs/




anast.jm at pg.com wrote:

>
> Christos...also make sure your image data is indeed Short .... you
> indicated it was only 0-255 so it might be unsigned_char...this would
> definitley cause the reader to attempt to read past the end of the
> file....john
>
>
> hi there
>
> this follows a previous post:
> *****
> i am trying the past couple of days to volumize a set of raw data
> files
> containing medical data
> the files represent images of
> size 256x256
> binary (0-255)
> spacing 2.5
> voxel size (x,y) 1.1211
> (the above data comes from an independent header file / raw files ->
> no
> header)
>
> first of all which reader should i use?
> vtkImageReader, vtkImageReader2, vtkBMPReader, ...?
>
> if someone has already some code that does something similar, i would
> appreciate if he/she could share it
> *****
>
> I have attempted to write the module however I there is a problem in
> the
> next block of calls:
>
> vtkImageReader2 *reader1 = vtkImageReader2::New();
>
>  reader1->SetFileDimensionality(2);
>  reader1->SetNumberOfScalarComponents(1);
>  reader1->SetFilePrefix("/home/christos/VIVE02/data/countour1/ABDL
> 15436 one contour"); //filenames are ok
>  reader1->SetFilePattern("%s.l%.2d"); //filenames are ok
>  reader1->SetDataByteOrderToBigEndian();
>
> reader1->SetDataScalarTypeToShort();
>  reader1->SetDataExtent(0,245,0,245,0,93);
>  reader1->SetDataSpacing(1.1211,1.1211,2.5);
>  reader1->SetDataOrigin(120.1, -130.5, -60.5);
>
>
> The error I am getting in the console is:
>
>
> -----------------------------------------------------------------------------------------
>
> _
> _Generic Warning: In
> /home/bellet/rpm/BUILD/VTK/IO/vtkImageReader2.cxx,
> line 668
> File operation failed. row = 140, Read = 492, FilePos = -1
>
>
> Press Enter to continue!
>
> ----------------------------------------------------------------------------------------_
>
> I have oppened the some of the files with a hex editor etc. and they
> seem ok!
>
> _
> _Any help would be really appreciated!
> Also if someone has a module that does the job, I would really be
> greatful if he/she could message me!
>
> thanks
> christos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030710/1c1dd2ec/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makeVolumeReader.tcl
Type: application/x-tcl
Size: 5918 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030710/1c1dd2ec/attachment.tcl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: volumeReader.tcl
Type: application/x-tcl
Size: 8999 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030710/1c1dd2ec/attachment-0001.tcl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makePointsReader.tcl
Type: application/x-tcl
Size: 5389 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030710/1c1dd2ec/attachment-0002.tcl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pointsReader.tcl
Type: application/x-tcl
Size: 6602 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030710/1c1dd2ec/attachment-0003.tcl>


More information about the vtkusers mailing list