imagej / ImageJ

Public domain software for processing and analyzing scientific images
http://imagej.org
Other
578 stars 227 forks source link

Add support for Rotated Rectangles to Plot Profile #179

Closed DrNjitram closed 2 years ago

DrNjitram commented 2 years ago

Add support for Rotated rectangles to plot profile by effectively doing a line profile over the space, utilizing Line.PointIterators to discretize the space.

It has some quirks at small angles but otherwise works like expected.

I posted an example to twitter.

The logic to detect the RotatedRectangle could be cleaner by checking a type, but I am unsure if that can be implemented without breaking backward compatibility.

rasband commented 2 years ago

Support for profile plotting of rotated rectangles is in the ImageJ 1.53u43 daily build. The commit is at https://github.com/imagej/ImageJ/commit/870c9f017028f90ce1280a94d5a02c0ced542533