Dear Mitk users,

I am still developping my application using Mitk as a library.

I have a new issue: I use a custom class of data, containing a 3D point set and a surface. The surface is a cylinder around the 3D points. I created a new class, inheriting form mitk::Surface. At the beginning, only the surface was displayed in the multiwidget, I assume because the SurfaceVtkMapper is used. I started writing a custom mapper for my custom data, but the 3D points are still not displayed.

My mapper class inherits mitk::SurfaceVtkMapper2D, and has a mitk::PointSetVtkMapper2D as a protected member.

Its header is as follows:

class NerveDataVtkMapper2D : public mitk::SurfaceVtkMapper2D
        {
        public:
            mitkClassMacro(NerveDataVtkMapper2D, mitk::SurfaceVtkMapper2D)
            itkFactorylessNewMacro(Self)
            itkCloneMacro(Self)

            /// \brief Constructor.
            NerveDataVtkMapper2D();
            ~NerveDataVtkMapper2D();

            virtual const NerveData *GetInput() const;

            virtual vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) override;

            static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer = NULL, bool overwrite = false);

            virtual void Update(mitk::BaseRenderer *renderer) override;

            virtual void SetDataNode(mitk::DataNode* dataNode) override;

        protected:
            mitk::PointSetVtkMapper2D::Pointer _pointSetMapper;
        };

and the Update function is:
void NerveDataVtkMapper2D::Update(mitk::BaseRenderer * renderer)
{
    // Update control points
    _pointSetMapper->Update(renderer);

    // Update Surface
    mitk::SurfaceVtkMapper2D::Update(renderer);
}

When I try to display the data, only the surface is displayed.
Do you have any idea of what I am missing? I will happily provide more information about my code if necessary.

--
Daphné Wallach
Ingénieur de recherche
http://www.hrv-simulation.com


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to