[Paraview] Paraview Programmable Source 3D Text

Dr. Roman Grothausmann grothausmann.roman at mh-hannover.de
Tue Jan 6 05:58:33 EST 2015


Dear Cory,


Following Your suggestion, I tried to modify my current plugin to include a new 
representation. However, I'm lost on how to combine the two things together. The 
example at the wiki and the one I found from Utkarsh 
(http://public.kitware.com/pipermail/paraview/2011-July/022296.html) replace the 
Mapper and not the actor. So I'm not sure where to place the 
text-plydata-generation in that case. Can You help me to get going with this? My 
current attempt is attached.

Many thanks for Your help
Roman


PS: I tried to compile Utkarsh's example but it stops because the 
UpdateSuppressor seems to be gone:

/net/home/grothama/vtk/paraview_plugins/Representation/vtkMySpecialRepresentation.cxx:43:53: 
error: ?class vtkMySpecialRepresentation? has no member named ?UpdateSuppressor?

Would vtkMySpecialRepresentation need to be derived from vtkPVUpdateSuppressor?


On 05/01/15 14:57, Cory Quammen wrote:
> Hi Roman,
>
> A representation plugin could probably do this. It would just need to
> set its internal actor to an instance of vtkFollower and set the
> camera from the view's renderer, which could be set by overriding the
> AddToView(vtkView* view) method in your custom representation.
>
> I hope that helps,
> Cory
>
> On Mon, Jan 5, 2015 at 8:24 AM, Dr. Roman Grothausmann
> <grothausmann.roman at mh-hannover.de> wrote:
>> Dear Utkarsh,
>>
>>
>> Needing the same thing as Willi, I've created a paraview plugin written in
>> C++ doing basically the same as Your script. Would it be possible to achieve
>> something like vtkFollower does from within a c++ PV plugin such that the
>> text always faces the camera? An other idea would be to use Python in the
>> animation view to rotate the text as the camera orbits. This would be a
>> workaround only for animations, which would suffice for me. Do You thing
>> that should be possible if nothing else works?
>>
>> Many thanks for looking into this.
>> Roman
>>
>> On 26/09/13 19:52, Utkarsh Ayachit wrote:
>>>
>>> Alas, that's not easy to do, if at all possible, with Python source.
>>>
>>>
>>> On Thu, Sep 26, 2013 at 5:48 AM, Willi Karel <wk at ipf.tuwien.ac.at
>>> <mailto:wk at ipf.tuwien.ac.at>> wrote:
>>>
>>>      Dear Utkarsh,
>>>
>>>      would it be possible to synchronize the transform of the rendered
>>> texts
>>>      to the transform of the camera, such that the planes in which the
>>> texts
>>>      lie stay normal to the viewing direction?
>>>      I'm aware of vtkFollower, but I'm not sure if it is applicable / how
>>> to
>>>      make use of it in the context of ParaView / Programmable Source, as it
>>>      derives from vtkActor.
>>>
>>>      Many thanks!
>>>      Willi.
>>>


-- 
Dr. Roman Grothausmann

Tomographie und Digitale Bildverarbeitung
Tomography and Digital Image Analysis

Institut für Funktionelle und Angewandte Anatomie, OE 4120
Medizinische Hochschule Hannover
Carl-Neuberg-Str. 1
D-30625 Hannover

Tel. +49 511 532-9574
-------------- next part --------------
# This exercise demonstrates a filter plugin.
cmake_minimum_required(VERSION 2.6)
  
FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})

# Use the PLUGIN macro to create a plugin.
ADD_PARAVIEW_PLUGIN(TextGlyphs3D "1.0"
   SERVER_MANAGER_SOURCES TextGlyphs3D.cxx
   SERVER_MANAGER_XML TextGlyphs3D.xml)


ADD_PARAVIEW_PLUGIN(Representation "1.0"
  SERVER_MANAGER_XML Representation.xml
  SERVER_MANAGER_SOURCES
    vtkMySpecialPolyDataMapper.cxx
    vtkMySpecialRepresentation.cxx)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Representation.xml
Type: text/xml
Size: 1454 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150106/b93651e9/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TextGlyphs3D.cxx
Type: text/x-c++src
Size: 3130 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150106/b93651e9/attachment.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TextGlyphs3D.h
Type: text/x-chdr
Size: 879 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150106/b93651e9/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TextGlyphs3D.xml
Type: text/xml
Size: 1007 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150106/b93651e9/attachment-0001.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkMySpecialRepresentation.cxx
Type: text/x-c++src
Size: 2021 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150106/b93651e9/attachment-0001.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkMySpecialRepresentation.h
Type: text/x-chdr
Size: 1288 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150106/b93651e9/attachment-0001.h>


More information about the ParaView mailing list