Package gov.nih.mipav.view
Interface PaintGrowListener
-
- All Known Implementing Classes:
ViewJComponentDTIImage,ViewJComponentEditImage,ViewJComponentPedsAtlasIconImage,ViewJComponentRegistration,ViewJComponentSingleRegistration,ViewJComponentTriImage
public interface PaintGrowListenerInterface to allow different types of ViewJComponents* to work with region grow dialogs.- Author:
- Evan McCreedy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ModelImagegetActiveImage()Get the active image we are growing in.voidregionGrow(java.lang.String str)Grows a region based on a starting supplied.voidsetDisplayFuzzy(boolean val)Sets whether a fuzzy image is displayed.voidsetFuzzyThreshold(float val)Set the fuzzy threshold value.voidsetGrowDialog(RegionGrowDialog dialog)Sets the JDialogPaintGrow for this class (usually used to set it to null).voidsetLess(float val)Determines the lower bound of what values we will grow into (lowThreshold = seedValue - val).voidsetMaxDistance(int val)Set the maximum distance for the region grow.voidsetMore(float val)Determines the upper bound of what values we will grow into (highThreshold = seedValue + val).voidsetSizeLimit(int val)Set a bound on the size of the region we are growing.voidsetUseVOI(boolean val)Sets whether to only grow within the currently selected VOI.voidshowRegionInfo(int count, java.lang.String str)Display statistics about the grown region.voidupdatePaint(java.util.BitSet region, boolean backup, boolean isGrower)Causes the image to update its paint bit mask and redisplay itself.
-
-
-
Method Detail
-
getActiveImage
ModelImage getActiveImage()
Get the active image we are growing in.- Returns:
- the active image.
-
regionGrow
void regionGrow(java.lang.String str)
Grows a region based on a starting supplied. A voxel is added to the the paintBitmap mask if its intensity is between previously supplied bounds.- Parameters:
str- the string to prepend to message containing region growth statistics.
-
setDisplayFuzzy
void setDisplayFuzzy(boolean val)
Sets whether a fuzzy image is displayed.- Parameters:
val- whether to show the fuzzy image.
-
setFuzzyThreshold
void setFuzzyThreshold(float val)
Set the fuzzy threshold value.- Parameters:
val- value to use when region growing with a fuzzy threshold.
-
setGrowDialog
void setGrowDialog(RegionGrowDialog dialog)
Sets the JDialogPaintGrow for this class (usually used to set it to null).- Parameters:
dialog- the paint grow dialog.
-
setLess
void setLess(float val)
Determines the lower bound of what values we will grow into (lowThreshold = seedValue - val).- Parameters:
val- the lower bound delta.
-
setMaxDistance
void setMaxDistance(int val)
Set the maximum distance for the region grow.- Parameters:
val- the maximum distance to grow across.
-
setMore
void setMore(float val)
Determines the upper bound of what values we will grow into (highThreshold = seedValue + val).- Parameters:
val- the upper bound delta.
-
setSizeLimit
void setSizeLimit(int val)
Set a bound on the size of the region we are growing.- Parameters:
val- the maximum region size.
-
setUseVOI
void setUseVOI(boolean val)
Sets whether to only grow within the currently selected VOI.- Parameters:
val- whether to only grow within the currently selected VOI.
-
showRegionInfo
void showRegionInfo(int count, java.lang.String str)Display statistics about the grown region.- Parameters:
count- Number of pixels (voxels).str- the string to prepend to message containing region growth statistics.
-
updatePaint
void updatePaint(java.util.BitSet region, boolean backup, boolean isGrower)Causes the image to update its paint bit mask and redisplay itself.- Parameters:
region- new paint region bit set.backup- whether to save the previous paint mask to allow the update to be un-done.isGrower- whether this paint listener is the one that did the region grow.
-
-