[vtkusers] Add ID to vtkImageActor
Mathieu Coursolle
mcoursolle at rogue-research.com
Fri Mar 6 11:11:40 EST 2009
Hi,
If I understand correctly, you are trying to easily retrieve a
vtkActor instance based on some key.
I usually use a map where the key is a unique ID, and the value the
actual vtkActor.
That way I can retrieve quickly the actor associated with a key.
However, this has the inconvenient
of maintaining that map to make sure you remove actors which are
deleted, and add newly created
actors.
Hope this helps,
Mathieu
____________________
Mathieu Coursolle, M.Ing.
Rogue Research Inc.
www.rogue-research.com
On 6-Mar-09, at 11:02 AM, John Eke wrote:
> What I am trying to do is add a string Id as a private member to a
> vtkImageActor. I have a scenario where I am inserting multiple
> vtkImageActors into a renderer... and I want to selectively enable
> and disable them. The only way I can forsee doing that is if each
> image actor had an ID. That way I can iterate through the actors,
> find the one with the ID I am looking for, then enable it.
>
> Is there a better way to do this? If not how can I add the ID field
> to an image actor?
>
> I hope this clears things up
>
> - John
>
> Mathieu Malaterre wrote:
>>
>> On Fri, Mar 6, 2009 at 4:39 PM, John Eke <johne at annidis.com> wrote:
>>
>>> Hi Guys,
>>>
>>> Whats the easiest way to get a vtkImageActor with an ID field? I
>>> tried
>>> inheritance, didn't work (maybe I didn't do it right). I tried
>>> creating a
>>> replica of vtkImageActor, and renaming it to something else. But
>>> with this,
>>> the New() method returns NULL
>>>
>> I did not quite followed what you are trying to do, but you
>> understand
>> that vtkImageActor::New() returns a vtkOpenGLImageActor ?
>>
>> 2cts
>>
>
> --
> INFORMAL COMMUNICATION - The statements within this email and
> attachments if any, may be founded on partial knowledge, incorrect
> information, or incomplete understanding of the issues and should
> not be accorded the probity or status of a formal evidentiary
> deposition.
>
>
>
> CONFIDENTIALITY STATEMENT - This e-mail and attachments if any, may
> contain confidential or privileged information. If you are not the
> intended recipient, please delete it, notify me immediately by reply
> e-mail, and be advised that you are not permitted to read, use,
> disclose, copy, or distribute it or its contents.
> _______________________________________________
> 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/20090306/d8f11bbe/attachment.htm>
More information about the vtkusers
mailing list