|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.data.image.AbstractImageTransformer<BufferedImageContainer>
adams.data.jai.transformer.AbstractJAITransformer
adams.data.jai.transformer.Crop
public class Crop
Crops the image to specified width and height. Where the crop rectangle starts is defined by the X and Y position and the anchor.
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
-x <int> (property: X) The horizontal pixel position. default: 1 minimum: 1
-y <int> (property: Y) The vertical pixel position. default: 1 minimum: 1
-width <int> (property: width) The width of the crop rectangle. default: 100 minimum: 1
-height <int> (property: height) The height of the crop rectangle. default: 75 minimum: 1
-anchor <TOP_LEFT|TOP_RIGHT|CENTER|BOTTOM_LEFT|BOTTOM_RIGHT> (property: anchor) Defines where to anchor the position on the crop rectangle. default: TOP_LEFT
| Nested Class Summary | |
|---|---|
static class |
Crop.Anchor
Enumeration for the crop rectangle anchor.\ |
| Field Summary | |
|---|---|
protected Crop.Anchor |
m_Anchor
where to anchor the position on the rectangle. |
protected int |
m_Height
the height of the crop rectangle. |
protected int |
m_Width
the width of the crop rectangle. |
protected int |
m_X
the X position of the crop rectangle. |
protected int |
m_Y
the Y position of the crop rectangle. |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
Crop()
|
|
| Method Summary | |
|---|---|
String |
anchorTipText()
Returns the tip text for this property. |
void |
defineOptions()
Adds options to the internal list of options. |
protected BufferedImageContainer[] |
doTransform(BufferedImageContainer img)
Performs no transformation at all, just returns the input. |
Crop.Anchor |
getAnchor()
Returns where to anchor the position on the rectangle. |
int |
getHeight()
Returns the height of the crop rectangle. |
int |
getWidth()
Returns the width of the crop rectangle. |
int |
getX()
Returns the X position. |
int |
getY()
Returns the Y position. |
String |
globalInfo()
Returns a string describing the object. |
String |
heightTipText()
Returns the tip text for this property. |
void |
setAnchor(Crop.Anchor value)
Sets where to anchor the position on the rectangle. |
void |
setHeight(int value)
Sets the height of the crop rectangle. |
void |
setWidth(int value)
Sets the width of the crop rectangle. |
void |
setX(int value)
Sets the X position. |
void |
setY(int value)
Sets the Y position. |
String |
widthTipText()
Returns the tip text for this property. |
String |
XTipText()
Returns the tip text for this property. |
String |
YTipText()
Returns the tip text for this property. |
| Methods inherited from class adams.data.jai.transformer.AbstractJAITransformer |
|---|
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 |
|---|
protected int m_X
protected int m_Y
protected int m_Width
protected int m_Height
protected Crop.Anchor m_Anchor
| Constructor Detail |
|---|
public Crop()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractOptionHandlerpublic void setX(int value)
value - the positionpublic int getX()
public String XTipText()
public void setY(int value)
value - the positionpublic int getY()
public String YTipText()
public void setWidth(int value)
value - the widthpublic int getWidth()
public String widthTipText()
public void setHeight(int value)
value - the heightpublic int getHeight()
public String heightTipText()
public void setAnchor(Crop.Anchor value)
value - the anchorpublic Crop.Anchor getAnchor()
public String anchorTipText()
protected BufferedImageContainer[] doTransform(BufferedImageContainer img)
doTransform in class AbstractImageTransformer<BufferedImageContainer>img - the image to process (can be modified, since it is a copy)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||