image

image

image

Abstract CFC based around imageJ Java Archive - version 0.9, 24 april 2003, Benoit Hediard ([email protected])

Metadata

convertFormat()

Changes an image's format eg from jpg to gif

Arguments

Name Type Required Default Options Description
imagePath string Yes Path to the image
NewFormat string Yes Format you wish to convert the image into

crop()

Crops the image, based on the given ROI (Region Of Interest)

Arguments

Name Type Required Default Options Description
None

dilate()

Dilates the image or ROI using a 3x3 minimum filter

Arguments

Name Type Required Default Options Description
None

drawLine()

Draws a line from (x1,y1) to (x2,y2)

Arguments

Name Type Required Default Options Description
x1 numeric Yes
y1 numeric Yes
x2 numeric Yes
y2 numeric Yes

drawPixel()

Sets the pixel at (x,y) to the current fill/draw value

Arguments

Name Type Required Default Options Description
x numeric Yes
y numeric Yes

drawRect()

Draws a rectangle.

Arguments

Name Type Required Default Options Description
x numeric Yes
y numeric Yes
width numeric Yes
height numeric Yes

drawString()

Draws a string at the current location using the current fill/draw value

Arguments

Name Type Required Default Options Description
x numeric Yes
y numeric Yes
text string Yes

erode()

Erodes the image or ROI using a 3x3 maximum filter

Arguments

Name Type Required Default Options Description
None

fill()

Fills the image or ROI with the current fill/draw value

Arguments

Name Type Required Default Options Description
None

findEdges()

Finds edges in the image or ROI using a Sobel operator

Arguments

Name Type Required Default Options Description
None

flipHorizontal()

Flips the image or ROI horizontally

Arguments

Name Type Required Default Options Description
None

flipVertical()

Flips the image or ROI vertically

Arguments

Name Type Required Default Options Description
None

gamma()

Performs gamma correction of the image or ROI

Arguments

Name Type Required Default Options Description
value numeric Yes ex. : 0.5 for lighter, 2 for darker

getDetails()

Returns a structure of attributes for specified image

Arguments

Name Type Required Default Options Description
imagePath string No Path to the image

getHeight()

Arguments

Name Type Required Default Options Description
None

getImagePlus()

Arguments

Name Type Required Default Options Description
None

getImageProcessor()

Arguments

Name Type Required Default Options Description
None

getType()

Arguments

Name Type Required Default Options Description
None

getWidth()

Arguments

Name Type Required Default Options Description
None

grayscale()

Convert color to grayscale

Arguments

Name Type Required Default Options Description
None

invert()

Inverts the image or ROI

Arguments

Name Type Required Default Options Description
None

lineTo()

Draws a line from the current drawing location to (x,y)

Arguments

Name Type Required Default Options Description
x numeric Yes
y numeric Yes

medianFilter()

A 3x3 median filter

Arguments

Name Type Required Default Options Description
None

moveTo()

Sets the current drawing location

Arguments

Name Type Required Default Options Description
x numeric Yes
y numeric Yes

open()

Arguments

Name Type Required Default Options Description
imagePath string Yes Opens tiff (and tiff stacks), dicom, fits, pgm, png, jpeg, bmp or gif images

resetROI()

Sets the ROI (Region of Interest) to the entire image

Arguments

Name Type Required Default Options Description
None

Resize()

Arguments

Name Type Required Default Options Description
originalImagePath string No
resizedImagePath string Yes
resizeValue numeric Yes
resizeType string No auto Possible value : auto, width or height

rotateLeft()

Rotates the entire image 90 degrees counter-clockwise

Arguments

Name Type Required Default Options Description
None

rotateRight()

Rotates the entire image 90 degrees counter-clockwise

Arguments

Name Type Required Default Options Description
None

save()

Writes the image file on the original file (automatically detect format)

Arguments

Name Type Required Default Options Description
quality numeric No 70 0 to 100 (for Jpeg only)

saveAs()

Writes the image file (automatically detect format)

Arguments

Name Type Required Default Options Description
imagePath string No If not provided, it overwrites the original file
quality numeric No 70 0 to 100 (for Jpeg only)

saveAsGif()

Writes the image file to Gif format

Arguments

Name Type Required Default Options Description
imagePath string Yes

saveAsJpeg()

Writes the image file to Jpeg format, returns true if OK

Arguments

Name Type Required Default Options Description
imagePath string Yes
quality numeric No 70 0 to 100

saveAsTiff()

Writes the image file to Tiff format

Arguments

Name Type Required Default Options Description
imagePath string Yes

saveAsZip()

Writes the image file to zipped Tiff format

Arguments

Name Type Required Default Options Description
filePath string Yes File path without extension

scale()

Scales the image by the specified factors. Does not change the image size

Arguments

Name Type Required Default Options Description
xScale numeric Yes
yScale numeric Yes

setColor()

Sets the default fill/draw value to the pixel value closest to the specified color

Arguments

Name Type Required Default Options Description
hexaColor string Yes Hexadecimal color, ex: FF0044

setFont()

Sets the font used by drawString()

Arguments

Name Type Required Default Options Description
name string No SansSerif logical name of this font
size numeric No 11 point size
isBold boolean No false
isItalic boolean No false
isAntialiased boolean Yes does not work... (???)

setLineWidth()

Sets the line width used by lineTo() and drawDot()

Arguments

Name Type Required Default Options Description
width numeric Yes

setROI()

Defines a rectangular region of interest

Arguments

Name Type Required Default Options Description
x numeric Yes ROI x coordinate
y numeric Yes ROI y coordinate
width numeric Yes ROI width
height numeric Yes ROI height

sharpen()

Sharpens the image or ROI using a 3x3 convolution kernel

Arguments

Name Type Required Default Options Description
None

smooth()

Replaces each pixel or ROI with the 3x3 neighborhood mean

Arguments

Name Type Required Default Options Description
None