public class RoiSaver extends Object
Constructor and Description |
---|
RoiSaver()
Dummy constructor.
|
Modifier and Type | Method and Description |
---|---|
static ij.process.ImageProcessor |
plotOnRoi(ij.process.ImageProcessor ip,
List<Point2d> vert,
Color c)
Plot ROI on image.
|
static void |
saveRoi(String fileName,
List<Point2d> vert)
Save ROI as image
|
static void |
saveRoi(String fileName,
Roi roi)
Save ROI as image.
|
static void |
saveRois(ij.ImagePlus image,
String fileName,
ArrayList<ArrayList<SegmentedShapeRoi>> ret)
Create stack from List of Rois.
|
static void |
saveRois(String fileName,
int xres,
int yres,
List<Point2d> vert1,
Color c1,
List<Point2d> vert2,
Color c2,
List<Point2d> vert3,
Color c3)
Save ROIs as image
|
public static void saveRoi(String fileName, List<Point2d> vert)
Get ListArray with vertices and create fileName.tif image with ROI For non-valid input list it creates red image of size 100 x 100
fileName
- file to save image with pathvert
- list of verticespublic static void saveRoi(String fileName, Roi roi)
fileName
- fileNameroi
- roisaveRois(ImagePlus, String, ArrayList)
public static void saveRois(String fileName, int xres, int yres, List<Point2d> vert1, Color c1, List<Point2d> vert2, Color c2, List<Point2d> vert3, Color c3)
Get ListArray with vertices and create fileName.tif image with ROI For non-valid input list it creates red image of size 100 x 100. Allows to add up to three ROIS in different colors.
fileName
- file to save image with pathxres
- resolution of output image, must include ROIyres
- resolution of output image, must include ROIvert1
- list 1c1
- color of list 1vert2
- list 2c2
- color of list 2vert3
- list 3c3
- color of list 3public static void saveRois(ij.ImagePlus image, String fileName, ArrayList<ArrayList<SegmentedShapeRoi>> ret)
image
- Image where rois will be plotted. Number of slices must be equal to rois.size();fileName
- File to saveret
- List of Lists of Rois. First level of rois is plotted on slices, second contains
rois to plot. Rois along second level are plotted with the same color across slices
e.g. First roi in second level in red, second roi in second level ble etcpublic static ij.process.ImageProcessor plotOnRoi(ij.process.ImageProcessor ip, List<Point2d> vert, Color c)
Get ListArray with vertices and create image image with ROI For non-valid input list it creates red image of size 100 x 100.
ip
- image to plot in.vert
- list of points to plotc
- colorCopyright © 2002–2019 Department of Computer Science, Warwick University. All rights reserved.