Class BlkThinPlateSplineFusion
java.lang.Object
net.preibisch.mvrecon.process.fusion.blk.BlkThinPlateSplineFusion
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double[]static int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <D extends net.imglib2.type.NativeType<D> & net.imglib2.type.numeric.RealType<D>>
net.imglib2.algorithm.blocks.dfield.DisplacementFields.TransformedDisplacementField<D> concatenateBoundingBoxOffset(net.imglib2.algorithm.blocks.dfield.DisplacementFields.TransformedDisplacementField<D> dfield, net.imglib2.Interval boundingBoxInTarget) fitAffineTransform(double[][] source, double[][] target) Fit an affine that approximates the TPS mapping fromsourcetotargetlandmarks.static <T extends net.imglib2.type.numeric.RealType<T> & net.imglib2.type.NativeType<T>>
net.imglib2.algorithm.blocks.BlockSupplier<T> init(net.imglib2.converter.Converter<net.imglib2.type.numeric.real.FloatType, T> converter, mpicbg.spim.data.generic.sequence.BasicImgLoader imgLoader, Collection<? extends mpicbg.spim.data.sequence.ViewId> viewIds, Map<mpicbg.spim.data.sequence.ViewId, ? extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>> viewDescriptions, Map<mpicbg.spim.data.sequence.ViewId, Landmarks> viewLandmarks, FusionGUI.FusionType fusionType, double anisotropyFactor, int interpolationMethod, Comparator<mpicbg.spim.data.sequence.ViewId> fusionOrder, Map<mpicbg.spim.data.sequence.ViewId, Coefficients> intensityAdjustmentCoefficients, net.imglib2.Interval fusionInterval, T type, int[] blockSize) TODO javadocstatic <T extends net.imglib2.type.numeric.RealType<T> & net.imglib2.type.NativeType<T>,D extends net.imglib2.type.NativeType<D> & net.imglib2.type.numeric.RealType<D>>
net.imglib2.algorithm.blocks.BlockSupplier<T> initWithLoadedDfields(net.imglib2.converter.Converter<net.imglib2.type.numeric.real.FloatType, T> converter, mpicbg.spim.data.generic.sequence.BasicImgLoader imgLoader, Collection<? extends mpicbg.spim.data.sequence.ViewId> viewIds, Map<mpicbg.spim.data.sequence.ViewId, ? extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>> viewDescriptions, Map<mpicbg.spim.data.sequence.ViewId, net.imglib2.realtransform.AffineTransform3D> approximateAffines, Map<mpicbg.spim.data.sequence.ViewId, net.imglib2.Interval> viewBounds, Map<mpicbg.spim.data.sequence.ViewId, net.imglib2.algorithm.blocks.dfield.DisplacementFields.TransformedDisplacementField<D>> rawDfields, FusionGUI.FusionType fusionType, double anisotropyFactor, int interpolationMethod, Comparator<mpicbg.spim.data.sequence.ViewId> fusionOrder, Map<mpicbg.spim.data.sequence.ViewId, Coefficients> intensityAdjustmentCoefficients, net.imglib2.Interval fusionInterval, T type, int[] blockSize) Entry point that accepts pre-sampled (un-offset) displacement fields instead of building them from landmarks.static net.imglib2.IntervalinverseTransformedBoundingBox(net.imglib2.realtransform.ThinplateSplineTransform transform, net.imglib2.Dimensions dimensions) Get the bounding box in render coordinates of an image of the givendimensionwhen back-projected through the inverse of the giventransformfrom rendered to image coordinates.
-
Field Details
-
defaultIntervalExpansion
public static int defaultIntervalExpansion -
defaultDisplacementFieldSpacing
public static final double[] defaultDisplacementFieldSpacing
-
-
Constructor Details
-
BlkThinPlateSplineFusion
public BlkThinPlateSplineFusion()
-
-
Method Details
-
init
public static <T extends net.imglib2.type.numeric.RealType<T> & net.imglib2.type.NativeType<T>> net.imglib2.algorithm.blocks.BlockSupplier<T> init(net.imglib2.converter.Converter<net.imglib2.type.numeric.real.FloatType, T> converter, mpicbg.spim.data.generic.sequence.BasicImgLoader imgLoader, Collection<? extends mpicbg.spim.data.sequence.ViewId> viewIds, Map<mpicbg.spim.data.sequence.ViewId, ? extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>> viewDescriptions, Map<mpicbg.spim.data.sequence.ViewId, Landmarks> viewLandmarks, FusionGUI.FusionType fusionType, double anisotropyFactor, int interpolationMethod, Comparator<mpicbg.spim.data.sequence.ViewId> fusionOrder, Map<mpicbg.spim.data.sequence.ViewId, Coefficients> intensityAdjustmentCoefficients, net.imglib2.Interval fusionInterval, T type, int[] blockSize) TODO javadoc- Type Parameters:
T- output type- Parameters:
converter- converts from FloatType to the output type. Maybe null, in which case a default converter (clamp to output type range) is used.imgLoader- TODOviewIds- TODOviewDescriptions- TODOviewLandmarks- TODOfusionType- how to combine pixelsanisotropyFactor-interpolationMethod- 1==linear, 0==nearest neighborintensityAdjustmentCoefficients- intensity adjustments, can be nullfusionInterval- TODOtype- instance of the output typeblockSize- TODO- Returns:
-
initWithLoadedDfields
public static <T extends net.imglib2.type.numeric.RealType<T> & net.imglib2.type.NativeType<T>,D extends net.imglib2.type.NativeType<D> & net.imglib2.type.numeric.RealType<D>> net.imglib2.algorithm.blocks.BlockSupplier<T> initWithLoadedDfields(net.imglib2.converter.Converter<net.imglib2.type.numeric.real.FloatType, T> converter, mpicbg.spim.data.generic.sequence.BasicImgLoader imgLoader, Collection<? extends mpicbg.spim.data.sequence.ViewId> viewIds, Map<mpicbg.spim.data.sequence.ViewId, ? extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>> viewDescriptions, Map<mpicbg.spim.data.sequence.ViewId, net.imglib2.realtransform.AffineTransform3D> approximateAffines, Map<mpicbg.spim.data.sequence.ViewId, net.imglib2.Interval> viewBounds, Map<mpicbg.spim.data.sequence.ViewId, net.imglib2.algorithm.blocks.dfield.DisplacementFields.TransformedDisplacementField<D>> rawDfields, FusionGUI.FusionType fusionType, double anisotropyFactor, int interpolationMethod, Comparator<mpicbg.spim.data.sequence.ViewId> fusionOrder, Map<mpicbg.spim.data.sequence.ViewId, Coefficients> intensityAdjustmentCoefficients, net.imglib2.Interval fusionInterval, T type, int[] blockSize) Entry point that accepts pre-sampled (un-offset) displacement fields instead of building them from landmarks. Use this when the dfields are computed elsewhere (e.g. distributed via Spark and cached on disk) and loaded back here as fullArrayImgs. The per-block evaluation downstream is perf-tuned forArrayImg-backed dfields, so always pass arrays (not lazyCachedCellImgs).- Parameters:
viewBounds- back-projected bounding box (render coordinates) per view, as produced byinverseTransformedBoundingBox(ThinplateSplineTransform, Dimensions).rawDfields- un-offset displacement fields per view, as produced byDisplacementFields.sample(tps, viewBounds.get(viewId), spacing). Must contain entries at least for all views overlappingfusionInterval; extra entries (for non-overlapping views) are ignored.
-
concatenateBoundingBoxOffset
public static <D extends net.imglib2.type.NativeType<D> & net.imglib2.type.numeric.RealType<D>> net.imglib2.algorithm.blocks.dfield.DisplacementFields.TransformedDisplacementField<D> concatenateBoundingBoxOffset(net.imglib2.algorithm.blocks.dfield.DisplacementFields.TransformedDisplacementField<D> dfield, net.imglib2.Interval boundingBoxInTarget) -
fitAffineTransform
public static net.imglib2.realtransform.AffineTransform3D fitAffineTransform(double[][] source, double[][] target) Fit an affine that approximates the TPS mapping fromsourcetotargetlandmarks. Used to derive the per-view "approximate affine" that drives blending-weight adjustment inFusionTools.adjustBlending(mpicbg.spim.data.generic.sequence.BasicViewDescription<?>, float[], float[], net.imglib2.realtransform.AffineTransform3D). The same fit is invoked byiniton the driver and (when caching is wired up) the result is persisted to N5 so that distributed block-fusion tasks don't have to recompute landmarks. -
inverseTransformedBoundingBox
public static net.imglib2.Interval inverseTransformedBoundingBox(net.imglib2.realtransform.ThinplateSplineTransform transform, net.imglib2.Dimensions dimensions) Get the bounding box in render coordinates of an image of the givendimensionwhen back-projected through the inverse of the giventransformfrom rendered to image coordinates.- Parameters:
transform- forward transform (from rendered to image coordinates)dimensions- image dimensions- Returns:
- bounding box in render coordinates
-