theba.core.gui.ThebaGUI Class Reference

List of all members.

Classes

class  HistogramAction
class  MouseClickListener
class  RegCountAction
class  RegionAnalysisAction

Public Member Functions

void actionPerformed (final ActionEvent e)
void fiberChordMeasurements ()
void addChannel (SliceReader reader, String name)
void addMenuItem (String title, final Runnable action)
void addMenuSeparator ()
void addToolbarButton (JComponent customButton)
void clearChannels ()
synchronized int currentSlice ()
void flipVolume ()
short[] getCurrentPixels ()
ImagePane getCurrentView ()
ThebaPrefs getPreferences ()
short[] getSlice (int z)
Tracker getCurrentTracker ()
Stack getStack ()
JFrame getWindow ()
JCheckBoxMenuItem hideWhite ()
boolean isMinimized ()
void putSlice (short[] data, int z)
void setPointerLabel (Point p)
void setProgress (final int val)
void setProgressComplete ()
void showImage (final short[] data)
void showResults (String s)
void showResults (final StringBuffer results, String title)
void updateImage ()
void updateSlice (final int z)
boolean isStopped ()
void setIsStopped (boolean isStopped)
void setProgressbar (int i, int max)
void releaseFiberId (short val)
short getNewFiberId ()
void setLabel (String string)
void setLoader (PluginLoader loader)
PluginLoader getPluginLoader ()

Static Public Member Functions

static ThebaGUI getInstance ()
static void main (String[] args)

Public Attributes

ArrayList lumencenters
final int MAX_FIBERS = 2048
int width
int height
int depth
final short INVALID = 7
final int BYTE_TYPE = 0
final int SHORT_TYPE = 1

Static Package Attributes

static int count = 0
static short[] empty
static ThebaGUI instance = null
static short[] tmp

Detailed Description

This is the class is responsible for most UI interaction such as menu layout, and listeners.

Author:
jensbw
perchrh

Definition at line 79 of file ThebaGUI.java.


Member Function Documentation

void theba.core.gui.ThebaGUI.actionPerformed ( final ActionEvent  e  ) 
void theba.core.gui.ThebaGUI.addChannel ( SliceReader  reader,
String  name 
)

Adds a channel to the tabbedview window if it is not already added (based on equal name)

Parameters:
reader The input slicereader (or writer)
name The tab-name

Definition at line 428 of file ThebaGUI.java.

Referenced by theba.trackers.BackTracker.traceWalls().

void theba.core.gui.ThebaGUI.addMenuItem ( String  title,
final Runnable  action 
)

Used by trackers to add menu-items to the track-menu

Parameters:
title Title for menu-item
action A runnable method containing executable code for this menu-Item

Definition at line 450 of file ThebaGUI.java.

References theba.core.gui.ThebaGUI.actionPerformed().

Referenced by theba.trackers.HHTracker.setup(), theba.trackers.FloodTracker3D.setup(), theba.trackers.FiberTracker.setup(), and theba.trackers.BackTracker.setup().

void theba.core.gui.ThebaGUI.addMenuSeparator (  ) 
void theba.core.gui.ThebaGUI.addToolbarButton ( JComponent  customButton  ) 

Menu used by Trackers to add a button to the toolbar.

Parameters:
customButton 

Definition at line 477 of file ThebaGUI.java.

Referenced by theba.trackers.HHTracker.setup(), theba.trackers.FiberTracker.setup(), and theba.trackers.BackTracker.setup().

void theba.core.gui.ThebaGUI.clearChannels (  ) 

Resets tabbed-pane view

Definition at line 490 of file ThebaGUI.java.

Referenced by theba.trackers.BackTracker.traceWalls().

synchronized int theba.core.gui.ThebaGUI.currentSlice (  ) 

Returns the depth index of currently selected (by the depthslicer) slice

Returns:
the depth/z-index of the current slice

Definition at line 1040 of file ThebaGUI.java.

Referenced by theba.core.gui.ThebaGUI.getCurrentPixels(), theba.trackers.BackTracker.selectSeed(), theba.core.gui.ThebaGUI.setPointerLabel(), and theba.core.gui.ThebaGUI.updateImage().

void theba.core.gui.ThebaGUI.fiberChordMeasurements (  ) 

This method generates fiber-chord measurements for the given volume. This involves calculation of the mean distance between porous regions in x,y and z-directions

Definition at line 305 of file ThebaGUI.java.

References theba.core.gui.ThebaGUI.count, theba.core.Stack.getDepth(), theba.core.Stack.getHeight(), theba.core.gui.ThebaGUI.getStack(), theba.core.Stack.getVoxel(), theba.core.Stack.getWidth(), theba.core.gui.ThebaGUI.isStopped(), theba.core.gui.ThebaGUI.setProgressbar(), and theba.core.gui.ThebaGUI.showResults().

void theba.core.gui.ThebaGUI.flipVolume (  ) 
short [] theba.core.gui.ThebaGUI.getCurrentPixels (  ) 

Returns the currently selected depth-slice

Returns:
The currently selected image-slice

Definition at line 1134 of file ThebaGUI.java.

References theba.core.gui.ThebaGUI.currentSlice(), and theba.core.gui.ThebaGUI.getSlice().

Referenced by theba.trackers.BackTracker.selectSeed(), and theba.core.gui.ThebaGUI.setPointerLabel().

Tracker theba.core.gui.ThebaGUI.getCurrentTracker (  ) 
Returns:
The currently selected tracker (indicated by the file-open dialog)

Definition at line 1186 of file ThebaGUI.java.

Referenced by theba.core.gui.ImagePane.setData().

ImagePane theba.core.gui.ThebaGUI.getCurrentView (  ) 

Returns the ImagePane that is currently selected (usually the main view)

Returns:
The selected ImagePane

Definition at line 1143 of file ThebaGUI.java.

Referenced by theba.core.gui.ThebaGUI.getSlice(), theba.core.gui.ThebaGUI.getStack(), and theba.core.gui.ThebaGUI.updateImage().

static ThebaGUI theba.core.gui.ThebaGUI.getInstance (  )  [static]
short theba.core.gui.ThebaGUI.getNewFiberId (  ) 

Returns a free fiberlabel from The list is allways updated when the volume is reloaded.

Returns:
A new short that has not yet been used in the data-stack

Definition at line 1958 of file ThebaGUI.java.

Referenced by theba.trackers.HHTracker.track(), theba.trackers.FiberTracker.track(), and theba.trackers.BackTracker.track().

PluginLoader theba.core.gui.ThebaGUI.getPluginLoader (  ) 
ThebaPrefs theba.core.gui.ThebaGUI.getPreferences (  ) 

Returns an object containing the current preferences for this application (not that several instances running at once, may use shared properties)

Returns:
The ThebaPrefs object containing preferences relating to FibForks

Definition at line 1159 of file ThebaGUI.java.

Referenced by theba.trackers.BackTracker.removeCrack(), theba.trackers.HHTracker.track(), theba.trackers.FiberTracker.track(), theba.trackers.BackTracker.track(), and theba.core.gui.OpenDialog.validateFields().

short [] theba.core.gui.ThebaGUI.getSlice ( int  z  ) 
Stack theba.core.gui.ThebaGUI.getStack (  ) 
JFrame theba.core.gui.ThebaGUI.getWindow (  ) 

Returns the application window

Returns:
The active application window (with associated position, size etc)

Definition at line 1204 of file ThebaGUI.java.

Referenced by theba.core.gui.OpenDialog.OpenDialog(), and theba.core.PluginLoader.PluginLoader().

JCheckBoxMenuItem theba.core.gui.ThebaGUI.hideWhite (  ) 
Returns:
the hideWhite checkbox-item, that indicates if white voxels should be filtered from view

Definition at line 1212 of file ThebaGUI.java.

boolean theba.core.gui.ThebaGUI.isMinimized (  ) 

Returns true if the application window is hidden from view

Returns:
true if application should be hidden from view

Definition at line 1221 of file ThebaGUI.java.

Referenced by theba.core.gui.ImagePane.setData(), and theba.core.gui.ThebaGUI.updateSlice().

boolean theba.core.gui.ThebaGUI.isStopped (  ) 
Returns:
True if any time-consuming tasks should be stopped (this function can be added to any time-consuming tasks such as plugins etc) When the stop-button is selected they should silently be stopped, freeing up the gui for other purposes. Note that there is no guarantee that any of these tasks will leave the system in a stable state...

Definition at line 1853 of file ThebaGUI.java.

Referenced by theba.core.gui.ThebaGUI.fiberChordMeasurements(), and theba.core.gui.ThebaGUI.flipVolume().

static void theba.core.gui.ThebaGUI.main ( String[]  args  )  [static]

Main method to launch Theba

Parameters:
args Command-line arguments

Definition at line 1629 of file ThebaGUI.java.

void theba.core.gui.ThebaGUI.putSlice ( short[]  data,
int  z 
)

Replaces a particular slice in the stack with new data

Parameters:
data A short[]-array with the same width-height dimensionas as the current stack
z A depth-index to copy this slice's contents to

Definition at line 1412 of file ThebaGUI.java.

References theba.core.io.VolumeReader.putSlice().

void theba.core.gui.ThebaGUI.releaseFiberId ( short  val  ) 

Release up a label This method should be called whenever a region is entirely removed from the stack, such that the label is made available for other purposes

Parameters:
val The label that is now free to use for otehr purposes

Definition at line 1891 of file ThebaGUI.java.

Referenced by theba.trackers.HHTracker.track(), and theba.trackers.FiberTracker.track().

void theba.core.gui.ThebaGUI.setIsStopped ( boolean  isStopped  ) 

Sets the current status of the stop-value

Parameters:
isStopped 

Definition at line 1862 of file ThebaGUI.java.

void theba.core.gui.ThebaGUI.setLabel ( String  string  ) 

Sets the label-text for the system-toolbar

Parameters:
string 

Definition at line 1975 of file ThebaGUI.java.

Referenced by theba.trackers.BackTracker.findCandidates().

void theba.core.gui.ThebaGUI.setLoader ( PluginLoader  loader  ) 

Definition at line 1979 of file ThebaGUI.java.

void theba.core.gui.ThebaGUI.setPointerLabel ( Point  p  ) 

Used by the imagePane to update pointer position whenever the mouse is moved

Parameters:
p New position

Definition at line 1423 of file ThebaGUI.java.

References theba.core.gui.ThebaGUI.currentSlice(), theba.core.gui.ThebaGUI.getCurrentPixels(), and theba.core.gui.ThebaGUI.getSlice().

Referenced by theba.core.gui.ImagePane.ImagePane().

void theba.core.gui.ThebaGUI.setProgress ( final int  val  ) 
void theba.core.gui.ThebaGUI.setProgressbar ( int  i,
int  max 
)

Sets the progress of the progressbar according to position and maxval

Parameters:
i Current position
max Maximum

Definition at line 1874 of file ThebaGUI.java.

Referenced by theba.core.gui.ThebaGUI.fiberChordMeasurements().

void theba.core.gui.ThebaGUI.setProgressComplete (  ) 
void theba.core.gui.ThebaGUI.showImage ( final short[]  data  ) 

Shows a particular image in the currently active imagePane. (selected tab)

Parameters:
data A short[] with the same width-height ratio as the current stack

Definition at line 1474 of file ThebaGUI.java.

References theba.core.gui.ImagePane.setData().

Referenced by theba.trackers.BackTracker.findCandidates(), theba.trackers.BackTracker.selectSeed(), theba.trackers.HHTracker.track(), theba.trackers.FiberTracker.track(), and theba.trackers.BackTracker.track().

void theba.core.gui.ThebaGUI.showResults ( final StringBuffer  results,
String  title 
)

Shows the contents of a stringbuffer in the floating result-window

Parameters:
results A stringbuffer containing the message
title A message that will be displayed in the title-bar of the result-window

Definition at line 1528 of file ThebaGUI.java.

References theba.core.gui.ThebaGUI.actionPerformed().

void theba.core.gui.ThebaGUI.showResults ( String  s  ) 
void theba.core.gui.ThebaGUI.updateImage (  ) 
void theba.core.gui.ThebaGUI.updateSlice ( final int  z  ) 

Sets the slice-number to a given value and updates the image

Parameters:
z The new sliceValue

Definition at line 1592 of file ThebaGUI.java.

References theba.core.gui.ThebaGUI.isMinimized(), and theba.core.gui.ThebaGUI.updateImage().

Referenced by theba.trackers.BackTracker.traceWalls().


Member Data Documentation

Definition at line 172 of file ThebaGUI.java.

Referenced by theba.core.gui.OpenDialog.getDataType().

int theba.core.gui.ThebaGUI.count = 0 [static, package]

Definition at line 178 of file ThebaGUI.java.

Referenced by theba.core.gui.ThebaGUI.fiberChordMeasurements().

short [] theba.core.gui.ThebaGUI.empty [static, package]

Definition at line 180 of file ThebaGUI.java.

ThebaGUI theba.core.gui.ThebaGUI.instance = null [static, package]

Definition at line 182 of file ThebaGUI.java.

Referenced by theba.core.gui.ThebaGUI.getInstance().

Definition at line 80 of file ThebaGUI.java.

short [] theba.core.gui.ThebaGUI.tmp [static, package]

The documentation for this class was generated from the following file:

Generated on Fri Nov 13 08:57:08 2009 for Theba by  doxygen 1.6.1