Page MenuHomePhabricator

[NaviBSQ] Remove ToFSurfaceVtkMapper3D
Closed, ResolvedPublic

Description

This is a cosmetic bug, however, necessary for smooth kinect integration.

The current version of mitkToFSurfaceVtkMapper3D has the following issues:

  1. Almost the whole class is copied from mitkSurfaceVtkMapper3D, which should be solved either by inheritance or by re-usage of mitkSurfaceVtkMapper3D and not by just copying code.
  2. The mitkToFSurfaceVtkMapper3D enhances the mitkSurfaceVtkMapper3D by a texture mapping and the possibility to show scalar values on the surface. This is a generic feature which could be usefull for users who are not interested in ToF at all. We have to decide whether to move this class to another location or even implement everything in the mitkSurfaceVtkMapper3D.
  3. There are three different ways to map colors on the vertices:

a.Scalars from the vtkScalarToColorTransferFunction
b.Texture from OpenCV
c.Texture from RGB-Image (not implemented in the current master)

a. + b. are spread all over the following classes:
QmitkToFUtil (settings to activate the functions)
mitkToFSurfaceVtkMapper3D (set texture + scalars for the vtkProp)
mitkToFDistanceImageToSurfaceFilter (compute texture coordinates)

> The code is a mess! ;)

Requirements:
-The interface of the new (old) mapper which passes this information to vtk should be kept very simple. The coding effort is very simple in VTK!
-Everything related to this features in QmitkToFUtil and mitkToFDistanceImageToSurfaceFilter should be implemented seperately for the three different ways. I assume b. + c. can be combined, but I'm not sure about the textureScaleCorrection variables used in the mitkToFDistanceImageToSurfaceFilter. I guess they are video-camera dependent and eventually ment for the resolution for Kwongs web-cam?
-The texture coordinates should only be performed once, since any camera does usually not change resolution during.

I can offer to implement this, but I would like to consult Alex if my solution is sufficient for all needs.

Event Timeline

A protype version (really bad code) of rbg texture for kinect can be found here:
personal/kilgus/kinectRBGtexture

This mapper can be removed now. Everything can be done using the property "Surface.Texture". See T13956 for examples.

Cos-medic bug with higher priority.

What is the status of this bug? Please change the target milestone to "AfterNextRelease" if this bug is not relevant or cannot be fixed in time for the 2013-06 release.

This bug could not be fixed for release 2013-06. Setting target milestone to next release

New remote branch pushed: bug-12012-remove-TofSurfaceVtkMapper3d

[91685f]: Merge branch 'bug-12012-remove-TofSurfaceVtkMapper3d'

Merged commits:

2014-01-29 14:27:19 Eric Heim [a309ee]
removed the deprecated mitkToFSurfaceVtkMapper3D class from tof util and using the acrual rendering methods from the core


2014-01-29 14:15:23 Eric Heim [2a6b98]
surface texture is removed from the actor in the mitkSurfaceVtkMapper3D if no texture is present


2014-01-28 18:15:40 Eric Heim [1753bd]
added property for scalarmapping and removed usage of the mapper in MITK ToF