[][src]Struct swc_neuron::SwcNeuron

pub struct SwcNeuron<S: StructureIdentifier, H: Header> {
    pub samples: Vec<SwcSample<S>>,
    pub header: Option<H>,
}

Fields

samples: Vec<SwcSample<S>>header: Option<H>

Implementations

impl<S: StructureIdentifier, H: Header> SwcNeuron<S, H>[src]

pub fn sort_index(self) -> Self[src]

Sort the neuron's samples by their index.

pub fn reindex(self) -> Result<Self, MissingSampleError>[src]

Re-index the neuron's samples in order of occurrence, starting at 1. Returns error if the SWC is missing a parent sample

pub fn sort_topo(self, reindex: bool) -> Result<Self, InconsistentNeuronError>[src]

Re-order its samples in pre-order depth first search. Children are visited in the order of their original sample number.

Returns an error if the neuron is not a self-consistent tree.

pub fn from_reader<R: Read>(reader: R) -> Result<Self, SwcParseError>[src]

pub fn to_writer<W: Write>(&self, writer: &mut W) -> Result<(), Error>[src]

pub fn replace_header(&mut self, header: Option<H>) -> Option<H>[src]

Replace the existing header with a new one, returning the existing.

Trait Implementations

impl<S: Clone + StructureIdentifier, H: Clone + Header> Clone for SwcNeuron<S, H>[src]

impl<S: Debug + StructureIdentifier, H: Debug + Header> Debug for SwcNeuron<S, H>[src]

impl<S: StructureIdentifier, H: Header> FromIterator<SwcSample<S>> for SwcNeuron<S, H>[src]

Auto Trait Implementations

impl<S, H> RefUnwindSafe for SwcNeuron<S, H> where
    H: RefUnwindSafe,
    S: RefUnwindSafe

impl<S, H> Send for SwcNeuron<S, H> where
    H: Send,
    S: Send

impl<S, H> Sync for SwcNeuron<S, H> where
    H: Sync,
    S: Sync

impl<S, H> Unpin for SwcNeuron<S, H> where
    H: Unpin,
    S: Unpin

impl<S, H> UnwindSafe for SwcNeuron<S, H> where
    H: UnwindSafe,
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.