public class Util extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Util.Features |
protected static class |
Util.PointMatches |
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static void |
applyLayerTransformToPatch(Patch patch,
CoordinateTransform ct) |
static AbstractModel<?> |
createModel(int modelIndex) |
protected static ArrayList<Feature> |
deserializeFeatures(Project project,
Object key,
String prefix,
long id)
Retrieve a
Collection of Features from the
TrakEM2 project folder. |
protected static ArrayList<PointMatch> |
deserializePointMatches(Project project,
Object key,
String prefix,
long id1,
long id2) |
static void |
imageToFloatAndMask(Image input,
ij.process.FloatProcessor output,
ij.process.FloatProcessor alpha)
Transfer and ARGB AWT image into a FloatProcessor with its grey values
and a FloatProcessor with its alpha values as [0...1].
|
static boolean |
serializeFeatures(Project project,
Object key,
String prefix,
long id,
Collection<Feature> f)
Save a
Collection of Features to the TrakEM2
project folder. |
static boolean |
serializePointMatches(Project project,
Object key,
String prefix,
long id1,
long id2,
Collection<PointMatch> m)
Save a
Collection of PointMatches two-sided. |
public static final boolean serializeFeatures(Project project, Object key, String prefix, long id, Collection<Feature> f)
Collection of Features to the TrakEM2
project folder. The saved file contains a key Object which
may specify the properties of the Feature Collection.project - key - prefix - id - f - protected static final ArrayList<Feature> deserializeFeatures(Project project, Object key, String prefix, long id)
Collection of Features from the
TrakEM2 project folder. The Collection is only returned if
equals key.project - key - prefix - id - public static final boolean serializePointMatches(Project project, Object key, String prefix, long id1, long id2, Collection<PointMatch> m)
Collection of PointMatches two-sided.
Creates two serialization files which is desperately required to clean
up properly invalid serializations on change of a Patch.project - key - prefix - id1 - id2 - m - protected static final ArrayList<PointMatch> deserializePointMatches(Project project, Object key, String prefix, long id1, long id2)
public static final void imageToFloatAndMask(Image input, ij.process.FloatProcessor output, ij.process.FloatProcessor alpha)
Transfer and ARGB AWT image into a FloatProcessor with its grey values and a FloatProcessor with its alpha values as [0...1].
Note, this method currently relies on how ImageJ reuses the
pixels of an AWT image as generated by Loader.getFlatAWTImage(...)
for creating a ColorProcessor. This may change in the future as have
many things in the past. This method is then the place to fix it.
input - output - alpha - public static final void applyLayerTransformToPatch(Patch patch, CoordinateTransform ct) throws Exception
Exceptionpublic static final AbstractModel<?> createModel(int modelIndex)
Copyright © 2015–2021 Fiji. All rights reserved.