odd behavior with multi-channel & measuring with ROI Manager

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

odd behavior with multi-channel & measuring with ROI Manager

Cammer, Michael
I am finding unpredictable results using the following macro code.

  roiManager("deselect");
  run("Clear Results");
  selectImage(original);
  for (c=1; c<=channels; c++){
    Stack.setChannel(c);
    Stack.setActiveChannels(c);
    roiManager("Measure");
  } // for c

If all the ROIs are in the first frame of a multichannel image, then the frame is reported in the results as 2 and the channels are reported correctly.  But if the ROIs are in multiple frames, then the channel is always reported as 1 even when it is measured correctly in the other channels.  Fortunately, this does appear to be reporting the correct mean etc for each channel, just not labeling the channel and frame correctly.

If instead of using the macro I click on the slider on the bottom of the hyperstack to choose the channel and then click on the Measure button in the ROI Manager window, the first channel is measured repeatedly for the number of channels.

I was using an earlier version of 1.47 but I updated to the daily build and now when the macro is run the image display is disabled.  It looks black in the window and adjusting the brightness/contrast or reverting to saved will not recover the display.  But dragging the cursor over the image displays the correct values.

Does anybody else have this odd behavior or should I rewrite the macro using my own for loop to measure each ROI from the manager?


________________________________________________________
Michael Cammer, Assistant Research Scientist
Skirball Institute of Biomolecular Medicine
Lab: (212) 263-3208  Cell: (914) 309-3270


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: odd behavior with multi-channel & measuring with ROI Manager

Cammer, Michael
Update:
Selecting just one item in the ROI manager and using the Measure button reports the frame correctly but always measures and reports Channel 1.
Using Analyze>Measure does measure the correct channel but reports both the Frame and CH as 0.

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Cammer, Michael
Sent: Tuesday, October 02, 2012 12:36 PM
To: [hidden email]
Subject: odd behavior with multi-channel & measuring with ROI Manager

I am finding unpredictable results using the following macro code.

  roiManager("deselect");
  run("Clear Results");
  selectImage(original);
  for (c=1; c<=channels; c++){
    Stack.setChannel(c);
    Stack.setActiveChannels(c);
    roiManager("Measure");
  } // for c

If all the ROIs are in the first frame of a multichannel image, then the frame is reported in the results as 2 and the channels are reported correctly.  But if the ROIs are in multiple frames, then the channel is always reported as 1 even when it is measured correctly in the other channels.  Fortunately, this does appear to be reporting the correct mean etc for each channel, just not labeling the channel and frame correctly.

If instead of using the macro I click on the slider on the bottom of the hyperstack to choose the channel and then click on the Measure button in the ROI Manager window, the first channel is measured repeatedly for the number of channels.

I was using an earlier version of 1.47 but I updated to the daily build and now when the macro is run the image display is disabled.  It looks black in the window and adjusting the brightness/contrast or reverting to saved will not recover the display.  But dragging the cursor over the image displays the correct values.

Does anybody else have this odd behavior or should I rewrite the macro using my own for loop to measure each ROI from the manager?


________________________________________________________
Michael Cammer, Assistant Research Scientist Skirball Institute of Biomolecular Medicine
Lab: (212) 263-3208  Cell: (914) 309-3270


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html