View Issue Details

IDProjectCategoryView StatusLast Update
0003488Slicer4Module Transformspublic2017-06-10 08:51
Reportercaseygoodlett Assigned Tojcfr  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.3.0 
Target VersionSlicer 4.4.0Fixed in VersionSlicer 4.4.0 
Summary0003488: Min/Max translation not respected in local coordinates mode
Description

I tried to re-position a surface model relative to an image using the Transforms module. I wanted to be able to rotate the object about its own center-of-origin so I selected "Local" coordinate system. In this case rotations work as expected. However, after applying a single rotation, the translations can quickly move the object far outside the scene and the min/max are not respected.

Additional Information

Tested in binary installer of slicer 4.3.1

Steps to reproduce
1) Load a surface model
2) Place surface model under a transform node
3) Edit the transform node
4) Set "Coordinate Reference" to Local
5) Apply an LR rotation of -75 degrees
6) Try to apply a negative IS translation. At first it works, but as the sliders approach the left-side they seem to wrap-around and reset the minimum value which quickly becomes close to -INT_16_MAX . This moves the object far outside the scene, and I have no way to recover except to start adjusting the transform again.

TagsToBeBackported

Relationships

has duplicate 0001386 closedalexy Transforms GUI - slider values go haywire 
related to 0003500 new Hybrid coordinate reference mode in Transforms module 

Activities

caseygoodlett

caseygoodlett

2013-11-08 05:33

developer   ~0010296

I think what I really want is a hybrid mode that acts like "local" coordinate system for rotations and global for translations. I am currently working around by manually switching between the two before editing either translations or rotations.

lassoan

lassoan

2013-11-15 11:38

developer   ~0010315

A hybrid mode would be useful, indeed. I added a ticket: 0003488.

However, the current behavior of the sliders makes translations in local mode completely unusable. The problem is that the translation slider's min/max value is changed while the slider is dragged, and this completely throws off the GUI.

The correct behavior would be: not let any value to go outside the set min/max boundaries when the values are changed by dragging a slider on the GUI. Updating the min/max boundaries from values set programmatically (by other modules, not on the GUI) is fine.

lassoan

lassoan

2013-11-15 11:55

developer   ~0010317

Acutally, I think the current implementation of the Local mode doesn't make sense. If you change the IS slider then it translates along the "from" coordinate system's IS axis by adjusting the IS coordinate in the "to" coordinate system!! This leads to major instability when IS axes are close to orthogonal.

Instead, the IS coordinate should be specified in the "from" coordinate system. In this case there would be no side effect (changing other sliders when moving one slider) and no instability.

lassoan

lassoan

2013-11-16 06:10

developer   ~0010319

Here is a tentative fix:
https://github.com/lassoan/Slicer/tree/transforms_local_reference_translation_fix

I do some more testing and send a pull request.

lassoan

lassoan

2013-11-16 13:08

developer   ~0010322

Looks good, so submitted a pull request:
https://github.com/Slicer/Slicer/pull/82

jcfr

jcfr

2013-11-18 09:19

administrator   ~0010329

Great. It solves the problem reported by Casey.

Would it be possible to revise the topic so that clicking on "Identity" also reset the translation slider when local mode has been selected ?

lassoan

lassoan

2013-11-18 09:46

developer   ~0010331

Updated the branch with the resetting of translation sliders on Identity clicked.

jcfr

jcfr

2013-11-18 10:38

administrator   ~0010332

Fixed in r22713
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22713

@Casey: When you have chance, would be great if you could try if tomorrow nightly and close the issue if it works for you. Thanks

caseygoodlett

caseygoodlett

2013-11-19 06:07

developer   ~0010337

seems to fix the problem for me.

Thanks for the quick response

jcfr

jcfr

2017-06-07 23:27

administrator   ~0014567

Fix committed to 2145-support-for-installing-extension-from-file branch.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file 4d8a9a06

2013-11-18 15:37:20

jcfr

Details Diff
BUG: Fixed translation sliders in local coordinate reference mode.

In local coordinate reference mode the slider positions do not match
directly with the transformation matrix values.

Similarly to rotation sliders, only relative positions are set
with the sliders in local coordinate reference mode.

Fixes 0003488

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22713 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/Widgets/qMRMLLinearTransformSlider.cxx Diff File
mod - Libs/MRML/Widgets/qMRMLTransformSliders.cxx Diff File
mod - Modules/Loadable/Transforms/qSlicerTransformsModuleWidget.cxx Diff File

Import 2017-06-07 23:51:09: master 4d8a9a06

2013-11-18 15:37:20

jcfr

Details Diff
BUG: Fixed translation sliders in local coordinate reference mode.

In local coordinate reference mode the slider positions do not match
directly with the transformation matrix values.

Similarly to rotation sliders, only relative positions are set
with the sliders in local coordinate reference mode.

Fixes 0003488

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22713 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/Widgets/qMRMLLinearTransformSlider.cxx Diff File
mod - Libs/MRML/Widgets/qMRMLTransformSliders.cxx Diff File
mod - Modules/Loadable/Transforms/qSlicerTransformsModuleWidget.cxx Diff File

Issue History

Date Modified Username Field Change
2013-11-08 05:30 caseygoodlett New Issue
2013-11-08 05:33 caseygoodlett Note Added: 0010296
2013-11-15 11:32 lassoan Relationship added related to 0003500
2013-11-15 11:38 lassoan Note Added: 0010315
2013-11-15 11:55 lassoan Note Added: 0010317
2013-11-16 06:10 lassoan Note Added: 0010319
2013-11-16 06:10 lassoan Status new => assigned
2013-11-16 06:10 lassoan Assigned To => lassoan
2013-11-16 13:08 lassoan Note Added: 0010322
2013-11-18 09:19 jcfr Note Added: 0010329
2013-11-18 09:46 lassoan Note Added: 0010331
2013-11-18 10:38 jcfr Target Version => Slicer 4.3.2
2013-11-18 10:38 jcfr Note Added: 0010332
2013-11-18 10:38 jcfr Status assigned => resolved
2013-11-18 10:38 jcfr Fixed in Version => Slicer 4.4.0
2013-11-18 10:38 jcfr Resolution open => fixed
2013-11-18 10:39 jcfr Tag Attached: ToBeBackported
2013-11-19 06:07 caseygoodlett Note Added: 0010337
2013-11-19 06:10 jcfr Status resolved => closed
2014-03-06 10:16 nicole Target Version Slicer 4.3.2 => Slicer 4.4.0
2014-04-17 10:53 lassoan Relationship added has duplicate 0001386
2017-06-07 23:27 jcfr Changeset attached => Slicer 2145-support-for-installing-extension-from-file 4d8a9a06
2017-06-07 23:27 jcfr Note Added: 0014567
2017-06-07 23:27 jcfr Assigned To lassoan => jcfr
2017-06-10 08:51 jcfr Changeset attached => Slicer master 4d8a9a06