View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002979 | Slicer4 | Core: CLI infrastructure | public | 2013-02-24 23:20 | 2018-03-02 11:06 |
Reporter | ymartelli | Assigned To | nicole | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | Slicer 4.2.2-1 | ||||
Target Version | Slicer 4.5.0-1 | Fixed in Version | Slicer 4.5.0-1 | ||
Summary | 0002979: Support for CLI point coordinateSystem | ||||
Description | The flag 'coordinateSystem' of the <point> tag does not have any effect, neither in the Slicer 4.2.2 GUI, nor in the generated command line. The documentation says that 'ras', 'lps' and 'ijk' are supported (http://www.slicer.org/slicerWiki/index.php/Slicer3:Execution_Model_Documentation#XML_Schema) but points always come in RAS coordinates. This was also reported on the mailing list: http://massmail.spl.harvard.edu/public-archives/slicer-users/2010/002850.html | ||||
Tags | No tags attached. | ||||
@Jim: Could you have a look ? Thanks |
|
The original design was to support multiple coordinate systems. But the implementation became Slicer specific with an implicit assumption of RAS. It is something that we have intended to revisit. Nicole want to revisit how we communicate points to a CLI, coordinating with that effort would be a good opportunity. |
|
@Jim: Thanks for the quick answer. @Yves: Assuming Jim or Nicole provides you with some guidance, would you be willing to help addressing this problem by contributing a patch ? |
|
If I can be of any help. Can you tell me roughly where to look for in the Slicer code? The plan would be to convert to the desired coordinate system when the command line is generated? I was wondering if it made sense to pass landmarks in a coordinate system when the data is in another? |
|
It is tricky. Basically Slicer does everything in RAS. But ITK does everything in LPS. When images are written to disk, Slicer converts its coordinate frame into a a coordinate frame compatible with the file format. When an CLI based on ITK reads that data in, the CLI converts the data to LPS. This same conversion occurs when sending images in memory to CLI as well. But for points, we don't have file format standards defining the coordinate frame of the serialized data. Originally we passed points on the command line. So we planned at attribute in the <point> tag to define what coordinate frame the plugin is expecting the data. Currently plugins receive points in RAS and convert them to LPS internally if needed. Here are some options:
We need to do 0000002 anyway, as we have modules that need to receive a collection of points larger than we want to put on the command line. But I expect for backward compatibility, we will maintain 0000001 is some capacity as it is useful for passing seed points and query points. Let's pull Nicole into the discussion as her plans for points will impact how we resolve this. |
|
My plan is to move toward 2, using a file format that can pass multiple points. I think I prefer that Slicer does the conversion before passing the points to the CLIs so that they can just specify the coordinate system and then read the points without having to do a conversion. For reference, these CLI's currently use the point parameter and some are expecting LPS coordinates: |
|
Would it also make sens to associated the "coordinateSystem" attribute with image input/output also ? |
|
Will this be fixable for the 4.3 release? Several people have asked about it. |
|
I was actually just working on a get markup point as LPS method late last week and was going to debug it today to get it into the Markups check in. The way I went was: Short answer: yes, for markup fiducials. |
|
Have the LPS option done locally to markups, but will postpone the IJK one, as it will rely on having an associated node id set for each fiducial point, looking up that volume and doing the RAS to IJK conversion on write/read. If IJK output is critical, I can work on it during the bug fixing phase. To have the CLI use the LPS functionality will work best if the coordinate system selection is defined on the vtkMRMLStorageNode level, otherwise I'm going to have to expand the WriteCLI call on the displayable nodes. There's also the to do point of expanding the point SEM type to support the fileExtension option to use the storage nodes to write files. Jim, can you weigh in? |
|
Added a coordinate system flag to the WriteCLI method and use it for annotation points, see the changes here: |
|
Support for LPS and RAS annotation/markup points is in the Slicer code base for the 4.3 release. |
|
Is this ready to move. |
|
Consider supporting --pointfile to write fiducials via file to CLI modules, and get them back, while still supporting individual command line --point (multi supported) for backward compatibility. Look at expanding PARSE_ARGS to do the reading automatically (as a backward compatibility option so that the points would be in the standard array)? If go the PARSE_ARGS way, deprecate the generation of individual points on the command line. The CLI developer would have to write it manually then though if they wanted to return changed points to Slicer. |
|
Slicer execution model changes: |
|
Thanks Nicole. Within the SlicerExecutionModel, could you add a simple test case to: https://github.com/naucoin/SlicerExecutionModel/blob/2979-support-for-cli-point-coordinateSystem-files/ModuleDescriptionParser/Testing/ModuleDescriptionTest.cxx |
|
Trying, but the WriteParameterFile method don't seem to be fully implemented in ModuleDescription. It just produces key = value lines for the top level parameter (though that matches what the Read method expects):
|
|
Did a simple module description parser test and a more extensive XML file test for point and pointfile. |
|
Execution model pull request: |
|
SEM pull request integrated. |
|
Slicer pull request: |
|
+1 Thanks Nicole. I added comment on the PR. |
|
Integrated as of svn 24459 |
|
Slicer: 2145-support-for-installing-extension-from-file 0c1a0975 2013-08-22 20:32:36 naucoin Details Diff |
ENH: Add support for the LPS coordinate system for CLIs Add a coordinate system flag check, default to ras but support LPS. Update the displayable nodes that use the WriteCLI method to use the coordinate system flag. TODO: IJK coordinate system - See issue 0002979 git-svn-id: http://svn.slicer.org/Slicer4/trunk@22311 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Libs/MRML/Core/vtkMRMLDisplayableNode.h | Diff File | ||
mod - Modules/Loadable/Annotations/MRML/vtkMRMLAnnotationControlPointsNode.cxx | Diff File | ||
mod - Modules/Loadable/Annotations/MRML/vtkMRMLAnnotationControlPointsNode.h | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-02-24 23:20 | ymartelli | New Issue | |
2013-02-24 23:20 | ymartelli | Status | new => assigned |
2013-02-24 23:20 | ymartelli | Assigned To | => millerjv |
2013-02-25 06:14 | jcfr | Note Added: 0008037 | |
2013-02-25 09:26 | millerjv | Note Added: 0008040 | |
2013-02-25 09:34 | jcfr | Note Added: 0008041 | |
2013-02-25 09:34 | jcfr | Note Edited: 0008041 | |
2013-02-25 23:13 | ymartelli | Note Added: 0008046 | |
2013-02-26 03:37 | millerjv | Note Added: 0008047 | |
2013-03-13 13:44 | nicole | Note Added: 0008120 | |
2013-03-19 11:38 | jcfr | Note Added: 0008165 | |
2013-07-04 10:51 | pieper | Note Added: 0008833 | |
2013-07-08 06:18 | nicole | Note Added: 0008876 | |
2013-07-08 09:58 | nicole | Note Added: 0008895 | |
2013-07-08 10:39 | nicole | Note Edited: 0008895 | |
2013-07-08 12:07 | nicole | Note Edited: 0008895 | |
2013-07-08 14:16 | nicole | Note Added: 0008915 | |
2013-08-30 07:43 | nicole | Note Added: 0009726 | |
2013-08-30 07:52 | jcfr | Target Version | => Slicer 4.4.0 |
2014-03-06 09:45 | pieper | Note Added: 0011247 | |
2014-07-29 11:44 | jcfr | Target Version | Slicer 4.4.0 => Slicer 4.5.0-1 |
2014-07-29 11:44 | jcfr | Assigned To | millerjv => nicole |
2015-01-08 05:43 | nicole | Note Added: 0012859 | |
2015-06-24 02:36 | nicole | Note Added: 0013148 | |
2015-06-24 04:24 | jcfr | Note Added: 0013149 | |
2015-06-24 06:55 | nicole | Note Added: 0013152 | |
2015-06-24 06:56 | nicole | Note Edited: 0013152 | |
2015-06-24 07:30 | nicole | Note Added: 0013153 | |
2015-07-06 12:10 | nicole | Note Added: 0013171 | |
2015-07-16 13:45 | nicole | Note Added: 0013185 | |
2015-07-16 14:19 | nicole | Note Added: 0013186 | |
2015-07-16 14:42 | jcfr | Note Added: 0013187 | |
2015-07-21 13:46 | nicole | Note Added: 0013190 | |
2015-07-21 13:46 | nicole | Status | assigned => resolved |
2015-07-21 13:46 | nicole | Fixed in Version | => Slicer 4.4.1 |
2015-07-21 13:46 | nicole | Resolution | open => fixed |
2015-09-09 08:29 | jcfr | Fixed in Version | Slicer 4.4.1 => Slicer 4.5.0-1 |
2017-06-07 23:27 | Changeset attached | => Slicer 2145-support-for-installing-extension-from-file 0c1a0975 | |
2018-03-02 11:06 | jcfr | Status | resolved => closed |