Merge scalars of two models

Hi,
can I have a question? I have merged two models by extension CMFreg. One of them has Scalars (Unipolar, Bipolar, LAT) and the second is a model from CT (SegmentEditor). I want (maybe need) to move Scalars from one model to the other. The first model is .vtk. Is there some opinion haw to make that?
Thank you so much for your answer and wish you nice days.
Honza

You can import this models and then use the module merge models.

If you want to keep the models separate and just copy the scalar data then you can achieve it by following these steps:

  • install ModelToModelDistance extension and use Model to model distance module to compute vector that moves points of one surface to the other (based on closest point of one surface on the other) - result will be stored in PointToPointVector point array of the output mesh
  • use vtkWarpVector filter with PointToPointVector to warp the model to match the surface of the other model
  • use vtkProbeFilter to get scalar values for each point
  • copy over the point data to the original (unwarped) mesh

The first step is running the module, the other steps are running a VTK filter (few lines of Python code each). See examples of running VTK filters on model nodes in the script repository.

Hello,
the method with the merge model was not able to convert the scalars. Method by Andras I was able to perform the first steps, but these:

use vtkWarpVector filter with PointToPointVector to warp the model to match the surface of the other model
use vtkProbeFilter to get scalar values for each point
copy over the point data to the original (unwarped) mesh

would I need to elaborate perhaps in more detail?
thank you for answer