[vtkusers] vtkImageReader - SetDataSpacing - What is it doing?
David Gobbi
david.gobbi at gmail.com
Fri Oct 14 18:29:28 EDT 2011
Hi Sean, Bill,
I doubt that there are any physical units used in the volume mapper
(though it would help to know what volume mapper is being used here...
"vtkVolumeMapper" is an abstract class).
My suspicion is that you need to set the SampleDistance of the mapper
to match the voxel spacing. With the ray cast mappers, for instance,
the SampleDistance should be around the minimum pixel dimension... so
around 0.04. The default SampleDistance is 1, which would only sample
every 20th voxel along the view ray.
- David
On Fri, Oct 14, 2011 at 3:14 PM, Sean Larkin
<sean.larkin at lickenbrocktech.com> wrote:
>
>
>
>
> From: Sean Larkin [mailto:sean.larkin at lickenbrocktech.com]
> Sent: Friday, October 14, 2011 4:14 PM
> To: 'Bill Lorensen'
> Subject: RE: [vtkusers] vtkImageReader - SetDataSpacing - What is it doing?
>
>
>
> That’s what I’m thinking as well. I understand that if the pixel spacing is
> larger the opacity may change, which would change the rendered image. But ,
> if I adjust the opacity function I can never get as good an image as with
> larger pixel spacing. Maybe with smaller pixel spacing there are fewer rays
> cast to produce the image?
>
>
>
> From: Bill Lorensen [mailto:bill.lorensen at gmail.com]
> Sent: Friday, October 14, 2011 3:42 PM
> To: Sean Larkin
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] vtkImageReader - SetDataSpacing - What is it doing?
>
>
>
> I suspect that the volume mapper has some settings that are specified in
> physical units.
>
>
> On Friday, October 14, 2011, Sean Larkin <sean.larkin at lickenbrocktech.com>
> wrote:
>> Hello,
>>
>> I’m using vtkImageReader to loading a 3D volume and render it with
>> vtkVolumeMapper. I want to be able to adjust the voxel aspect ratio, so I
>> decided to use the SetDataSpacing() method of vtkImageReader. Is this the
>> best way to do this? I ask this because I can get very different looking
>> rendered images when I use the same aspect ratio, with different values.
>> For example, when I set the spacing to [.043,.043,1] I get poor resolution
>> compared to when I use [1,1,23.3] (these are the same ratios). Does
>> anyone know why this is happening?
>>
>>
>>
>> Thanks,
>>
>> Sean Larkin
>
> _______________________________________________
> 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
>
>
More information about the vtkusers
mailing list