[vtkusers] Storing pointers to pipeline objects.

Cory Quammen cory.quammen at kitware.com
Tue Apr 17 08:54:06 EDT 2018


> At the moment, I am simply collecting the objects in a struct and storing
> them in a C++ container which is member of the class handling the pipeline.
> I have included below a sample of what I am doing at the moment. Is there a
> better way of doing this?
>
> Thanks,
> Panos
>

That is a perfectly acceptable and typical way to access objects in the
pipeline.

Cory



>
> ===============================================
> class QuadView
> {
> private:
>         struct PipelineObjects2D
>         {
>                 vtkSmartPointer<vtkImageStack> imageStack;
>                 vtkSmartPointer<vtkRenderer> renderer;
>                 vtkSmartPointer<vtkGenericOpenGLRenderWindow>
> renderWindow;
>         };
>
>         struct ImageDataStruct
>         {
>                 vtkSmartPointer<vtkImageData> imageData;
>                 vtkSmartPointer<vtkLookupTable> lookupTable;
>                 std::unordered_map<IQuadViewUI::ViewKey,
> vtkSmartPointer<vtkImageResliceMapper>>
>                         resliceMapperContainer;
>                 std::unordered_map<IQuadViewUI::ViewKey,
> vtkSmartPointer<vtkImageSlice>>
>                         imageSliceContainer;
>         };
>
>         std::map<unsigned long /*image UID*/, ImageDataStruct>
>                 m_ImageDataContainer;
>         std::unordered_map<IQuadViewUI::ViewKey, PipelineObjects2D>
>                 m_PipelineObject2DContainer;
>
> public:
>
>         // more code
> };
>
> ===============================================
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180417/90878baf/attachment.html>


More information about the vtkusers mailing list