[Paraview] Paraview Programmable Source 3D Text
Cory Quammen
cory.quammen at kitware.com
Tue Jan 6 22:17:32 EST 2015
Roman,
I think there's a fundamental problem with the approach we've
discussed so far. vtkFollower won't work with the text glyph approach
you are proposing. The problem is that you need to rotate each of the
text glyphs independently to face the camera plane. If you generate a
set of 3D glyphs at each point, using a vtkFollower in the
representation will reorient the entire set of glyphs and not each
glyph independently. Does that make sense?
You might want to take a look at vtkDataLabelRepresentation in
ParaView. It draws cell ID and point ID labels oriented with the
camera plane.
Hope that helps,
Cory
On Tue, Jan 6, 2015 at 5:58 AM, Dr. Roman Grothausmann
<grothausmann.roman at mh-hannover.de> wrote:
> 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
--
Cory Quammen
R&D Engineer
Kitware, Inc.
More information about the ParaView
mailing list