View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003776 | Slicer4 | Module Volumes | public | 2014-07-24 05:16 | 2017-06-10 08:51 |
Reporter | safir | Assigned To | pieper | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | closed | Resolution | fixed | ||
Product Version | Slicer 4.3.1 | ||||
Target Version | Slicer 4.4.0 | Fixed in Version | Slicer 4.7.0 | ||
Summary | 0003776: CheckForLabelVolumeValidity compares float points and it says: IJKToRAS mismatch at [0, 3] (-89.6207 != -89.6207) | ||||
Description | Calling CheckForLabelVolumeValidity with two volumes that have the same dimension returns a wrong warning, e.g. "IJKToRAS mismatch at [0, 3] (-89.6207 != -89.6207)", "IJKToRAS mismatch at [1, 1] (0.000542851 != 0.000542851)", and "IJKToRAS mismatch at [2, 0] (4.32616e-09 != 4.32616e-09) IJKToRAS mismatch at [2, 2] (0.0752821 != 0.0752821)", and "IJKToRAS mismatch at [2, 3] (176.197 != 176.197)". I think the comparison at line 929 in "vtkSlicerVolumesLogic.cxx": "if (volumeValue != labelValue)", must be to a certain floating point, e.g. if "abs(volumeValue - labelValue > 0.001)". | ||||
Tags | No tags attached. | ||||
@safir: Thanks for reporting the problem and suggesting a solution. Could you test the following patch: https://github.com/jcfr/Slicer/tree/3776-CheckForLabelVolumeValidity-fix-double-compare |
|
Fixed in r23488 @Steve: Thanks for reviewing. @Safir: Thanks for contributing. After testing it works out as expected, make sure to close the issue. Thanks |
|
Thanks @jscfr for looking into this issue. The issue remains the same for me, with these two files: https://db.tt/YNaGQblq and https://db.tt/goyDta8k I get this "Warning: IJKToRAS mismatch at [1, 3] (45.929 != 45.929)" and "IJKToRAS mismatch at [2, 3] (176.197 != 176.197)". /Arash |
|
I think this problem still exist. I've changed the format of a label map from nrrd to mha. After opening the scene and the editor with the label map saved in mha format I receive the same warning. |
|
What version of Slicer are you using? (is it something newer that 4.4?) Can you share a small example dataset that demonstrates the problem? |
|
Here is an example: http://www13.zippyshare.com/v/bW3crAV2/file.html The same label map stored as nrrd and mha. If I switch from nrrd to mha in the Editor, i get the error: I use version 4.6.2. |
|
Thanks for reporting - I'd like to try with the sample data you provided, but the zippyshare.com link has so many ads with download buttons that I cannot tell which one actually links to the data. Can you try again with dropbox or google drive? Or even just upload to the bug tracker if the file is small enough. |
|
Slicer_Bug3776_Example.zip (3,667,585 bytes) |
|
^^^^ done Attached Files: |
|
Thanks for the data - I was able to replicate the issue. There is a truncation issue where the original data from the NRRD file: space directions: (1.26953125,0,0) (0,1.26953125,0) (0,0,0.5) Contains more digits than the Meta file: ElementSpacing = 1.26953 1.26953 0.5 So the detection was correct, but the error message was incorrect because the error message only displayed 6 significant digits, but this included 3 before the decimal point while the code checks only the fractional part. If I fix the error message I get this: IJKToRAS mismatch at [0, 0] (-1.269531 != -1.269530) which is technically correct but still probably over sensitive for the nature of the problem. |
|
Fix is committed so the dialog box accurately reports the numbers that are different: http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=26061 It may still be the case that the test is overly sensitive, but I think that should be filed as an independent issue. |
|
But if I understand correctly, the reason for the difference is the conversion from nrrd to mha, right? |
|
Right - the mha file doesn't preserve all the significant digits. Probably this could be addressed by changing the print format in the Meta image code. |
|
Import 2017-06-07 23:51:09: master 41ee3bdf 2014-07-28 09:56:08 Details Diff |
BUG: Fix CheckForLabelVolumeValidity warning. Fixes 0003776 This commit fixes a regression introduced in r23406 [1] where calling CheckForLabelVolumeValidity with two volumes that have the same dimension was returning a wrong warning, e.g. "IJKToRAS mismatch at [0, 3] (-89.6207 != -89.6207)", "IJKToRAS mismatch at [1, 1] (0.000542851 != 0.000542851)", and "IJKToRAS mismatch at [2, 0] (4.32616e-09 != 4.32616e-09) IJKToRAS mismatch at [2, 2] (0.0752821 != 0.0752821)", and "IJKToRAS mismatch at [2, 3] (176.197 != 176.197)". Thanks to "safir" for reporting the problem and suggesting a solution. [1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=23406 git-svn-id: http://svn.slicer.org/Slicer4/trunk@23488 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Modules/Loadable/Volumes/Logic/vtkSlicerVolumesLogic.cxx | Diff File | ||
Import 2017-06-07 23:51:09: master ef7d83d3 2017-05-30 17:56:45 Details Diff |
BUG: 0003776 warning dialog gave useless/misleading information The fuzzy compare of image geometry looks at the difference between two values, but the printing of the warning set the precision based on the whole number including the digits left of the decimal point. The result was a message that showed identical numbers and reported them as different (understandably confusing). https://www.na-mic.org/Bug/view.php?id=3776 From: Steve Pieper <pieper@isomics.com> git-svn-id: http://svn.slicer.org/Slicer4/trunk@26061 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Modules/Loadable/Volumes/Logic/vtkSlicerVolumesLogic.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-07-24 05:16 | safir | New Issue | |
2014-07-28 05:23 | jcfr | Status | new => assigned |
2014-07-28 05:23 | jcfr | Assigned To | => pieper |
2014-07-28 05:23 | jcfr | Target Version | => Slicer 4.4.0 |
2014-07-28 05:24 | jcfr | Note Added: 0012253 | |
2014-07-28 06:08 | jcfr | Note Added: 0012257 | |
2014-07-28 06:08 | jcfr | Status | assigned => resolved |
2014-07-28 06:08 | jcfr | Fixed in Version | => Slicer 4.4.0 |
2014-07-28 06:08 | jcfr | Resolution | open => fixed |
2014-07-29 00:38 | safir | Note Added: 0012264 | |
2017-05-19 09:34 | _-_-_ | Note Added: 0014488 | |
2017-05-19 09:40 | pieper | Note Added: 0014489 | |
2017-05-30 04:06 | _-_-_ | Note Added: 0014494 | |
2017-05-30 04:08 | _-_-_ | Note Edited: 0014494 | View Revisions |
2017-05-30 12:43 | pieper | Note Added: 0014501 | |
2017-05-30 14:38 | _-_-_ | File Added: Slicer_Bug3776_Example.zip | |
2017-05-30 14:39 | _-_-_ | Note Added: 0014503 | |
2017-05-30 14:39 | _-_-_ | File Added: Slicer_Bug3776_Example.JPG | |
2017-05-30 14:52 | _-_-_ | Note Edited: 0014503 | View Revisions |
2017-05-30 18:06 | pieper | Note Added: 0014504 | |
2017-05-30 18:06 | pieper | Note Edited: 0014504 | View Revisions |
2017-05-30 18:23 | pieper | Note Added: 0014505 | |
2017-05-30 18:23 | pieper | Status | resolved => closed |
2017-05-30 18:23 | pieper | Fixed in Version | Slicer 4.4.0 => Slicer 4.7.0 |
2017-05-31 03:45 | _-_-_ | Note Added: 0014506 | |
2017-05-31 07:42 | pieper | Note Added: 0014507 | |
2017-06-08 01:51 | pieper | Changeset attached | => Slicer master ef7d83d3 |
2017-06-10 08:51 | jcfr | Changeset attached | => Slicer master 41ee3bdf |