Re: Augmenting an ImagePlus with Additional Information

Posted by Rasband, Wayne (NIH/NIMH) [E] on
URL: http://imagej.273.s1.nabble.com/Augmenting-an-ImagePlus-with-Additional-Information-tp3689248p3689254.html

On Feb 22, 2010, at 12:21 PM, Michael Ellis <[hidden email]
 > wrote:

> Augmenting an ImagePlus with Additional Information
>
> I am writing an ImageJ plugin to read our proprietary file format. Our
> files are karyotyping files that contain zipped up TIFF files, polygon
> data describing the chromosome boundaries and various other metrics.
>
> So far I can load the image files and I'm adding the list of polygon
> boundaries as PolygonRoi's to the ROIManager. However, if I use our
> plugin to load a s second karyotype file, then I have either to append
> to, or replace the contents of the ROIManager. I'd prefer to associate
> the list of PolygonRoi's with the image.
>
> So how best to do this?
>
> Subclassing the ImagePlus might work, but I'm not a fan of type
> casting; I suspect that it would have gotchas like having ImageJ's
> "Duplicate" command lose the additional information.
>
> Is there any other robust means of augmenting an image with additional
> information?

Add the polygon boundaries to the image as an overlay (requires  
v1.43). Overlays can be transferred to the ROI Manager, easily  
retrieved using ImagePlus.getOverlay(), and they are saved with the  
image when saving in TIFF format. The Duplicate command will preserve  
overlays in the next daily build.

-wayne