Problem with Interpolate ROIs

504 views
Skip to first unread message

John Jameson

unread,
Aug 13, 2013, 11:36:07 AM8/13/13
to bonej-users-a...@googlegroups.com
Hi all,

I have been using BoneJ and its associated utilities for over a year now.  While processing some data this week, I am having trouble with the "Interpolate ROIs" plugin.  Namely, I have converted a 16-bit micro-CT tiff stack into 8-bit and downsampled by a factor of 2.  I segmented with thresholding and then created rectangular ROIs in the ROI Manager every 20 slices.  When I click on the first ROI and then shift+click the last and try the Interpolate ROI plugin, it performs the calculations, but for some reason it associates all of the resulting ROIs with only one slice in the stack.  All of my initial ROIs have slice info associated with them, so I'm not sure why it would do this.

I'm running Fiji 1.48a and Java 7.25 on a 64-bit Windows machine.  Has anyone else had a similar issue?  Am I missing something simple?

As always, many thanks for your input!
Kind regards,
John

--
John Jameson
ALS Doctoral Fellow
Lawrence Berkeley National Lab
Berkeley, CA
(510) 486-7236 office
(423) 863-1278 cell

Michael Doube

unread,
Aug 13, 2013, 11:39:26 AM8/13/13
to bonej-users-a...@googlegroups.com
On 13/08/13 17:36, John Jameson wrote:
> click on the first ROI and then shift+click the last

Try again without attempting to select all the ROIs. The ROI
interpolator will use all the ROIs in the ROI manager without your
selecting them.

Michael

John Jameson

unread,
Aug 13, 2013, 2:21:26 PM8/13/13
to bonej-users-a...@googlegroups.com
Thanks for the suggestion, but unfortunately I'm still having the same issue.  It seems to assign all interpolated ROIs to the slice that is active in the viewing pane.

John


Michael

--
You received this message because you are subscribed to the Google Groups "BoneJ Users and Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonej-users-and-dev...@googlegroups.com.
To post to this group, send email to bonej-users-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/bonej-users-and-developers.
For more options, visit https://groups.google.com/groups/opt_out.


Michael Doube

unread,
Aug 13, 2013, 3:08:58 PM8/13/13
to bonej-users-a...@googlegroups.com, John Jameson, Wayne Rasband, Johannes Schindelin
On 13/08/13 20:21, John Jameson wrote:
> Thanks for the suggestion, but unfortunately I'm still having the same
> issue. It seems to assign all interpolated ROIs to the slice that is
> active in the viewing pane.

I can confirm this bug, in today's FIJI. Wayne recently discussed with
me adding Interpolate ROIs as a button to the ROI Manager, but I didn't
know the outcome. It looks like it is now there, and is broken in the
same way.

https://github.com/fiji/imagej1/blob/196dd8a39dccc3f982b58870ef00210ed1322be7/ij/plugin/RoiInterpolator.java

Wayne, I'm honoured that my code is in ImageJ. Would you mind adding an
authorship note in the source? It is missing from my code, unusually.

I don't know why this is breaking BoneJ's implementation - maybe because
there is a method name collision?

I normally run and test BoneJ in a vanilla ImageJ, currently 1.47m, and
on a Sun/Oracle Java 1.6. One of the jobs of the engineer we're trying
to fund will be to make sure that the rest of the ecosystem plays nicely
with BoneJ's functionality *before* stuff gets released into userland.

Thanks for the report: short term solution, downgrade your ij.jar. (Help
> About ImageJ... > Upgrade to version [dropdown] 1.47)

Michael



Michael Doube

unread,
Aug 13, 2013, 3:11:26 PM8/13/13
to bonej-users-a...@googlegroups.com
 
> About ImageJ... > Upgrade to version [dropdown] 1.47)

Sorry,

Help > Update ImageJ... > ...

Michael Doube

unread,
Aug 14, 2013, 3:50:20 AM8/14/13
to Johannes Schindelin, bonej-users-a...@googlegroups.com, John Jameson, Wayne Rasband
Hi Johannes,

>> I can confirm this bug, in today's FIJI.
>
> I have not enough information to identify the problem.

I Cc:d you for your information only, not as a request to identify or fix.

> Also, I am very short on time,

It is the human condition, unfortunately:
http://lifeboxes.neocities.org/

> preparing for a two-week absence,

R&R, I hope? I shall be back from 'holiday' shortly, and can then put a
bit more attention towards this.

> so please fix this bug without me.

That was my intention. Would you like to be kept informed?

>> I normally run and test BoneJ in a vanilla ImageJ, currently 1.47m, and
>> on a Sun/Oracle Java 1.6. One of the jobs of the engineer we're trying
>> to fund will be to make sure that the rest of the ecosystem plays nicely
>> with BoneJ's functionality *before* stuff gets released into userland.
>
> The first thing that engineer is to add the automated regression tests I
> suggested a long time ago...

That's the idea (I simply haven't had the personal resources to even
investigate this important task since "a long time ago", hence the need
for a dedicated person), and thank you for the reminder to include that
in the workplan for the application. I hope that by funding this
position all of BoneJ, FIJI and ImageJ would become a bit more robust.

Michael

Michael Doube

unread,
Aug 14, 2013, 5:24:44 AM8/14/13
to Rasband, Wayne (NIH/NIMH) [E], John Jameson, Johannes Schindelin, bonej-users-and-developers
Hi Wayne,

> This bug is fixed in the ROI Manager's "Interpolate ROIs" command
> in the ImageJ 1.48b daily build.

That's amazingly fast, thanks Wayne!

John, you can update your ImageJ to the daily build like so:

Help > Update ImageJ... > [dropdown] daily build

I see though that only the new command from the ROI Manager is working
properly and that if you run the command from BoneJ (Plugins > Stacks
> ROI Manager) the bug is still present. Has something changed with
ROIs that I need to take care of in BoneJ, or be aware of generally?

Once everything is working I will just dump BoneJ's copy of
RoiInterpolator and have it require ImageJ v1.48b or later.

> I added @author tags for you and Johannes to
> ij.plugin.RoiInterpolator.java.

Thanks!

Michael

Michael Doube

unread,
Aug 14, 2013, 6:57:00 AM8/14/13
to bonej-users-a...@googlegroups.com
On 13/08/13 17:36, John Jameson wrote:
> it associates all of the resulting ROIs with only one slice in the stack

After looking at this a bit more deeply it seems like there was a change
to the ROI Manager which makes it forget the z-positions of ROIs added
to it by plugin code.

That likely affects other BoneJ functionality, including *any plugin
with a "Use ROI Manager" option* and Fit Sphere, for example.

I'm discussing with Wayne the best way to deal with this. In the
meantime, *BoneJ users should avoid upgrading ImageJ / ij.jar beyond 1.47v.*

Michael

Michael Doube

unread,
Sep 17, 2013, 4:33:20 AM9/17/13
to bonej-users-a...@googlegroups.com
This bug was fixed in ImageJ v1.48b. Thanks Wayne for the fix, and John for the report.

Termo

unread,
Nov 6, 2013, 3:55:20 AM11/6/13
to bonej-users-a...@googlegroups.com

I think the bug still exist to some extend here on ij1.48f and BoneJ 1.3.11. Using "Fit Sphere" with any of the "Copy Sphere", "Inner Cube" or "Outer Cube" selected the new ROIs are all at slice 1 :(

If none of the above listed options are chosen, the ROIs have the correct slices...


Regards
Rasmus

Michael Doube

unread,
Nov 7, 2013, 1:18:53 PM11/7/13
to bonej-users-a...@googlegroups.com
Hi Rasmus,

Thanks for the report. I'm a bit short on time to investigate this right
now, unfortunately. Is it a blocking bug for you? (i.e. destroys your
workflow)? Can you get around it by downgrading your ImageJ?

Michael
Reply all
Reply to author
Forward
0 new messages