public class CellCounter extends JFrame implements ActionListener, ItemListener, DocumentListener, loci.common.StatusReporter, loci.common.StatusListener, de.unihalle.informatik.Alida.dataio.provider.swing.events.ALDSwingValueChangeListener, de.unihalle.informatik.Alida.operator.events.ALDOperatorCollectionEventListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
CellCounter.CellCounterDetectOperatorConfigPanel
Panel to configure operators to be applied to image.
|
private static class |
CellCounter.GUIShower
Show the GUI threadsafe
|
JFrame.AccessibleJFrameFrame.AccessibleAWTFrameWindow.AccessibleAWTWindow, Window.TypeContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
private static String |
ABOUT |
protected ImageIcon |
aboutIcon
MiToBo icon to be shown in about box.
|
private static String |
ADD |
protected JButton |
addButton |
protected JRadioButton |
ch1Button |
protected JRadioButton |
ch2Button |
protected JRadioButton |
ch3Button |
protected JRadioButton |
ch4Button |
protected ButtonGroup |
channelGrp |
private ij.ImagePlus |
counterImg |
protected CellCntrMarkerVector |
currentMarkerVector |
private static Color[] |
defaultColors
Default colors to be used for the first 8 markers.
|
private static String |
DELETE |
protected JButton |
deleteButton |
private static String |
DETECT |
protected JButton |
detectButton |
protected MTBImage |
detectImg
Copy of input image used for pre-segmentation of regions.
|
protected boolean |
detectMode
Avoids editing markers during pre-segmentation phase.
|
protected int |
detectZSlice
Z-coordinate of currently selected slice, starting with 1 (!).
|
protected JPanel |
dynButtonPanel |
protected Vector<de.unihalle.informatik.Alida.dataio.provider.swing.components.ALDSwingComponent> |
dynColorChooserVector
Keeps track of the color choosers.
|
protected JPanel |
dynColorPanel |
private GridLayout |
dynGrid |
protected JPanel |
dynPanel |
protected Vector<JRadioButton> |
dynRadioVector
Keeps track of the radio buttons for type selection.
|
protected JPanel |
dynTxtPanel |
protected JButton |
exportButton |
private static String |
EXPORTIMG |
protected JButton |
exportimgButton |
private static String |
EXPORTMARKERS |
private static String |
FILTER |
protected JButton |
filterButton |
protected CellCntrImageCanvas |
ic
Reference to associated image window.
|
private ij.ImagePlus |
img |
private static String |
INITIALIZE |
protected JButton |
initializeButton |
(package private) static CellCounter |
instance |
private boolean |
isJava14 |
private boolean |
keepOriginal |
private static String |
KEEPORIGINAL |
protected JButton |
loadButton |
private static String |
LOADMARKERS |
protected Vector<loci.common.StatusListener> |
m_statusListeners
Vector of installed
StatusListener objects. |
protected JCheckBox |
markersCheck |
private CellCntrMarkerVector |
markerVector |
private static String |
MEASURE |
protected JButton |
measureButton |
protected JCheckBox |
newCheck |
protected JCheckBox |
numbersCheck |
(package private) MTBOperatorCollection<CellCounterDetectOperator> |
opCollection
Collection of available detectors for pre-segmentation.
|
protected CellCounter.CellCounterDetectOperatorConfigPanel |
opConfPanel |
static int |
OPEN |
HashMap<String,Integer> |
opTypeIDs |
protected CellCntrRegionFilterFrame |
pFilter
Frame for filtering segmented regions in a user-friendly manner.
|
protected JDialog |
progressMessageWin
Corresponding configuration and control window.
|
private static String |
QUIT |
protected ButtonGroup |
radioGrp |
private static String |
REMOVE |
protected JButton |
removeButton |
protected boolean |
renderHighQuality
Flag to enable or disable high quality rendering.
|
private static String |
RESET |
protected JButton |
resetButton |
private static String |
RESETCOUNTER |
private static String |
RESULTS |
protected JButton |
resultsButton |
static int |
SAVE |
private static String |
SELECT |
protected JButton |
selectButton |
protected JSeparator |
separator |
private static String |
SHOWALL |
protected JCheckBox |
showAllCheck |
protected JCheckBox |
showBordersBox |
private static String |
SHOWMARKERS |
private static String |
SHOWNUMBERS |
protected JSpinner |
spChannelBoundaries |
protected SpinnerNumberModel |
spmChannelBoundaries |
protected JPanel |
statButtonPanel |
private Vector<JTextField> |
txtFieldVector
Keeps track of the text fields showing numbers of markers.
|
protected Vector<CellCntrMarkerVector> |
typeVector
Keeps track of the marker vectors.
|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabledCROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSEABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
CellCounter() |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent event) |
private void |
addMenuBar()
Adds a menu bar to the frame.
|
void |
addStatusListener(loci.common.StatusListener statListener) |
void |
changedUpdate(DocumentEvent e) |
protected void |
disableDetectMode()
Disables detect mode and deactivates buttons.
|
void |
dispose() |
void |
exportMarkers() |
Vector<JRadioButton> |
getButtonVector() |
int |
getCellBoundaryChannel() |
CellCntrMarkerVector |
getCurrentMarkerVector() |
private String |
getFilePath(JFrame parent,
String dialogMessage,
int dialogType) |
void |
handleALDOperatorCollectionEvent(de.unihalle.informatik.Alida.operator.events.ALDOperatorCollectionEvent event) |
void |
handleValueChangeEvent(de.unihalle.informatik.Alida.dataio.provider.swing.events.ALDSwingValueChangeEvent event) |
private void |
initGUI() |
private void |
initializeImage()
Method to initialize internal image data from focussed GUI image.
|
protected void |
initProgressWin()
Setup the window for informing the user about progress.
|
void |
insertUpdate(DocumentEvent e) |
void |
itemStateChanged(ItemEvent e) |
void |
loadMarkers() |
private JButton |
makeButton(String name,
String tooltip) |
private JTextField |
makeDynamicTextArea() |
private JRadioButton |
makeDynRadioButton(int id,
CellCntrMarkerVector mv)
Initializes the radio buttons to select the marker type.
|
void |
measure() |
void |
notifyListeners(loci.common.StatusEvent e) |
(package private) void |
populateTxtFields() |
void |
removeStatusListener(loci.common.StatusListener statListener) |
void |
removeUpdate(DocumentEvent e) |
void |
report() |
void |
reset()
Delete all markers.
|
void |
resetSelectedCounter()
Delete markers of selected counter typel
|
void |
setButtonVector(Vector<JRadioButton> buttonVector) |
void |
setCurrentMarkerVector(CellCntrMarkerVector currMarkerVector) |
static void |
setType(int type) |
private void |
setupAboutBoxIcon()
Initializes the icon for the about box.
|
protected void |
showAboutBox()
Show MiToBo About Box window.
|
protected void |
showProgressWin()
Displays progress window in the center of the image.
|
void |
statusUpdated(loci.common.StatusEvent e) |
void |
switchContours() |
void |
switchMarkers() |
void |
switchNumbers() |
private void |
updateChooserButton(DocumentEvent e)
Method to enable or disable the color chooser button linked with document.
|
private void |
validateLayout() |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedaddPropertyChangeListener, 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, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontadd, 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, validateTreeaction, 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, 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, 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, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFont, postEventprivate static final String ADD
private static final String REMOVE
private static final String INITIALIZE
private static final String RESULTS
private static final String DELETE
private static final String KEEPORIGINAL
private static final String SHOWMARKERS
private static final String SHOWNUMBERS
private static final String SHOWALL
private static final String RESET
private static final String RESETCOUNTER
private static final String EXPORTMARKERS
private static final String LOADMARKERS
private static final String EXPORTIMG
private static final String MEASURE
private static final String ABOUT
private static final String QUIT
private static final String DETECT
private static final String FILTER
private static final String SELECT
private static final Color[] defaultColors
protected CellCntrRegionFilterFrame pFilter
protected Vector<CellCntrMarkerVector> typeVector
protected Vector<JRadioButton> dynRadioVector
protected Vector<de.unihalle.informatik.Alida.dataio.provider.swing.components.ALDSwingComponent> dynColorChooserVector
private Vector<JTextField> txtFieldVector
private CellCntrMarkerVector markerVector
protected CellCntrMarkerVector currentMarkerVector
protected JPanel dynPanel
protected JPanel dynButtonPanel
protected JPanel statButtonPanel
protected JPanel dynTxtPanel
protected JPanel dynColorPanel
protected JCheckBox showBordersBox
protected JCheckBox newCheck
protected JCheckBox markersCheck
protected JCheckBox numbersCheck
protected JCheckBox showAllCheck
protected JSpinner spChannelBoundaries
protected SpinnerNumberModel spmChannelBoundaries
protected CellCounter.CellCounterDetectOperatorConfigPanel opConfPanel
protected ButtonGroup radioGrp
protected ButtonGroup channelGrp
protected JRadioButton ch1Button
protected JRadioButton ch2Button
protected JRadioButton ch3Button
protected JRadioButton ch4Button
protected JSeparator separator
protected JButton addButton
protected JButton removeButton
protected JButton initializeButton
protected JButton detectButton
protected JButton filterButton
protected JButton selectButton
protected JButton resultsButton
protected JButton deleteButton
protected JButton resetButton
protected JButton exportButton
protected JButton loadButton
protected JButton exportimgButton
protected JButton measureButton
private boolean keepOriginal
protected boolean detectMode
protected boolean renderHighQuality
protected CellCntrImageCanvas ic
private ij.ImagePlus img
private ij.ImagePlus counterImg
protected MTBImage detectImg
protected int detectZSlice
private GridLayout dynGrid
MTBOperatorCollection<CellCounterDetectOperator> opCollection
protected JDialog progressMessageWin
private boolean isJava14
protected ImageIcon aboutIcon
protected Vector<loci.common.StatusListener> m_statusListeners
StatusListener objects.static CellCounter instance
public static final int SAVE
public static final int OPEN
private void initGUI()
private void addMenuBar()
private void setupAboutBoxIcon()
private JTextField makeDynamicTextArea()
void populateTxtFields()
private JRadioButton makeDynRadioButton(int id, CellCntrMarkerVector mv)
id - Index of the marker (in the range of 1-8)private void initializeImage()
private void validateLayout()
public void actionPerformed(ActionEvent event)
actionPerformed in interface ActionListenerpublic void itemStateChanged(ItemEvent e)
itemStateChanged in interface ItemListenerpublic void handleValueChangeEvent(de.unihalle.informatik.Alida.dataio.provider.swing.events.ALDSwingValueChangeEvent event)
handleValueChangeEvent in interface de.unihalle.informatik.Alida.dataio.provider.swing.events.ALDSwingValueChangeListenerprotected void showAboutBox()
protected void disableDetectMode()
throws de.unihalle.informatik.Alida.exceptions.ALDWorkflowException
de.unihalle.informatik.Alida.exceptions.ALDWorkflowException - Thrown in case of failure.public void measure()
public void reset()
public void resetSelectedCounter()
public void report()
public void loadMarkers()
throws de.unihalle.informatik.Alida.exceptions.ALDWorkflowException
de.unihalle.informatik.Alida.exceptions.ALDWorkflowExceptionpublic void exportMarkers()
public int getCellBoundaryChannel()
public Vector<JRadioButton> getButtonVector()
public void setButtonVector(Vector<JRadioButton> buttonVector)
public CellCntrMarkerVector getCurrentMarkerVector()
public void setCurrentMarkerVector(CellCntrMarkerVector currMarkerVector)
public static void setType(int type)
public void switchMarkers()
public void switchNumbers()
public void switchContours()
public void insertUpdate(DocumentEvent e)
insertUpdate in interface DocumentListenerpublic void removeUpdate(DocumentEvent e)
removeUpdate in interface DocumentListenerpublic void changedUpdate(DocumentEvent e)
changedUpdate in interface DocumentListenerprivate void updateChooserButton(DocumentEvent e)
e - Document event to be handled.protected void initProgressWin()
protected void showProgressWin()
public void handleALDOperatorCollectionEvent(de.unihalle.informatik.Alida.operator.events.ALDOperatorCollectionEvent event)
handleALDOperatorCollectionEvent in interface de.unihalle.informatik.Alida.operator.events.ALDOperatorCollectionEventListenerpublic void addStatusListener(loci.common.StatusListener statListener)
addStatusListener in interface loci.common.StatusReporterpublic void notifyListeners(loci.common.StatusEvent e)
notifyListeners in interface loci.common.StatusReporterpublic void removeStatusListener(loci.common.StatusListener statListener)
removeStatusListener in interface loci.common.StatusReporterpublic void statusUpdated(loci.common.StatusEvent e)
statusUpdated in interface loci.common.StatusListenerCopyright © 2010–2025 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.