Page MenuHomePhabricator

CopyInformation of mitk::Surface missing
Closed, ResolvedPublic

Description

The method CopyInformation() is not implemented in mitk::Surface .

This is necessary for SurfaceToSurfaceFilter to work, as the inputs cannot be grafted into the outputs.

Needs to be done for PathPlanningFilters to proceed.

Related Objects

Event Timeline

added 2 methods:

Graft: copies the content of a given mitk::surface into the current one

GetNumberOfPolyDatas: returns the number of vtkPolyDatas that are stored in the Surface. used by graft()

is needed for many filters that use mitk::surfaces as input, e.g. mitkSurfaceToSurfaceFilter

committed at revision 17543

could somebody have a look at it?

I'm to a specialist of DataStructures and time management, but I believe that you can use GetTimeSteps() to get the number of polydatas stored in the surface (there should be one for each timestep. Correct, Tobias?).

To really graft a surface, you need to copy all of the superclass members too (or better yet, call the Graft method of the superclass). Mostly the geometry comes to my mind here...

Tobias, you understand the surface and geometry code better, could you review it?

Where are the results of the review? what about the grafting of Geometry information?

Review result is that information is copied correctly and method GetNumberOfPolyData is not named correctly. And right, geometry is not considered by now, as BaseData does not copy anything.

Added new methods Graft() and CopyInformation() to mitkSurfaceTest

@ revision 17598

Changed name of method GetNumberOfPolyDatas() to GetSizeOfPolyDataSeries().

VtkPolyData is now copied using DeepCopy() instead of CopyStructure(). CopyStructure did not fully copy the PolyData

@ revision 17599

Used it for couple of weeks and it seems to work fine

->resolved