de.unihalle.informatik.MiToBo.core.datatypes.neurites
Class MTBNeurite2DProfileSet

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDData
      extended by de.unihalle.informatik.MiToBo.core.datatypes.neurites.MTBNeurite2DProfileSet

public class MTBNeurite2DProfileSet
extends de.unihalle.informatik.Alida.operator.ALDData

A set of neurite profiles organized as linked list. Each profile is of type MTBNeuriteProfile.

Author:
Danny Misiak
See Also:
MTBNeurite2DProfile

Constructor Summary
MTBNeurite2DProfileSet()
          Constructor to create a new set of neurite profiles.
 
Method Summary
 void add(MTBNeurite2DProfile profile)
          Appends the specified element to the end of this list.
 void addElementAt(int index, MTBNeurite2DProfile profile)
          Inserts the specified element at the specified position in this list.
 void addFirst(MTBNeurite2DProfile profile)
          Inserts the specified element at the beginning of this list.
 void addLast(MTBNeurite2DProfile profile)
          Appends the specified element to the end of this list.
 MTBNeurite2DProfile getElementAt(int index)
          Returns the element at the specified position in this list.
 MTBNeurite2DProfile getFirst()
          Returns the first element in this list.
 MTBNeurite2DProfile getLast()
          Returns the last element in this list.
 MTBImage getVoronoiStack()
          Get stack of voronoi tesselation images.
 boolean isEmpty()
          Returns true if this collection contains no elements.
 MTBNeurite2DProfile removeElementAt(int index)
          Removes the element at the specified position in this list.
 MTBNeurite2DProfile removeFirst()
          Removes and returns the first element from this list.
 MTBNeurite2DProfile removeLast()
          Removes and returns the last element from this list.
 boolean saveProfileSet(String file)
          Saves the given profile data list with N profiles to the given file.
 void setElementAt(int index, MTBNeurite2DProfile profile)
          Replaces the element at the specified position in this list with the specified element.
 int size()
          Returns the number of elements in this list.
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDData
cloneProperties, getLocation, getProperty, getPropertyKeys, print, setLocation, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MTBNeurite2DProfileSet

public MTBNeurite2DProfileSet()
Constructor to create a new set of neurite profiles.

Method Detail

add

public void add(MTBNeurite2DProfile profile)
Appends the specified element to the end of this list.

Parameters:
profile - new profile to add

addElementAt

public void addElementAt(int index,
                         MTBNeurite2DProfile profile)
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

Parameters:
index - index for the new element
profile - new profile to set at the specified index

addFirst

public void addFirst(MTBNeurite2DProfile profile)
Inserts the specified element at the beginning of this list.

Parameters:
profile - profile to add at first position

addLast

public void addLast(MTBNeurite2DProfile profile)
Appends the specified element to the end of this list.

Parameters:
profile - to add at last position

getElementAt

public MTBNeurite2DProfile getElementAt(int index)
Returns the element at the specified position in this list.

Parameters:
index - index of the element to get
Returns:
Element at specified index.

setElementAt

public void setElementAt(int index,
                         MTBNeurite2DProfile profile)
Replaces the element at the specified position in this list with the specified element.

Parameters:
index - position to set the profile
profile - profile to set

getFirst

public MTBNeurite2DProfile getFirst()
Returns the first element in this list.

Returns:
First element of the list.

getLast

public MTBNeurite2DProfile getLast()
Returns the last element in this list.

Returns:
Last element of the list

isEmpty

public boolean isEmpty()
Returns true if this collection contains no elements.

Returns:
True if list is empty.

removeElementAt

public MTBNeurite2DProfile removeElementAt(int index)
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.

Parameters:
index - index of the element to remove
Returns:
Element at specified index.

removeFirst

public MTBNeurite2DProfile removeFirst()
Removes and returns the first element from this list.

Returns:
Removed first element.

removeLast

public MTBNeurite2DProfile removeLast()
Removes and returns the last element from this list.

Returns:
Removed last element.

size

public int size()
Returns the number of elements in this list.

Returns:
Number of elements.

saveProfileSet

public boolean saveProfileSet(String file)
Saves the given profile data list with N profiles to the given file.

Each profile is written to a single column. Each column will have a different number of entries according to the different lengths of the profiles.

File format: \t\t...\t ... \t\t...\t

Parameters:
profs - List of neurite profiles.
file - Output file (txt format).
Returns:
True if saving is successful.

getVoronoiStack

public MTBImage getVoronoiStack()
Get stack of voronoi tesselation images. Each voronoi tesselation of a neurite is saved in the stack.

Returns:
Voronoi tesselations for each neurite of the current profile set.


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.