public class ExtractPSF<T extends RealType<T> & NativeType<T>> extends Object
Modifier and Type | Field and Description |
---|---|
protected HashMap<ViewId,ArrayImg<T,?>> |
originalPSFs |
protected HashMap<ViewId,ArrayImg<T,?>> |
pointSpreadFunctions |
protected ArrayList<ViewId> |
viewIds |
Constructor and Description |
---|
ExtractPSF() |
Modifier and Type | Method and Description |
---|---|
static <T extends Type<T>> |
commonSize(List<Img<T>> images)
Returns the bounding box so that all images can fit in there
or null if input is null or input.size is 0
|
Img<T> |
computeAveragePSF()
Compute average PSF in local image coordinates, all images are supposed to have the same dimensions
|
Img<T> |
computeAverageTransformedPSF()
compute the average psf in original calibration and after applying the transformations
|
long[] |
computeMaxDimTransformedPSF() |
static <S extends RealType<S>> |
computeMaxProjection(Img<S> avgPSF,
int minDim)
Get projection along the smallest dimension (which is usually the rotation axis)
|
static <S extends RealType<S>> |
computeMaxProjection(RandomAccessibleInterval<S> avgPSF,
ImgFactory<S> factory,
int minDim) |
void |
extractNextImg(RandomAccessibleInterval<T> img,
ViewId viewId,
AffineTransform3D model,
ArrayList<double[]> locations,
long[] psfSize) |
protected static <T extends RealType<T> & NativeType<T>> |
extractPSFLocal(RandomAccessibleInterval<T> img,
ArrayList<double[]> locations,
long[] size)
Extracts the PSF by averaging the local neighborhood RANSAC correspondences
|
protected static File |
getFileNameForViewId(ViewDescription vd,
ArrayList<Pair<Pair<Angle,Illumination>,String>> filenames) |
HashMap<ViewId,ArrayImg<T,?>> |
getInputCalibrationPSFs() |
HashMap<ViewId,ArrayImg<T,?>> |
getPSFMap() |
ArrayImg<T,?> |
getTransformedPSF(ViewId viewId)
Returns the transformed PSF.
|
HashMap<ViewId,ViewId> |
getViewIdMapping() |
ArrayList<ViewId> |
getViewIdsForPSFs() |
static <T extends RealType<T> & NativeType<T>> |
loadAndTransformPSFs(ArrayList<Pair<Pair<Angle,Illumination>,String>> filenames,
ArrayList<ViewDescription> viewDesc,
T type,
HashMap<ViewId,AffineTransform3D> models) |
static <T extends RealType<T>> |
makeSameSize(Img<T> img,
long[] sizeIn)
Make image the same size as defined, center it
|
static <T extends RealType<T> & NativeType<T>> |
transform(RandomAccessibleInterval<T> image,
AffineTransform3D transformIn,
long[] newDim,
double[] offset) |
protected static <T extends RealType<T> & NativeType<T>> |
transformPSF(RandomAccessibleInterval<T> psf,
AffineTransform3D model)
Transforms the extracted PSF using the affine transformation of the corresponding view
|
protected final HashMap<ViewId,ArrayImg<T extends RealType<T> & NativeType<T>,?>> pointSpreadFunctions
protected final HashMap<ViewId,ArrayImg<T extends RealType<T> & NativeType<T>,?>> originalPSFs
public HashMap<ViewId,ViewId> getViewIdMapping()
public ArrayImg<T,?> getTransformedPSF(ViewId viewId)
viewId
- public HashMap<ViewId,ArrayImg<T,?>> getInputCalibrationPSFs()
public ArrayList<ViewId> getViewIdsForPSFs()
public static <S extends RealType<S>> Img<S> computeMaxProjection(Img<S> avgPSF, int minDim)
avgPSF
- - the average psfminDim
- - along which dimension to project, if set to <0, the smallest dimension will be chosenpublic static <S extends RealType<S>> Img<S> computeMaxProjection(RandomAccessibleInterval<S> avgPSF, ImgFactory<S> factory, int minDim)
public Img<T> computeAverageTransformedPSF()
public Img<T> computeAveragePSF()
public void extractNextImg(RandomAccessibleInterval<T> img, ViewId viewId, AffineTransform3D model, ArrayList<double[]> locations, long[] psfSize)
img
- viewId
- model
- locations
- psfSize
- - dimensions of psf to extractprotected static <T extends RealType<T> & NativeType<T>> ArrayImg<T,?> transformPSF(RandomAccessibleInterval<T> psf, AffineTransform3D model)
psf
- - the extracted psf (NOT z-scaling corrected)model
- - the transformation modelprotected static <T extends RealType<T> & NativeType<T>> ArrayImg<T,?> extractPSFLocal(RandomAccessibleInterval<T> img, ArrayList<double[]> locations, long[] size)
size
- - the size in which the psf is extracted (in pixel units, z-scaling is ignored)public static <T extends RealType<T> & NativeType<T>> ArrayImg<T,?> transform(RandomAccessibleInterval<T> image, AffineTransform3D transformIn, long[] newDim, double[] offset)
public static <T extends RealType<T>> Img<T> makeSameSize(Img<T> img, long[] sizeIn)
img
- public static <T extends Type<T>> long[] commonSize(List<Img<T>> images)
images
- public long[] computeMaxDimTransformedPSF()
public static <T extends RealType<T> & NativeType<T>> ExtractPSF<T> loadAndTransformPSFs(ArrayList<Pair<Pair<Angle,Illumination>,String>> filenames, ArrayList<ViewDescription> viewDesc, T type, HashMap<ViewId,AffineTransform3D> models)
filenames
- protected static File getFileNameForViewId(ViewDescription vd, ArrayList<Pair<Pair<Angle,Illumination>,String>> filenames)
Copyright © 2015–2021 Fiji. All rights reserved.