[vtkusers] Re: Creating a Volume from 2D BMP files.
Sharwari Mavalankar
sharwari at gmail.com
Thu Aug 31 06:37:40 EDT 2006
hi Yixun,
Thanks for your email.I had a couple of more questions though.
1.I do not want to visualize colour slices.They are grey level images.
2.Also if I put SetDataExtent() before the Update() then I am getting an
access violation error.What does the Update function do exactly?
Also can you tell me what the five parameters in SetDataExtent() mean?
3.If I use vtkVolume what mapper should I use to visualize the slices?
Thanks again for all your help.
Sharwari
On 8/23/06, Yixun Liu <yxliu at fudan.edu.cn> wrote:
>
> Hi,
>
> If you want to visualize color slices, you need to
> 1. read these slices. You need to put the SetDataExtent(0, 111, 0, 127, 1,
> 300);
> before Update();
>
> vtkTIFFReader *v16 = vtkTIFFReader::New();
>
> v16->SetFilePrefix("D:\\MyVC\\VTKtest\\Raycasting\\Data\\BrainColor\\brain");
> v16->SetFilePattern("%s%d.TIF");
> v16->SetDataExtent(0, 111, 0, 127, 1, 300);
> v16->SetDataSpacing(1.2,1.2,0.5);
> v16->SetDataOrigin(0.0, 0.0, 0.0);
> v16->SetNumberOfScalarComponents(3);
> v16->Update();
>
> 2. Add the 4th component. The first three components are color and the 4th
> is used to map to opacity. I compute the luminancy according to the firft
> three components and take it as the 4th component.
>
> 3. Opacity map using vtkPiecewiseFunction
>
> 4. no need color map function
>
> 5. you need vtk5.0
>
> Regads,
>
> Yixun Liu
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060831/33dfcad3/attachment.htm>
More information about the vtkusers
mailing list