pub trait InstanceAnnotate:
Clone
+ Default
+ Debug
+ PartialEq
+ Serialize
+ DeserializeOwned {
// Required methods
fn is_contained_in_image(&self, shape: ShapeI) -> bool;
fn contains<P>(&self, point: P) -> bool
where P: Into<PtF>;
fn dist_to_boundary(&self, p: PtF) -> TPtF;
fn rot90_with_image_ntimes(self, shape: &ShapeI, n: u8) -> RvResult<Self>;
fn enclosing_bb(&self) -> BbF;
fn to_cocoseg(
&self,
shape_im: ShapeI,
is_export_absolute: bool,
) -> RvResult<Option<CocoSegmentation>>;
}Required Methods§
fn is_contained_in_image(&self, shape: ShapeI) -> bool
fn contains<P>(&self, point: P) -> bool
fn dist_to_boundary(&self, p: PtF) -> TPtF
fn rot90_with_image_ntimes(self, shape: &ShapeI, n: u8) -> RvResult<Self>
fn enclosing_bb(&self) -> BbF
fn to_cocoseg( &self, shape_im: ShapeI, is_export_absolute: bool, ) -> RvResult<Option<CocoSegmentation>>
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl InstanceAnnotate for Canvas
impl InstanceAnnotate for Canvas
source§fn dist_to_boundary(&self, p: PtF) -> TPtF
fn dist_to_boundary(&self, p: PtF) -> TPtF
Returns the distance to the boundary of the mask
Arguments: p: in image coordinates