public class Waves
extends java.util.Vector
implements java.io.Serializable
Constructor and Description |
---|
Waves()
The default constructor
|
Waves(double[][] matrix)
This loads a matrix were the first array is the columns that represent each Wave and the rows
represent the timepoints.
|
Waves(ImagePlus imp,
Roi[] rois)
A utility constructor to build a set of Waves from a time-series image and the Rois on it.
|
Waves(ImagePlus imp,
Rois rois)
A utility constructor to build a set of Waves from a time-series image and the Rois on it.
|
Waves(java.lang.String filename)
A constructor that immediately calls the load function with filename passed as argument.
|
Waves(Wave[] waves)
Constructs a Waves object from an array of Wave objects.
|
Modifier and Type | Method and Description |
---|---|
void |
__delitem__(int i) |
int |
__len__() |
void |
__setitem__(int i,
Wave wave) |
void |
addWave(Wave wave)
Adds the Wave to the end of the collection.
|
void |
addWaves(Waves waves)
Adds each Wave from the Waves to the current collection in the order they appear in the argument's collection.
|
boolean |
areEpisodic()
Returns true if ALL the Waves in this instance are EpisodicWaves
|
Wave |
averageWaves()
Returns a Wave named 'WaveAvg' by averaging each of the Waves at each sampling point.
|
Waves |
clone()
Returns a deep-copy of this Waves' instance.
|
void |
convolve(Wave firWave)
Convolves each Wave in this instance with the Wave passed as argument.
|
void |
differentiate()
Differentiates each Wave in this instance.
|
void |
exponentialFit()
Scales each Wave in this instance with respect to its own pattern by an exponential fit.
|
Waves |
filterOut(Waves waves2)
This instance of Waves should be the list of candidates to eliminate if they appear in waves2.
|
protected int |
findNextWave(java.util.ArrayList corrTimes,
java.util.ArrayList corrValues) |
Wave |
get(int index)
A convenience method for calling getWave.
|
Wave[] |
getArray()
Returns this collection of Waves as an array.
|
Waves |
getCleanZscoredWaves()
Replaces the current instances of Waves with the clean zscored waves.
|
Waves |
getClusteredWaves(ViewFrame viewFrame)
Returns the Waves associated with the front ClusterFramePlugIn's selected cluster.
|
java.lang.String |
getFormattedString(java.lang.String prefix,
int decimalPlaces,
boolean withTimes)
Returns the Waves as a String in a tabular layout where each column is a Wave's data contents.
|
double |
getMaxValue()
Gets the maximum value across all the Waves in this instance.
|
double |
getMinValue()
Gets the minimum value across all the Waves in this instance.
|
java.lang.String[] |
getNames() |
Roi[] |
getRois()
Returns an array of Rois associated with each of the Waves in this instance.
|
static Waves |
getRoiWaves(ImagePlus imp)
Creates a new set of Waves from the selected ROIs in the RoiManager and the ImagePlus passed as argument.
|
static Waves |
getRoiWaves(ImagePlus imp,
Roi[] rois,
boolean trackThrough)
Creates a new set of Waves from Roi passed as argument the ImagePlus passed as argument by forwardly traversing through the next related Rois.
|
static Waves |
getRoiWaves(ImagePlus imp,
Rois rois,
boolean trackThrough) |
Waves |
getScrambledWaves() |
Waves |
getTruncatedZscoredWaves()
Replaces the current instances of Waves with the truncated zscored waves.
|
Wave |
getWave(int index)
Returns the Wave at the given index in the collection.
|
Wave |
getWave(java.lang.String waveName) |
Waves |
getWaveRanges(double startTime_s,
double endTime_s)
Returns a new Waves object where each Wave encompasses the range of startTime_s up to endTime_s of the original Wave.
|
Waves |
getWavesByName(java.io.File file) |
Waves |
getWavesWithLengthAtLeast(int length) |
void |
integrate()
Integrates each Wave in this instance.
|
Waves |
intersection(Waves waves2)
Returns only the waves that are in both this instance's Waves and waves2 where the return Waves are
from this list.
|
void |
invert() |
void |
linearFit()
Scales each Wave in this instance with respect to its own pattern by a linear fit.
|
void |
load(java.lang.String filename)
Loads either .txt, .zip, or individual .wave files into the current collection.
|
void |
normalize()
Normalizes each Wave in this instance with respect to itself on the range [0,1].
|
void |
normalize(double lowerBound,
double upperBound)
Normalizes each Wave in this instance with respect to itself on the range given by arguments.
|
ChartPlugIn |
plot2D() |
ChartPlugIn |
plot2D(boolean overlay) |
ChartPlugIn |
plot3D() |
ChartPlugIn |
plot3D(double lowerZBound,
double upperZBound) |
Wave |
pop()
Removes the last Wave from this Waves instance and returns it.
|
void |
reverse() |
void |
save(java.lang.String filename) |
void |
shuffle() |
Waves |
sort() |
Waves |
sort(boolean byZeroLagCorrelation)
Crosscorrelates each Wave with the average of all the Waves and returns them sorted by
the highest correlation value at the earliest lag time or at the zero lag if indicated by the argument.
|
java.lang.String |
toString()
Returns a line-separated String containing the list of all the Wave names in this instance.
|
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, trimToSize
public Waves()
public Waves(java.lang.String filename) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public Waves(double[][] matrix)
public Waves(Wave[] waves)
public Waves(ImagePlus imp, Rois rois)
public Wave[] getArray()
public Waves getWaveRanges(double startTime_s, double endTime_s)
public Wave pop()
public java.lang.String getFormattedString(java.lang.String prefix, int decimalPlaces, boolean withTimes)
public boolean areEpisodic()
public void save(java.lang.String filename)
public void load(java.lang.String filename) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public Waves clone()
clone
in class java.util.Vector
public Waves getClusteredWaves(ViewFrame viewFrame)
public static Waves getRoiWaves(ImagePlus imp)
public Waves getWavesWithLengthAtLeast(int length)
public static Waves getRoiWaves(ImagePlus imp, Roi[] rois, boolean trackThrough)
public void normalize(double lowerBound, double upperBound)
public void normalize()
public void linearFit()
public void exponentialFit()
public void differentiate()
public void integrate()
public void convolve(Wave firWave)
public double getMinValue()
public double getMaxValue()
public Roi[] getRois()
public Wave get(int index)
get
in interface java.util.List
get
in class java.util.Vector
public Wave getWave(int index)
public Wave getWave(java.lang.String waveName)
public java.lang.String[] getNames()
public void addWave(Wave wave)
public void addWaves(Waves waves)
public Wave averageWaves()
public void __setitem__(int i, Wave wave)
public void __delitem__(int i)
public int __len__()
protected int findNextWave(java.util.ArrayList corrTimes, java.util.ArrayList corrValues)
public void reverse()
public void shuffle()
public Waves sort()
public void invert()
public Waves getScrambledWaves()
public Waves sort(boolean byZeroLagCorrelation)
public java.lang.String toString()
toString
in class java.util.Vector
public Waves getWavesByName(java.io.File file)
public Waves getCleanZscoredWaves()
public Waves getTruncatedZscoredWaves()
public ChartPlugIn plot2D()
public ChartPlugIn plot2D(boolean overlay)
public ChartPlugIn plot3D()
public ChartPlugIn plot3D(double lowerZBound, double upperZBound)
public Waves intersection(Waves waves2)