Re: [micro-manager-general] Spam (8.588):Re: Spam (12.588):Re: Steps to get a functional plugin, le
Status: Beta
Brought to you by:
nicost
|
From: Nico S. <nic...@uc...> - 2020-04-16 15:41:32
|
Hi Carlos, > a friendly reminder that I got stuck on a couple of issues on the last > thread. No worries, did not realize that it was my turn. Ccing the mailing list. > >> Couple of things missing to make it a real usefull tool though: >> >> * marking on the window. >> Something that has bothered me, but not much, is a bluish rectangle that >> uM puts in the data window. I don't know where it comes from, nor what >> it represent. But trying to use the ImageJ processor to mark the ROIs >> did not work. >> >> processor.setLineWidth(1); >> processor.setColor(Color.red); >> >> processor.setRoi(roi_[i]); >> v = processor.getStats().mean; >> data[i].add((double)imagesReceived_, v, false); >> processor.draw(roi_[i]); >> >> That, or drawRoi(), do not make it. This is drawn by mageJ, to indicate that you are (slightly) zoomed in and can pan the image around. It is a known bug that is hard to solve, see: https://github.com/micro-manager/micro-manager/issues/238. >> * ROI set saving. >> The ROI set should go into the datastore somehow, so the data can be >> reproduced afterwards. I have't looked at that part yet, but I'm trying >> to maximize the SNR of this message :) You will need to add these to the metadata. This goes something like: Metadata md = image.getMetadata(); PropertyMap.Builder pMapBuilder = md.getUserData().getCopyBuilder(); pMapBuilder.putRectangleList("YourKey", ListofYourRoisTransformedToRectangles); newMd = md.copyBuilderPreservingUUID().userData(pMapBuilder.build()).build(); Image storeThisOne = image.copyWithMetadat(newMd); Typing this without IDE, so doubtlessly errors. This is a bit complicated, but the design has the advantage that each object is immutable. Hope it makes sense! Best, Nico |