View Issue Details

IDProjectCategoryView StatusLast Update
0003261Slicer4Core: Base Codepublic2017-06-07 23:27
Reporteryuzheng Assigned Tofinetjul  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.2.2-1 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0003261: qMRMLVolumeInfoWidget unexpectedly changes the volume image spacing and image origin to lower precision
Description

When a volume is selected as the active volume in the volume module, setImageOrigin will be triggered in qMRMLVolumeInfoWidget.cxx:
QObject::connect(this->ImageOriginWidget, SIGNAL(coordinatesChanged(double)),
q, SLOT(setImageOrigin(double
)));
It then sets Origin for the volume node. Currently the value got from Signal is not the original Origin, but the round-off value based on Slicer's precision (Application Settings->Units->Length).

E.g. The MR-head.nrrd from Sample Data originally has its space origin as (86.644897460937486,-133.92860412597656,116.78569793701172).
When it is opened in Volume module and then saved without any changes by user, its space origin is changed to (86.644999999999996,-133.929,116.78599999999999). This is based on the default precision: 3.

Volume Image Spacing has the same issue.

Expected behavior: qMRMLVolumeInfoWidget should only display the round off value, but it still uses the actual value to set volume node.

Discussion: assume the precision is the 3 (default one), z origin is then displayed as 116.786. If user changes it to 116.787, what value should Slicer use to update the volume node?
option 1) 116.787
option 2) 116.78669793701172 (= 116.78569793701172 + 0.001)

TagsNo tags attached.

Relationships

related to 0003260 closedjcfr Volumes not marked as modified on Save after volume image spacing/origin is changed 
related to 0003266 closedfinetjul Check that CTK topic "ctkvalueproxy" do not cause issue 

Activities

finetjul

finetjul

2013-08-07 11:42

administrator   ~0009423

Please try https://github.com/finetjul/Slicer/commit/14a1b7743244e3d9d665ae1497327e41f2fe7a85

yuzheng

yuzheng

2013-08-08 09:58

developer   ~0009431

The original issue is fixed. And option 1) is used to save the user changes.

finetjul

finetjul

2013-08-09 11:51

administrator   ~0009446

Fixed in r22281

jcfr

jcfr

2014-03-06 05:21

administrator   ~0011161

Closing resolved issues that have not been updated in more than 3 months

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file 807ee8bc

2013-08-09 15:50:51

finetjul

Details Diff
BUG: Keep precision in ctkDoubleSpinBox

Issue 0003261

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22281 3bd1e089-480b-0410-8dfb-8563597acbee
mod - SuperBuild/External_CTK.cmake Diff File

Issue History

Date Modified Username Field Change
2013-07-30 12:05 yuzheng New Issue
2013-07-30 12:05 yuzheng Status new => assigned
2013-07-30 12:05 yuzheng Assigned To => alexy
2013-07-30 12:09 yuzheng Description Updated
2013-07-30 12:09 yuzheng Relationship added related to 0003260
2013-07-30 12:10 yuzheng Description Updated
2013-07-30 12:12 yuzheng Category Core: MRML => Core: Base Code
2013-07-31 08:34 jcfr Assigned To alexy => yuzheng
2013-07-31 08:38 jcfr Relationship added related to 0003266
2013-08-07 07:23 yuzheng Assigned To yuzheng => finetjul
2013-08-07 11:42 finetjul Note Added: 0009423
2013-08-07 11:42 finetjul Status assigned => feedback
2013-08-07 11:43 finetjul Product Version => Slicer 4.2.2-1
2013-08-07 11:43 finetjul Target Version => Slicer 4.3.0
2013-08-08 09:58 yuzheng Note Added: 0009431
2013-08-09 11:51 finetjul Note Added: 0009446
2013-08-09 11:51 finetjul Status feedback => resolved
2013-08-09 11:51 finetjul Fixed in Version => Slicer 4.3.0
2013-08-09 11:51 finetjul Resolution open => fixed
2014-03-06 05:21 jcfr Note Added: 0011161
2014-03-06 05:23 jcfr Status resolved => closed
2017-06-07 23:27 finetjul Changeset attached => Slicer 2145-support-for-installing-extension-from-file 807ee8bc