rvlib

Trait InstanceAnnotate

source
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§

source

fn is_contained_in_image(&self, shape: ShapeI) -> bool

source

fn contains<P>(&self, point: P) -> bool
where P: Into<PtF>,

source

fn dist_to_boundary(&self, p: PtF) -> TPtF

source

fn rot90_with_image_ntimes(self, shape: &ShapeI, n: u8) -> RvResult<Self>

source

fn enclosing_bb(&self) -> BbF

source

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

source§

fn dist_to_boundary(&self, p: PtF) -> TPtF

Returns the distance to the boundary of the mask

Arguments: p: in image coordinates

source§

fn is_contained_in_image(&self, shape: ShapeI) -> bool

source§

fn contains<P>(&self, point: P) -> bool
where P: Into<PtF>,

source§

fn enclosing_bb(&self) -> BbF

source§

fn rot90_with_image_ntimes(self, shape: &ShapeI, n: u8) -> RvResult<Self>

source§

fn to_cocoseg( &self, shape_im: ShapeI, _is_export_absolute: bool, ) -> RvResult<Option<CocoSegmentation>>

Implementors§