Hi Daphné, just to be sure, you want to create a 2D renderer, so show slices of the surface and whichever points happen to be close to the slice in the 2D render windows?
You are handing through the relevant parts of your input (slice or pointset respectively) to each mapper? As far as I recall you would have to create a point set data nodes and set it via SetDataNode for the point set mapper to be able to access it via GetInput? Have you set a breakpoint inside both GenerateDataForRenderer to check whether they are called? Best, Caspar -----Ursprüngliche Nachricht----- Von: Daphné Wallach [mailto:daphne.wall...@hrv-simulation.com] Gesendet: Donnerstag, 21. September 2017 18:02 An: mitk-users@lists.sourceforge.net Betreff: [mitk-users] Display of a custom class inheriting from mitk::BaseData 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 ------------------------------------------------------------------------------ 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