public class BigWarp<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BigWarp.BigWarpData<T> |
protected class |
BigWarp.LandmarkModeListener |
class |
BigWarp.LandmarkTableListener |
protected class |
BigWarp.MouseLandmarkListener |
class |
BigWarp.MouseLandmarkTableListener |
static class |
BigWarp.SolveThread |
class |
BigWarp.WarningTableCellRenderer |
static class |
BigWarp.WarpVisType |
Constructor and Description |
---|
BigWarp(BigWarp.BigWarpData<T> data,
String windowTitle,
BigWarpViewerOptions options,
ProgressWriter progressWriter) |
BigWarp(BigWarp.BigWarpData<T> data,
String windowTitle,
ProgressWriter progressWriter) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDefaultTableMouseListener() |
void |
addKeyEventPostProcessor(KeyEventPostProcessor ke) |
boolean |
addPoint(double[] ptarray,
boolean isMoving)
Updates the global variable ptBack
|
String |
addPoint(double[] ptarray,
boolean isMoving,
BigWarpViewerPanel viewer)
Updates the global variable ptBack
|
void |
addTransformListener(TransformListener<InvertibleRealTransform> listener) |
void |
autoSaveLandmarks()
Saves landmarks to a new File in the user's bigwarp folder.
|
void |
checkBoxInputMaps() |
void |
closeAll() |
static double |
computeScaleAssumeRigid(AffineTransform3D xfm) |
protected int |
detectNumDims()
The display will be in 3d if any of the input sources are 3d.
|
static <T> int |
detectNumDims(List<SourceAndConverter<T>> sources)
The display will be in 3d if any of the input sources are 3d.
|
protected void |
disableTransformHandlers() |
protected void |
enableTransformHandlers() |
void |
exportAsImagePlus(boolean virtual) |
void |
exportAsImagePlus(boolean virtual,
String path) |
void |
exportWarpField() |
protected void |
fitBaselineWarpMagModel() |
BigWarpAutoSaver |
getAutoSaver()
Returns the
BigWarpAutoSaver . |
File |
getBigwarpSettingsFolder()
Returns the default location for bigwarp settings / auto saved files: ~/.bigwarp
|
Bookmarks |
getBookmarks() |
BigWarpTransform |
getBwTransform() |
BigWarp.BigWarpData<T> |
getData() |
BigWarpLandmarkFrame |
getLandmarkFrame() |
BigWarpLandmarkPanel |
getLandmarkPanel() |
File |
getLastDirectory() |
AffineTransform3D |
getMovingToFixedTransformAsAffineTransform3D() |
BigWarpOverlay |
getOverlayP() |
BigWarpOverlay |
getOverlayQ() |
int |
getSelectedUnpairedRow(boolean isMoving)
Returns the index of the selected row, if it is unpaired, -1 otherwise
|
SetupAssignments |
getSetupAssignments() |
List<SourceAndConverter<T>> |
getSources() |
ThinPlateR2LogRSplineKernelTransform |
getTransform()
Deprecated.
|
String |
getTransformType() |
BigWarpViewerFrame |
getViewerFrameP() |
BigWarpViewerFrame |
getViewerFrameQ() |
void |
goToBookmark() |
static void |
initBrightness(double cumulativeMinCutoff,
double cumulativeMaxCutoff,
ViewerState state,
ConverterSetups converterSetups)
Deprecated.
Use
InitializeViewerState method instead. |
void |
invertPointCorrespondences() |
boolean |
isInLandmarkMode() |
boolean |
isMovingDisplayTransformed() |
boolean |
isRowIncomplete()
Returns true if the currently selected row in the landmark table is missing on the the landmarks
|
boolean |
isUpdateWarpOnChange() |
protected void |
loadLandmarks() |
void |
loadLandmarks(String filename) |
protected void |
loadSettings() |
protected void |
loadSettings(String xmlFilename) |
static void |
main(String[] args) |
void |
matchActiveViewerPanelToOther() |
void |
matchOtherViewerPanelToActive() |
protected void |
matchWindowTransforms(BigWarpViewerPanel panelToChange,
BigWarpViewerPanel panelToMatch)
Changes the view transformation of 'panelToChange' to match that of 'panelToMatch'
|
int |
numDimensions() |
void |
quickSaveLandmarks()
Saves landmarks to either the last File the user
saved landmarks to, or a unique location in the user's bigwarp folder.
|
void |
removeKeyEventPostProcessor(KeyEventPostProcessor ke) |
void |
resetView() |
boolean |
restimateTransformation() |
protected void |
saveLandmarks() |
protected void |
saveLandmarks(String filename) |
void |
saveMovingImageToFile()
Deprecated.
|
File |
saveMovingImageXml() |
File |
saveMovingImageXml(String proposedFilePath) |
protected void |
saveSettings() |
protected void |
saveSettings(String xmlFilename) |
protected int |
selectedLandmark(double[] pt,
boolean isMoving) |
protected int |
selectedLandmark(double[] pt,
boolean isMoving,
boolean selectInTable)
Returns the index of the landmark closest to the input point,
if it is within a certain distance threshold.
|
void |
setAutosaveFolder(File autoSaveFolder)
Set the folder where the results of auto-saving will be stored.
|
void |
setGridType(GridSource.GRID_TYPE method) |
void |
setInLandmarkMode(boolean inLmMode) |
void |
setIsMovingDisplayTransformed(boolean isTransformed) |
void |
setLastDirectory(File dir) |
void |
setMovingSpimData(SpimData movingSpimData,
File movingImageXml) |
void |
setSpotColor(Color c) |
void |
setTransformType(String type) |
void |
setUpdateWarpOnChange(boolean updateWarpOnPtChange) |
protected void |
setupImageJExportOption() |
void |
setupKeyListener() |
protected void |
setUpLandmarkMenus() |
protected void |
setUpViewerMenu(BigWarpViewerFrame vframe) |
protected void |
setupWarpMagBaselineOptions(CoordinateTransform[] xfm,
int ndim) |
void |
setWarpGridSpacing(double spacing) |
void |
setWarpGridWidth(double width) |
void |
setWarpMagBaselineIndex(int index) |
void |
setWarpVisGridType(GridSource.GRID_TYPE type) |
void |
setWarpVisMode(BigWarp.WarpVisType type,
BigWarpViewerFrame viewerFrame,
boolean both) |
void |
stopAutosave() |
void |
toggleInLandmarkMode() |
boolean |
toggleMovingImageDisplay()
Toggles whether the moving image is displayed after warping (in the same
space as the fixed image), or in its native space.
|
void |
toggleNameVisibility() |
void |
togglePointVisibility() |
void |
toggleUpdateWarpOnChange() |
void |
toggleWarpVisMode(BigWarpViewerFrame viewerFrame) |
void |
updatePointLocation(double[] ptarray,
boolean isMoving,
int selectedPointIndex) |
void |
updatePointLocation(double[] ptarray,
boolean isMoving,
int selectedPointIndex,
BigWarpViewerPanel viewer) |
void |
updateRowSelection(boolean isMoving,
int lastRowEdited) |
static void |
updateRowSelection(LandmarkTableModel landmarkModel,
JTable table,
boolean isMoving,
int lastRowEdited) |
int |
updateWarpedPoint(double[] ptarray,
boolean isMoving) |
void |
warpToLandmark(int row,
BigWarpViewerPanel viewer) |
void |
warpToNearest(BigWarpViewerPanel viewer) |
static <T> List<SourceAndConverter<T>> |
wrapSourcesAsTransformed(List<SourceAndConverter<T>> sources,
int ndims,
BigWarp.BigWarpData<?> data) |
protected static final int DEFAULT_WIDTH
protected static final int DEFAULT_HEIGHT
public static final int GRID_SOURCE_ID
public static final int WARPMAG_SOURCE_ID
public static final int JACDET_SOURCE_ID
protected BigWarpViewerOptions options
protected BigWarp.BigWarpData<T> data
protected int[] movingSourceIndexList
protected int[] targetSourceIndexList
protected List<SourceAndConverter<T>> sources
protected final SetupAssignments setupAssignments
protected final BrightnessDialog brightnessDialog
protected final WarpVisFrame warpVisDialog
protected final HelpDialog helpDialog
protected final SourceInfoDialog sourceInfoDialog
protected final VisibilityAndGroupingDialog activeSourcesDialogP
protected final VisibilityAndGroupingDialog activeSourcesDialogQ
protected final BookmarksEditor bookmarkEditorP
protected final BookmarksEditor bookmarkEditorQ
protected final BigWarpViewerPanel viewerP
protected final BigWarpViewerPanel viewerQ
protected final AffineTransform3D initialViewP
protected final AffineTransform3D initialViewQ
protected BigWarpLandmarkPanel landmarkPanel
protected final LandmarkPointMenu landmarkPopupMenu
protected final BigWarpLandmarkFrame landmarkFrame
protected final BigWarpViewerSettings viewerSettings
protected final BigWarpOverlay overlayP
protected final BigWarpOverlay overlayQ
protected final BigWarpDragOverlay dragOverlayP
protected final BigWarpDragOverlay dragOverlayQ
protected RealPoint currentLandmark
protected LandmarkTableModel landmarkModel
protected InvertibleRealTransform currentTransform
protected JTable landmarkTable
protected BigWarp.LandmarkTableListener landmarkModellistener
protected BigWarp.MouseLandmarkListener landmarkClickListenerP
protected BigWarp.MouseLandmarkListener landmarkClickListenerQ
protected BigWarp.MouseLandmarkTableListener landmarkTableListener
protected BigWarpMessageAnimator message
protected final Set<KeyEventPostProcessor> keyEventPostProcessorSet
protected final SourceAndConverter<FloatType> gridSource
protected final SourceAndConverter<FloatType> warpMagSource
protected final SourceAndConverter<FloatType> jacDetSource
protected final AbstractModel<?>[] baseXfmList
protected TransformTypeSelectDialog transformSelector
protected AffineTransform3D tmpTransform
protected boolean inLandmarkMode
protected int baselineModelIndex
protected File autoSaveDirectory
protected File lastDirectory
protected File lastLandmarks
protected BigWarpAutoSaver autoSaver
protected boolean updateWarpOnPtChange
protected boolean firstWarpEstimation
protected static org.apache.log4j.Logger logger
public BigWarp(BigWarp.BigWarpData<T> data, String windowTitle, ProgressWriter progressWriter) throws SpimDataException
SpimDataException
public BigWarp(BigWarp.BigWarpData<T> data, String windowTitle, BigWarpViewerOptions options, ProgressWriter progressWriter) throws SpimDataException
SpimDataException
public int numDimensions()
@Deprecated public static void initBrightness(double cumulativeMinCutoff, double cumulativeMaxCutoff, ViewerState state, ConverterSetups converterSetups)
InitializeViewerState
method instead.cumulativeMinCutoff
- the min image intensitycumulativeMaxCutoff
- the max image intensitystate
- the viewer stateconverterSetups
- the converter setupspublic void addKeyEventPostProcessor(KeyEventPostProcessor ke)
public void removeKeyEventPostProcessor(KeyEventPostProcessor ke)
public void closeAll()
public void setUpdateWarpOnChange(boolean updateWarpOnPtChange)
public void toggleUpdateWarpOnChange()
public boolean isInLandmarkMode()
public void toggleInLandmarkMode()
public boolean isUpdateWarpOnChange()
public void invertPointCorrespondences()
public File getLastDirectory()
public void setLastDirectory(File dir)
public void setSpotColor(Color c)
protected void setUpViewerMenu(BigWarpViewerFrame vframe)
protected void setupImageJExportOption()
public void exportAsImagePlus(boolean virtual)
@Deprecated public void saveMovingImageToFile()
public File saveMovingImageXml()
public AffineTransform3D getMovingToFixedTransformAsAffineTransform3D()
public void exportAsImagePlus(boolean virtual, String path)
public void exportWarpField()
protected void setUpLandmarkMenus()
public Bookmarks getBookmarks()
public BigWarpViewerFrame getViewerFrameP()
public BigWarpViewerFrame getViewerFrameQ()
public BigWarpOverlay getOverlayP()
public BigWarpOverlay getOverlayQ()
public SetupAssignments getSetupAssignments()
public BigWarp.BigWarpData<T> getData()
public List<SourceAndConverter<T>> getSources()
public BigWarpLandmarkFrame getLandmarkFrame()
public BigWarpLandmarkPanel getLandmarkPanel()
public void setInLandmarkMode(boolean inLmMode)
public void updatePointLocation(double[] ptarray, boolean isMoving, int selectedPointIndex, BigWarpViewerPanel viewer)
ptarray
- location of the clicked pointisMoving
- is the viewer in moving spaceselectedPointIndex
- the index of the selected pointviewer
- the BigWarpViewerPanel clicked onpublic void updatePointLocation(double[] ptarray, boolean isMoving, int selectedPointIndex)
public int updateWarpedPoint(double[] ptarray, boolean isMoving)
public void updateRowSelection(boolean isMoving, int lastRowEdited)
public static void updateRowSelection(LandmarkTableModel landmarkModel, JTable table, boolean isMoving, int lastRowEdited)
public int getSelectedUnpairedRow(boolean isMoving)
isMoving
- isMovingpublic String addPoint(double[] ptarray, boolean isMoving, BigWarpViewerPanel viewer)
ptarray
- the point locationisMoving
- is the point location in moving image spaceviewer
- the viewer panelpublic boolean addPoint(double[] ptarray, boolean isMoving)
ptarray
- the point locationisMoving
- is the point location in moving image spaceprotected int selectedLandmark(double[] pt, boolean isMoving)
protected int selectedLandmark(double[] pt, boolean isMoving, boolean selectInTable)
pt
- the point locationisMoving
- is the point location in moving image spaceselectInTable
- also select the landmark in the tablepublic static double computeScaleAssumeRigid(AffineTransform3D xfm)
protected void disableTransformHandlers()
protected void enableTransformHandlers()
protected void matchWindowTransforms(BigWarpViewerPanel panelToChange, BigWarpViewerPanel panelToMatch)
panelToChange
- the viewer panel whose transform will changepanelToMatch
- the viewer panel the transform will come frompublic void matchOtherViewerPanelToActive()
public void matchActiveViewerPanelToOther()
public void warpToNearest(BigWarpViewerPanel viewer)
public void warpToLandmark(int row, BigWarpViewerPanel viewer)
public void goToBookmark()
public void resetView()
public void toggleNameVisibility()
public void togglePointVisibility()
public boolean toggleMovingImageDisplay()
protected void addDefaultTableMouseListener()
public void setGridType(GridSource.GRID_TYPE method)
public static <T> List<SourceAndConverter<T>> wrapSourcesAsTransformed(List<SourceAndConverter<T>> sources, int ndims, BigWarp.BigWarpData<?> data)
public void setupKeyListener()
public void setWarpVisGridType(GridSource.GRID_TYPE type)
public void setWarpGridWidth(double width)
public void setWarpGridSpacing(double spacing)
protected void setupWarpMagBaselineOptions(CoordinateTransform[] xfm, int ndim)
public void setWarpMagBaselineIndex(int index)
protected void fitBaselineWarpMagModel()
public void setWarpVisMode(BigWarp.WarpVisType type, BigWarpViewerFrame viewerFrame, boolean both)
public void toggleWarpVisMode(BigWarpViewerFrame viewerFrame)
public boolean restimateTransformation()
public void setIsMovingDisplayTransformed(boolean isTransformed)
public boolean isRowIncomplete()
public boolean isMovingDisplayTransformed()
protected int detectNumDims()
public static <T> int detectNumDims(List<SourceAndConverter<T>> sources)
T
- the typesources
- the sourcespublic static void main(String[] args)
public void checkBoxInputMaps()
public void setTransformType(String type)
public String getTransformType()
public BigWarpTransform getBwTransform()
@Deprecated public ThinPlateR2LogRSplineKernelTransform getTransform()
public void addTransformListener(TransformListener<InvertibleRealTransform> listener)
public void setAutosaveFolder(File autoSaveFolder)
autoSaveFolder
- the destination folderpublic void autoSaveLandmarks()
public void quickSaveLandmarks()
public File getBigwarpSettingsFolder()
public BigWarpAutoSaver getAutoSaver()
BigWarpAutoSaver
.public void stopAutosave()
protected void saveLandmarks()
protected void saveLandmarks(String filename) throws IOException
IOException
protected void loadLandmarks()
public void loadLandmarks(String filename)
protected void saveSettings()
protected void saveSettings(String xmlFilename) throws IOException
IOException
protected void loadSettings()
protected void loadSettings(String xmlFilename) throws IOException, org.jdom2.JDOMException
IOException
org.jdom2.JDOMException
Copyright © 2015–2021 Fiji. All rights reserved.