[vtkusers] Build depth map of a 3D model
Wenlong Wang
scc.wwl at gmail.com
Mon May 7 09:59:58 EDT 2012
Hi, Jana
Thank you for your suggestion. I tried vtkWindowToImageFilter and
SetInputBufferTypeToZBuffer(), but the application returns an error says
"ERROR: In ..\..\VTK\IO\vtkBMPWriter.cxx, line 109
vtkBMPWriter (00C53A10): BMPWriter only accepts unsigned char scalars!"
I then changed the image writer to vtkJPEGWriter, but it pops similar error
says the writer only accepts unsigned char input.
I have no idea how z buffer works in vtk. Can you help me?
Thank you very much. I greatly appreciate your help.
Best wishes
Wenlong
2012/5/7 Jana Sefcikova <neollie at gmail.com>
> Hello,
> I would try use vtkWindowToImageFilter to make screenshot of depth map.
> Here is an example
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/Screenshot
>
> Instead of
> # windowToImageFilter->SetInputBufferTypeToRGBA();
> try
> # windowToImageFilter->SetInputBufferTypeToZBuffer();
>
> I am new in vtk, this is only idea.
>
> J.
>
>
> On 7 May 2012 14:45, Wenlong <scc.wwl at gmail.com> wrote:
>
>> Hi, Jana,
>>
>> Thank you for your reply.
>>
>> No, I don't want to color my input model. I only need the depth
>> information
>> visualized. The intensity of a pixel varies as the depth changes at
>> corresponding point on my model surface. Thus the pixel will become darker
>> or brighter.
>>
>> To have an idea of how it looks like, you can google it.
>>
>> Best wishes
>> Wenlong
>>
>> --
>> View this message in context:
>> http://vtk.1045678.n5.nabble.com/Build-depth-map-of-a-3D-model-tp5689116p5690963.html
>>
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>> _______________________________________________
>> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120507/c211abb2/attachment.htm>
More information about the vtkusers
mailing list