Package gov.nih.mipav.view.dialogs
Class JDialogScriptableTransform
- java.lang.Object
- 
- java.awt.Component
- 
- java.awt.Container
- 
- java.awt.Window
- 
- java.awt.Dialog
- 
- javax.swing.JDialog
- 
- gov.nih.mipav.view.dialogs.JDialogBase
- 
- gov.nih.mipav.view.dialogs.JDialogScriptableBase
- 
- gov.nih.mipav.view.dialogs.JDialogScriptableTransform
 
 
 
 
 
 
 
 
- 
- All Implemented Interfaces:
- AlgorithmInterface,- ScriptableActionInterface,- DialogDefaultsInterface,- ActionDiscovery,- java.awt.event.ActionListener,- java.awt.event.FocusListener,- java.awt.event.ItemListener,- java.awt.event.WindowListener,- java.awt.image.ImageObserver,- java.awt.MenuContainer,- java.io.Serializable,- java.util.EventListener,- javax.accessibility.Accessible,- javax.swing.event.ChangeListener,- javax.swing.RootPaneContainer,- javax.swing.WindowConstants
 
 public class JDialogScriptableTransform extends JDialogScriptableBase implements AlgorithmInterface, javax.swing.event.ChangeListener, ActionDiscovery Dialog to get user input, then call algorithmTransform. User may select resample or transform. User may input matrix or use image's associated transformation matrix. User may input desired resolutions and dims. User may select interpolation method. Creates new volume. You can choose either of 2 goals in bilinear or trilinear interpolation, but you cannot choose both. You can choose to: 1.) Match the start row, column, and slice in the original image with the start row, column, and slice in the transformed image with no duplication of start values and match the end row, column, and slice in the original image with the end row column, and slice in the transformed image with no duplication of end values with a smooth interpolation occurring between the beginning and end. For a smooth bilinear or trilinear interpolation you must map from 0 to n1t - 1 in the transformed image to 0 to n1 - 1 in the original image. Mapping from n1t - 1 to n1t in the transformed image to n1 - 1 to n1 in the source image would lead to multiple identical transformed copies for source image values between n1 - 1 and n1 - 0.5 and identical or out of bounds transformed values for source values from n1 - 0.5 to n1. This necessitates using equations of the form (dim - 1) * res = (transformedDim - 1) * transformedRes. Since the field of view = dim * res, this does not preserve field of view. If a user wishes to reslice an image and have the beginning and end slices match without duplication, then this would be the method to select 2.) If a user simply wishes to magnify the field of view and is not worried about duplicate beginning and end values, then preserve the field of view = dim * res = transformedDim * transformedRes. If the interpolation is not bilinear or trilinear, then the purpose of interpolation is always to preserve the FOV. For either interpolation purpose, note that if the user selects the new dimension, then the floating point resolution can be perfectly adjusted, but if the user selects the new resolution, since dimensions are integers, the new dimension value may not be perfectly adjusted.- Version:
- 0.1 Nov. 19, 1999
- Author:
- Delia McGarry, Neva Cherniavsky, Zohara Cohen
- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBaseJDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKAction
 - 
Nested classes/interfaces inherited from class javax.swing.JDialogjavax.swing.JDialog.AccessibleJDialog
 - 
Nested classes/interfaces inherited from class java.awt.Dialogjava.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 - 
Nested classes/interfaces inherited from class java.awt.Windowjava.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
 
- 
 - 
Field SummaryFields Modifier and Type Field Description private static intACPC_TO_ORIGDOCUMENT ME!private static intACPC_TO_TLRCDOCUMENT ME!private AlgorithmTalairachTransformalgoTalDOCUMENT ME!private AlgorithmTransformalgoTransor if the source image is to be replaced.private javax.swing.JCheckBoxclipCheckboxDOCUMENT ME!private javax.swing.JComboBoxcomboBoxImageDOCUMENT ME!private javax.swing.JComboBoxcomboBoxInterpDOCUMENT ME!private javax.swing.JComboBoxcomboBoxTalTransformDOCUMENT ME!private javax.swing.JRadioButtoncomputeTImageDOCUMENT ME!private intconstantFOVWe use the constant to preserve the FOV.private javax.swing.JRadioButtonconstantFOVradioRadio button for constant FOV interpolation.private javax.swing.ButtonGroupcropOrPadDOCUMENT ME!private javax.swing.JRadioButtoncropRadioDOCUMENT ME!private javax.swing.JLabelcurrentDOCUMENT ME!private intcXdimDOCUMENT ME!private floatcXresDOCUMENT ME!private intcYdimDOCUMENT ME!private floatcYresDOCUMENT ME!private intcZdimDOCUMENT ME!private floatcZresDOCUMENT ME!private intdataTypeprivate float[]dimsprivate booleando25DDOCUMENT ME!private booleandoClipDOCUMENT ME!private booleandoInvMatDOCUMENT ME!private booleandoPadDOCUMENT ME!private booleandoRotateCenterDOCUMENT ME!private booleandoTalairachDOCUMENT ME!private booleandoUpdateOriginDOCUMENT ME!private booleandoVOIDOCUMENT ME!private booleanenableSATransformprivate javax.swing.JRadioButtonendMatchFOVradioRadio button for slice start & end matching interpolation.private boolean[]fileClipprivate int[]fileInterpprivate javax.swing.JRadioButtonfileMatrixDOCUMENT ME!private boolean[]filePadprivate TransMatrixfileTransMatrixStores the matrix read in from a file it then can be converted to the corrected axis orientation (i.e. world coordinate and/or left-hand coordinate systems).private boolean[]filetVOIprivate floatfillValueprivate ModelImageimagesource imageprivate javax.swing.JCheckBoximage25DCheckboxDOCUMENT ME!private doubleimageMaxprivate doubleimageMinprivate intinterpInterpolation methodprivate javax.swing.ButtonGroupinterpFOVgroupButton group for interpolation type, contant FOV or start, end matching.private javax.swing.JCheckBoxinvertCheckboxDOCUMENT ME!private booleanisSATransformis this a scanner anatomical transform (->AXIAL)private javax.swing.JLabellabelDimXDOCUMENT ME!private javax.swing.JLabellabelDimYDOCUMENT ME!private javax.swing.JLabellabelDimZDOCUMENT ME!private javax.swing.JLabellabelOriginprivate javax.swing.JLabellabelResXDOCUMENT ME!private javax.swing.JLabellabelResYDOCUMENT ME!private javax.swing.JLabellabelResZDOCUMENT ME!private javax.swing.JLabellabelRxDOCUMENT ME!private javax.swing.JLabellabelRyDOCUMENT ME!private javax.swing.JLabellabelRzDOCUMENT ME!private javax.swing.JLabellabelSKxDOCUMENT ME!private javax.swing.JLabellabelSKyDOCUMENT ME!private javax.swing.JLabellabelSKzDOCUMENT ME!private javax.swing.JLabellabelSxDOCUMENT ME!private javax.swing.JLabellabelSyDOCUMENT ME!private javax.swing.JLabellabelSzDOCUMENT ME!private javax.swing.JLabellabelTransformDimXprivate javax.swing.JLabellabelTransformDimYprivate javax.swing.JLabellabelTransformDimZprivate javax.swing.JLabellabelTransformResXprivate javax.swing.JLabellabelTransformResYprivate javax.swing.JLabellabelTransformResZprivate javax.swing.JLabellabelTxDOCUMENT ME!private javax.swing.JLabellabelTyDOCUMENT ME!private javax.swing.JLabellabelTzDOCUMENT ME!private booleanleftHandSystemIf true change matrix to the left-hand coordinate system.private javax.swing.JSlidermagSliderDOCUMENT ME!private javax.swing.ButtonGroupmatrixDeterminationGroupDOCUMENT ME!private java.lang.StringmatrixDirectoryprivate java.lang.StringmatrixFileDOCUMENT ME!private javax.swing.JTextFieldmatrixFNameDOCUMENT ME!private intmaxDOCUMENT ME!private javax.swing.JLabelmaximumDOCUMENT ME!private intminDOCUMENT ME!private javax.swing.JLabelminimumDOCUMENT ME!private javax.swing.JRadioButtonnoTransformDOCUMENT ME!private static intORIG_TO_ACPCDOCUMENT ME!private static intORIG_TO_TLRCDOCUMENT ME!private javax.swing.JComboBoxoutOfBoundsComboBoxprivate intoutOfBoundsIndexTells how to select fill value for out of bounds data 0 for image minimum 1 for NaN for float, zero otherwise. 2 for user defined 3 for image maximumprivate javax.swing.JLabeloutOfBoundsLabelprivate javax.swing.ButtonGroupoutputDimsGroupprivate intoXdimDOCUMENT ME!private floatoXresDOCUMENT ME!private intoYdimDOCUMENT ME!private floatoYresDOCUMENT ME!private intoZdimDOCUMENT ME!private floatoZresDOCUMENT ME!private javax.swing.JRadioButtonpadRadioDOCUMENT ME!private booleanpreserveFOVDOCUMENT ME!private javax.swing.JRadioButtonpreserveFOV2Buttonprivate javax.swing.JRadioButtonpreserveFOVButtonprivate javax.swing.JRadioButtonpreserveOutputDimsButtonprivate javax.swing.JRadioButtonprevSelectedTransformRadioButtonprivate booleanquietprivate java.lang.StringRESAMPLE_STATUS_DEFAULT_TEXTprivate javax.swing.ButtonGroupresampleGroupDOCUMENT ME!private ModelImageresampleImageDOCUMENT ME!private javax.swing.JRadioButtonresampleMatrixSourceButtonprivate javax.swing.JRadioButtonresampleMatrixTargetButtonprivate javax.swing.JPanelresamplePanelprivate javax.swing.JRadioButtonresampleSliderDOCUMENT ME!private javax.swing.JTextFieldresampleStatusTextFieldprivate javax.swing.JRadioButtonresampletoImageDOCUMENT ME!private javax.swing.JRadioButtonresampletoMatrixFileDOCUMENT ME!private javax.swing.JRadioButtonresampletoUserDOCUMENT ME!private javax.swing.ButtonGroupresDimGroupprivate float[]resolsprivate javax.swing.ButtonGroupresTransformGroupprivate ModelImageresultImageDOCUMENT ME!private javax.swing.ButtonGrouprotationAxisGroupDOCUMENT ME!private javax.swing.JRadioButtonrotCenterDOCUMENT ME!private javax.swing.JRadioButtonrotOriginDOCUMENT ME!private javax.swing.JRadioButtonseparateDimResButtonprivate static longserialVersionUIDUse serialVersionUID for interoperability.private int[]sourceXdimprivate float[]sourceXresprivate int[]sourceYdimprivate float[]sourceYresprivate int[]sourceZdimprivate float[]sourceZresprivate AlgorithmTPSplinesplineprivate javax.swing.JRadioButtonstoredMatrixDOCUMENT ME!private javax.swing.JComboBoxstoredMatrixBoxprivate javax.swing.JTabbedPanetabbedPaneTabbed paneprivate int[]targetXdimprivate float[]targetXresprivate int[]targetYdimprivate float[]targetYresprivate int[]targetZdimprivate float[]targetZresprivate javax.swing.JTextFieldtextDimXDOCUMENT ME!private javax.swing.JTextFieldtextDimYDOCUMENT ME!private javax.swing.JTextFieldtextDimZDOCUMENT ME!private javax.swing.JTextFieldtextResXDOCUMENT ME!private javax.swing.JTextFieldtextResYDOCUMENT ME!private javax.swing.JTextFieldtextResZDOCUMENT ME!private javax.swing.JTextFieldtextRxDOCUMENT ME!private javax.swing.JTextFieldtextRyDOCUMENT ME!private javax.swing.JTextFieldtextRzDOCUMENT ME!private javax.swing.JTextFieldtextSKxDOCUMENT ME!private javax.swing.JTextFieldtextSKyDOCUMENT ME!private javax.swing.JTextFieldtextSKzDOCUMENT ME!private javax.swing.JTextFieldtextSxDOCUMENT ME!private javax.swing.JTextFieldtextSyDOCUMENT ME!private javax.swing.JTextFieldtextSzDOCUMENT ME!private javax.swing.JTextFieldtextTransformDimXprivate javax.swing.JTextFieldtextTransformDimYprivate javax.swing.JTextFieldtextTransformDimZprivate javax.swing.JTextFieldtextTransformResXprivate javax.swing.JTextFieldtextTransformResYprivate javax.swing.JTextFieldtextTransformResZprivate javax.swing.JTextFieldtextTxDOCUMENT ME!private javax.swing.JTextFieldtextTyDOCUMENT ME!private javax.swing.JTextFieldtextTzDOCUMENT ME!private TalairachTransformInfotInfoDOCUMENT ME!private static intTLRC_TO_ACPCDOCUMENT ME!private static intTLRC_TO_ORIGDOCUMENT ME!private java.lang.StringTRANSFORM_STATUS_DEFAULT_TEXTprivate javax.swing.JTextFieldtransformStatusTextFieldprivate inttransformTypeDOCUMENT ME!private java.lang.String[]tValDOCUMENT ME!private int[]unitsprivate javax.swing.JCheckBoxupdateOriginCheckboxDOCUMENT ME!private javax.swing.JRadioButtonuserDefinedMatrixDOCUMENT ME!private ViewUserInterfaceuserInterfaceDOCUMENT ME!private booleanuseSACenterprivate javax.swing.JCheckBoxuseSACenterBoxcheckbox telling the algorithm to use the scanner coordinate center rather than the image centerprivate javax.swing.JLabelvalueLabelprivate javax.swing.JTextFieldvalueTextprivate javax.swing.JCheckBoxvoiCheckboxDOCUMENT ME!private booleanwcSystemIf true change matrix to the world coordinate system.private TransMatrixxfrmDOCUMENT ME!private javax.swing.JCheckBoxxyAspectRatioDOCUMENT ME!private javax.swing.JCheckBoxxyzAspectRatioDOCUMENT ME!- 
Fields inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBasedisplayInNewFrame, isComplete, scriptParameters
 - 
Fields inherited from class gov.nih.mipav.view.dialogs.JDialogBaseapplyButton, bar, cancelButton, cancelFlag, closeButton, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, serif12, serif12B, voiManager
 - 
Fields inherited from class javax.swing.JDialogaccessibleContext, rootPane, rootPaneCheckingEnabled
 - 
Fields inherited from class java.awt.ComponentBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
- 
 - 
Constructor SummaryConstructors Constructor Description JDialogScriptableTransform()Empty constructor needed for dynamic instantiation (used during scripting).JDialogScriptableTransform(java.awt.Frame theParentFrame, ModelImage im)Constructs new transform dialog and sets up GUI components.JDialogScriptableTransform(java.awt.Frame theParentFrame, ModelImage im, boolean doInit)Constructs new transform dialog and sets up GUI components.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent event)Closes dialog box when the OK button is pressed, sets the variables, and calls the algorithm.voidalgorithmPerformed(AlgorithmBase algorithm)This method is required if the AlgorithmPerformed interface is implemented.private voidbuildComboBox()Builds a list of images to register to the template image.private javax.swing.JPanelbuildMatrixPanel()Builds the matrixPanel.private javax.swing.JPanelbuildOptionPanel()Builds the OptionPanel.private javax.swing.JPanelbuildResamplePanel()Builds the resample panel.(package private) javax.swing.JPanelbuildResampleStatusPanel()(package private) javax.swing.JPanelbuildTransformStatusPanel()protected voidcallAlgorithm()Calls the algorithm with the set variables.private voidcallTalAlgorithm()DOCUMENT ME!private voidclearResampleOriginalValues()private voidclearResampleStatusBox()private voidclearTransformStatusBox()ParameterTablecreateInputParameters()Returns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used insetGUIFromParams()).ParameterTablecreateOutputParameters()Returns a table listing the output parameters of this algorithm (usually just labels used to obtain output image names later).private voiddisableResampleMatrixFileButton()protected voiddoPostAlgorithmActions()Used to perform actions after the execution of the algorithm is completed (e.g., put the result image in the image table).private voidenableDims(boolean state)DOCUMENT ME!private voidenableResampleMatrixFileButton()private voidenableResampleMatrixFileButtonTargetOnly()private voidenableResols(boolean state)DOCUMENT ME!private voidenableYSettings(boolean state)DOCUMENT ME!voidfinalize()voidfocusLost(java.awt.event.FocusEvent event)When the user clicks the mouse out of a text field, resets the necessary variables.ActionMetadatagetActionMetadata()Return meta-information about this discoverable action for categorization and labeling purposes.private int[]getAxisOrientation(float[][] array)Return the 3 axis orientation codes that correspond to the closest standard anatomical orientation of the (i,j,k) axes.(package private) java.io.FilegetFileFromName(java.lang.String fileName)java.lang.StringgetOutputImageName(java.lang.String imageParamName)Returns the name of an image output by this algorithm, the image returned depends on the parameter label given (which can be used to retrieve the image object from the image registry).ModelImagegetResultImage()Accessor that returns the image.private booleanhasV1TargetData()private voidinit()Initializes the dialog box to a certain size and adds the components.booleanisActionComplete()Returns whether the action has successfully completed its execution.private booleanisCorrectTranformMatrixFile(java.lang.String fileName)private booleanisV2MatrixDataFile()private booleanisValidV2MatrixFileRead()voiditemStateChanged(java.awt.event.ItemEvent event)Method to handle item events.java.lang.StringmatrixFileMenu()Allows the user to select matrix file.private voidpopulateResampleMatrixFileValues()TransMatrixreadTransformMatrixFile(java.lang.String fileName)Reads a matrix from a file.private TransMatrixreadTransformMatrixFile(java.lang.String fileName, boolean runningFromScript)Reads a matrix from a file.private TransMatrixreorientCoordSystem(TransMatrix rkMatrix)Re-orient the matrix to world and left-hand coordinate systems if required.static TransMatrixreorientCoordSystem(TransMatrix rkMatrix, ModelImage rkImage, ModelImage rkResampleImage, boolean bWcSystem, boolean bLeftHandSystem)Re-orient the matrix to world and left-hand coordinate systems if required.voidsetClipFlag(boolean flag)Accessor that sets the clip flag.private voidsetDefaultResampleToUser()DOCUMENT ME!voidsetDimAndResXYZ()Resets the dimension and resolution fields for resampling panel.voidsetDoInvMat(boolean flag)Accessor that sets the boolean for invert matrix.voidsetDoTalairach(boolean doTalairach)Accessor that sets the boolean for doing a Talairach type transformation.voidsetFileXDim(int xDim)voidsetFillValue(float fillValue)Accessor that sets the fillValue.protected voidsetGUIFromParams()Set the dialog GUI using the script parameters while running this algorithm as part of a script.voidsetImage25D(boolean flag)Accessor that sets the slicing flag.voidsetInterp(int interp)Accessor that sets the interpolation method.voidsetLeftHandSystem(boolean leftHandSys)Sets the left-hand coordinate flag.voidsetMatrix(TransMatrix matrix)Accessor that sets the transformation matrix.voidsetOutDimensions(int[] outDim)Accessor to set the output image's dimensions.voidsetOutResolutions(float[] outRes)Accessor to set the output image's resolutions.voidsetPadFlag(boolean flag)Accessor that sets the padding flag.voidsetPreserveFOV(boolean flag)Accessor that sets value for the preserveFOV booleanvoidsetQuiet(boolean quiet)private voidsetResampleStatusBox(java.lang.String status)private voidsetTransformStatusBox(java.lang.String status)voidsetTransformType(int transformType)Accessor that sets the type of Talairach transformation.voidsetUnits(int[] units)Accessor that sets the units.voidsetUpdateOrigin(boolean flag)Accessor that sets the update origin flag.private booleansetVariables()Sets the variables needed to run the algorithm.voidsetVOIFlag(boolean flag)Accessor that sets the voi flag.voidsetWCSystem(boolean wcSys)Sets the world coordinate flag.voidstateChanged(javax.swing.event.ChangeEvent event)Sets values based on knob along slider.protected voidstoreParamsFromGUI()Record the parameters just used to run this algorithm in a script.private booleantestType(int type, float value)Determine if the value is in the image type range and within the float range since AlgorithmTransform does not use double buffers.private voidupdateResampleStatusImage()private voidupdateResampleStatusUserSpecified()- 
Methods inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBasegetDialogActionString, insertScriptLine, isComplete, scriptRun, setComplete
 - 
Methods inherited from class gov.nih.mipav.view.dialogs.JDialogBasebuildApplyButton, buildButtons, buildCancelButton, buildCancelButton, buildCloseButton, buildHelpButton, buildImageComboBox, buildOKButton, buildOKButton, buildOKCancelButtons, buildTitledBorder, buildTitledBorder, createLabel, createProgressBar, createProgressBar, createTextField, focusGained, getDialogName, isCancelled, isQuietRunning, isRunInSeparateThread, isScriptRunning, loadDefaults, loadDefaults, makeImageName, makeString, openNewFrame, saveDefaults, saveDefaults, setQuietRunning, setScriptRunning, setSeparateThread, setVisible, setVisible, setVisibleMenuBar, setVisibleStandard, setVOIManager, testParameter, testParameterMin, updateFFTFileInfo, updateFileInfo, updateFileInfoOtherModality, updateFileInfoStatic, updateFileInfoStatic, updateFileTypeInfo, updateFileTypeInfo, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 - 
Methods inherited from class javax.swing.JDialogaddImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 - 
Methods inherited from class java.awt.DialogaddNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
 - 
Methods inherited from class java.awt.WindowaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, 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, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
 - 
Methods inherited from class java.awt.Containeradd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
 - 
Methods inherited from class java.awt.Componentaction, 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, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 - 
Methods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface gov.nih.mipav.view.dialogs.ActionDiscoveryscriptRun
 
- 
 
- 
- 
- 
Field Detail- 
serialVersionUIDprivate static final long serialVersionUID Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
 
 - 
ORIG_TO_ACPCprivate static final int ORIG_TO_ACPC DOCUMENT ME!- See Also:
- Constant Field Values
 
 - 
ORIG_TO_TLRCprivate static final int ORIG_TO_TLRC DOCUMENT ME!- See Also:
- Constant Field Values
 
 - 
ACPC_TO_TLRCprivate static final int ACPC_TO_TLRC DOCUMENT ME!- See Also:
- Constant Field Values
 
 - 
TLRC_TO_ACPCprivate static final int TLRC_TO_ACPC DOCUMENT ME!- See Also:
- Constant Field Values
 
 - 
TLRC_TO_ORIGprivate static final int TLRC_TO_ORIG DOCUMENT ME!- See Also:
- Constant Field Values
 
 - 
ACPC_TO_ORIGprivate static final int ACPC_TO_ORIG DOCUMENT ME!- See Also:
- Constant Field Values
 
 - 
algoTalprivate AlgorithmTalairachTransform algoTal DOCUMENT ME!
 - 
algoTransprivate AlgorithmTransform algoTrans or if the source image is to be replaced.
 - 
clipCheckboxprivate javax.swing.JCheckBox clipCheckbox DOCUMENT ME!
 - 
voiCheckboxprivate javax.swing.JCheckBox voiCheckbox DOCUMENT ME!
 - 
image25DCheckboxprivate javax.swing.JCheckBox image25DCheckbox DOCUMENT ME!
 - 
updateOriginCheckboxprivate javax.swing.JCheckBox updateOriginCheckbox DOCUMENT ME!
 - 
invertCheckboxprivate javax.swing.JCheckBox invertCheckbox DOCUMENT ME!
 - 
comboBoxImageprivate javax.swing.JComboBox comboBoxImage DOCUMENT ME!
 - 
comboBoxInterpprivate javax.swing.JComboBox comboBoxInterp DOCUMENT ME!
 - 
comboBoxTalTransformprivate javax.swing.JComboBox comboBoxTalTransform DOCUMENT ME!
 - 
computeTImageprivate javax.swing.JRadioButton computeTImage DOCUMENT ME!
 - 
do25Dprivate boolean do25D DOCUMENT ME!
 - 
doRotateCenterprivate boolean doRotateCenter DOCUMENT ME!
 - 
doTalairachprivate boolean doTalairach DOCUMENT ME!
 - 
doVOIprivate boolean doVOI DOCUMENT ME!
 - 
doClipprivate boolean doClip DOCUMENT ME!
 - 
doPadprivate boolean doPad DOCUMENT ME!
 - 
preserveFOVprivate boolean preserveFOV DOCUMENT ME!
 - 
doUpdateOriginprivate boolean doUpdateOrigin DOCUMENT ME!
 - 
doInvMatprivate boolean doInvMat DOCUMENT ME!
 - 
fileTransMatrixprivate TransMatrix fileTransMatrix Stores the matrix read in from a file it then can be converted to the corrected axis orientation (i.e. world coordinate and/or left-hand coordinate systems).
 - 
imageprivate ModelImage image source image
 - 
interpprivate int interp Interpolation method
 - 
fillValueprivate float fillValue 
 - 
labelOriginprivate javax.swing.JLabel labelOrigin 
 - 
labelResXprivate javax.swing.JLabel labelResX DOCUMENT ME!
 - 
labelResYprivate javax.swing.JLabel labelResY DOCUMENT ME!
 - 
labelResZprivate javax.swing.JLabel labelResZ DOCUMENT ME!
 - 
labelDimXprivate javax.swing.JLabel labelDimX DOCUMENT ME!
 - 
labelDimYprivate javax.swing.JLabel labelDimY DOCUMENT ME!
 - 
labelDimZprivate javax.swing.JLabel labelDimZ DOCUMENT ME!
 - 
labelTransformResXprivate javax.swing.JLabel labelTransformResX 
 - 
labelTransformResYprivate javax.swing.JLabel labelTransformResY 
 - 
labelTransformResZprivate javax.swing.JLabel labelTransformResZ 
 - 
labelTransformDimXprivate javax.swing.JLabel labelTransformDimX 
 - 
labelTransformDimYprivate javax.swing.JLabel labelTransformDimY 
 - 
labelTransformDimZprivate javax.swing.JLabel labelTransformDimZ 
 - 
textTransformResXprivate javax.swing.JTextField textTransformResX 
 - 
textTransformResYprivate javax.swing.JTextField textTransformResY 
 - 
textTransformResZprivate javax.swing.JTextField textTransformResZ 
 - 
textTransformDimXprivate javax.swing.JTextField textTransformDimX 
 - 
textTransformDimYprivate javax.swing.JTextField textTransformDimY 
 - 
textTransformDimZprivate javax.swing.JTextField textTransformDimZ 
 - 
resTransformGroupprivate javax.swing.ButtonGroup resTransformGroup 
 - 
resampleMatrixSourceButtonprivate javax.swing.JRadioButton resampleMatrixSourceButton 
 - 
resampleMatrixTargetButtonprivate javax.swing.JRadioButton resampleMatrixTargetButton 
 - 
labelTxprivate javax.swing.JLabel labelTx DOCUMENT ME!
 - 
labelTyprivate javax.swing.JLabel labelTy DOCUMENT ME!
 - 
labelTzprivate javax.swing.JLabel labelTz DOCUMENT ME!
 - 
labelRxprivate javax.swing.JLabel labelRx DOCUMENT ME!
 - 
labelRyprivate javax.swing.JLabel labelRy DOCUMENT ME!
 - 
labelRzprivate javax.swing.JLabel labelRz DOCUMENT ME!
 - 
labelSxprivate javax.swing.JLabel labelSx DOCUMENT ME!
 - 
labelSyprivate javax.swing.JLabel labelSy DOCUMENT ME!
 - 
labelSzprivate javax.swing.JLabel labelSz DOCUMENT ME!
 - 
labelSKxprivate javax.swing.JLabel labelSKx DOCUMENT ME!
 - 
labelSKyprivate javax.swing.JLabel labelSKy DOCUMENT ME!
 - 
labelSKzprivate javax.swing.JLabel labelSKz DOCUMENT ME!
 - 
leftHandSystemprivate boolean leftHandSystem If true change matrix to the left-hand coordinate system.
 - 
magSliderprivate javax.swing.JSlider magSlider DOCUMENT ME!
 - 
matrixDeterminationGroupprivate javax.swing.ButtonGroup matrixDeterminationGroup DOCUMENT ME!
 - 
rotationAxisGroupprivate javax.swing.ButtonGroup rotationAxisGroup DOCUMENT ME!
 - 
cropOrPadprivate javax.swing.ButtonGroup cropOrPad DOCUMENT ME!
 - 
matrixFileprivate java.lang.String matrixFile DOCUMENT ME!
 - 
matrixDirectoryprivate java.lang.String matrixDirectory 
 - 
matrixFNameprivate javax.swing.JTextField matrixFName DOCUMENT ME!
 - 
maxprivate int max DOCUMENT ME!
 - 
minprivate int min DOCUMENT ME!
 - 
maximumprivate javax.swing.JLabel maximum DOCUMENT ME!
 - 
minimumprivate javax.swing.JLabel minimum DOCUMENT ME!
 - 
currentprivate javax.swing.JLabel current DOCUMENT ME!
 - 
oXdimprivate int oXdim DOCUMENT ME!
 - 
oYdimprivate int oYdim DOCUMENT ME!
 - 
oZdimprivate int oZdim DOCUMENT ME!
 - 
cXdimprivate int cXdim DOCUMENT ME!
 - 
cYdimprivate int cYdim DOCUMENT ME!
 - 
cZdimprivate int cZdim DOCUMENT ME!
 - 
oXresprivate float oXres DOCUMENT ME!
 - 
oYresprivate float oYres DOCUMENT ME!
 - 
oZresprivate float oZres DOCUMENT ME!
 - 
cXresprivate float cXres DOCUMENT ME!
 - 
cYresprivate float cYres DOCUMENT ME!
 - 
cZresprivate float cZres DOCUMENT ME!
 - 
unitsprivate int[] units 
 - 
resampleGroupprivate javax.swing.ButtonGroup resampleGroup DOCUMENT ME!
 - 
resampleImageprivate ModelImage resampleImage DOCUMENT ME!
 - 
resampletoUserprivate javax.swing.JRadioButton resampletoUser DOCUMENT ME!
 - 
resampletoImageprivate javax.swing.JRadioButton resampletoImage DOCUMENT ME!
 - 
resampleSliderprivate javax.swing.JRadioButton resampleSlider DOCUMENT ME!
 - 
resampletoMatrixFileprivate javax.swing.JRadioButton resampletoMatrixFile DOCUMENT ME!
 - 
resultImageprivate ModelImage resultImage DOCUMENT ME!
 - 
rotCenterprivate javax.swing.JRadioButton rotCenter DOCUMENT ME!
 - 
rotOriginprivate javax.swing.JRadioButton rotOrigin DOCUMENT ME!
 - 
cropRadioprivate javax.swing.JRadioButton cropRadio DOCUMENT ME!
 - 
padRadioprivate javax.swing.JRadioButton padRadio DOCUMENT ME!
 - 
storedMatrixprivate javax.swing.JRadioButton storedMatrix DOCUMENT ME!
 - 
noTransformprivate javax.swing.JRadioButton noTransform DOCUMENT ME!
 - 
userDefinedMatrixprivate javax.swing.JRadioButton userDefinedMatrix DOCUMENT ME!
 - 
fileMatrixprivate javax.swing.JRadioButton fileMatrix DOCUMENT ME!
 - 
storedMatrixBoxprivate javax.swing.JComboBox storedMatrixBox 
 - 
textResXprivate javax.swing.JTextField textResX DOCUMENT ME!
 - 
textResYprivate javax.swing.JTextField textResY DOCUMENT ME!
 - 
textResZprivate javax.swing.JTextField textResZ DOCUMENT ME!
 - 
textDimXprivate javax.swing.JTextField textDimX DOCUMENT ME!
 - 
textDimYprivate javax.swing.JTextField textDimY DOCUMENT ME!
 - 
textDimZprivate javax.swing.JTextField textDimZ DOCUMENT ME!
 - 
resampleStatusTextFieldprivate javax.swing.JTextField resampleStatusTextField 
 - 
transformStatusTextFieldprivate javax.swing.JTextField transformStatusTextField 
 - 
textTxprivate javax.swing.JTextField textTx DOCUMENT ME!
 - 
textTyprivate javax.swing.JTextField textTy DOCUMENT ME!
 - 
textTzprivate javax.swing.JTextField textTz DOCUMENT ME!
 - 
textRxprivate javax.swing.JTextField textRx DOCUMENT ME!
 - 
textRyprivate javax.swing.JTextField textRy DOCUMENT ME!
 - 
textRzprivate javax.swing.JTextField textRz DOCUMENT ME!
 - 
textSxprivate javax.swing.JTextField textSx DOCUMENT ME!
 - 
textSyprivate javax.swing.JTextField textSy DOCUMENT ME!
 - 
textSzprivate javax.swing.JTextField textSz DOCUMENT ME!
 - 
textSKxprivate javax.swing.JTextField textSKx DOCUMENT ME!
 - 
textSKyprivate javax.swing.JTextField textSKy DOCUMENT ME!
 - 
textSKzprivate javax.swing.JTextField textSKz DOCUMENT ME!
 - 
tInfoprivate TalairachTransformInfo tInfo DOCUMENT ME!
 - 
transformTypeprivate int transformType DOCUMENT ME!
 - 
tValprivate java.lang.String[] tVal DOCUMENT ME!
 - 
userInterfaceprivate ViewUserInterface userInterface DOCUMENT ME!
 - 
wcSystemprivate boolean wcSystem If true change matrix to the world coordinate system.
 - 
xfrmprivate TransMatrix xfrm DOCUMENT ME!
 - 
xyAspectRatioprivate javax.swing.JCheckBox xyAspectRatio DOCUMENT ME!
 - 
xyzAspectRatioprivate javax.swing.JCheckBox xyzAspectRatio DOCUMENT ME!
 - 
preserveFOVButtonprivate javax.swing.JRadioButton preserveFOVButton 
 - 
preserveOutputDimsButtonprivate javax.swing.JRadioButton preserveOutputDimsButton 
 - 
outputDimsGroupprivate javax.swing.ButtonGroup outputDimsGroup 
 - 
preserveFOV2Buttonprivate javax.swing.JRadioButton preserveFOV2Button 
 - 
separateDimResButtonprivate javax.swing.JRadioButton separateDimResButton 
 - 
resDimGroupprivate javax.swing.ButtonGroup resDimGroup 
 - 
useSACenterBoxprivate javax.swing.JCheckBox useSACenterBox checkbox telling the algorithm to use the scanner coordinate center rather than the image center
 - 
useSACenterprivate boolean useSACenter 
 - 
tabbedPaneprivate javax.swing.JTabbedPane tabbedPane Tabbed pane
 - 
isSATransformprivate boolean isSATransform is this a scanner anatomical transform (->AXIAL)
 - 
enableSATransformprivate boolean enableSATransform 
 - 
constantFOVprivate int constantFOV We use the constant to preserve the FOV. Either 1 or 0;
 - 
interpFOVgroupprivate javax.swing.ButtonGroup interpFOVgroup Button group for interpolation type, contant FOV or start, end matching.
 - 
constantFOVradioprivate javax.swing.JRadioButton constantFOVradio Radio button for constant FOV interpolation.
 - 
endMatchFOVradioprivate javax.swing.JRadioButton endMatchFOVradio Radio button for slice start & end matching interpolation.
 - 
dimsprivate float[] dims 
 - 
resolsprivate float[] resols 
 - 
outOfBoundsLabelprivate javax.swing.JLabel outOfBoundsLabel 
 - 
outOfBoundsComboBoxprivate javax.swing.JComboBox outOfBoundsComboBox 
 - 
valueLabelprivate javax.swing.JLabel valueLabel 
 - 
valueTextprivate javax.swing.JTextField valueText 
 - 
imageMinprivate double imageMin 
 - 
imageMaxprivate double imageMax 
 - 
dataTypeprivate int dataType 
 - 
resamplePanelprivate javax.swing.JPanel resamplePanel 
 - 
outOfBoundsIndexprivate int outOfBoundsIndex Tells how to select fill value for out of bounds data 0 for image minimum 1 for NaN for float, zero otherwise. 2 for user defined 3 for image maximum
 - 
splineprivate AlgorithmTPSpline spline 
 - 
fileInterpprivate int[] fileInterp 
 - 
sourceXresprivate float[] sourceXres 
 - 
sourceYresprivate float[] sourceYres 
 - 
sourceZresprivate float[] sourceZres 
 - 
targetXresprivate float[] targetXres 
 - 
targetYresprivate float[] targetYres 
 - 
targetZresprivate float[] targetZres 
 - 
sourceXdimprivate int[] sourceXdim 
 - 
sourceYdimprivate int[] sourceYdim 
 - 
sourceZdimprivate int[] sourceZdim 
 - 
targetXdimprivate int[] targetXdim 
 - 
targetYdimprivate int[] targetYdim 
 - 
targetZdimprivate int[] targetZdim 
 - 
filetVOIprivate boolean[] filetVOI 
 - 
fileClipprivate boolean[] fileClip 
 - 
filePadprivate boolean[] filePad 
 - 
quietprivate boolean quiet 
 - 
RESAMPLE_STATUS_DEFAULT_TEXTprivate java.lang.String RESAMPLE_STATUS_DEFAULT_TEXT 
 - 
TRANSFORM_STATUS_DEFAULT_TEXTprivate java.lang.String TRANSFORM_STATUS_DEFAULT_TEXT 
 - 
prevSelectedTransformRadioButtonprivate javax.swing.JRadioButton prevSelectedTransformRadioButton 
 
- 
 - 
Constructor Detail- 
JDialogScriptableTransformpublic JDialogScriptableTransform() Empty constructor needed for dynamic instantiation (used during scripting).
 - 
JDialogScriptableTransformpublic JDialogScriptableTransform(java.awt.Frame theParentFrame, ModelImage im)Constructs new transform dialog and sets up GUI components.- Parameters:
- theParentFrame- Parent frame.
- im- Source image.
 
 - 
JDialogScriptableTransformpublic JDialogScriptableTransform(java.awt.Frame theParentFrame, ModelImage im, boolean doInit)Constructs new transform dialog and sets up GUI components.- Parameters:
- theParentFrame- Parent frame.
- im- Source image.
 
 
- 
 - 
Method Detail- 
setQuietpublic void setQuiet(boolean quiet) - Parameters:
- quiet-
 
 - 
actionPerformedpublic void actionPerformed(java.awt.event.ActionEvent event) Closes dialog box when the OK button is pressed, sets the variables, and calls the algorithm.- Specified by:
- actionPerformedin interface- java.awt.event.ActionListener
- Overrides:
- actionPerformedin class- JDialogBase
- Parameters:
- event- Event that triggers function.
 
 - 
algorithmPerformedpublic void algorithmPerformed(AlgorithmBase algorithm) This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithms when it has completed or failed to to complete, so that the dialog can be display the result image and/or clean up.- Specified by:
- algorithmPerformedin interface- AlgorithmInterface
- Parameters:
- algorithm- Algorithm that caused the event.
 
 - 
finalizepublic void finalize() - Overrides:
- finalizein class- java.lang.Object
 
 - 
focusLostpublic void focusLost(java.awt.event.FocusEvent event) When the user clicks the mouse out of a text field, resets the necessary variables.- Specified by:
- focusLostin interface- java.awt.event.FocusListener
- Overrides:
- focusLostin class- JDialogBase
- Parameters:
- event- event that triggers this function
 
 - 
getResultImagepublic ModelImage getResultImage() Accessor that returns the image.- Returns:
- The result image
 
 - 
itemStateChangedpublic void itemStateChanged(java.awt.event.ItemEvent event) Method to handle item events.- Specified by:
- itemStateChangedin interface- java.awt.event.ItemListener
- Overrides:
- itemStateChangedin class- JDialogBase
- Parameters:
- event- event that cause the method to fire
 
 - 
matrixFileMenupublic java.lang.String matrixFileMenu() Allows the user to select matrix file.- Returns:
- fileName
 
 - 
getFileFromNamejava.io.File getFileFromName(java.lang.String fileName) 
 - 
isCorrectTranformMatrixFileprivate boolean isCorrectTranformMatrixFile(java.lang.String fileName) 
 - 
readTransformMatrixFileprivate TransMatrix readTransformMatrixFile(java.lang.String fileName, boolean runningFromScript) Reads a matrix from a file.- Parameters:
- fileName- name of the matrix file.
- runningFromScript- if this was invoked from the script runner
 
 - 
readTransformMatrixFilepublic TransMatrix readTransformMatrixFile(java.lang.String fileName) Reads a matrix from a file.- Parameters:
- fileName- name of the matrix file.
 
 - 
setPreserveFOVpublic void setPreserveFOV(boolean flag) Accessor that sets value for the preserveFOV boolean- Parameters:
- flag-- trueindicates that output dim should be set from input dim*res or input (dim-1)*res. flag- falseindicates that the output dim should be set from the selected image output dim.
 
 - 
setClipFlagpublic void setClipFlag(boolean flag) Accessor that sets the clip flag.- Parameters:
- flag-- trueindicates clip image,- falseotherwise.
 
 - 
setDoInvMatpublic void setDoInvMat(boolean flag) Accessor that sets the boolean for invert matrix.- Parameters:
- flag-- trueindicates invert matrix,- falseotherwise.
 
 - 
setDimAndResXYZpublic void setDimAndResXYZ() Resets the dimension and resolution fields for resampling panel. Called by focusLost.
 - 
setDoTalairachpublic void setDoTalairach(boolean doTalairach) Accessor that sets the boolean for doing a Talairach type transformation.- Parameters:
- doTalairach- boolean
 
 - 
setImage25Dpublic void setImage25D(boolean flag) Accessor that sets the slicing flag.- Parameters:
- flag-- trueindicates slices should be blurred independently.
 
 - 
setInterppublic void setInterp(int interp) Accessor that sets the interpolation method.- Parameters:
- interp- DOCUMENT ME!
 
 - 
setLeftHandSystempublic void setLeftHandSystem(boolean leftHandSys) Sets the left-hand coordinate flag. If true, change matrix to the left-hand coordinate system.- Overrides:
- setLeftHandSystemin class- JDialogBase
- Parameters:
- leftHandSys- DOCUMENT ME!
 
 - 
setMatrixpublic void setMatrix(TransMatrix matrix) Accessor that sets the transformation matrix.- Parameters:
- matrix- The transformation matrix.
 
 - 
setOutDimensionspublic void setOutDimensions(int[] outDim) Accessor to set the output image's dimensions.- Parameters:
- outDim- Array of the dimensions.
 
 - 
setOutResolutionspublic void setOutResolutions(float[] outRes) Accessor to set the output image's resolutions.- Parameters:
- outRes- Array of the resolutions.
 
 - 
setPadFlagpublic void setPadFlag(boolean flag) Accessor that sets the padding flag.- Parameters:
- flag-- trueindicates slices should be blurred independently.
 
 - 
setFillValuepublic void setFillValue(float fillValue) Accessor that sets the fillValue.- Parameters:
- fillValue- DOCUMENT ME!
 
 - 
setTransformTypepublic void setTransformType(int transformType) Accessor that sets the type of Talairach transformation.- Parameters:
- transformType- int
 
 - 
setUnitspublic void setUnits(int[] units) Accessor that sets the units.- Parameters:
- units- of image
 
 - 
setUpdateOriginpublic void setUpdateOrigin(boolean flag) Accessor that sets the update origin flag.- Parameters:
- flag-- trueindicates to update the image origin using the transformation matrix.
 
 - 
setVOIFlagpublic void setVOIFlag(boolean flag) Accessor that sets the voi flag.- Parameters:
- flag-- trueindicates transform VOI,- falseotherwise.
 
 - 
setWCSystempublic void setWCSystem(boolean wcSys) Sets the world coordinate flag. If true, change matrix to the world coordinate system.- Overrides:
- setWCSystemin class- JDialogBase
- Parameters:
- wcSys- DOCUMENT ME!
 
 - 
stateChangedpublic void stateChanged(javax.swing.event.ChangeEvent event) Sets values based on knob along slider.- Specified by:
- stateChangedin interface- javax.swing.event.ChangeListener
- Parameters:
- event- ChangeEvent event that triggered this function
 
 - 
setFileXDimpublic void setFileXDim(int xDim) - Parameters:
- xDim- By setting fileXdim[0] to zero can change path selected in callAlgorithm
 
 - 
callAlgorithmprotected void callAlgorithm() Calls the algorithm with the set variables.- Specified by:
- callAlgorithmin class- JDialogScriptableBase
 
 - 
doPostAlgorithmActionsprotected void doPostAlgorithmActions() Used to perform actions after the execution of the algorithm is completed (e.g., put the result image in the image table). Defaults to no action, override to actually have it do something.- Overrides:
- doPostAlgorithmActionsin class- JDialogScriptableBase
 
 - 
setGUIFromParamsprotected void setGUIFromParams() Set the dialog GUI using the script parameters while running this algorithm as part of a script.- Specified by:
- setGUIFromParamsin class- JDialogScriptableBase
 
 - 
storeParamsFromGUIprotected void storeParamsFromGUI() throws ParserExceptionRecord the parameters just used to run this algorithm in a script.- Specified by:
- storeParamsFromGUIin class- JDialogScriptableBase
- Throws:
- ParserException- If there is a problem creating/recording the new parameters.
 
 - 
buildComboBoxprivate void buildComboBox() Builds a list of images to register to the template image.
 - 
buildMatrixPanelprivate javax.swing.JPanel buildMatrixPanel() Builds the matrixPanel.- Returns:
- The matrix panel.
 
 - 
buildOptionPanelprivate javax.swing.JPanel buildOptionPanel() Builds the OptionPanel.- Returns:
- DOCUMENT ME!
 
 - 
buildResamplePanelprivate javax.swing.JPanel buildResamplePanel() Builds the resample panel.- Returns:
- The resample panel.
 
 - 
callTalAlgorithmprivate void callTalAlgorithm() DOCUMENT ME!
 - 
enableDimsprivate void enableDims(boolean state) DOCUMENT ME!- Parameters:
- state- DOCUMENT ME!
 
 - 
enableResolsprivate void enableResols(boolean state) DOCUMENT ME!- Parameters:
- state- DOCUMENT ME!
 
 - 
enableYSettingsprivate void enableYSettings(boolean state) DOCUMENT ME!- Parameters:
- state- DOCUMENT ME!
 
 - 
getAxisOrientationprivate int[] getAxisOrientation(float[][] array) Return the 3 axis orientation codes that correspond to the closest standard anatomical orientation of the (i,j,k) axes.- Parameters:
- array- 4x4 matrix that transforms (i,j,k) indexes to x,y,z coordinates where +x =Left, +y = Posterior, +z = Superior Only the upper-left 3x3 corner of the matrix is used This routine finds the permutation of (x,y,z) which has the smallest angle to the (i,j,k) axes directions, which are columns of the input matrix
- Returns:
- DOCUMENT ME!
 
 - 
initprivate void init() Initializes the dialog box to a certain size and adds the components.
 - 
buildResampleStatusPaneljavax.swing.JPanel buildResampleStatusPanel() 
 - 
buildTransformStatusPaneljavax.swing.JPanel buildTransformStatusPanel() 
 - 
reorientCoordSystemprivate TransMatrix reorientCoordSystem(TransMatrix rkMatrix) Re-orient the matrix to world and left-hand coordinate systems if required.- Parameters:
- rkMatrix- the matrix to be converted
- Returns:
- result
- See Also:
- reorientCoordSystem(gov.nih.mipav.model.structures.TransMatrix)
 
 - 
reorientCoordSystempublic static TransMatrix reorientCoordSystem(TransMatrix rkMatrix, ModelImage rkImage, ModelImage rkResampleImage, boolean bWcSystem, boolean bLeftHandSystem) Re-orient the matrix to world and left-hand coordinate systems if required. Note at the moment the voxel resolutions are handled in the transformation algorithm. At some future point we should adjust for voxel resolutions in the transformation matrix - its faster.- Parameters:
- rkMatrix- the matrix to be converted
- rkImage- main image
- rkResampleImage- resampled image
- bWcSystem- true if world coord system
- bLeftHandSystem- true if left-handed system.
- Returns:
- result
 
 - 
setDefaultResampleToUserprivate void setDefaultResampleToUser() DOCUMENT ME!
 - 
setVariablesprivate boolean setVariables() Sets the variables needed to run the algorithm.- Returns:
- Flag indicating successful set of the variables.
 
 - 
testTypeprivate boolean testType(int type, float value)Determine if the value is in the image type range and within the float range since AlgorithmTransform does not use double buffers.- Parameters:
- type- image type
- value- value tested
- Returns:
- true if value is within acceptable range
 
 - 
getActionMetadatapublic ActionMetadata getActionMetadata() Return meta-information about this discoverable action for categorization and labeling purposes.- Specified by:
- getActionMetadatain interface- ActionDiscovery
- Returns:
- Metadata for this action.
 
 - 
createInputParameterspublic ParameterTable createInputParameters() Returns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used insetGUIFromParams()).- Specified by:
- createInputParametersin interface- ActionDiscovery
- Returns:
- A parameter table listing the inputs of this algorithm.
 
 - 
createOutputParameterspublic ParameterTable createOutputParameters() Returns a table listing the output parameters of this algorithm (usually just labels used to obtain output image names later).- Specified by:
- createOutputParametersin interface- ActionDiscovery
- Returns:
- A parameter table listing the outputs of this algorithm.
 
 - 
getOutputImageNamepublic java.lang.String getOutputImageName(java.lang.String imageParamName) Returns the name of an image output by this algorithm, the image returned depends on the parameter label given (which can be used to retrieve the image object from the image registry).- Specified by:
- getOutputImageNamein interface- ActionDiscovery
- Parameters:
- imageParamName- The output image parameter label for which to get the image name.
- Returns:
- The image name of the requested output image parameter label.
 
 - 
isActionCompletepublic boolean isActionComplete() Returns whether the action has successfully completed its execution.- Specified by:
- isActionCompletein interface- ActionDiscovery
- Returns:
- True, if the action is complete. False, if the action failed or is still running.
 
 - 
disableResampleMatrixFileButtonprivate void disableResampleMatrixFileButton() 
 - 
enableResampleMatrixFileButtonprivate void enableResampleMatrixFileButton() 
 - 
enableResampleMatrixFileButtonTargetOnlyprivate void enableResampleMatrixFileButtonTargetOnly() 
 - 
populateResampleMatrixFileValuesprivate void populateResampleMatrixFileValues() 
 - 
clearResampleOriginalValuesprivate void clearResampleOriginalValues() 
 - 
setResampleStatusBoxprivate void setResampleStatusBox(java.lang.String status) 
 - 
clearResampleStatusBoxprivate void clearResampleStatusBox() 
 - 
isValidV2MatrixFileReadprivate boolean isValidV2MatrixFileRead() 
 - 
isV2MatrixDataFileprivate boolean isV2MatrixDataFile() 
 - 
hasV1TargetDataprivate boolean hasV1TargetData() 
 - 
setTransformStatusBoxprivate void setTransformStatusBox(java.lang.String status) 
 - 
clearTransformStatusBoxprivate void clearTransformStatusBox() 
 - 
updateResampleStatusUserSpecifiedprivate void updateResampleStatusUserSpecified() 
 - 
updateResampleStatusImageprivate void updateResampleStatusImage() 
 
- 
 
-