public class MainDialog extends GenericDialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static int |
ACCURATE_MODE
accurate mode constant
|
static int |
FAST_MODE
fast mode constant
|
static int |
MONO_MODE
unidirectional ("mono") mode constant
|
static String[] |
sMaxScaleDeformationChoices
final deformation options
|
static String[] |
sMinScaleDeformationChoices
initial deformation options
|
checkbox, choice, defaultChoiceIndexes, defaultStrings, defaultText, defaultValues, numberField, radioButtonGroups, slider, stringField, textArea1, textArea2, theLabel
DEFAULT_MODALITY_TYPE
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
MainDialog(Frame parentWindow,
ij.ImagePlus[] imageList,
int mode,
int maxImageSubsamplingFactor,
int min_scale_deformation,
int max_scale_deformation,
double divWeight,
double curlWeight,
double landmarkWeight,
double imageWeight,
double consistencyWeight,
double stopThreshold,
boolean richOutput,
boolean saveTransformation)
Create a new instance of MainDialog.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent ae)
Actions to be taken during the dialog.
|
void |
applyRawTransformationToSource(double[][] transformation_x,
double[][] transformation_y)
Apply a raw transformation to the source image.
|
void |
applyTransformationToSource(int intervals,
double[][] cx,
double[][] cy)
Apply the transformation defined by the spline coefficients to the source
image.
|
void |
freeMemory()
Free the memory used in the program.
|
String |
getMacroArgs()
Get arguments from the macro call
|
ij.process.ImageProcessor |
getOriginalSourceIP()
Get original source image processor.
|
ij.process.ImageProcessor |
getOriginalTargetIP()
Get original target image processor.
|
BSplineModel |
getSource()
Get source image model.
|
double[][] |
getSourceAffineMatrix()
Get the source initial affine matrix.
|
ij.ImagePlus |
getSourceImp()
Get reference to source image
|
Mask |
getSourceMask()
Get source Mask.
|
Mask |
getSourceMsk()
Get source mask.
|
PointHandler |
getSourcePh()
Get source point handler.
|
BSplineModel |
getTarget()
Get target image model.
|
double[][] |
getTargetAffineMatrix()
Get the target initial affine matrix.
|
ij.ImagePlus |
getTargetImp()
Get reference to target image
|
Mask |
getTargetMask()
Get target Mask.
|
Mask |
getTargetMsk()
Get target mask.
|
PointHandler |
getTargetPh()
Get target point handler.
|
void |
grayImage(PointHandler ph)
Method to color the area of the mask.
|
boolean |
isClearMaskSet()
Get clearMask flag.
|
boolean |
isFinalActionLaunched()
Get finalActionLaunched flag.
|
boolean |
isMacroCall()
Get the macro flag
|
boolean |
isSaveTransformationSet()
Get saveTransformation flag.
|
boolean |
isStopRegistrationSet()
Get stopRegistration flag.
|
void |
itemStateChanged(ItemEvent e)
Action to be taken when choices change.
|
void |
joinThreads()
Join the threads for the source and target images.
|
void |
repaintToolbar()
Repaint toolbar.
|
void |
restoreAll()
Restore the initial conditions.
|
void |
setClearMask(boolean val)
Set the clearMask flag.
|
void |
setFinalActionLaunched(boolean b)
Set final action launched flag.
|
void |
setSaveTransformation(boolean b)
Set saveTransformation flag.
|
void |
setSourceAffineMatrix(double[][] affineMatrix)
Set source intial affine matrix.
|
void |
setSourceMask(String sFileName)
Set source Mask.
|
void |
setStopRegistration()
Set the stopRegistration flag to true.
|
void |
setToolbarAllUp()
Set toolbar tools all up.
|
void |
showDialog()
Show main bUnwarpJ dialog
|
void |
ungrayImage(PointAction pa)
Ungray image.
|
void |
windowClosing(WindowEvent e)
Actions to be taken when closing the dialog.
|
addCheckbox, addCheckboxGroup, addCheckboxGroup, addChoice, addDialogListener, addDirectoryField, addDirectoryField, addFileField, addFileField, addHelp, addImage, addImageChoice, addMessage, addMessage, addMessage, addNumericField, addNumericField, addNumericField, addPanel, addPanel, addPreviewCheckbox, addPreviewCheckbox, addRadioButtonGroup, addSlider, addSlider, addStringField, addStringField, addTextAreas, addToSameRow, adjustmentValueChanged, centerDialog, dispose, enableYesNoCancel, enableYesNoCancel, focusGained, focusLost, getButtons, getCheckboxes, getChoices, getErrorMessage, getInsets, getInstance, getLabel, getMessage, getNextBoolean, getNextChoice, getNextChoiceIndex, getNextImage, getNextNumber, getNextRadioButton, getNextString, getNextText, getNumericFields, getPreviewCheckbox, getRadioButtonGroups, getSliders, getStringFields, getTextArea1, getTextArea2, getValue, hideCancelButton, invalidNumber, isMacro, isPreviewActive, keyPressed, keyReleased, keyTyped, paint, parseDouble, previewRunning, repaint, setCancelLabel, setDefaultString, setEchoChar, setFont, setHelpLabel, setInsets, setLocation, setOKLabel, setSmartRecording, setup, textValueChanged, wasCanceled, wasOKed, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
addNotify, getAccessibleContext, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, update, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static int FAST_MODE
public static int ACCURATE_MODE
public static int MONO_MODE
public static String[] sMinScaleDeformationChoices
public static String[] sMaxScaleDeformationChoices
public MainDialog(Frame parentWindow, ij.ImagePlus[] imageList, int mode, int maxImageSubsamplingFactor, int min_scale_deformation, int max_scale_deformation, double divWeight, double curlWeight, double landmarkWeight, double imageWeight, double consistencyWeight, double stopThreshold, boolean richOutput, boolean saveTransformation)
parentWindow
- pointer to the parent windowimageList
- list of images from ImageJmode
- default registration mode (0 = Fast, 1 = Accurate, 2 = Mono)maxImageSubsamplingFactor
- subsampling factor at highest resolution levelmin_scale_deformation
- default minimum scale deformation valuemax_scale_deformation
- default maximum scale deformation valuedivWeight
- default divergence weightcurlWeight
- default curl weightlandmarkWeight
- default landmarks weightimageWeight
- default image similarity weightconsistencyWeight
- default consistency weightstopThreshold
- default stopping thresholdrichOutput
- default verbose flagsaveTransformation
- default save transformations flagpublic void setSourceMask(String sFileName)
sFileName
- source mask file namepublic void setSourceAffineMatrix(double[][] affineMatrix)
affineMatrix
- initial affine matrixpublic Mask getSourceMask()
public Mask getTargetMask()
public void actionPerformed(ActionEvent ae)
actionPerformed
in interface ActionListener
actionPerformed
in class GenericDialog
public void windowClosing(WindowEvent e)
windowClosing
in interface WindowListener
windowClosing
in class GenericDialog
public void showDialog()
showDialog
in class GenericDialog
public void itemStateChanged(ItemEvent e)
itemStateChanged
in interface ItemListener
itemStateChanged
in class GenericDialog
e
- item eventpublic void applyTransformationToSource(int intervals, double[][] cx, double[][] cy)
intervals
- intervals in the deformationcx
- b-spline X- coefficientscy
- b-spline Y- coefficientspublic void applyRawTransformationToSource(double[][] transformation_x, double[][] transformation_y)
transformation_x
- X- mappingtransformation_y
- Y- mappingpublic void freeMemory()
public void grayImage(PointHandler ph)
ph
- image point handlerpublic boolean isFinalActionLaunched()
public boolean isClearMaskSet()
public boolean isSaveTransformationSet()
public void setSaveTransformation(boolean b)
b
- set to true to save transformations into filepublic boolean isStopRegistrationSet()
public void joinThreads()
public void restoreAll()
public void setClearMask(boolean val)
val
- flag to clear maskpublic void setStopRegistration()
public double[][] getSourceAffineMatrix()
public double[][] getTargetAffineMatrix()
public void ungrayImage(PointAction pa)
pa
- point action pointerpublic PointHandler getSourcePh()
public PointHandler getTargetPh()
public Mask getSourceMsk()
public Mask getTargetMsk()
public void setFinalActionLaunched(boolean b)
b
- set to true if the final action has startedpublic void setToolbarAllUp()
public void repaintToolbar()
public BSplineModel getTarget()
public ij.process.ImageProcessor getOriginalSourceIP()
public ij.process.ImageProcessor getOriginalTargetIP()
public BSplineModel getSource()
public boolean isMacroCall()
public String getMacroArgs()
public ij.ImagePlus getSourceImp()
public ij.ImagePlus getTargetImp()
Copyright © 2015–2021 Fiji. All rights reserved.