-
Notifications
You must be signed in to change notification settings - Fork 0
Algorithms and ends mapping
This page contains a bit of "in-depth" explanation/illustration
of algorithms in CurveMorph and ends mapping.
Let's start with a bit more straightforward
For two ROIs, it re-samples them with the same number of equidistant
points along the normalized length line. The segment number is equal
to the length of the longer ROI in pixels.
Then it linearly interpolates XY coordinates of each resampled point.
The only thing the algorithms needs to know is ends to ends mapping
or corresponence.
Let's see an example, where "first" and "last" ends of ROIs are "aligned".
This would be the output for any ends mapping settings:
"Closest" or "Always first/last".
But if the ends of one ROI are switched, then for "Always first/last"
the result will look like:
While for the "Closest" it would be the same as in the first picture,
since "first" end of left ROI is the closest to the "last" end of the ROI on the right.
This algorithm resamples ROI in the same manner.
But instead of XY coordinates interpolation, it interpolates angles
between resampled segments. That produces an interpolated shape,
but for a proper morph, one needs to account for the translation
between ROIs. So if we choose "Always first", the translation
will be applied between the coordinates of "first" and "first" ends:
Notice that the interpolated position of the "first" end forms a straight line.
Now, the result of "Always last" will look like this,
where the "last" end will be translated along the line:
And the "Closest" setting will use the mapping between the "first" end of ROI1
and the "last" end of ROI2, since the distance between them is the shortest:
Practically, in my opinion, this mode is helpful
if you analyze something that appears to have a clamped or pinned end
and in 90% of cases, you can safely choose "Closest".
But if the clamped end is not observed, and both ends seem to move
independently, you can activate "Use centroid" option.
In this case, the translation will be calculated via the center of mass.
This is how it will look for the "Closest" option:
For this mode, "Closest" restores the mapping between closest ends.
But if using "Always first/last", we can force "inverse" mapping,
but there would be no difference between "Always first/last" options,
since in this case we do not use ends positions:
Developed in Cell Biology group of Utrecht University.
Check out Updates history. The plugin and this wiki are under constant development.
E-mail for any questions, feedback, errors or suggestion
or tag @ekatrukha at image.sc forum.