View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001910 | Slicer4 | Core: CLI infrastructure | public | 2012-04-16 23:11 | 2017-06-07 23:27 |
Reporter | almar | Assigned To | nicole | ||
Priority | normal | Severity | major | Reproducibility | sometimes |
Status | closed | Resolution | fixed | ||
Product Version | Slicer 4.1.0 | ||||
Target Version | Slicer 4.3.0 | Fixed in Version | Slicer 4.3.0 | ||
Summary | 0001910: Problem with fiducial registration | ||||
Description | Sometimes when you try to register using fiducials the module gives an faulty registration matrix. Restarting slicer and importing the fiducials in a new scene solves the problem then. Also sometimes the module clears all the input fields when running it, without actually calculating an outcome. | ||||
Tags | No tags attached. | ||||
Casey: are you available to work on this bug? If not, can Dominik take it? |
|
If Dominik can take this that would be great. Thank you |
|
@Dominik: Could you have a look at this in the coming week ? If not we will re-target for 4.4 release. Thanks |
|
I could not replicate the reported issue about the fault registration matrix or the issue with clearing the inputs. I did discover a new issue with the markups CLI interface that I will investigate further. |
|
Before the markups were merged [1], the fiducial registration was working well for me (tested on a version of slicer nightly from June 19 2013), so I think the original issue has been fixed. However, now the issue is that the WriteCLI method [2] is returning all fiducials in a markup list in a single string. So the command line looks right, but actually each command line argument should be a different string in the commandLineAsString vector of strings. If you look at the implementations of the two methods [3] you can see the difference. If I print the arguments from inside the CLI module like this: for (int i = 0; i < argc; i++) PARSE_ARGS; The output is: 0: /Users/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.2/cli-modules/FiducialRegistration I would say the right solution for this is to refactor a bit and make the signature of WriteCLI accept a vector of strings as the first argument and then it should push back strings onto that list to represent the command line arguments of the node. [1] https://github.com/Slicer/Slicer/commit/f834581be82c1a09d2e74b146294965e696faa9d [3] https://github.com/Slicer/Slicer/blob/master/Base/QTCLI/vtkSlicerCLIModuleLogic.cxx#L1410-1454 |
|
From the mailing list, from Brad: https://github.com/Slicer/Slicer/blob/master/Base/QTCLI/vtkSlicerCLIModuleLogic.cxx#L1410 I didn't see how the marksups WriteCLI method even get's this variable. Does it pass all point to in the Markups node? or did I miss something? Should be low impact enough while refactoring for this bug to add a singlePoint flag to WriteCLI. |
|
Proposed fix: |
|
Tested on Ubuntu 10.04 - Here is the output after I added the debug statement in the FiducialRegistration.cxx: slicer:0x7fdcb22d83a0 --processinformationaddress 0x765d850 --returnparameterfile /tmp/Slicer2/28553_f1OVqjoHRQ.params --fixedLandmarks -25.7469,-9.46105,-10.2143 --fixedLandmarks 6.6209,-44.7714,-10.2143 --fixedLandmarks -35.7515,37.0309,-10.2143 --movingLandmarks -25.7469,-9.46105,-10.2143 --movingLandmarks 6.6209,-44.7714,-10.2143 --movingLandmarks -35.7515,37.0309,-10.2143 --saveTransform /tmp/Slicer2/CIFFD_vtkMRMLLinearTransformNodeE.txt --transformType Rigid 0: slicer:0x7fdcb22d83a0 |
|
Should the flag and the value should be on separate lines? When I put in the debugging statement and run the test I get: EDIT (Jc): Having one argument per line is right 475: 0: ModuleEntryPoint While from the GUI I get the same as JC posted: Putting a print statement after the PARSE_ARGS command to print out the fixed landmarks (just the x coord), running the test I get valid points: Running from the GUI, I also get valid points: Looks like PARSE_ARGS is smart enough to deal with both cases, but in vtkSlicerCLIModuleLogic, it does add the flag and the parameter as separate strings. I'm updating the WriteCLI implementations. |
|
Rats, wasn't thinking and squashed the two commits so I lost comments on the original one, sorry! Here's the updated topic: |
|
Where did you put your debug statement to get the two output reported in note c9721 ? |
|
Before and after PARSE_ARGS: PARSE_ARGS; for (int i = 0; i < fixedLandmarks.size(); ++i) |
|
Fixed in svn 22369: |
|
Closing resolved issues that have not been updated in more than 3 months |
|
Slicer: 2145-support-for-installing-extension-from-file 20882931 2013-08-30 14:41:01 naucoin Details Diff |
BUG: update WriteCLI to fill a vector of strings, honor mutiple = false Because Markups define multiple markups (with potentially multiple points) in one node, it was writting multiple instances of a string + coordinates to the string stream passed in to WriteCLI. This causes a problem for the parsing of the arguments in CLIs such as FiducialRegistration which needed a separate string for each point. With this change, the markup points are writen into a vector of strings, one string for each point in each Markup. Added the multipleFlag to be passed to WriteCLI, and if it's false, only write the first selected markup to the output vector. If that markup has multiple points, it will write all of those points. Updated the Annotation control point to use the new WriteCLI signature, but because of the way the points are written, it will only write the first point in a multi point annotation (such as a ruler) if multiple is false, so it ignores it and the CLI module logic takes care of ensuring that only the first child in an annotation hierachy is written out. Write out a warning message if this is the case. Added a test for FiducialRegistration, updated the Markups node test 1 to test the single point flag. Removed trailing white spaces. Issue 0001910 0003345 0003340 git-svn-id: http://svn.slicer.org/Slicer4/trunk@22369 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Base/QTCLI/vtkSlicerCLIModuleLogic.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLDisplayableNode.h | Diff File | ||
mod - Modules/CLI/FiducialRegistration/FiducialRegistration.cxx | Diff File | ||
mod - Modules/CLI/FiducialRegistration/Testing/CMakeLists.txt | Diff File | ||
add - Modules/CLI/FiducialRegistration/Testing/FiducialRegistrationTest.cxx | Diff File | ||
mod - Modules/Loadable/Annotations/MRML/vtkMRMLAnnotationControlPointsNode.cxx | Diff File | ||
mod - Modules/Loadable/Annotations/MRML/vtkMRMLAnnotationControlPointsNode.h | Diff File | ||
mod - Modules/Loadable/Markups/MRML/vtkMRMLMarkupsNode.cxx | Diff File | ||
mod - Modules/Loadable/Markups/MRML/vtkMRMLMarkupsNode.h | Diff File | ||
mod - Modules/Loadable/Markups/Testing/Cxx/vtkMRMLMarkupsNodeTest1.cxx | Diff File | ||
Slicer: 2145-support-for-installing-extension-from-file b4c3236c 2013-09-03 18:52:59 naucoin Details Diff |
BUG: fix failing test Fix the write CLI test for the markpus node by adjusting the expected number of arguments to be 2 times the number of points, as the flag is written separately now. Related to fixes for issue 0001910 git-svn-id: http://svn.slicer.org/Slicer4/trunk@22399 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Modules/Loadable/Markups/Testing/Cxx/vtkMRMLMarkupsNodeTest1.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-04-16 23:11 | almar | New Issue | |
2012-08-20 07:49 | nicole | Assigned To | => caseygoodlett |
2012-08-20 07:49 | nicole | Status | new => assigned |
2012-08-20 07:49 | nicole | Target Version | => Slicer 4.3.0 |
2012-08-20 07:49 | nicole | Note Added: 0005572 | |
2012-08-20 11:32 | caseygoodlett | Note Added: 0005621 | |
2013-08-02 08:44 | jcfr | Assigned To | caseygoodlett => DMeier |
2013-08-02 08:44 | jcfr | Note Added: 0009360 | |
2013-08-27 12:21 | jcfr | Assigned To | DMeier => pieper |
2013-08-28 13:50 | pieper | Note Added: 0009686 | |
2013-08-28 14:23 | pieper | Assigned To | pieper => nicole |
2013-08-28 14:35 | pieper | Note Added: 0009687 | |
2013-08-29 09:29 | nicole | Note Added: 0009701 | |
2013-08-29 11:16 | blowekamp | Relationship added | related to 0003345 |
2013-08-29 13:03 | nicole | Note Added: 0009710 | |
2013-08-29 18:46 | jcfr | Note Added: 0009715 | |
2013-08-30 06:52 | nicole | Note Added: 0009721 | |
2013-08-30 07:03 | nicole | Note Edited: 0009721 | |
2013-08-30 07:13 | nicole | Note Edited: 0009721 | |
2013-08-30 07:28 | nicole | Note Added: 0009724 | |
2013-08-30 07:47 | jcfr | Note Edited: 0009721 | |
2013-08-30 07:49 | jcfr | Note Added: 0009727 | |
2013-08-30 07:55 | nicole | Note Added: 0009728 | |
2013-08-30 10:42 | nicole | Note Added: 0009730 | |
2013-08-30 10:42 | nicole | Status | assigned => resolved |
2013-08-30 10:42 | nicole | Fixed in Version | => Slicer 4.3.0 |
2013-08-30 10:42 | nicole | Resolution | open => fixed |
2014-03-06 05:00 | jcfr | Note Added: 0010848 | |
2014-03-06 05:02 | jcfr | Status | resolved => closed |
2017-06-07 23:27 | Changeset attached | => Slicer 2145-support-for-installing-extension-from-file b4c3236c | |
2017-06-07 23:27 | Changeset attached | => Slicer 2145-support-for-installing-extension-from-file 20882931 |