Struct rvlib::tools_data::annotations::BboxAnnotations
source · pub struct BboxAnnotations {
pub show_labels: bool,
/* private fields */
}Fields§
§show_labels: boolImplementations§
source§impl BboxAnnotations
impl BboxAnnotations
pub const fn new() -> Self
pub fn to_data(self) -> (Vec<GeoFig>, Vec<usize>)
pub fn extend<IG, IC>(&mut self, geos: IG, cat_ids: IC, shape_image: Shape)where IG: Iterator<Item = GeoFig>, IC: Iterator<Item = usize>,
pub fn from_bbs_cats(geos: Vec<GeoFig>, cat_ids: Vec<usize>) -> BboxAnnotations
pub fn from_bbs(bbs: Vec<BB>, cat_id: usize) -> BboxAnnotations
pub fn reduce_cat_idxs(&mut self, cat_idx: usize)
pub fn remove(&mut self, box_idx: usize) -> GeoFig
pub fn remove_multiple(&mut self, indices: &[usize])
pub fn remove_selected(&mut self)
pub fn shift( &mut self, x_shift: i32, y_shift: i32, shape_orig: Shape, split_mode: SplitMode )
pub fn shift_min_bbs( &mut self, x_shift: i32, y_shift: i32, shape_orig: Shape, split_mode: SplitMode )
pub fn shift_max_bbs( &mut self, x_shift: i32, y_shift: i32, shape_orig: Shape, split_mode: SplitMode )
pub fn add_geo(&mut self, geo: GeoFig, cat_idx: usize)
pub fn add_bb(&mut self, bb: BB, cat_idx: usize)
pub fn cat_idxs(&self) -> &Vec<usize>
pub fn geos(&self) -> &Vec<GeoFig>
pub fn deselect(&mut self, box_idx: usize)
pub fn deselect_all(&mut self)
pub fn toggle_selection(&mut self, box_idx: usize)
pub fn select(&mut self, box_idx: usize)
pub fn select_multi(&mut self, box_idxs: impl Iterator<Item = usize>)
pub fn select_all(&mut self)
pub fn select_last_n(&mut self, n: usize)
pub fn selected_bbs(&self) -> &Vec<bool>
pub fn selected_follow_movement( &mut self, mpo_from: PtF, mpo_to: PtF, orig_shape: Shape, split_mode: SplitMode ) -> bool
pub fn label_selected(&mut self, cat_id: usize)
pub fn clear(&mut self)
Trait Implementations§
source§impl Clone for BboxAnnotations
impl Clone for BboxAnnotations
source§fn clone(&self) -> BboxAnnotations
fn clone(&self) -> BboxAnnotations
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for BboxAnnotations
impl Debug for BboxAnnotations
source§impl Default for BboxAnnotations
impl Default for BboxAnnotations
source§fn default() -> BboxAnnotations
fn default() -> BboxAnnotations
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for BboxAnnotations
impl<'de> Deserialize<'de> for BboxAnnotations
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for BboxAnnotations
impl PartialEq for BboxAnnotations
source§fn eq(&self, other: &BboxAnnotations) -> bool
fn eq(&self, other: &BboxAnnotations) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for BboxAnnotations
impl Serialize for BboxAnnotations
impl Eq for BboxAnnotations
impl StructuralEq for BboxAnnotations
impl StructuralPartialEq for BboxAnnotations
Auto Trait Implementations§
impl RefUnwindSafe for BboxAnnotations
impl Send for BboxAnnotations
impl Sync for BboxAnnotations
impl Unpin for BboxAnnotations
impl UnwindSafe for BboxAnnotations
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst>,
Approximate the subject with the default scheme.
source§fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,
Approximate the subject with a specific scheme.
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
source§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere Self: Sized + Into<Dst>,
Convert the subject to a given type.
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.