[vtkusers] 8 bit data volume rendering (in 'Medical' Sample)?
Divya Rathore
divyarathore at gmail.com
Mon Apr 20 02:04:30 EDT 2009
Thanks Jerome.
If we look at the sample code (Medical1.cxx):
// The following reader is used to read a series of 2D slices (images)
// that compose the volume. The slice dimensions are set, and the
// pixel spacing. The data Endianness must also be specified. The reader
// usese the FilePrefix in combination with the slice number to construct
// filenames using the format FilePrefix.%d. (In this case the FilePrefix
// is the root name of the file: quarter.)
vtkVolume16Reader *v16 = vtkVolume16Reader::New();
v16->SetDataDimensions (64,64);
v16->SetImageRange (1,93);
v16->SetDataByteOrderToLittleEndian();
v16->SetFilePrefix (argv[1]);
v16->SetDataSpacing (3.2, 3.2, 1.5);
It uses vtkVolume16Reader to read the 16 bit files. I would like to know the
8 bit counterpart of this class. If not, any other class that can read
multiple 8 bit files in a similar manner.
regards,
D Rathore
On Mon, Apr 20, 2009 at 12:55 AM, Jérôme <jerome.velut at gmail.com> wrote:
> Hi,
>
> I used to write short VTK python scripts for processing high number of
> files. In your case, it could be a simple loop on our files that, for each,
> do
> - Read
> - Cast to unsigned char (vtkImageCast -> be careful of type conversion.
> vtkImageShiftScale could be another solution)
> - Write
>
> If I understood your problem...
>
> Best regards,
>
> Jerome
>
> 2009/4/19 Divya Rathore <divyarathore at gmail.com>
>
>> Hi All,
>>
>> I was using Medical sample with Visual C++.
>> It takes 16 bit files in the format xxx.1, xxx.2, xxx.3 etc. All works to
>> taste.
>>
>> The Problem - How can I supply it 8 bit files? I have around 800 files and
>> converting them to 16 bit will double the data size - too huge for my
>> graphics card.
>>
>> regards,
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
--
"The difference between school and life? In school, you're taught a lesson
and then given a test. In life, you're given a test that teaches you a
lesson."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090420/b29813d6/attachment.htm>
More information about the vtkusers
mailing list