Each mask now has a type, accessible via the maskType() method, identifying which kind of ROI it is intended to be. A class is returned, and the default behavior is to return the concrete class of the object. Geometric mask types set their type to their associated geometric mask interface -- the following types are currently defined: Box, Line, PointMask, Polygon2D, Polyline, RealPointCollection and SuperEllipsoid. (Ellipsoid and Sphere are simply special cases of SuperEllipsoid, with the same equality semantics.)
Each mask type has its own equality semantics. Static utility methods are provided in the associated interfaces for computing hashCode and equals for the built-in geometric mask types. And the implementing class hierarchies now lean on these utility methods rather than recapitulating the logic.
RealPointCollection now has a size() method, for efficient equality testing.
Each mask now has a type, accessible via the
maskType()
method, identifying which kind of ROI it is intended to be. A class is returned, and the default behavior is to return the concrete class of the object. Geometric mask types set their type to their associated geometric mask interface -- the following types are currently defined:Box
,Line
,PointMask
,Polygon2D
,Polyline
,RealPointCollection
andSuperEllipsoid
. (Ellipsoid
andSphere
are simply special cases ofSuperEllipsoid
, with the same equality semantics.)Each mask type has its own equality semantics. Static utility methods are provided in the associated interfaces for computing
hashCode
andequals
for the built-in geometric mask types. And the implementing class hierarchies now lean on these utility methods rather than recapitulating the logic.RealPointCollection
now has asize()
method, for efficient equality testing.