adams.data.imagej.transformer
Class Macro

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.data.image.AbstractImageTransformer<ImagePlusContainer>
              extended by adams.data.imagej.transformer.AbstractImageJTransformer
                  extended by adams.data.imagej.transformer.Macro
All Implemented Interfaces:
CleanUpHandler, Debuggable, Destroyable, OptionHandler, SizeOfHandler, Serializable, Comparable

public class Macro
extends AbstractImageJTransformer

Executes the macro commands to transform the image.
Due to ImageJ's architecture, only a single ImageJ instance is available in a process at any given time. Interacting with ImageJ while running a macro will lead to unpredictable side-effects.

Valid options are:

-D <int> (property: debugLevel)
    The greater the number the more additional info the scheme may output to 
    the console (0 = off).
    default: 0
    minimum: 0
 
-commands <adams.core.base.BaseText> (property: commands)
    The macro commands to transform the image width.
    default: 
 

Version:
$Revision: 4788 $
Author:
fracpete (fracpete at waikato dot ac dot nz), Dale (dale at cs dot waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  BaseText m_Commands
          the macro commands.
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
Macro()
           
 
Method Summary
 String commandsTipText()
          Returns the tip text for this property.
 void defineOptions()
          Adds options to the internal list of options.
protected  ImagePlusContainer[] doTransform(ImagePlusContainer img)
          Performs no transformation at all, just returns the input.
 BaseText getCommands()
          Returns the width to resize to.
 String globalInfo()
          Returns a string describing the object.
 void setCommands(BaseText value)
          Sets the width to resize to.
 
Methods inherited from class adams.data.imagej.transformer.AbstractImageJTransformer
forCommandLine, forName, getTransformations
 
Methods inherited from class adams.data.image.AbstractImageTransformer
checkImage, cleanUp, compareTo, destroy, equals, shallowCopy, shallowCopy, transform
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Commands

protected BaseText m_Commands
the macro commands.

Constructor Detail

Macro

public Macro()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class AbstractOptionHandler
Returns:
a description suitable for displaying in the gui

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractOptionHandler

setCommands

public void setCommands(BaseText value)
Sets the width to resize to.

Parameters:
value - the width, -1 uses original width

getCommands

public BaseText getCommands()
Returns the width to resize to.

Returns:
the width, -1 if original width is used

commandsTipText

public String commandsTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

doTransform

protected ImagePlusContainer[] doTransform(ImagePlusContainer img)
Performs no transformation at all, just returns the input.

Specified by:
doTransform in class AbstractImageTransformer<ImagePlusContainer>
Parameters:
img - the image to process (can be modified, since it is a copy)
Returns:
the copy of the image


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.