Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect VoxelSize in MetaMorph Reader #1966

Merged
merged 4 commits into from Sep 30, 2015

Conversation

dgault
Copy link
Member

@dgault dgault commented Sep 8, 2015

To fix the physical Z size, the difference between the absolute Z
positions will need to be used.
MetaMorph handler already parses the z positions. The physical z size is
then calculated by subtracting the top and bottom values and dividing by
the number of steps.

Ticket details below:
https://trac.openmicroscopy.org/ome/ticket/12977

Splitting from #1964

To fix the physical Z size, the difference between the absolute Z
positions will need to be used.
MetaMorph handler already parses the z positions. The physical z size is
then calculated by subtracting the top and bottom values and dividing by
the number of steps.

Ticket details below:
https://trac.openmicroscopy.org/ome/ticket/12977
@@ -778,6 +778,32 @@ else if (differentZs) {
if (zDistances != null) {
stepSize = zDistances[0];
}
else {
Vector<Double> zPositions = new Vector<Double>();
Vector<Double> uniqueZ = new Vector<Double>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An ArrayList would suffice unless you need thread synchronization.

@sbesson
Copy link
Member

sbesson commented Sep 9, 2015

Note this PR is causing regressions on the Metamorph files of test_images_good - see https://ci.openmicroscopy.org/job/BIOFORMATS-5.1-merge-test_images_good/

@mtbc
Copy link
Member

mtbc commented Sep 9, 2015

Note that if you configure the build parameters you can use https://ci.openmicroscopy.org/job/BIOFORMATS-5.1-merge-repository-subset/ (presumably someday DEV too) to do quick tests of these -- it does something similar to what is described on http://www.openmicroscopy.org/site/support/bio-formats5.1/developers/commit-testing.html. Often the problem is just a little bug in the code but one may sometimes legitimately need to generate adjustments for the .bioformats files that these tests check against.

@sbesson sbesson added the develop label Sep 9, 2015
Updated to use unique handlers in order to fix issues with merge tests

https://ci.openmicroscopy.org/job/BIOFORMATS-5.1-merge-test_images_good/625/
The Physical Step Size is now only being calculated when each step in
the z range is unique. If duplicate values appear within the range then
we will not update the step size
@dgault
Copy link
Member Author

dgault commented Sep 14, 2015

Testing Steps:

nom1.nd
nom1_w1561 Em 600-50.TIF
nom1_w2488 Em 525-50.TIF

  • Import the image series using default settings
  • Check that PhysicalSizeZ in OME metadata matches expected value

Expected physical z size for:
1.5 µm

Updating the physical z size calculations to use BigDecimal in order to
control the precision of floating point arithmetic and remove rounding
errors.
@bramalingam
Copy link
Member

Tested using ImageJ. Everything works as expected. Please merge.

@dgault dgault closed this Sep 15, 2015
@dgault dgault reopened this Sep 15, 2015
@sbesson
Copy link
Member

sbesson commented Sep 17, 2015

melissalinkert added a commit that referenced this pull request Sep 30, 2015
Incorrect VoxelSize in MetaMorph Reader
@melissalinkert melissalinkert merged commit 134c310 into ome:develop Sep 30, 2015
@sbesson sbesson added this to the 5.1.5 milestone Oct 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants