endrov.roi
Class ROI

java.lang.Object
  extended by endrov.data.EvContainer
      extended by endrov.data.EvObject
          extended by endrov.roi.ROI
Direct Known Subclasses:
BitmapROI, BoxROI, CompoundROI, EllipseROI, ROI2D

public abstract class ROI
extends EvObject

ROI (Region Of Interest), selects a region on channel X frames X x,y,z (5D)


Nested Class Summary
static interface ROI.Handle
          One handle for a ROI: marks a part of a ROI (in image window).
static class ROI.ROIType
          Class: Information about a ROI type *
static class ROI.SpanChannels
          Span class: channels *
static class ROI.SpanChannelsWidget
          Widget to edit channel span
static class ROI.SpanNumeric
          Span class: numeric *
static class ROI.SpanNumericWidget
          Widget to edit a numeric span
 
Field Summary
static SimpleObserver roiParamChanged
          Instance *
static SimpleObserver roiStructChanged
           
static SimpleObserver selectionChanged
           
 
Fields inherited from class endrov.data.EvContainer
author, containerIcon, coreMetadataModified, dateCreate, dateLastModify, isGeneratedData, metaObject, ostBlobID
 
Constructor Summary
ROI()
           
 
Method Summary
static void addType(ROI.ROIType rt)
           
 void buildMetamenu(javax.swing.JMenu menu, EvContainer parentObject)
          Add options for ROI metaobject to metaobject menu
static void deleteSelected()
           
protected  java.util.Map<java.lang.String,EvChannel> getChannelMap(EvContainer ob)
           
abstract  java.util.Set<java.lang.String> getChannels(EvContainer rec)
          Get which channels might be relevant
abstract  java.util.Set<EvDecimal> getFrames(EvContainer rec, java.lang.String channel)
          Get which frames might be relevant
abstract  ROI.Handle[] getHandles()
          Get handles for resizing ROI
abstract  LineIterator getLineIterator(ProgressHandle progh, EvStack stack, EvImagePlane im, java.lang.String channel, EvDecimal frame, double z)
          Get iterator over ROI
 java.lang.String getMetaTypeDesc()
          Description of this type of metadata.
abstract  ROI.Handle getPlacementHandle1()
          Get first handle to place, if ROI can be placed
abstract  ROI.Handle getPlacementHandle2()
          Get second handle to place, if ROI can be placed
abstract  java.lang.String getROIDesc()
          Description/short name for this type of ROI
abstract  javax.swing.JComponent getROIWidget()
          Get a widget to edit the parameters of this ROI
static java.util.Collection<ROI> getSelected()
           
static java.util.Collection<ROI.ROIType> getTypes()
           
abstract  boolean imageInRange(java.lang.String channel, EvDecimal frame, double z)
          Check if an image might be relevant?
abstract  void initPlacement(java.lang.String chan, EvDecimal frame, EvDecimal z)
          First called when placing ROI
static void initPlugin()
          Plugin declaration
static boolean isSelected(ROI roi)
           
 void openEditWindow()
          Open window allowing settings for ROI to be changed
abstract  boolean pointInRange(java.lang.String channel, EvDecimal frame, double x, double y, double z)
          Check if a given point (world coordinates) is in a ROI
static void setSelected(java.util.Collection<ROI> newsel)
           
 
Methods inherited from class endrov.data.EvObject
cloneEvObject, cloneEvObjectRecursive, cloneUsingSerialize, getContainerIcon, loadMetadata, saveMetadata
 
Methods inherited from class endrov.data.EvContainer
addMetaObject, getChild, getChildNames, getFreeChildName, getIdObjects, getIdObjectsRecursive, getMetaContainer, getMetaObject, getObjects, isMetadataModified, putChild, removeMetaObjectByValue, setMetadataModified, setMetadataNotModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selectionChanged

public static final SimpleObserver selectionChanged

roiParamChanged

public static final SimpleObserver roiParamChanged
Instance *


roiStructChanged

public static final SimpleObserver roiStructChanged
Constructor Detail

ROI

public ROI()
Method Detail

getSelected

public static java.util.Collection<ROI> getSelected()

isSelected

public static boolean isSelected(ROI roi)

setSelected

public static void setSelected(java.util.Collection<ROI> newsel)

deleteSelected

public static void deleteSelected()

addType

public static void addType(ROI.ROIType rt)

getTypes

public static java.util.Collection<ROI.ROIType> getTypes()

buildMetamenu

public void buildMetamenu(javax.swing.JMenu menu,
                          EvContainer parentObject)
Add options for ROI metaobject to metaobject menu

Specified by:
buildMetamenu in class EvObject
parentObject - TODO

openEditWindow

public void openEditWindow()
Open window allowing settings for ROI to be changed


getMetaTypeDesc

public java.lang.String getMetaTypeDesc()
Description of this type of metadata. ROI's should implement getROIDesc instead to assure some sort of consistency in the descriptions

Specified by:
getMetaTypeDesc in class EvObject

getROIDesc

public abstract java.lang.String getROIDesc()
Description/short name for this type of ROI


getROIWidget

public abstract javax.swing.JComponent getROIWidget()
Get a widget to edit the parameters of this ROI


getChannels

public abstract java.util.Set<java.lang.String> getChannels(EvContainer rec)
Get which channels might be relevant


getFrames

public abstract java.util.Set<EvDecimal> getFrames(EvContainer rec,
                                                   java.lang.String channel)
Get which frames might be relevant


getHandles

public abstract ROI.Handle[] getHandles()
Get handles for resizing ROI


getPlacementHandle1

public abstract ROI.Handle getPlacementHandle1()
Get first handle to place, if ROI can be placed


getPlacementHandle2

public abstract ROI.Handle getPlacementHandle2()
Get second handle to place, if ROI can be placed


initPlacement

public abstract void initPlacement(java.lang.String chan,
                                   EvDecimal frame,
                                   EvDecimal z)
First called when placing ROI


imageInRange

public abstract boolean imageInRange(java.lang.String channel,
                                     EvDecimal frame,
                                     double z)
Check if an image might be relevant?


getLineIterator

public abstract LineIterator getLineIterator(ProgressHandle progh,
                                             EvStack stack,
                                             EvImagePlane im,
                                             java.lang.String channel,
                                             EvDecimal frame,
                                             double z)
Get iterator over ROI


pointInRange

public abstract boolean pointInRange(java.lang.String channel,
                                     EvDecimal frame,
                                     double x,
                                     double y,
                                     double z)
Check if a given point (world coordinates) is in a ROI


getChannelMap

protected java.util.Map<java.lang.String,EvChannel> getChannelMap(EvContainer ob)

initPlugin

public static void initPlugin()
Plugin declaration