This is a collection of functions to extend the EBImage
package and provide helper functions for processing micrographs. These functions require the EBImage
package and are typically used with the virustiter
package. The virustiter
package requires the lattice
and latticeExtra
packages.
circularity
- more precisely calculate the circularity of an image objectperimeter
- more precisely calculate the perimeter of an image objectni
- a vectorized wrapper to the normalize()
function with defaults for 12-bit imagesbresenham
- Bresenham's integer line "plotting" algorithmpnpoly
- determine if points are within a polygon (algorithm of W. Randolph Franklin)stackObjects2
- place detected objects with the bounding box in an image stackinterleave
- reorganize an image stack by interleaving the imagesplotStack
- plot an image stack with optional labelslocatorStack
- interact with a plotted image stack to select frameslabelStack
- label frames of a plotted image stacksobel
- the Sobel filter for edge detectionusm
- the Unsharp mask filter to sharpen images by increasing local contrasthpf
- the High pass filter to exclude slowly varying signalsEBImage
uses the S4
Image
class to store and process images. A region of interest is an Image
object with the additional class named Roi
and a slot named loc
to store the original x,y
and x2,y2
location of the rectangular region of interest. This class of objects allows the image and original location to be passed in one object.
getROI
- get a region of interestputROI
- put a region of interest (with scaling) at one of nine locations in an imagedrawROI
- draw a frame around or within an image to highlight the region of interest as.Roi
- convert Image
object to Roi
object or reset the loc
slot of an Roi
object to the image dimensionsscaleBar
- add horizontal scale bar to imagecrop
- crop a grayscale or binary image to exclude zero pixels at the edgesboxtext
- add text with a shaded background box to a plotdp
- wrapper to call dev.print
for the current device window where the global logical variable SaveImage
can be used to determine whether a file will be saved or notinset
- function to be added...maybe... add a framed inset to an image by sequential use of getROI, drawROI, and putROI to select a region from an image, draw a frame about the selected region and then place the selection as a framed insetAt the moment, inset
can be emulated by something like the following:
plot(img) # assuming 'img' holds an Image object
ins <- getROI(img)
ans <- drawROI(img, ins, lwd = 2)
ans <- putROI(ans, ins, "topright", lwd = 4)
plot(ans)
GPL-3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.