embl-cba / imagej-utils

BSD 2-Clause "Simplified" License
2 stars 4 forks source link

Reconsider ImageSegment #29

Open tischi opened 3 years ago

tischi commented 3 years ago

Currently an ImageSegment looks like this:

public interface ImageSegment extends RealLocalizable
{
    String imageId();

    double labelId();

    int timePoint();

    FinalRealInterval boundingBox();

    void setBoundingBox( FinalRealInterval boundingBox );

    float[] getMesh();

    void setMesh( float[] mesh );
}

This becomes limiting if one wants to annotate image segments. To implement this, we currently need to go via the table or have to check whether segment instanceof TableRow and then go via this.

Maybe this could be solved differently, e.g., by adding set and get segmentFeature methods that could internally link to the corresponding tableRow?

cc @K-Meech