databionics.esom.tool.classmask
Class ClassmaskTool

java.lang.Object
  extended by databionics.esom.tool.AbstractTool
      extended by databionics.esom.tool.classmask.ClassmaskTool
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.util.EventListener

public class ClassmaskTool
extends AbstractTool
implements java.awt.event.MouseListener

Author:
Nogger, Mart, Stammi

Field Summary
protected  javax.swing.JSpinner alphaSpinner
           
protected  boolean autoFlood
          Automated floodfill or not.
protected  javax.swing.JCheckBox chkAutoFlood
          Chechbox for automated floodfill
protected  javax.swing.JCheckBox chkFloodFill
          Checkbox wether to use floodfill
protected  ColorTable colorTable
           
protected  DataClass currentClass
           
protected  ClassmaskFile data
           
protected  boolean floodFill
          Floodfill or not.
protected  javax.swing.JLabel lblTreshold
          Label for sldTreshold.
protected static org.apache.log4j.Logger log
           
protected  javax.swing.JSlider sldTreshold
          This slider is used to determine the treshold for not automated floodfill
protected  double treshold
          The treshold for floodfill.
 
Fields inherited from class databionics.esom.tool.AbstractTool
application, bottomBar, bottomTab, btnClear, btnLoad, btnPaint, btnSave, clearItm, clickMode, controlButton, creatorPanel, dataTable, dataTableModel, displayPanel, dragMode, drawing, fileMenu, filename, gui, loader, loadItm, moveCallback, pnlControl, polygonMode, popMenu, removeItm, renderer, renderPanel, saveItm, toolBar, toolRenderer
 
Constructor Summary
ClassmaskTool(boolean gui, Application application)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          If the big ControlButton is pressed, select this Tool
 float getAlpha()
           
 ColorTable getColorTable()
           
 DataClass getCurrentClass()
           
 ClassmaskFile getData()
           
 java.lang.String getShortTitle()
           
 double getTreshold()
           
 void init()
          Initialize what needs to be Initialized.
 boolean isAutoFlood()
           
 boolean isFloodFill()
           
 boolean load(java.lang.String filename)
          load the neuron classification from a *.cls file
 void mouseClicked(java.awt.event.MouseEvent arg0)
           
 void mouseEntered(java.awt.event.MouseEvent arg0)
           
 void mouseExited(java.awt.event.MouseEvent arg0)
           
 void mousePressed(java.awt.event.MouseEvent arg0)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void reset()
          called when the actual renderer changed
 void resetGuiElements()
           
 boolean save(java.lang.String filename)
           
 void setColorTable(ColorTable colorTable)
           
 void setCurrentClass(DataClass currentClass)
           
 void setData(ClassmaskFile data)
           
 void setData(java.lang.Object object)
           
 void setDrawing(boolean drawing)
          set the drawing mode for this tool.
 void update()
          Updates all gui elements, if not null.
 
Methods inherited from class databionics.esom.tool.AbstractTool
callback, getApplication, getBottomTab, getCallback, getControlButton, getCreatorPanel, getDataTable, getDataTableModel, getDisplayPanel, getFileMenu, getFilename, getLoader, getMessage, getMoveCallback, getPnlControl, getPopMenu, getRenderer, getToolBar, getToolRenderer, initGui, isClickMode, isDragMode, isDrawing, isGui, isPolygonMode, moveSelection, reAreas, reColorize, reDraw, reFore, reMask, rePostFore, rePreFore, reRender, reTile, reZoom, select, setApplication, setBottomTab, setCallback, setClickMode, setControlButton, setCreatorPanel, setCtrlAccelerator, setDataTable, setDataTableModel, setDisplayPanel, setDragMode, setFilename, setLoader, setMoveCallback, setPolygonMode, setRenderer, setToolBar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log

currentClass

protected DataClass currentClass

colorTable

protected ColorTable colorTable

alphaSpinner

protected javax.swing.JSpinner alphaSpinner

data

protected ClassmaskFile data

chkFloodFill

protected javax.swing.JCheckBox chkFloodFill
Checkbox wether to use floodfill


floodFill

protected boolean floodFill
Floodfill or not.


chkAutoFlood

protected javax.swing.JCheckBox chkAutoFlood
Chechbox for automated floodfill


autoFlood

protected boolean autoFlood
Automated floodfill or not.


sldTreshold

protected javax.swing.JSlider sldTreshold
This slider is used to determine the treshold for not automated floodfill


lblTreshold

protected javax.swing.JLabel lblTreshold
Label for sldTreshold.


treshold

protected double treshold
The treshold for floodfill.

Constructor Detail

ClassmaskTool

public ClassmaskTool(boolean gui,
                     Application application)
Method Detail

init

public void init()
Description copied from class: AbstractTool
Initialize what needs to be Initialized.

Specified by:
init in class AbstractTool

update

public void update()
Description copied from class: AbstractTool
Updates all gui elements, if not null. Uses JComponent.revalidate() Better solution maybe possible.

Overrides:
update in class AbstractTool

reset

public void reset()
called when the actual renderer changed

Specified by:
reset in class AbstractTool

load

public boolean load(java.lang.String filename)
load the neuron classification from a *.cls file

Parameters:
filename -
Returns:

save

public boolean save(java.lang.String filename)

setData

public void setData(java.lang.Object object)

resetGuiElements

public void resetGuiElements()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
If the big ControlButton is pressed, select this Tool

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class AbstractTool
Parameters:
e - an ActionEvent

getColorTable

public ColorTable getColorTable()
Returns:
Returns the colorTable.

setColorTable

public void setColorTable(ColorTable colorTable)
Parameters:
colorTable - The colorTable to set.

getAlpha

public float getAlpha()
Returns:
Returns the alphaSpinner.

getCurrentClass

public DataClass getCurrentClass()
Returns:
Returns the currentClass.

setCurrentClass

public void setCurrentClass(DataClass currentClass)
Parameters:
currentClass - The currentClass to set.

getShortTitle

public java.lang.String getShortTitle()
Specified by:
getShortTitle in class AbstractTool

setDrawing

public void setDrawing(boolean drawing)
Description copied from class: AbstractTool
set the drawing mode for this tool. if it changes, reDraw() will be called.

Overrides:
setDrawing in class AbstractTool
Parameters:
drawing - The drawing to set.

getData

public ClassmaskFile getData()
Returns:
Returns the data.

setData

public void setData(ClassmaskFile data)
Parameters:
data - The data to set.

isFloodFill

public boolean isFloodFill()
Returns:
Returns the floodFill. true if Tool is in autoclustering mode.

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent arg0)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent arg0)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent arg0)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent arg0)
Specified by:
mouseExited in interface java.awt.event.MouseListener

getTreshold

public double getTreshold()
Returns:
Returns the treshold.

isAutoFlood

public boolean isAutoFlood()
Returns:
Returns the autoFlood.


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.