View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002267 | Slicer4 | Core: MRML | public | 2012-06-26 21:07 | 2017-06-10 08:51 |
Reporter | inorton | Assigned To | nicole | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | |||||
Target Version | Slicer 4.5.0-1 | Fixed in Version | Slicer 4.5.0-1 | ||
Summary | 0002267: Add "SliceIntersectionWidth" property to ModelDisplayNode | ||||
Description | Per Andrey's request, he would like to have option to make slice intersections thicker. This is easy to support in DM but needs a new property on the ModelDisplayNode. | ||||
Tags | help-wanted | ||||
From Xinwei Wang, Stanford: "Hope that it can be fixed after next major release. Otherwise, it is not convenient. |
|
Same issue in Slicer3, that has not been resolved: http://www.na-mic.org/Bug/view.php?id=715 Posts on user list that requested specifically this feature: 2010: http://slicer-users.65878.n3.nabble.com/editor-label-outline-line-thickness-td931595.html |
|
There are two related issues in terms of making slice overlays thicker: 1) the outline mode of a label map (as set by the button in the slice controller widget). For this, we could add an explicit image dilate step in the slice layer pipeline. Note that there may be issues at the borders of labels. The dilate code would have to be added here: https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Logic/vtkMRMLSliceLayerLogic.cxx#L563 Alternatively the label outline class could be modified to show pixels that are not just on the border, also one or more pixels in from the border. The most general solution would be to do a localized distance transform of some sort. Probably the dilate is easier. 2) the outlines of models intersected with the slice, as selected in the models module. These can easily be made thicker with a property on the actor: |
|
Steve, for (1), maybe we can try to add an option to initialize voxel neighborhood in the output instead of just one voxel here: https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Logic/vtkImageLabelOutline.cxx#L158 ? For (2), does it make sense to add intersection line thickness to the display node, expose it in the Models widget, and initialize on the actor? |
|
For (1), Demian and I talked and he suggested doing an n-pixel erosion and then subtracting it from the label layer. I like this suggestion since we could make the lines arbitrarily thick. Unfortunately we could not find a multi-label erosion filter already implemented in ether vtk or itk, so there some coding to be done to implement that. For (2), yes, it seems we have some options: BTW, I exchanged email with Xinwei and it seems that issue (1) is the one that causes issues for them right now. |
|
Good idea. I looked around but could not find a filter for (1) either. I will see if I have some down-time during the case to look into this. I would think taking ITK erosion filter, adding extra checks and wrapping ITKVTK should not be very hard, but maybe I am missing something. For (2), I agree it does not resolve directly the request, but I think would be nice to have this feature anyway, especially since it enables visualization of multiple contours. |
|
It would be great if you could look into (1) Andrey. I agree that writing the vtkITK wrapper would be the right thing, and it could be integrated in the display pipeline. What Demian and I looked for was a filter that would erode all label values in one pass rather than requiring that the image be decomposed into multiple images, one per unique label value to erode. So maybe this requires a custom ITK filter (also possible, but more coding). |
|
This might be relevant, need to investigate: http://old.nabble.com/Multilabel-dilation-td34995623.html |
|
It seems like we could use the slice intersection width parameter being added to the vtkMRMLDisplayNode so that we can support it as a configurable option for volumes and models and other displayable nodes rather than just for model nodes. SliceIntersectionVisibility is already defined there. Adding it as an integer denoting number of voxels in width that the intersection should be. |
|
On my github: |
|
svn 21832[1] adds the SliceIntersectionThickness to the vtkMRMLDisplayNode. The widget elements are disabled, please enable them when they're being used. http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21832 |
|
That's a great addition - thanks Nicole! Can you elaborate on "please enable them when they're being used." ? Is that something the user needs to do or is there still some programming to do? |
|
I just tried this and was able to set the width with python and the spin box updated (still grayed out) but the width did not change in the slice view. What else needs to be done on this? |
|
Enable the spin box when the updating of the width is done in the slice view (all I did was provide the variable to save the width and the widget to set it). My understanding was that Andrey was going to do the filter update. |
|
Nicole, I thought you are adding model slice intersection thickness. Based on the comment 0007671 from Steve, no additional filter is needed, it should just pass the value to the actor. |
|
Okay - I see - this was actually a simple change so I went ahead and did it. This will be very useful for making image for publication and presentation. Committed r21840 http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21840 |
|
Oops, sorry, I didn't read the previous comments closely enough! Thanks Steve! |
|
Referring back to the earlier notes on this bug, we have now implemented the fix for (2), which was the model intersections. We still need to work on (1) which was the outline width of the labels. |
|
This would be a perfect task for someone who wants to learn a little vtk coding - the fix is probably pretty simple but will require C++ and some testing. |
|
There is a "Slice intersection thickness" display option in the model module. I think it does what is needed. |
|
I don't think the label map outline mode line thickness has been implemented yet though, just the model slice intersections. |
|
Alireza, can you look into this issue of adding the capability to control line thickness for label outline? This feature was specifically requested by Reinhard, and also by many other users. Thanks. |
|
I agree - this is a doable project and would be helpful for people. Alireza, let me know if you need suggestions on how to approach it. -Steve |
|
The vtkImageLabelOutline filter is a simplified clone of VTK's vtkImageDilateErode3D filter. The original vtkImageDilateErode3D filter contains a kernel size parameter, so I guess we could just use the original VTK filter or copy the kernel size parameter handling from vtkImageDilateErode3D to vtkImageLabelOutline. |
|
I like the suggestion from Andras. One complication is lightbox mode, where you get 'bleed' from adjacent slices due to the way the slices are extracted. It looks like setting the kernel size to 1 in the slice axis (z) would handle this case. Hopefully this turns out to be an easy fix! http://www.vtk.org/doc/nightly/html/classvtkImageDilateErode3D.html |
|
I'm looking into implementing this as part of the Radiomics project. |
|
Topic for review (it seems to work not badly in a quick lightbox test): I added using and setting the kernel size on the current filter, cued off of the SliceIntersectionThickness defined on the vtkMRMLDisplayNode (same variable as used with models). That's set by default to 1 in the node constructor. Two related questions: |
|
Responding to questions from Andrey via email: The way the classes are set up, SliceIntersectionThickness is defined on the superclass, vtkMRMLDisplayNode, and it seems to be a general enough name to support an argument to use it in both the model display node and the label map volume display node for showing outlines on the slices. If we decide to update the API to separate the concepts, it would mean:
I'm inclined to leave it as is, with setting the higher default for the label volume display node in that constructor, since the current changes resolve the reported feature request. I'm willing to do the work, but would rather get the GUI change checked in now and then update it later on the API side after resolving the questions above. |
|
Pull request: |
|
I didn't try building it but the pull request looks good to me. I'd say go ahead and merge. |
|
Andrey's building it to test, I didn't do extensive testing so I'd like to wait on his report to see if there are outstanding bugs. |
|
Fixes commited as |
|
Nicole, as discussed in the email thread, line thickness is not uniform over the countour. Can you update on the status? |
|
2015-05-14 14:28
|
|
There's clearly something wrong with the underlying filter. See attached image single-pixel.png |
|
Looks better to me now: http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=24256 |
|
Another issue fixed in r24257. The outline really does look correct now. People will love this feature ; ) |
|
Wow, good catches, thanks! |
|
Thanks! Alas on testing this morning I found some odd behavior--(if you zoom in and look at the boundaries of the view there are some asymmetries that are troubling. Particularly noticable when the outlines are very thick. It seems to be related to the kernel size, kernel middle, and the neighborhood size. I'll hook up a debugger and check the assumptions. I'll need to re-open the issue. |
|
See notes |
|
Okay, now this one is finally looking correct as of r24260. Pointer arithmetic going on in the guts of this one. I also cleaned up the style a bit to make things easier to debug. |
|
Thanks for working on this Steve |
|
Slicer: 2145-support-for-installing-extension-from-file d6b09116 2013-03-22 16:23:48 naucoin Details Diff |
BUG: add a way to set the slice intersection thickness Add the SliceIntersectionThickeness property to vtkMRMLDisplayNode and test it. Add a label and spin box to the qMRMLDisplayNodeWidget but keep it disabled for now. Issue 0002267 git-svn-id: http://svn.slicer.org/Slicer4/trunk@21832 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Libs/MRML/Core/vtkMRMLCoreTestingMacros.h | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLDisplayNode.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLDisplayNode.h | Diff File | ||
mod - Libs/MRML/Widgets/Resources/UI/qMRMLDisplayNodeWidget.ui | Diff File | ||
mod - Libs/MRML/Widgets/Testing/qMRMLDisplayNodeWidgetEventTranslatorPlayerTest1.xml | Diff File | ||
mod - Libs/MRML/Widgets/qMRMLDisplayNodeWidget.cxx | Diff File | ||
mod - Libs/MRML/Widgets/qMRMLDisplayNodeWidget.h | Diff File | ||
Import 2017-06-07 23:51:09: master cd654faa 2015-04-30 16:50:50 naucoin Details Diff |
BUG: add outline thickness for label map outlines Use the Outline setting on the image label outline filter to increase the outline thickness. The label outline value is used as the kernel size radius. Added a GUI for the label outline integer, copied from the Models display GUI, still using SliceIntersectionThickness as that's the display node setting that's used by the filter. Set the default slice intersection thickenss to 3 for label map volume display nodes. Issue 0002267 git-svn-id: http://svn.slicer.org/Slicer4/trunk@24203 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Libs/MRML/Core/vtkMRMLLabelMapVolumeDisplayNode.cxx | Diff File | ||
mod - Libs/MRML/Logic/vtkImageLabelOutline.cxx | Diff File | ||
mod - Libs/MRML/Logic/vtkImageLabelOutline.h | Diff File | ||
mod - Libs/MRML/Logic/vtkMRMLSliceLayerLogic.cxx | Diff File | ||
mod - Modules/Loadable/Volumes/Widgets/Resources/UI/qSlicerLabelMapVolumeDisplayWidget.ui | Diff File | ||
mod - Modules/Loadable/Volumes/Widgets/qSlicerLabelMapVolumeDisplayWidget.cxx | Diff File | ||
mod - Modules/Loadable/Volumes/Widgets/qSlicerLabelMapVolumeDisplayWidget.h | Diff File | ||
Import 2017-06-07 23:51:09: master 44328a78 2015-05-05 15:40:32 naucoin Details Diff |
STYLE: update Volumes documentation to include outline thickness Add a parameter description of the label outline thickness option for label map volume display. Issue 0002267 git-svn-id: http://svn.slicer.org/Slicer4/trunk@24213 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Modules/Loadable/Volumes/Documentation/Volumes.xml | Diff File | ||
Import 2017-06-07 23:51:09: master 92d7129b 2015-05-14 18:26:08 Details Diff |
BUG: 0002267 image label outline incorrect There was a logic error in the outline kernel calculation from a previous commit. https://github.com/Slicer/Slicer/commit/cd654faa89279694af12f5d7bbaa053281594881 From: Steve Pieper <pieper@bwh.harvard.edu> git-svn-id: http://svn.slicer.org/Slicer4/trunk@24256 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Libs/MRML/Logic/vtkImageLabelOutline.cxx | Diff File | ||
Import 2017-06-07 23:51:09: master 1e52c8fb 2015-05-14 18:46:36 Details Diff |
BUG: 0002267 - remove mask code from vtkImageLabelOutline Since vtkImageLabelOutline inherits from vtkImageNeighborhoodFilter it has a fixed size mask for defining 4-connect vs 8-connect kernels. When we tried to use bigger kernels this caused overstepping outside the mask which can lead to an access violation. From: Steve Pieper <pieper@bwh.harvard.edu> git-svn-id: http://svn.slicer.org/Slicer4/trunk@24257 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Libs/MRML/Logic/vtkImageLabelOutline.cxx | Diff File | ||
Import 2017-06-07 23:51:09: master f99c9f00 2015-05-15 15:54:58 Details Diff |
BUG: 0002267 fix symmetry of label outline thickness There was a miscalculation of the array indices that caused the lines to be wider and thicker on the left and top of a label region. From: Steve Pieper <pieper@isomics.com> git-svn-id: http://svn.slicer.org/Slicer4/trunk@24260 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Libs/MRML/Logic/vtkImageLabelOutline.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-06-26 21:07 | inorton | New Issue | |
2012-06-26 21:08 | inorton | Relationship added | related to 0001536 |
2012-08-20 07:30 | nicole | Assigned To | => nicole |
2012-08-20 07:30 | nicole | Status | new => assigned |
2012-08-20 10:35 | nicole | Target Version | => Slicer 4.3.0 |
2013-01-14 17:23 | fedorov | Note Added: 0007668 | |
2013-01-14 17:51 | fedorov | Note Added: 0007669 | |
2013-01-15 03:03 | pieper | Note Added: 0007671 | |
2013-01-15 15:31 | fedorov | Note Added: 0007678 | |
2013-01-16 02:33 | pieper | Note Added: 0007680 | |
2013-01-16 03:43 | fedorov | Note Added: 0007681 | |
2013-01-16 04:02 | pieper | Note Added: 0007682 | |
2013-02-13 04:18 | finetjul | Relationship added | related to 0002946 |
2013-02-13 04:21 | fedorov | Note Added: 0007912 | |
2013-02-15 11:05 | nicole | Note Added: 0007959 | |
2013-02-15 12:21 | nicole | Note Added: 0007963 | |
2013-03-12 09:06 | pieper | Relationship added | child of 0003003 |
2013-03-22 12:24 | nicole | Assigned To | nicole => fedorov |
2013-03-22 12:25 | nicole | Note Added: 0008209 | |
2013-03-23 05:33 | pieper | Note Added: 0008215 | |
2013-03-24 14:56 | pieper | Note Added: 0008228 | |
2013-03-25 06:35 | nicole | Note Added: 0008229 | |
2013-03-25 06:57 | fedorov | Note Added: 0008230 | |
2013-03-25 07:00 | pieper | Note Added: 0008231 | |
2013-03-25 07:00 | nicole | Note Added: 0008232 | |
2013-03-25 07:01 | pieper | Note Added: 0008233 | |
2013-08-28 12:13 | pieper | Target Version | Slicer 4.3.0 => Slicer 4.4.0 |
2013-08-28 12:18 | pieper | Assigned To | fedorov => |
2013-08-28 12:18 | pieper | Tag Attached: I-want-to-contribute | |
2013-08-28 12:19 | pieper | Note Added: 0009670 | |
2014-03-06 08:47 | nicole | Status | assigned => new |
2014-04-17 12:18 | lassoan | Note Added: 0011603 | |
2014-04-17 12:18 | lassoan | Status | new => resolved |
2014-04-17 12:18 | lassoan | Resolution | open => fixed |
2014-04-17 12:18 | lassoan | Assigned To | => lassoan |
2014-04-17 13:49 | nicole | Note Added: 0011606 | |
2014-05-12 23:20 | jcfr | Tag Renamed | I-want-to-contribute => help-wanted |
2014-06-04 06:22 | fedorov | Note Added: 0012014 | |
2014-06-04 06:22 | fedorov | Assigned To | lassoan => mehrtash |
2014-06-04 06:22 | fedorov | Status | resolved => acknowledged |
2014-06-04 06:33 | pieper | Note Added: 0012016 | |
2014-06-04 11:21 | lassoan | Note Added: 0012021 | |
2014-06-04 11:43 | pieper | Note Added: 0012023 | |
2014-07-29 11:55 | jcfr | Target Version | Slicer 4.4.0 => Slicer 4.5.0-1 |
2015-04-21 15:10 | nicole | Status | acknowledged => assigned |
2015-04-21 15:10 | nicole | Assigned To | mehrtash => nicole |
2015-04-21 15:10 | nicole | Note Added: 0013016 | |
2015-04-30 07:19 | nicole | Note Added: 0013026 | |
2015-04-30 07:19 | nicole | Note Added: 0013027 | |
2015-04-30 11:49 | nicole | Note Added: 0013028 | |
2015-04-30 12:08 | pieper | Note Added: 0013029 | |
2015-04-30 12:47 | nicole | Note Added: 0013030 | |
2015-04-30 12:48 | nicole | Note Edited: 0013030 | |
2015-04-30 13:18 | nicole | Note Added: 0013031 | |
2015-04-30 13:18 | nicole | Status | assigned => resolved |
2015-04-30 13:18 | nicole | Fixed in Version | => Slicer 4.4.1 |
2015-05-14 06:32 | fedorov | Note Added: 0013047 | |
2015-05-14 06:32 | fedorov | Status | resolved => feedback |
2015-05-14 06:32 | fedorov | Resolution | fixed => reopened |
2015-05-14 14:28 | pieper | File Added: single-pixel.png | |
2015-05-14 14:29 | pieper | Note Added: 0013050 | |
2015-05-14 14:53 | pieper | Note Added: 0013052 | |
2015-05-14 14:53 | pieper | Status | feedback => resolved |
2015-05-14 14:53 | pieper | Resolution | reopened => fixed |
2015-05-14 15:13 | pieper | Note Added: 0013053 | |
2015-05-15 06:59 | nicole | Note Added: 0013065 | |
2015-05-15 07:03 | pieper | Note Added: 0013066 | |
2015-05-15 07:03 | pieper | Note Added: 0013067 | |
2015-05-15 07:03 | pieper | Status | resolved => feedback |
2015-05-15 07:03 | pieper | Resolution | fixed => reopened |
2015-05-15 12:22 | pieper | Note Added: 0013072 | |
2015-05-15 12:22 | pieper | Status | feedback => resolved |
2015-05-15 12:22 | pieper | Resolution | reopened => fixed |
2015-05-27 13:30 | nicole | Relationship added | related to 0003980 |
2015-05-27 13:39 | fedorov | Note Added: 0013108 | |
2015-07-10 09:46 | fedorov | Status | resolved => closed |
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 d6b09116 | |
2017-06-10 08:51 | pieper | Changeset attached | => Slicer master f99c9f00 |
2017-06-10 08:51 | pieper | Changeset attached | => Slicer master 1e52c8fb |
2017-06-10 08:51 | pieper | Changeset attached | => Slicer master 92d7129b |
2017-06-10 08:51 | Changeset attached | => Slicer master 44328a78 | |
2017-06-10 08:51 | Changeset attached | => Slicer master cd654faa |