Search in sources :

Example 11 with ImageHandler

use of mcib3d.image3d.ImageHandler in project mcib3d-core by mcib3d.

the class Object3DLabel method drawIntersection.

/**
 * @param mask
 * @param other
 * @param red
 * @param green
 * @param blue
 */
@Deprecated
public void drawIntersection(ImageStack mask, Object3DLabel other, int red, int green, int blue) {
    ImageProcessor tmp;
    ImageHandler otherSeg = other.getLabelImage();
    int otherValue = other.getValue();
    Color col = new Color(red, green, blue);
    for (int z = zmin; z <= zmax; z++) {
        tmp = mask.getProcessor(z + 1);
        tmp.setColor(col);
        for (int x = xmin; x <= xmax; x++) {
            for (int y = ymin; y <= ymax; y++) {
                if ((labelImage.getPixel(x, y, z) == value) && (otherSeg.getPixel(x, y, z) == otherValue)) {
                    tmp.drawPixel(x, y);
                }
            }
        }
    }
}
Also used : ImageHandler(mcib3d.image3d.ImageHandler) ImageProcessor(ij.process.ImageProcessor)

Aggregations

ImageHandler (mcib3d.image3d.ImageHandler)11 ImageShort (mcib3d.image3d.ImageShort)5 ImageProcessor (ij.process.ImageProcessor)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Object3D (mcib3d.geom.Object3D)1 Point3D (mcib3d.geom.Point3D)1 Vector3D (mcib3d.geom.Vector3D)1 Voxel3D (mcib3d.geom.Voxel3D)1 Voxel3DComparable (mcib3d.geom.Voxel3DComparable)1 ImageFloat (mcib3d.image3d.ImageFloat)1 ImageInt (mcib3d.image3d.ImageInt)1 ImageLabeller (mcib3d.image3d.ImageLabeller)1