Subject hierarchy 2.0

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Subject hierarchy 2.0

pinter

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

pinter

Hi again,

 

As an attempt to increase enthusiasm I implemented the hierarchy combobox, see in short video:

https://www.screencast.com/t/WfIBZ9O6

 

Also, whoever finds the first bug, gets a free beverage of choice in Italy!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, February 22, 2017 18:45
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] Subject hierarchy 2.0

 

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

lasso2

Thank you Csaba, this looks awesome! This widget could eventually replace the current node selector (qMRMLNodeComboBox). It would make it much easier to see where a node belongs to (you wouldn’t need to store patient name, study ID, etc in the node name).

 

Andras

 

From: [hidden email]
Sent: Friday, February 24, 2017 7:27 PM
To: [hidden email]; [hidden email]
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi again,

 

As an attempt to increase enthusiasm I implemented the hierarchy combobox, see in short video:

https://www.screencast.com/t/WfIBZ9O6

 

Also, whoever finds the first bug, gets a free beverage of choice in Italy!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, February 22, 2017 18:45
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] Subject hierarchy 2.0

 

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

Steve Pieper-2
Hi Csaba - 

I agree with Andras, using the hierarchy as a replacement for the combo box looks great - very useful!

I did a fresh build of your branch on linux, no problems.

Running the subject hierarchy seems to work fine, but I did get the python messages pasted below.

One question/suggestion: it would make sense to me if there was a "Segment this..." next to the "Register this..." entry in the node context menu.  This would take you to the segment editor and select the target volume as the master (creating a segmentation if needed and maybe also prompting the user to create a segment if there isn't one already).  Or does this functionality already exist and I missed it?

Cheers,
Steve


Python 2.7.11 (default, Feb 25 2017, 15:14:52) 
[GCC 5.4.0 20160609] on linux2
>>> Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentEditorSubjectHierarchyPlugin.py", line 4, in <module>
    from AbstractScriptedSubjectHierarchyPlugin import *
ImportError: No module named AbstractScriptedSubjectHierarchyPlugin
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentStatisticsSubjectHierarchyPlugin.py", line 4, in <module>
    from AbstractScriptedSubjectHierarchyPlugin import *
ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

On Fri, Feb 24, 2017 at 8:18 PM, Andras Lasso <[hidden email]> wrote:

Thank you Csaba, this looks awesome! This widget could eventually replace the current node selector (qMRMLNodeComboBox). It would make it much easier to see where a node belongs to (you wouldn’t need to store patient name, study ID, etc in the node name).

 

Andras

 

From: [hidden email]
Sent: Friday, February 24, 2017 7:27 PM
To: [hidden email]; [hidden email]
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi again,

 

As an attempt to increase enthusiasm I implemented the hierarchy combobox, see in short video:

https://www.screencast.com/t/WfIBZ9O6

 

Also, whoever finds the first bug, gets a free beverage of choice in Italy!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, February 22, 2017 18:45
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] Subject hierarchy 2.0

 

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

pinter
In reply to this post by lasso2

Hi Steve,

 

Thank you very much for building and trying it!

 

The python errors you got may be linux-specific, as it works for me on Windows. As a matter of fact, I was tinkering with python plugins and added a new one a few minutes ago, and they seem to work.

 

Indeed, the Segment Editor plugin provides the context menu item you suggested, and I use it regularly.

 

What is the content of the folder

/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins ?

There should be an __init__, an abstract plugin (the file it seems to be missing in your build), and the plugins: segment editor, segment statistics, and if you use the latest, annotations.

If the file AbstractScriptedSubjectHierarchyPlugin.py is missing, then deploying it from Modules/Loadable/SubjectHierarchy/Widgets/Python may work differently on Linux. Or the dynamically implemented __init__ file does its job wrong.

 

Thanks,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Saturday, February 25, 2017 17:24
To: Andras Lasso <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

I agree with Andras, using the hierarchy as a replacement for the combo box looks great - very useful!

 

I did a fresh build of your branch on linux, no problems.

 

Running the subject hierarchy seems to work fine, but I did get the python messages pasted below.

 

One question/suggestion: it would make sense to me if there was a "Segment this..." next to the "Register this..." entry in the node context menu.  This would take you to the segment editor and select the target volume as the master (creating a segmentation if needed and maybe also prompting the user to create a segment if there isn't one already).  Or does this functionality already exist and I missed it?

 

Cheers,

Steve

 

 

Python 2.7.11 (default, Feb 25 2017, 15:14:52) 

[GCC 5.4.0 20160609] on linux2

>>> Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentEditorSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentStatisticsSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

 

On Fri, Feb 24, 2017 at 8:18 PM, Andras Lasso <[hidden email]> wrote:

Thank you Csaba, this looks awesome! This widget could eventually replace the current node selector (qMRMLNodeComboBox). It would make it much easier to see where a node belongs to (you wouldn’t need to store patient name, study ID, etc in the node name).

 

Andras

 

From: [hidden email]
Sent: Friday, February 24, 2017 7:27 PM
To: [hidden email]; [hidden email]
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi again,

 

As an attempt to increase enthusiasm I implemented the hierarchy combobox, see in short video:

https://www.screencast.com/t/WfIBZ9O6

 

Also, whoever finds the first bug, gets a free beverage of choice in Italy!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, February 22, 2017 18:45
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] Subject hierarchy 2.0

 

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

Steve Pieper-2
In reply to this post by lasso2
Hi Csaba - 

Ah, I see - yes, those plugins are just what I was looking for.

Not sure why they don't load.  All the correct files seem to be in the right places.  

$ ls Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/
AbstractScriptedSubjectHierarchyPlugin.py   __init__.pyc                             SegmentStatisticsSubjectHierarchyPlugin.py
AbstractScriptedSubjectHierarchyPlugin.pyc  SegmentEditorSubjectHierarchyPlugin.py   SegmentStatisticsSubjectHierarchyPlugin.pyc
__init__.py                                 SegmentEditorSubjectHierarchyPlugin.pyc


Let me know if there's anything you want me to test.

-Steve

On Sat, Feb 25, 2017 at 5:57 PM, Csaba Pinter <[hidden email]> wrote:

Hi Steve,

 

Thank you very much for building and trying it!

 

The python errors you got may be linux-specific, as it works for me on Windows. As a matter of fact, I was tinkering with python plugins and added a new one a few minutes ago, and they seem to work.

 

Indeed, the Segment Editor plugin provides the context menu item you suggested, and I use it regularly.

 

What is the content of the folder

/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins ?

There should be an __init__, an abstract plugin (the file it seems to be missing in your build), and the plugins: segment editor, segment statistics, and if you use the latest, annotations.

If the file AbstractScriptedSubjectHierarchyPlugin.py is missing, then deploying it from Modules/Loadable/SubjectHierarchy/Widgets/Python may work differently on Linux. Or the dynamically implemented __init__ file does its job wrong.

 

Thanks,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Saturday, February 25, 2017 17:24
To: Andras Lasso <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

I agree with Andras, using the hierarchy as a replacement for the combo box looks great - very useful!

 

I did a fresh build of your branch on linux, no problems.

 

Running the subject hierarchy seems to work fine, but I did get the python messages pasted below.

 

One question/suggestion: it would make sense to me if there was a "Segment this..." next to the "Register this..." entry in the node context menu.  This would take you to the segment editor and select the target volume as the master (creating a segmentation if needed and maybe also prompting the user to create a segment if there isn't one already).  Or does this functionality already exist and I missed it?

 

Cheers,

Steve

 

 

Python 2.7.11 (default, Feb 25 2017, 15:14:52) 

[GCC 5.4.0 20160609] on linux2

>>> Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentEditorSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentStatisticsSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

 

On Fri, Feb 24, 2017 at 8:18 PM, Andras Lasso <[hidden email]> wrote:

Thank you Csaba, this looks awesome! This widget could eventually replace the current node selector (qMRMLNodeComboBox). It would make it much easier to see where a node belongs to (you wouldn’t need to store patient name, study ID, etc in the node name).

 

Andras

 

From: [hidden email]
Sent: Friday, February 24, 2017 7:27 PM
To: [hidden email]; [hidden email]
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi again,

 

As an attempt to increase enthusiasm I implemented the hierarchy combobox, see in short video:

https://www.screencast.com/t/WfIBZ9O6

 

Also, whoever finds the first bug, gets a free beverage of choice in Italy!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, February 22, 2017 18:45
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] Subject hierarchy 2.0

 

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 



_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

pinter
In reply to this post by lasso2

Hi Steve,

 

Strange. These errors must originate from the modules trying to import the plugins, which try to import the abstract plugin. As the file is there, and there are no other errors, I can’t yet imagine the reason for this to happen. I’ll build it on our Ubuntu VM and see if I can reproduce it and figure out what’s going on.

 

The beverage of choice I promised for the first bug is of course yours :)

 

Thanks,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Sunday, February 26, 2017 14:25
To: Csaba Pinter
Cc: Andras Lasso; SPL Slicer Devel
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

Ah, I see - yes, those plugins are just what I was looking for.

 

Not sure why they don't load.  All the correct files seem to be in the right places.  

 

$ ls Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/

AbstractScriptedSubjectHierarchyPlugin.py   __init__.pyc                             SegmentStatisticsSubjectHierarchyPlugin.py

AbstractScriptedSubjectHierarchyPlugin.pyc  SegmentEditorSubjectHierarchyPlugin.py   SegmentStatisticsSubjectHierarchyPlugin.pyc

__init__.py                                 SegmentEditorSubjectHierarchyPlugin.pyc

 

 

Let me know if there's anything you want me to test.

 

-Steve

 

On Sat, Feb 25, 2017 at 5:57 PM, Csaba Pinter <[hidden email]> wrote:

Hi Steve,

 

Thank you very much for building and trying it!

 

The python errors you got may be linux-specific, as it works for me on Windows. As a matter of fact, I was tinkering with python plugins and added a new one a few minutes ago, and they seem to work.

 

Indeed, the Segment Editor plugin provides the context menu item you suggested, and I use it regularly.

 

What is the content of the folder

/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins ?

There should be an __init__, an abstract plugin (the file it seems to be missing in your build), and the plugins: segment editor, segment statistics, and if you use the latest, annotations.

If the file AbstractScriptedSubjectHierarchyPlugin.py is missing, then deploying it from Modules/Loadable/SubjectHierarchy/Widgets/Python may work differently on Linux. Or the dynamically implemented __init__ file does its job wrong.

 

Thanks,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Saturday, February 25, 2017 17:24
To: Andras Lasso <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

I agree with Andras, using the hierarchy as a replacement for the combo box looks great - very useful!

 

I did a fresh build of your branch on linux, no problems.

 

Running the subject hierarchy seems to work fine, but I did get the python messages pasted below.

 

One question/suggestion: it would make sense to me if there was a "Segment this..." next to the "Register this..." entry in the node context menu.  This would take you to the segment editor and select the target volume as the master (creating a segmentation if needed and maybe also prompting the user to create a segment if there isn't one already).  Or does this functionality already exist and I missed it?

 

Cheers,

Steve

 

 

Python 2.7.11 (default, Feb 25 2017, 15:14:52) 

[GCC 5.4.0 20160609] on linux2

>>> Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentEditorSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentStatisticsSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

 

On Fri, Feb 24, 2017 at 8:18 PM, Andras Lasso <[hidden email]> wrote:

Thank you Csaba, this looks awesome! This widget could eventually replace the current node selector (qMRMLNodeComboBox). It would make it much easier to see where a node belongs to (you wouldn’t need to store patient name, study ID, etc in the node name).

 

Andras

 

From: [hidden email]
Sent: Friday, February 24, 2017 7:27 PM
To: [hidden email]; [hidden email]
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi again,

 

As an attempt to increase enthusiasm I implemented the hierarchy combobox, see in short video:

https://www.screencast.com/t/WfIBZ9O6

 

Also, whoever finds the first bug, gets a free beverage of choice in Italy!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, February 22, 2017 18:45
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] Subject hierarchy 2.0

 

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

Steve Pieper-2
In reply to this post by lasso2
> The beverage of choice I promised for the first bug is of course yours :)

Yay!  Second round is on me!

On Sun, Feb 26, 2017 at 4:39 PM, Csaba Pinter <[hidden email]> wrote:

Hi Steve,

 

Strange. These errors must originate from the modules trying to import the plugins, which try to import the abstract plugin. As the file is there, and there are no other errors, I can’t yet imagine the reason for this to happen. I’ll build it on our Ubuntu VM and see if I can reproduce it and figure out what’s going on.

 

The beverage of choice I promised for the first bug is of course yours :)

 

Thanks,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Sunday, February 26, 2017 14:25
To: Csaba Pinter
Cc: Andras Lasso; SPL Slicer Devel


Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

Ah, I see - yes, those plugins are just what I was looking for.

 

Not sure why they don't load.  All the correct files seem to be in the right places.  

 

$ ls Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/

AbstractScriptedSubjectHierarchyPlugin.py   __init__.pyc                             SegmentStatisticsSubjectHierarchyPlugin.py

AbstractScriptedSubjectHierarchyPlugin.pyc  SegmentEditorSubjectHierarchyPlugin.py   SegmentStatisticsSubjectHierarchyPlugin.pyc

__init__.py                                 SegmentEditorSubjectHierarchyPlugin.pyc

 

 

Let me know if there's anything you want me to test.

 

-Steve

 

On Sat, Feb 25, 2017 at 5:57 PM, Csaba Pinter <[hidden email]> wrote:

Hi Steve,

 

Thank you very much for building and trying it!

 

The python errors you got may be linux-specific, as it works for me on Windows. As a matter of fact, I was tinkering with python plugins and added a new one a few minutes ago, and they seem to work.

 

Indeed, the Segment Editor plugin provides the context menu item you suggested, and I use it regularly.

 

What is the content of the folder

/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins ?

There should be an __init__, an abstract plugin (the file it seems to be missing in your build), and the plugins: segment editor, segment statistics, and if you use the latest, annotations.

If the file AbstractScriptedSubjectHierarchyPlugin.py is missing, then deploying it from Modules/Loadable/SubjectHierarchy/Widgets/Python may work differently on Linux. Or the dynamically implemented __init__ file does its job wrong.

 

Thanks,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Saturday, February 25, 2017 17:24
To: Andras Lasso <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

I agree with Andras, using the hierarchy as a replacement for the combo box looks great - very useful!

 

I did a fresh build of your branch on linux, no problems.

 

Running the subject hierarchy seems to work fine, but I did get the python messages pasted below.

 

One question/suggestion: it would make sense to me if there was a "Segment this..." next to the "Register this..." entry in the node context menu.  This would take you to the segment editor and select the target volume as the master (creating a segmentation if needed and maybe also prompting the user to create a segment if there isn't one already).  Or does this functionality already exist and I missed it?

 

Cheers,

Steve

 

 

Python 2.7.11 (default, Feb 25 2017, 15:14:52) 

[GCC 5.4.0 20160609] on linux2

>>> Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentEditorSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentStatisticsSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

 

On Fri, Feb 24, 2017 at 8:18 PM, Andras Lasso <[hidden email]> wrote:

Thank you Csaba, this looks awesome! This widget could eventually replace the current node selector (qMRMLNodeComboBox). It would make it much easier to see where a node belongs to (you wouldn’t need to store patient name, study ID, etc in the node name).

 

Andras

 

From: [hidden email]
Sent: Friday, February 24, 2017 7:27 PM
To: [hidden email]; [hidden email]
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi again,

 

As an attempt to increase enthusiasm I implemented the hierarchy combobox, see in short video:

https://www.screencast.com/t/WfIBZ9O6

 

Also, whoever finds the first bug, gets a free beverage of choice in Italy!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, February 22, 2017 18:45
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] Subject hierarchy 2.0

 

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 

 



_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

Isaiah Norton-2
In reply to this post by pinter
Hi Csaba,

The changes build fine for me on mac (checked out and rebased your branch to avoid moving back to older CTK; built at superbuild level in existing tree).

Here are some comments/issues I noticed:

- sometimes the Subject Hierarchy module context menu for a scalar or labelmap volume will display "Register This" (with no target selection sub-menu). Clicking on that menu item has no effect, and then the "Register This" item is gone the next time the context menu is raised for that node.

- clicking on visibility button for a MarkupsFiducialNode does not select the node. This causes the "Data MRML node information" section at the bottom of module to quickly flash on/off (whereas other node types stay selected after clicking visibility button).

- the visibility control has very weird/unexpected interactions with slice views, I think in part because the state is not fully synchronized. For example, in a scene with one scalar volume, one DTI volume, two labelmaps:
- nothing selected in Slice view, everything invisible in SH Module. Click visibility on a labelmap -> sets labelmap to both labelmap and BG volume in the slice view.
- nothing selected in Slice view, everything invisible in SH Module. Click visibility on a scalar volume -> sets labelmap to BG, scalar volume to FG.
- nothing selected in Slice view, everything invisible in SH Module. Click visibility on 2nd labelmap -> it is set to active labelmap volume, and the first labelmap is set to active BG volume.
- nothing selected in Slice view, everything invisible in SH Module. Click visibility on DTI volume -> is is set to active FG, 1st labelmap is set to active BG.

- crashed once when changing visibility of a DTI volume, and once when trying various sequences for scalar and labelmap as above (not running in debugger unfortunately, and couldn't reproduce).
 

More general questions/comments:

  - Are there any examples of a SubjectHierarchyPlugin provided by an Extension? It looks like the interface to do this is: `qSlicerSubjectHierarchyPluginHandler::instance()->registerPlugin(...)`?

  - In the section of the vtkMRMLSubjectHierarchyNode.cxx code with the magic string separators (e.g SUBJECTHIERARCHY_NAME_VALUE_SEPARATOR) for serializing mappings into MRML, one of the comments mentions that the UID could be a MIDAS URL. Wouldn't such a UID be split on the URL protocol identifier because of the `:` separator, when read back?

Thanks,
Isaiah

PS: not directly related to the changes here, but an observation: Slicer continues to accrete complex shadow trees to work around MRML problems.  (e.g.: Qt scene models, transform paths, displayablemanager internal tracking lists, node reference mappings, model hierarchies, ...).



On Wed, Feb 22, 2017 at 6:45 PM, Csaba Pinter <[hidden email]> wrote:

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

pinter
In reply to this post by pinter

Hi Isaiah,

 

Thanks a lot for testing!

 

>> - sometimes the Subject Hierarchy module context menu for a scalar or labelmap volume will display "Register This" (with no target selection sub-menu). Clicking on that menu item has no effect, and then the "Register This" item is gone the next time the context menu is raised for that node

-> I think the way the feature works is not straightforward enough. There have been discussions about it, but haven’t found a better way yet. So by clicking “Register this…” you select the moving volume. Then if you right-click on another volume (important that it is a different one), then a “Register [FirstVolumeName] to this using…” menu will appear with a submenu containing rigid, deformable, and fiducial registration options. This is consistent for example to how file compare and merge tools work that are integrated into the OS shell. If we find a better way in the future, we can change it! So far, however, I simply ported this feature to the new subject hierarchy

 

>> - clicking on visibility button for a MarkupsFiducialNode does not select the node. This causes the "Data MRML node information" section at the bottom of module to quickly flash on/off (whereas other node types stay selected after clicking visibility button).

-> Good point, I’ll fix this so that the node is selected

 

>> - the visibility control has very weird/unexpected interactions with slice views, I think in part because the state is not fully synchronized. For example, in a scene with one scalar volume, one DTI volume, two labelmaps:

-> Volume visibility is another feature that is considered not convenient. Steve also pointed this out recently. We plan to find a better solution in a developer a hangout in the near future

 

>> - crashed once when changing visibility of a DTI volume, and once when trying various sequences for scalar and labelmap as above (not running in debugger unfortunately, and couldn't reproduce)

-> Thanks, I’ll try to reproduce!

 

>> - Are there any examples of a SubjectHierarchyPlugin provided by an Extension? It looks like the interface to do this is: `qSlicerSubjectHierarchyPluginHandler::instance()->registerPlugin(...)`?

-> Yes, indeed. See also existing plugins: Many C++ one, for example Models; Few python plugins, such as SegmentStatistics; Python plugin for C++ module can be found in Annotations. Let me know if you have questions, I’m happy to help!

 

>> - In the section of the vtkMRMLSubjectHierarchyNode.cxx code with the magic string separators (e.g SUBJECTHIERARCHY_NAME_VALUE_SEPARATOR) for serializing mappings into MRML, one of the comments mentions that the UID could be a MIDAS URL. Wouldn't such a UID be split on the URL protocol identifier because of the `:` separator, when read back?

-> Very good point. I actually haven’t tested such a case. We can potentially use rarer separator characters such as ^ and | instead of the colon and semicolon

 

I’ll address the ones that are straightforward. I’ll let you know when we scheduled the usability discussion in a hangout so you can chime in.

 

Thanks again,

csaba

 

From: Isaiah Norton [mailto:[hidden email]]
Sent: Monday, February 27, 2017 14:40
To: Csaba Pinter <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba,

 

The changes build fine for me on mac (checked out and rebased your branch to avoid moving back to older CTK; built at superbuild level in existing tree).

 

Here are some comments/issues I noticed:

 

- sometimes the Subject Hierarchy module context menu for a scalar or labelmap volume will display "Register This" (with no target selection sub-menu). Clicking on that menu item has no effect, and then the "Register This" item is gone the next time the context menu is raised for that node.

 

- clicking on visibility button for a MarkupsFiducialNode does not select the node. This causes the "Data MRML node information" section at the bottom of module to quickly flash on/off (whereas other node types stay selected after clicking visibility button).

 

- the visibility control has very weird/unexpected interactions with slice views, I think in part because the state is not fully synchronized. For example, in a scene with one scalar volume, one DTI volume, two labelmaps:

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on a labelmap -> sets labelmap to both labelmap and BG volume in the slice view.

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on a scalar volume -> sets labelmap to BG, scalar volume to FG.

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on 2nd labelmap -> it is set to active labelmap volume, and the first labelmap is set to active BG volume.

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on DTI volume -> is is set to active FG, 1st labelmap is set to active BG.

 

- crashed once when changing visibility of a DTI volume, and once when trying various sequences for scalar and labelmap as above (not running in debugger unfortunately, and couldn't reproduce).

 

 

More general questions/comments:

 

  - Are there any examples of a SubjectHierarchyPlugin provided by an Extension? It looks like the interface to do this is: `qSlicerSubjectHierarchyPluginHandler::instance()->registerPlugin(...)`?

 

  - In the section of the vtkMRMLSubjectHierarchyNode.cxx code with the magic string separators (e.g SUBJECTHIERARCHY_NAME_VALUE_SEPARATOR) for serializing mappings into MRML, one of the comments mentions that the UID could be a MIDAS URL. Wouldn't such a UID be split on the URL protocol identifier because of the `:` separator, when read back?

 

Thanks,

Isaiah

 

PS: not directly related to the changes here, but an observation: Slicer continues to accrete complex shadow trees to work around MRML problems.  (e.g.: Qt scene models, transform paths, displayablemanager internal tracking lists, node reference mappings, model hierarchies, ...).

 

 

 

On Wed, Feb 22, 2017 at 6:45 PM, Csaba Pinter <[hidden email]> wrote:

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

Isaiah Norton-2
In reply to this post by pinter
-> I think the way the feature works is not straightforward enough. There have been discussions about it, but haven’t found a better way yet. So by clicking “Register this…” you select the moving volume. Then if you right-click on another volume (important that it is a different one), then a “Register [FirstVolumeName] to this using…” menu will appear with a submenu containing rigid, deformable, and fiducial registration options. This is consistent for example to how file compare and merge tools work that are integrated into the OS shell. If we find a better way in the future, we can change it! So far, however, I simply ported this feature to the new subject hierarchy

Ok, I see. Usually this kind of statefulness has some more prominent accompanying visual cues. Providing an option to back out the source selection might help.

I think it would be simpler to select target immediately from the source volume's context menu, and then choose the registration method elsewhere (e.g. a popup, or send selections to a registration wizard).

-> Very good point. I actually haven’t tested such a case. We can potentially use rarer separator characters such as ^ and | instead of the colon and semicolon

Couldn't these items couldn't be stored in XML child nodes?


 

On Mon, Feb 27, 2017 at 4:04 PM, Csaba Pinter <[hidden email]> wrote:

Hi Isaiah,

 

Thanks a lot for testing!

 

>> - sometimes the Subject Hierarchy module context menu for a scalar or labelmap volume will display "Register This" (with no target selection sub-menu). Clicking on that menu item has no effect, and then the "Register This" item is gone the next time the context menu is raised for that node

-> I think the way the feature works is not straightforward enough. There have been discussions about it, but haven’t found a better way yet. So by clicking “Register this…” you select the moving volume. Then if you right-click on another volume (important that it is a different one), then a “Register [FirstVolumeName] to this using…” menu will appear with a submenu containing rigid, deformable, and fiducial registration options. This is consistent for example to how file compare and merge tools work that are integrated into the OS shell. If we find a better way in the future, we can change it! So far, however, I simply ported this feature to the new subject hierarchy

 

>> - clicking on visibility button for a MarkupsFiducialNode does not select the node. This causes the "Data MRML node information" section at the bottom of module to quickly flash on/off (whereas other node types stay selected after clicking visibility button).

-> Good point, I’ll fix this so that the node is selected

 

>> - the visibility control has very weird/unexpected interactions with slice views, I think in part because the state is not fully synchronized. For example, in a scene with one scalar volume, one DTI volume, two labelmaps:

-> Volume visibility is another feature that is considered not convenient. Steve also pointed this out recently. We plan to find a better solution in a developer a hangout in the near future

 

>> - crashed once when changing visibility of a DTI volume, and once when trying various sequences for scalar and labelmap as above (not running in debugger unfortunately, and couldn't reproduce)

-> Thanks, I’ll try to reproduce!

 

>> - Are there any examples of a SubjectHierarchyPlugin provided by an Extension? It looks like the interface to do this is: `qSlicerSubjectHierarchyPluginHandler::instance()->registerPlugin(...)`?

-> Yes, indeed. See also existing plugins: Many C++ one, for example Models; Few python plugins, such as SegmentStatistics; Python plugin for C++ module can be found in Annotations. Let me know if you have questions, I’m happy to help!

 

>> - In the section of the vtkMRMLSubjectHierarchyNode.cxx code with the magic string separators (e.g SUBJECTHIERARCHY_NAME_VALUE_SEPARATOR) for serializing mappings into MRML, one of the comments mentions that the UID could be a MIDAS URL. Wouldn't such a UID be split on the URL protocol identifier because of the `:` separator, when read back?

-> Very good point. I actually haven’t tested such a case. We can potentially use rarer separator characters such as ^ and | instead of the colon and semicolon

 

I’ll address the ones that are straightforward. I’ll let you know when we scheduled the usability discussion in a hangout so you can chime in.

 

Thanks again,

csaba

 

From: Isaiah Norton [mailto:[hidden email]]
Sent: Monday, February 27, 2017 14:40
To: Csaba Pinter <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba,

 

The changes build fine for me on mac (checked out and rebased your branch to avoid moving back to older CTK; built at superbuild level in existing tree).

 

Here are some comments/issues I noticed:

 

- sometimes the Subject Hierarchy module context menu for a scalar or labelmap volume will display "Register This" (with no target selection sub-menu). Clicking on that menu item has no effect, and then the "Register This" item is gone the next time the context menu is raised for that node.

 

- clicking on visibility button for a MarkupsFiducialNode does not select the node. This causes the "Data MRML node information" section at the bottom of module to quickly flash on/off (whereas other node types stay selected after clicking visibility button).

 

- the visibility control has very weird/unexpected interactions with slice views, I think in part because the state is not fully synchronized. For example, in a scene with one scalar volume, one DTI volume, two labelmaps:

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on a labelmap -> sets labelmap to both labelmap and BG volume in the slice view.

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on a scalar volume -> sets labelmap to BG, scalar volume to FG.

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on 2nd labelmap -> it is set to active labelmap volume, and the first labelmap is set to active BG volume.

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on DTI volume -> is is set to active FG, 1st labelmap is set to active BG.

 

- crashed once when changing visibility of a DTI volume, and once when trying various sequences for scalar and labelmap as above (not running in debugger unfortunately, and couldn't reproduce).

 

 

More general questions/comments:

 

  - Are there any examples of a SubjectHierarchyPlugin provided by an Extension? It looks like the interface to do this is: `qSlicerSubjectHierarchyPluginHandler::instance()->registerPlugin(...)`?

 

  - In the section of the vtkMRMLSubjectHierarchyNode.cxx code with the magic string separators (e.g SUBJECTHIERARCHY_NAME_VALUE_SEPARATOR) for serializing mappings into MRML, one of the comments mentions that the UID could be a MIDAS URL. Wouldn't such a UID be split on the URL protocol identifier because of the `:` separator, when read back?

 

Thanks,

Isaiah

 

PS: not directly related to the changes here, but an observation: Slicer continues to accrete complex shadow trees to work around MRML problems.  (e.g.: Qt scene models, transform paths, displayablemanager internal tracking lists, node reference mappings, model hierarchies, ...).

 

 

 

On Wed, Feb 22, 2017 at 6:45 PM, Csaba Pinter <[hidden email]> wrote:

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 



_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

pinter
In reply to this post by pinter

Hi Isaiah,

 

Ok, I see. Usually this kind of statefulness has some more prominent accompanying visual cues. Providing an option to back out the source selection might help.

 

I think it would be simpler to select target immediately from the source volume's context menu, and then choose the registration method elsewhere (e.g. a popup, or send selections to a registration wizard).

-> Selecting the fixed volume from the sub-menu is a good idea, and it should be doable too. Choosing the registration type can also be a sub-menu for each volume, or a popup as you say. Creating a registration wizard is a more complex project, see for example https://app.assembla.com/spaces/slicerrt/tickets/realtime_list?ticket=582

Providing option to back up from selection is a great idea, and I think I’ll do that for the time being.

 

Couldn't these items couldn't be stored in XML child nodes?

-> Also a good idea! Unfortunately the vtkMRMLParser way of parsing the XML is very rigid, i.e. it parses one element at a time, and I needed to add an exception in it for the SH items already (similar to how SceneViews work). Basically you need to keep temporary stacks of parsed elements, etc. Until this mechanism is completely refactored, I think my best option is to use those more rare characters and serialize.

 

I appreciate your input very much, keep them flowing! I’ll keep all the above ones in my list that are non-trivial, and fix the others.

 

Cheers,

csaba

 

 

 

From: Isaiah Norton [[hidden email]]
Sent: Monday, February 27, 2017 16:41
To: Csaba Pinter <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

-> I think the way the feature works is not straightforward enough. There have been discussions about it, but haven’t found a better way yet. So by clicking “Register this…” you select the moving volume. Then if you right-click on another volume (important that it is a different one), then a “Register [FirstVolumeName] to this using…” menu will appear with a submenu containing rigid, deformable, and fiducial registration options. This is consistent for example to how file compare and merge tools work that are integrated into the OS shell. If we find a better way in the future, we can change it! So far, however, I simply ported this feature to the new subject hierarchy

 

Ok, I see. Usually this kind of statefulness has some more prominent accompanying visual cues. Providing an option to back out the source selection might help.

 

I think it would be simpler to select target immediately from the source volume's context menu, and then choose the registration method elsewhere (e.g. a popup, or send selections to a registration wizard).

 

-> Very good point. I actually haven’t tested such a case. We can potentially use rarer separator characters such as ^ and | instead of the colon and semicolon

 

Couldn't these items couldn't be stored in XML child nodes?

 

 

 

 

On Mon, Feb 27, 2017 at 4:04 PM, Csaba Pinter <[hidden email]> wrote:

Hi Isaiah,

 

Thanks a lot for testing!

 

>> - sometimes the Subject Hierarchy module context menu for a scalar or labelmap volume will display "Register This" (with no target selection sub-menu). Clicking on that menu item has no effect, and then the "Register This" item is gone the next time the context menu is raised for that node

-> I think the way the feature works is not straightforward enough. There have been discussions about it, but haven’t found a better way yet. So by clicking “Register this…” you select the moving volume. Then if you right-click on another volume (important that it is a different one), then a “Register [FirstVolumeName] to this using…” menu will appear with a submenu containing rigid, deformable, and fiducial registration options. This is consistent for example to how file compare and merge tools work that are integrated into the OS shell. If we find a better way in the future, we can change it! So far, however, I simply ported this feature to the new subject hierarchy

 

>> - clicking on visibility button for a MarkupsFiducialNode does not select the node. This causes the "Data MRML node information" section at the bottom of module to quickly flash on/off (whereas other node types stay selected after clicking visibility button).

-> Good point, I’ll fix this so that the node is selected

 

>> - the visibility control has very weird/unexpected interactions with slice views, I think in part because the state is not fully synchronized. For example, in a scene with one scalar volume, one DTI volume, two labelmaps:

-> Volume visibility is another feature that is considered not convenient. Steve also pointed this out recently. We plan to find a better solution in a developer a hangout in the near future

 

>> - crashed once when changing visibility of a DTI volume, and once when trying various sequences for scalar and labelmap as above (not running in debugger unfortunately, and couldn't reproduce)

-> Thanks, I’ll try to reproduce!

 

>> - Are there any examples of a SubjectHierarchyPlugin provided by an Extension? It looks like the interface to do this is: `qSlicerSubjectHierarchyPluginHandler::instance()->registerPlugin(...)`?

-> Yes, indeed. See also existing plugins: Many C++ one, for example Models; Few python plugins, such as SegmentStatistics; Python plugin for C++ module can be found in Annotations. Let me know if you have questions, I’m happy to help!

 

>> - In the section of the vtkMRMLSubjectHierarchyNode.cxx code with the magic string separators (e.g SUBJECTHIERARCHY_NAME_VALUE_SEPARATOR) for serializing mappings into MRML, one of the comments mentions that the UID could be a MIDAS URL. Wouldn't such a UID be split on the URL protocol identifier because of the `:` separator, when read back?

-> Very good point. I actually haven’t tested such a case. We can potentially use rarer separator characters such as ^ and | instead of the colon and semicolon

 

I’ll address the ones that are straightforward. I’ll let you know when we scheduled the usability discussion in a hangout so you can chime in.

 

Thanks again,

csaba

 

From: Isaiah Norton [mailto:[hidden email]]
Sent: Monday, February 27, 2017 14:40
To: Csaba Pinter <
[hidden email]>
Cc: SPL Slicer Devel <
[hidden email]>
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba,

 

The changes build fine for me on mac (checked out and rebased your branch to avoid moving back to older CTK; built at superbuild level in existing tree).

 

Here are some comments/issues I noticed:

 

- sometimes the Subject Hierarchy module context menu for a scalar or labelmap volume will display "Register This" (with no target selection sub-menu). Clicking on that menu item has no effect, and then the "Register This" item is gone the next time the context menu is raised for that node.

 

- clicking on visibility button for a MarkupsFiducialNode does not select the node. This causes the "Data MRML node information" section at the bottom of module to quickly flash on/off (whereas other node types stay selected after clicking visibility button).

 

- the visibility control has very weird/unexpected interactions with slice views, I think in part because the state is not fully synchronized. For example, in a scene with one scalar volume, one DTI volume, two labelmaps:

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on a labelmap -> sets labelmap to both labelmap and BG volume in the slice view.

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on a scalar volume -> sets labelmap to BG, scalar volume to FG.

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on 2nd labelmap -> it is set to active labelmap volume, and the first labelmap is set to active BG volume.

- nothing selected in Slice view, everything invisible in SH Module. Click visibility on DTI volume -> is is set to active FG, 1st labelmap is set to active BG.

 

- crashed once when changing visibility of a DTI volume, and once when trying various sequences for scalar and labelmap as above (not running in debugger unfortunately, and couldn't reproduce).

 

 

More general questions/comments:

 

  - Are there any examples of a SubjectHierarchyPlugin provided by an Extension? It looks like the interface to do this is: `qSlicerSubjectHierarchyPluginHandler::instance()->registerPlugin(...)`?

 

  - In the section of the vtkMRMLSubjectHierarchyNode.cxx code with the magic string separators (e.g SUBJECTHIERARCHY_NAME_VALUE_SEPARATOR) for serializing mappings into MRML, one of the comments mentions that the UID could be a MIDAS URL. Wouldn't such a UID be split on the URL protocol identifier because of the `:` separator, when read back?

 

Thanks,

Isaiah

 

PS: not directly related to the changes here, but an observation: Slicer continues to accrete complex shadow trees to work around MRML problems.  (e.g.: Qt scene models, transform paths, displayablemanager internal tracking lists, node reference mappings, model hierarchies, ...).

 

 

 

On Wed, Feb 22, 2017 at 6:45 PM, Csaba Pinter <[hidden email]> wrote:

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

pinter
In reply to this post by lasso2

Hi Steve,

 

I fixed the issue on Mac, and pushed the commit to the branch. Now the segment editor plugin should work.

I’ll fix the issues Isaiah brought up, finish updating the extensions, then create a pull request. I’d like to integrate it as soon as possible (there are already fewer bugs with the new SH than with the old one).

 

Cheers,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Sunday, February 26, 2017 14:25
To: Csaba Pinter <[hidden email]>
Cc: Andras Lasso <[hidden email]>; SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

Ah, I see - yes, those plugins are just what I was looking for.

 

Not sure why they don't load.  All the correct files seem to be in the right places.  

 

$ ls Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/

AbstractScriptedSubjectHierarchyPlugin.py   __init__.pyc                             SegmentStatisticsSubjectHierarchyPlugin.py

AbstractScriptedSubjectHierarchyPlugin.pyc  SegmentEditorSubjectHierarchyPlugin.py   SegmentStatisticsSubjectHierarchyPlugin.pyc

__init__.py                                 SegmentEditorSubjectHierarchyPlugin.pyc

 

 

Let me know if there's anything you want me to test.

 

-Steve

 

On Sat, Feb 25, 2017 at 5:57 PM, Csaba Pinter <[hidden email]> wrote:

Hi Steve,

 

Thank you very much for building and trying it!

 

The python errors you got may be linux-specific, as it works for me on Windows. As a matter of fact, I was tinkering with python plugins and added a new one a few minutes ago, and they seem to work.

 

Indeed, the Segment Editor plugin provides the context menu item you suggested, and I use it regularly.

 

What is the content of the folder

/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins ?

There should be an __init__, an abstract plugin (the file it seems to be missing in your build), and the plugins: segment editor, segment statistics, and if you use the latest, annotations.

If the file AbstractScriptedSubjectHierarchyPlugin.py is missing, then deploying it from Modules/Loadable/SubjectHierarchy/Widgets/Python may work differently on Linux. Or the dynamically implemented __init__ file does its job wrong.

 

Thanks,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Saturday, February 25, 2017 17:24
To: Andras Lasso <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

I agree with Andras, using the hierarchy as a replacement for the combo box looks great - very useful!

 

I did a fresh build of your branch on linux, no problems.

 

Running the subject hierarchy seems to work fine, but I did get the python messages pasted below.

 

One question/suggestion: it would make sense to me if there was a "Segment this..." next to the "Register this..." entry in the node context menu.  This would take you to the segment editor and select the target volume as the master (creating a segmentation if needed and maybe also prompting the user to create a segment if there isn't one already).  Or does this functionality already exist and I missed it?

 

Cheers,

Steve

 

 

Python 2.7.11 (default, Feb 25 2017, 15:14:52) 

[GCC 5.4.0 20160609] on linux2

>>> Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentEditorSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentStatisticsSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

 

On Fri, Feb 24, 2017 at 8:18 PM, Andras Lasso <[hidden email]> wrote:

Thank you Csaba, this looks awesome! This widget could eventually replace the current node selector (qMRMLNodeComboBox). It would make it much easier to see where a node belongs to (you wouldn’t need to store patient name, study ID, etc in the node name).

 

Andras

 

From: [hidden email]
Sent: Friday, February 24, 2017 7:27 PM
To: [hidden email]; [hidden email]
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi again,

 

As an attempt to increase enthusiasm I implemented the hierarchy combobox, see in short video:

https://www.screencast.com/t/WfIBZ9O6

 

Also, whoever finds the first bug, gets a free beverage of choice in Italy!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, February 22, 2017 18:45
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] Subject hierarchy 2.0

 

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

Steve Pieper-2
In reply to this post by lasso2
Hi Csaba - 

Thanks for the fix - my linux build now has the plugins and Segment this... and it works just like I hoped it would!

Best,
Steve

On Tue, Feb 28, 2017 at 1:34 PM, Csaba Pinter <[hidden email]> wrote:

Hi Steve,

 

I fixed the issue on Mac, and pushed the commit to the branch. Now the segment editor plugin should work.

I’ll fix the issues Isaiah brought up, finish updating the extensions, then create a pull request. I’d like to integrate it as soon as possible (there are already fewer bugs with the new SH than with the old one).

 

Cheers,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Sunday, February 26, 2017 14:25
To: Csaba Pinter <[hidden email]>
Cc: Andras Lasso <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

Ah, I see - yes, those plugins are just what I was looking for.

 

Not sure why they don't load.  All the correct files seem to be in the right places.  

 

$ ls Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/

AbstractScriptedSubjectHierarchyPlugin.py   __init__.pyc                             SegmentStatisticsSubjectHierarchyPlugin.py

AbstractScriptedSubjectHierarchyPlugin.pyc  SegmentEditorSubjectHierarchyPlugin.py   SegmentStatisticsSubjectHierarchyPlugin.pyc

__init__.py                                 SegmentEditorSubjectHierarchyPlugin.pyc

 

 

Let me know if there's anything you want me to test.

 

-Steve

 

On Sat, Feb 25, 2017 at 5:57 PM, Csaba Pinter <[hidden email]> wrote:

Hi Steve,

 

Thank you very much for building and trying it!

 

The python errors you got may be linux-specific, as it works for me on Windows. As a matter of fact, I was tinkering with python plugins and added a new one a few minutes ago, and they seem to work.

 

Indeed, the Segment Editor plugin provides the context menu item you suggested, and I use it regularly.

 

What is the content of the folder

/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins ?

There should be an __init__, an abstract plugin (the file it seems to be missing in your build), and the plugins: segment editor, segment statistics, and if you use the latest, annotations.

If the file AbstractScriptedSubjectHierarchyPlugin.py is missing, then deploying it from Modules/Loadable/SubjectHierarchy/Widgets/Python may work differently on Linux. Or the dynamically implemented __init__ file does its job wrong.

 

Thanks,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Saturday, February 25, 2017 17:24
To: Andras Lasso <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

I agree with Andras, using the hierarchy as a replacement for the combo box looks great - very useful!

 

I did a fresh build of your branch on linux, no problems.

 

Running the subject hierarchy seems to work fine, but I did get the python messages pasted below.

 

One question/suggestion: it would make sense to me if there was a "Segment this..." next to the "Register this..." entry in the node context menu.  This would take you to the segment editor and select the target volume as the master (creating a segmentation if needed and maybe also prompting the user to create a segment if there isn't one already).  Or does this functionality already exist and I missed it?

 

Cheers,

Steve

 

 

Python 2.7.11 (default, Feb 25 2017, 15:14:52) 

[GCC 5.4.0 20160609] on linux2

>>> Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentEditorSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentStatisticsSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

 

On Fri, Feb 24, 2017 at 8:18 PM, Andras Lasso <[hidden email]> wrote:

Thank you Csaba, this looks awesome! This widget could eventually replace the current node selector (qMRMLNodeComboBox). It would make it much easier to see where a node belongs to (you wouldn’t need to store patient name, study ID, etc in the node name).

 

Andras

 

From: [hidden email]
Sent: Friday, February 24, 2017 7:27 PM
To: [hidden email]; [hidden email]
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi again,

 

As an attempt to increase enthusiasm I implemented the hierarchy combobox, see in short video:

https://www.screencast.com/t/WfIBZ9O6

 

Also, whoever finds the first bug, gets a free beverage of choice in Italy!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, February 22, 2017 18:45
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] Subject hierarchy 2.0

 

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 

 



_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

pinter
In reply to this post by lasso2

Great! Thanks for testing it!

 

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Tuesday, February 28, 2017 18:59
To: Csaba Pinter
Cc: Andras Lasso; SPL Slicer Devel
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

Thanks for the fix - my linux build now has the plugins and Segment this... and it works just like I hoped it would!

 

Best,

Steve

 

On Tue, Feb 28, 2017 at 1:34 PM, Csaba Pinter <[hidden email]> wrote:

Hi Steve,

 

I fixed the issue on Mac, and pushed the commit to the branch. Now the segment editor plugin should work.

I’ll fix the issues Isaiah brought up, finish updating the extensions, then create a pull request. I’d like to integrate it as soon as possible (there are already fewer bugs with the new SH than with the old one).

 

Cheers,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Sunday, February 26, 2017 14:25
To: Csaba Pinter <[hidden email]>
Cc: Andras Lasso <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

Ah, I see - yes, those plugins are just what I was looking for.

 

Not sure why they don't load.  All the correct files seem to be in the right places.  

 

$ ls Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/

AbstractScriptedSubjectHierarchyPlugin.py   __init__.pyc                             SegmentStatisticsSubjectHierarchyPlugin.py

AbstractScriptedSubjectHierarchyPlugin.pyc  SegmentEditorSubjectHierarchyPlugin.py   SegmentStatisticsSubjectHierarchyPlugin.pyc

__init__.py                                 SegmentEditorSubjectHierarchyPlugin.pyc

 

 

Let me know if there's anything you want me to test.

 

-Steve

 

On Sat, Feb 25, 2017 at 5:57 PM, Csaba Pinter <[hidden email]> wrote:

Hi Steve,

 

Thank you very much for building and trying it!

 

The python errors you got may be linux-specific, as it works for me on Windows. As a matter of fact, I was tinkering with python plugins and added a new one a few minutes ago, and they seem to work.

 

Indeed, the Segment Editor plugin provides the context menu item you suggested, and I use it regularly.

 

What is the content of the folder

/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins ?

There should be an __init__, an abstract plugin (the file it seems to be missing in your build), and the plugins: segment editor, segment statistics, and if you use the latest, annotations.

If the file AbstractScriptedSubjectHierarchyPlugin.py is missing, then deploying it from Modules/Loadable/SubjectHierarchy/Widgets/Python may work differently on Linux. Or the dynamically implemented __init__ file does its job wrong.

 

Thanks,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Saturday, February 25, 2017 17:24
To: Andras Lasso <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

I agree with Andras, using the hierarchy as a replacement for the combo box looks great - very useful!

 

I did a fresh build of your branch on linux, no problems.

 

Running the subject hierarchy seems to work fine, but I did get the python messages pasted below.

 

One question/suggestion: it would make sense to me if there was a "Segment this..." next to the "Register this..." entry in the node context menu.  This would take you to the segment editor and select the target volume as the master (creating a segmentation if needed and maybe also prompting the user to create a segment if there isn't one already).  Or does this functionality already exist and I missed it?

 

Cheers,

Steve

 

 

Python 2.7.11 (default, Feb 25 2017, 15:14:52) 

[GCC 5.4.0 20160609] on linux2

>>> Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentEditorSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentStatisticsSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

 

On Fri, Feb 24, 2017 at 8:18 PM, Andras Lasso <[hidden email]> wrote:

Thank you Csaba, this looks awesome! This widget could eventually replace the current node selector (qMRMLNodeComboBox). It would make it much easier to see where a node belongs to (you wouldn’t need to store patient name, study ID, etc in the node name).

 

Andras

 

From: [hidden email]
Sent: Friday, February 24, 2017 7:27 PM
To: [hidden email]; [hidden email]
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi again,

 

As an attempt to increase enthusiasm I implemented the hierarchy combobox, see in short video:

https://www.screencast.com/t/WfIBZ9O6

 

Also, whoever finds the first bug, gets a free beverage of choice in Italy!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, February 22, 2017 18:45
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] Subject hierarchy 2.0

 

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 

 

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

pinter

I made the pull request for SH2.0: https://github.com/Slicer/Slicer/pull/676

 

Since the last emails, I addressed each of Isaiah’s, Steve’s, and other people’s comments, fixed all outstanding issues, and added a few extra features (filtering methods in the tree and combobox, support to load MRML scenes with legacy subject hierarchy nodes).

 

Thanks for all the help, and also in advance for reviewing the pull request!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Tuesday, February 28, 2017 19:50
To: Steve Pieper <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Great! Thanks for testing it!

 

csaba

 

From: Steve Pieper [[hidden email]]
Sent: Tuesday, February 28, 2017 18:59
To: Csaba Pinter
Cc: Andras Lasso; SPL Slicer Devel
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

Thanks for the fix - my linux build now has the plugins and Segment this... and it works just like I hoped it would!

 

Best,

Steve

 

On Tue, Feb 28, 2017 at 1:34 PM, Csaba Pinter <[hidden email]> wrote:

Hi Steve,

 

I fixed the issue on Mac, and pushed the commit to the branch. Now the segment editor plugin should work.

I’ll fix the issues Isaiah brought up, finish updating the extensions, then create a pull request. I’d like to integrate it as soon as possible (there are already fewer bugs with the new SH than with the old one).

 

Cheers,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Sunday, February 26, 2017 14:25
To: Csaba Pinter <[hidden email]>
Cc: Andras Lasso <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

Ah, I see - yes, those plugins are just what I was looking for.

 

Not sure why they don't load.  All the correct files seem to be in the right places.  

 

$ ls Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/

AbstractScriptedSubjectHierarchyPlugin.py   __init__.pyc                             SegmentStatisticsSubjectHierarchyPlugin.py

AbstractScriptedSubjectHierarchyPlugin.pyc  SegmentEditorSubjectHierarchyPlugin.py   SegmentStatisticsSubjectHierarchyPlugin.pyc

__init__.py                                 SegmentEditorSubjectHierarchyPlugin.pyc

 

 

Let me know if there's anything you want me to test.

 

-Steve

 

On Sat, Feb 25, 2017 at 5:57 PM, Csaba Pinter <[hidden email]> wrote:

Hi Steve,

 

Thank you very much for building and trying it!

 

The python errors you got may be linux-specific, as it works for me on Windows. As a matter of fact, I was tinkering with python plugins and added a new one a few minutes ago, and they seem to work.

 

Indeed, the Segment Editor plugin provides the context menu item you suggested, and I use it regularly.

 

What is the content of the folder

/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins ?

There should be an __init__, an abstract plugin (the file it seems to be missing in your build), and the plugins: segment editor, segment statistics, and if you use the latest, annotations.

If the file AbstractScriptedSubjectHierarchyPlugin.py is missing, then deploying it from Modules/Loadable/SubjectHierarchy/Widgets/Python may work differently on Linux. Or the dynamically implemented __init__ file does its job wrong.

 

Thanks,

csaba

 

From: Steve Pieper [mailto:[hidden email]]
Sent: Saturday, February 25, 2017 17:24
To: Andras Lasso <[hidden email]>
Cc: Csaba Pinter <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi Csaba - 

 

I agree with Andras, using the hierarchy as a replacement for the combo box looks great - very useful!

 

I did a fresh build of your branch on linux, no problems.

 

Running the subject hierarchy seems to work fine, but I did get the python messages pasted below.

 

One question/suggestion: it would make sense to me if there was a "Segment this..." next to the "Register this..." entry in the node context menu.  This would take you to the segment editor and select the target volume as the master (creating a segmentation if needed and maybe also prompting the user to create a segment if there isn't one already).  Or does this functionality already exist and I missed it?

 

Cheers,

Steve

 

 

Python 2.7.11 (default, Feb 25 2017, 15:14:52) 

[GCC 5.4.0 20160609] on linux2

>>> Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentEditorSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/pieper/slicer4/latest/Slicer-superbuild/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/SubjectHierarchyPlugins/SegmentStatisticsSubjectHierarchyPlugin.py", line 4, in <module>

    from AbstractScriptedSubjectHierarchyPlugin import *

ImportError: No module named AbstractScriptedSubjectHierarchyPlugin

 

On Fri, Feb 24, 2017 at 8:18 PM, Andras Lasso <[hidden email]> wrote:

Thank you Csaba, this looks awesome! This widget could eventually replace the current node selector (qMRMLNodeComboBox). It would make it much easier to see where a node belongs to (you wouldn’t need to store patient name, study ID, etc in the node name).

 

Andras

 

From: [hidden email]
Sent: Friday, February 24, 2017 7:27 PM
To: [hidden email]; [hidden email]
Subject: Re: [slicer-devel] Subject hierarchy 2.0

 

Hi again,

 

As an attempt to increase enthusiasm I implemented the hierarchy combobox, see in short video:

https://www.screencast.com/t/WfIBZ9O6

 

Also, whoever finds the first bug, gets a free beverage of choice in Italy!

 

csaba

 

From: slicer-devel [mailto:[hidden email]] On Behalf Of Csaba Pinter
Sent: Wednesday, February 22, 2017 18:45
To: SPL Slicer Devel <[hidden email]>
Subject: [slicer-devel] Subject hierarchy 2.0

 

Hi all,

 

Implementation of subject hierarchy 2.0 is ready considering Slicer core. In a nutshell, what it offers in addition to the current subject hierarchy is:

- Considerably increased speed due to the single subject hierarchy node (instead of duplicate SH node for each data node)

- It can be enabled by default, because it does not clutter the MRML scene and there are no special mechanisms to support other hierarchies (no pop-up window when entering the module)

- Support of model hierarchies in subject hierarchy (subject hierarchy shows the same tree that the Models module shows, and it is handled the same way (atlases, drag&drop, show/hide, etc.)

- Improved drag&drop: re-ordering of items (and restoring the order correctly on complete update), drag&drop to empty area reparents to the scene

- Expand and collapsed states of the items are preserved, and restored when reconstructing the hierarchy

- Drop-down subject hierarchy tree is possible to add in the modules instead of a simple MRML node selector. This, besides allowing an easier overview of the data, makes it possible to differentiate between nodes that have the same name but belong to different patient or study

- More control over the subject hierarchy Qt model in general, more room for further improvements

 

Extended information about it can be found on the labs page

https://www.slicer.org/wiki/Documentation/Labs/SubjectHierarchy

 

The development branch is here

https://github.com/cpinter/Slicer/tree/stop-subject-hierarchy-node-duplication

I’d appreciate if those who are interested in this could build and test it. I tested as much as I could on Windows, but there are other OS’s, and also everyone uses it slightly differently, so there surely will be a few bugs.

 

What I’m still working on is updating the extensions. Once it’s done, and I fixed all newly discovered bugs, I’m ready to integrate.

 

Thank you,

csaba


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 

 

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

Jorge Onieva
Hi Csaba.

I'm having an issue that seems to be related with the new SH. I wonder if
anyone has a similar use case. Slicer crashes when trying to do a
"setCurrentNode" in a slicer.qMRMLNodeComboBox().

It could be related with the fact that the labelmap node is generated from a
CLI? This is the full process that is executed when clicking a button in one
of our modules:

Labelmap selector:
        self.labelSelector = slicer.qMRMLNodeComboBox()
        self.labelSelector.nodeTypes = (("vtkMRMLLabelMapVolumeNode"), "")
        self.labelSelector.selectNodeUponCreation = True
        self.labelSelector.addEnabled = False
        self.labelSelector.removeEnabled = False
        self.labelSelector.noneEnabled = True
        self.labelSelector.showHidden = False
        self.labelSelector.showChildNodeTypes = False
        self.labelSelector.setMRMLScene(slicer.mrmlScene)
        self.labelSelector.setToolTip("Pick the label map to the
algorithm.")
        parametersFormLayout.addRow("Label Map Volume: ",
self.labelSelector)

- When the user clicks:
   1) Create a new labelmap node:
        self.labelNode =
slicer.mrmlScene.AddNode(slicer.vtkMRMLLabelMapVolumeNode())
        name = inputNode.GetName() + '_partialLungLabelMap'
        self.labelNode.SetName(slicer.mrmlScene.GenerateUniqueName(name))
        ...
   2) "Fill" the labelmap in a CLI:
       generatepartiallunglabelmap =
slicer.modules.generatepartiallunglabelmap
        parameters = {
              "ctFileName": inputNode.GetID(),
              "outputLungMaskFileName": label_map.GetID(),  
              }
       
slicer.cli.run(generatepartiallunglabelmap,None,parameters,wait_for_completion=True)
      .....
  3) Set the labelmap in the Node selector:
       self.labelSelector.setCurrentNode(self.labelNode)

At that moment, Slicer crashes and I get this error:
Process:               Slicer [52464]
Path:                
/Applications/Slicer.nightly.2017.03.29.app/Contents/MacOS/Slicer
Identifier:            ???
Version:               ??? (4.7.0-2017-03-28)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Slicer [52464]
User ID:               501

Date/Time:             2017-03-30 18:15:54.245 -0400
OS Version:            Mac OS X 10.11.6 (15G1421)
Report Version:        11
Anonymous UUID:        4FDD0076-D434-A082-AF52-F21DAD9F1DEB

Sleep/Wake UUID:       3123F9CC-F4F7-4CB9-A547-0C0AD73A6F81

Time Awake Since Boot: 40000 seconds
Time Since Wake:       27000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0:
-->
    __TEXT                 0000000100000000-0000000100040000 [  256K]
r-x/rwx SM=COW
/Applications/Slicer.nightly.2017.03.29.app/Contents/MacOS/Slicer

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libqSlicerBaseQTCLI.dylib     0x0000000100292915
vtkSlicerCLIEditSubjectHierarchyCallback::Execute(vtkObject*, unsigned long,
void*) + 245
1   libqSlicerBaseQTCLI.dylib     0x0000000100291db1
vtkSlicerCLIOneShotCallbackCallback::Execute(vtkObject*, unsigned long,
void*) + 65
2   libvtkCommon-7.1.1.dylib       0x000000010eef305b
vtkSubjectHelper::InvokeEvent(unsigned long, void*, vtkObject*) + 1115
3   libqSlicerBaseQTCore.dylib     0x0000000103aacfc6
qSlicerCoreApplication::invokeEvent() + 278
4   libqSlicerBaseQTCore.dylib     0x0000000103b0aa3f
qSlicerCoreApplication::qt_static_metacall(QObject*, QMetaObject::Call, int,
void**) + 511
5   QtCore                         0x00000001038666ec
QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 2348
6   QtCore                         0x00000001038622a3
QObject::event(QEvent*) + 51
7   QtGui                         0x0000000102ba5bf2
QApplicationPrivate::notify_helper(QObject*, QEvent*) + 258
8   QtGui                         0x0000000102ba892a
QApplication::notify(QObject*, QEvent*) + 6746
9   libqSlicerBaseQTGUI.dylib     0x000000010036caa3
qSlicerApplication::notify(QObject*, QEvent*) + 19
10  QtCore                         0x000000010384fcd3
QCoreApplication::notifyInternal(QObject*, QEvent*) + 115
11  QtGui                         0x0000000102ba941c
qt_sendSpontaneousEvent(QObject*, QEvent*) + 44
12  QtGui                         0x0000000102b5763b
QEventDispatcherMacPrivate::activateTimer(__CFRunLoopTimer*, void*) + 187
13  com.apple.CoreFoundation       0x00007fff8a616af4
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
14  com.apple.CoreFoundation       0x00007fff8a616783 __CFRunLoopDoTimer +
1075
15  com.apple.CoreFoundation       0x00007fff8a6162da __CFRunLoopDoTimers +
298
16  com.apple.CoreFoundation       0x00007fff8a60d7d1 __CFRunLoopRun + 1841
17  com.apple.CoreFoundation       0x00007fff8a60ce38 CFRunLoopRunSpecific +
296
18  com.apple.HIToolbox           0x00007fff91a70935
RunCurrentEventLoopInMode + 235
19  com.apple.HIToolbox           0x00007fff91a7076f ReceiveNextEventCommon
+ 432
20  com.apple.HIToolbox           0x00007fff91a705af
_BlockUntilNextEventMatchingListInModeWithFilter + 71
21  com.apple.AppKit               0x00007fff97e39df6 _DPSNextEvent + 1067
22  com.apple.AppKit               0x00007fff97e39226 -[NSApplication
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
23  com.apple.AppKit               0x00007fff97e2dd80 -[NSApplication run] +
682
24  QtGui                         0x0000000102b5834a
QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) +
474
25  QtCore                         0x000000010384cdf5
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 501
26  QtCore                         0x000000010385024a
QCoreApplication::exec() + 202
27                                 0x000000010003e1de main + 9182
28                                 0x000000010003bdf4 start + 52


I hope that this is enough information to try to figure out what's going on.
This module is working fine in the last Release.

If you need any other information please feel fry to email me in private, I
don't want to bother everybody with more details...

Tx!
Jorge


 



--
View this message in context: http://slicer-devel.65872.n3.nabble.com/Subject-hierarchy-2-0-tp4038061p4038390.html
Sent from the slicer-devel mailing list archive at Nabble.com.
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

Jorge Onieva
This post has NOT been accepted by the mailing list yet.
In reply to this post by pinter
Hi Csaba.

I'm having an issue that seems to be related with the new SH. I wonder if anyone has a similar use case. Slicer crashes when trying to do a "setCurrentNode" in a slicer.qMRMLNodeComboBox().

It could be related with the fact that the labelmap node is generated from a CLI? This is the full process that is executed when clicking a button in one of our modules:

Labelmap selector:
        self.labelSelector = slicer.qMRMLNodeComboBox()
        self.labelSelector.nodeTypes = (("vtkMRMLLabelMapVolumeNode"), "")
        self.labelSelector.selectNodeUponCreation = True
        self.labelSelector.addEnabled = False
        self.labelSelector.removeEnabled = False
        self.labelSelector.noneEnabled = True
        self.labelSelector.showHidden = False
        self.labelSelector.showChildNodeTypes = False
        self.labelSelector.setMRMLScene(slicer.mrmlScene)
        self.labelSelector.setToolTip("Pick the label map to the algorithm.")
        parametersFormLayout.addRow("Label Map Volume: ", self.labelSelector)

- When the user clicks:
   1) Create a new labelmap node:
        self.labelNode = slicer.mrmlScene.AddNode(slicer.vtkMRMLLabelMapVolumeNode())
        name = inputNode.GetName() + '_partialLungLabelMap'
        self.labelNode.SetName(slicer.mrmlScene.GenerateUniqueName(name))
        ...
   2) "Fill" the labelmap in a CLI:
       generatepartiallunglabelmap = slicer.modules.generatepartiallunglabelmap
        parameters = {
              "ctFileName": inputNode.GetID(),
              "outputLungMaskFileName": label_map.GetID(),  
              }
        slicer.cli.run(generatepartiallunglabelmap,None,parameters,wait_for_completion=True)
      .....
  3) Set the labelmap in the Node selector:
       self.labelSelector.setCurrentNode(self.labelNode)

At that moment, Slicer crashes and I get this error:
Process:               Slicer [52464]
Path:                  /Applications/Slicer.nightly.2017.03.29.app/Contents/MacOS/Slicer
Identifier:            ???
Version:               ??? (4.7.0-2017-03-28)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Slicer [52464]
User ID:               501

Date/Time:             2017-03-30 18:15:54.245 -0400
OS Version:            Mac OS X 10.11.6 (15G1421)
Report Version:        11
Anonymous UUID:        4FDD0076-D434-A082-AF52-F21DAD9F1DEB

Sleep/Wake UUID:       3123F9CC-F4F7-4CB9-A547-0C0AD73A6F81

Time Awake Since Boot: 40000 seconds
Time Since Wake:       27000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0:
-->
    __TEXT                 0000000100000000-0000000100040000 [  256K] r-x/rwx SM=COW  /Applications/Slicer.nightly.2017.03.29.app/Contents/MacOS/Slicer

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libqSlicerBaseQTCLI.dylib     0x0000000100292915 vtkSlicerCLIEditSubjectHierarchyCallback::Execute(vtkObject*, unsigned long, void*) + 245
1   libqSlicerBaseQTCLI.dylib     0x0000000100291db1 vtkSlicerCLIOneShotCallbackCallback::Execute(vtkObject*, unsigned long, void*) + 65
2   libvtkCommon-7.1.1.dylib       0x000000010eef305b vtkSubjectHelper::InvokeEvent(unsigned long, void*, vtkObject*) + 1115
3   libqSlicerBaseQTCore.dylib     0x0000000103aacfc6 qSlicerCoreApplication::invokeEvent() + 278
4   libqSlicerBaseQTCore.dylib     0x0000000103b0aa3f qSlicerCoreApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 511
5   QtCore                         0x00000001038666ec QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 2348
6   QtCore                         0x00000001038622a3 QObject::event(QEvent*) + 51
7   QtGui                         0x0000000102ba5bf2 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 258
8   QtGui                         0x0000000102ba892a QApplication::notify(QObject*, QEvent*) + 6746
9   libqSlicerBaseQTGUI.dylib     0x000000010036caa3 qSlicerApplication::notify(QObject*, QEvent*) + 19
10  QtCore                         0x000000010384fcd3 QCoreApplication::notifyInternal(QObject*, QEvent*) + 115
11  QtGui                         0x0000000102ba941c qt_sendSpontaneousEvent(QObject*, QEvent*) + 44
12  QtGui                         0x0000000102b5763b QEventDispatcherMacPrivate::activateTimer(__CFRunLoopTimer*, void*) + 187
13  com.apple.CoreFoundation       0x00007fff8a616af4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
14  com.apple.CoreFoundation       0x00007fff8a616783 __CFRunLoopDoTimer + 1075
15  com.apple.CoreFoundation       0x00007fff8a6162da __CFRunLoopDoTimers + 298
16  com.apple.CoreFoundation       0x00007fff8a60d7d1 __CFRunLoopRun + 1841
17  com.apple.CoreFoundation       0x00007fff8a60ce38 CFRunLoopRunSpecific + 296
18  com.apple.HIToolbox           0x00007fff91a70935 RunCurrentEventLoopInMode + 235
19  com.apple.HIToolbox           0x00007fff91a7076f ReceiveNextEventCommon + 432
20  com.apple.HIToolbox           0x00007fff91a705af _BlockUntilNextEventMatchingListInModeWithFilter + 71
21  com.apple.AppKit               0x00007fff97e39df6 _DPSNextEvent + 1067
22  com.apple.AppKit               0x00007fff97e39226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
23  com.apple.AppKit               0x00007fff97e2dd80 -[NSApplication run] + 682
24  QtGui                         0x0000000102b5834a QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 474
25  QtCore                         0x000000010384cdf5 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 501
26  QtCore                         0x000000010385024a QCoreApplication::exec() + 202
27                                 0x000000010003e1de main + 9182
28                                 0x000000010003bdf4 start + 52


I hope that this is enough information to try to figure out what's going on. This module is working fine in the last Release.

If you need any other information please feel fry to email me in private, I don't want to bother everybody with more details...

Tx!
Jorge


 
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

pinter
In reply to this post by Jorge Onieva
HI Jorge,

I committed a fix. Please test and let me know if it worked.

csaba

-----Original Message-----
From: slicer-devel [mailto:[hidden email]] On Behalf Of Jorge Onieva
Sent: Thursday, March 30, 2017 18:22
To: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] Subject hierarchy 2.0

Hi Csaba.

I'm having an issue that seems to be related with the new SH. I wonder if anyone has a similar use case. Slicer crashes when trying to do a "setCurrentNode" in a slicer.qMRMLNodeComboBox().

It could be related with the fact that the labelmap node is generated from a CLI? This is the full process that is executed when clicking a button in one of our modules:

Labelmap selector:
        self.labelSelector = slicer.qMRMLNodeComboBox()
        self.labelSelector.nodeTypes = (("vtkMRMLLabelMapVolumeNode"), "")
        self.labelSelector.selectNodeUponCreation = True
        self.labelSelector.addEnabled = False
        self.labelSelector.removeEnabled = False
        self.labelSelector.noneEnabled = True
        self.labelSelector.showHidden = False
        self.labelSelector.showChildNodeTypes = False
        self.labelSelector.setMRMLScene(slicer.mrmlScene)
        self.labelSelector.setToolTip("Pick the label map to the
algorithm.")
        parametersFormLayout.addRow("Label Map Volume: ",
self.labelSelector)

- When the user clicks:
   1) Create a new labelmap node:
        self.labelNode =
slicer.mrmlScene.AddNode(slicer.vtkMRMLLabelMapVolumeNode())
        name = inputNode.GetName() + '_partialLungLabelMap'
        self.labelNode.SetName(slicer.mrmlScene.GenerateUniqueName(name))
        ...
   2) "Fill" the labelmap in a CLI:
       generatepartiallunglabelmap =
slicer.modules.generatepartiallunglabelmap
        parameters = {
              "ctFileName": inputNode.GetID(),
              "outputLungMaskFileName": label_map.GetID(),  
              }
       
slicer.cli.run(generatepartiallunglabelmap,None,parameters,wait_for_completion=True)
      .....
  3) Set the labelmap in the Node selector:
       self.labelSelector.setCurrentNode(self.labelNode)

At that moment, Slicer crashes and I get this error:
Process:               Slicer [52464]
Path:                
/Applications/Slicer.nightly.2017.03.29.app/Contents/MacOS/Slicer
Identifier:            ???
Version:               ??? (4.7.0-2017-03-28)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Slicer [52464]
User ID:               501

Date/Time:             2017-03-30 18:15:54.245 -0400
OS Version:            Mac OS X 10.11.6 (15G1421)
Report Version:        11
Anonymous UUID:        4FDD0076-D434-A082-AF52-F21DAD9F1DEB

Sleep/Wake UUID:       3123F9CC-F4F7-4CB9-A547-0C0AD73A6F81

Time Awake Since Boot: 40000 seconds
Time Since Wake:       27000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0:
-->
    __TEXT                 0000000100000000-0000000100040000 [  256K]
r-x/rwx SM=COW
/Applications/Slicer.nightly.2017.03.29.app/Contents/MacOS/Slicer

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libqSlicerBaseQTCLI.dylib     0x0000000100292915
vtkSlicerCLIEditSubjectHierarchyCallback::Execute(vtkObject*, unsigned long,
void*) + 245
1   libqSlicerBaseQTCLI.dylib     0x0000000100291db1
vtkSlicerCLIOneShotCallbackCallback::Execute(vtkObject*, unsigned long,
void*) + 65
2   libvtkCommon-7.1.1.dylib       0x000000010eef305b
vtkSubjectHelper::InvokeEvent(unsigned long, void*, vtkObject*) + 1115
3   libqSlicerBaseQTCore.dylib     0x0000000103aacfc6
qSlicerCoreApplication::invokeEvent() + 278
4   libqSlicerBaseQTCore.dylib     0x0000000103b0aa3f
qSlicerCoreApplication::qt_static_metacall(QObject*, QMetaObject::Call, int,
void**) + 511
5   QtCore                         0x00000001038666ec
QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 2348
6   QtCore                         0x00000001038622a3
QObject::event(QEvent*) + 51
7   QtGui                         0x0000000102ba5bf2
QApplicationPrivate::notify_helper(QObject*, QEvent*) + 258
8   QtGui                         0x0000000102ba892a
QApplication::notify(QObject*, QEvent*) + 6746
9   libqSlicerBaseQTGUI.dylib     0x000000010036caa3
qSlicerApplication::notify(QObject*, QEvent*) + 19
10  QtCore                         0x000000010384fcd3
QCoreApplication::notifyInternal(QObject*, QEvent*) + 115
11  QtGui                         0x0000000102ba941c
qt_sendSpontaneousEvent(QObject*, QEvent*) + 44
12  QtGui                         0x0000000102b5763b
QEventDispatcherMacPrivate::activateTimer(__CFRunLoopTimer*, void*) + 187
13  com.apple.CoreFoundation       0x00007fff8a616af4
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
14  com.apple.CoreFoundation       0x00007fff8a616783 __CFRunLoopDoTimer +
1075
15  com.apple.CoreFoundation       0x00007fff8a6162da __CFRunLoopDoTimers +
298
16  com.apple.CoreFoundation       0x00007fff8a60d7d1 __CFRunLoopRun + 1841
17  com.apple.CoreFoundation       0x00007fff8a60ce38 CFRunLoopRunSpecific +
296
18  com.apple.HIToolbox           0x00007fff91a70935
RunCurrentEventLoopInMode + 235
19  com.apple.HIToolbox           0x00007fff91a7076f ReceiveNextEventCommon
+ 432
20  com.apple.HIToolbox           0x00007fff91a705af
_BlockUntilNextEventMatchingListInModeWithFilter + 71
21  com.apple.AppKit               0x00007fff97e39df6 _DPSNextEvent + 1067
22  com.apple.AppKit               0x00007fff97e39226 -[NSApplication
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
23  com.apple.AppKit               0x00007fff97e2dd80 -[NSApplication run] +
682
24  QtGui                         0x0000000102b5834a
QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) +
474
25  QtCore                         0x000000010384cdf5
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 501
26  QtCore                         0x000000010385024a
QCoreApplication::exec() + 202
27                                 0x000000010003e1de main + 9182
28                                 0x000000010003bdf4 start + 52


I hope that this is enough information to try to figure out what's going on.
This module is working fine in the last Release.

If you need any other information please feel fry to email me in private, I don't want to bother everybody with more details...

Tx!
Jorge


 



--
View this message in context: http://slicer-devel.65872.n3.nabble.com/Subject-hierarchy-2-0-tp4038061p4038390.html
Sent from the slicer-devel mailing list archive at Nabble.com.
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Subject hierarchy 2.0

Jorge Onieva
In reply to this post by Jorge Onieva
Hi Csaba.

It seems to be working fine now. Are there any runner-up prizes for SH bug detectors during next NAMIC? I know the beer went to Steve, but a shot would do too... 

Thanks a lot for the quick fix.

Jorge Onieva

On Fri, Mar 31, 2017 at 9:07 AM, Csaba Pinter <[hidden email]> wrote:
HI Jorge,

I committed a fix. Please test and let me know if it worked.

csaba

-----Original Message-----
From: slicer-devel [mailto:[hidden email]] On Behalf Of Jorge Onieva
Sent: Thursday, March 30, 2017 18:22
To: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] Subject hierarchy 2.0

Hi Csaba.

I'm having an issue that seems to be related with the new SH. I wonder if anyone has a similar use case. Slicer crashes when trying to do a "setCurrentNode" in a slicer.qMRMLNodeComboBox().

It could be related with the fact that the labelmap node is generated from a CLI? This is the full process that is executed when clicking a button in one of our modules:

Labelmap selector:
        self.labelSelector = slicer.qMRMLNodeComboBox()
        self.labelSelector.nodeTypes = (("vtkMRMLLabelMapVolumeNode"), "")
        self.labelSelector.selectNodeUponCreation = True
        self.labelSelector.addEnabled = False
        self.labelSelector.removeEnabled = False
        self.labelSelector.noneEnabled = True
        self.labelSelector.showHidden = False
        self.labelSelector.showChildNodeTypes = False
        self.labelSelector.setMRMLScene(slicer.mrmlScene)
        self.labelSelector.setToolTip("Pick the label map to the
algorithm.")
        parametersFormLayout.addRow("Label Map Volume: ",
self.labelSelector)

- When the user clicks:
   1) Create a new labelmap node:
        self.labelNode =
slicer.mrmlScene.AddNode(slicer.vtkMRMLLabelMapVolumeNode())
        name = inputNode.GetName() + '_partialLungLabelMap'
        self.labelNode.SetName(slicer.mrmlScene.GenerateUniqueName(name))
        ...
   2) "Fill" the labelmap in a CLI:
       generatepartiallunglabelmap =
slicer.modules.generatepartiallunglabelmap
        parameters = {
              "ctFileName": inputNode.GetID(),
              "outputLungMaskFileName": label_map.GetID(),
              }

slicer.cli.run(generatepartiallunglabelmap,None,parameters,wait_for_completion=True)
      .....
  3) Set the labelmap in the Node selector:
       self.labelSelector.setCurrentNode(self.labelNode)

At that moment, Slicer crashes and I get this error:
Process:               Slicer [52464]
Path:
/Applications/Slicer.nightly.2017.03.29.app/Contents/MacOS/Slicer
Identifier:            ???
Version:               ??? (4.7.0-2017-03-28)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Slicer [52464]
User ID:               501

Date/Time:             2017-03-30 18:15:54.245 -0400
OS Version:            Mac OS X 10.11.6 (15G1421)
Report Version:        11
Anonymous UUID:        4FDD0076-D434-A082-AF52-F21DAD9F1DEB

Sleep/Wake UUID:       3123F9CC-F4F7-4CB9-A547-0C0AD73A6F81

Time Awake Since Boot: 40000 seconds
Time Since Wake:       27000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0:
-->
    __TEXT                 0000000100000000-0000000100040000 [  256K]
r-x/rwx SM=COW
/Applications/Slicer.nightly.2017.03.29.app/Contents/MacOS/Slicer

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libqSlicerBaseQTCLI.dylib           0x0000000100292915
vtkSlicerCLIEditSubjectHierarchyCallback::Execute(vtkObject*, unsigned long,
void*) + 245
1   libqSlicerBaseQTCLI.dylib           0x0000000100291db1
vtkSlicerCLIOneShotCallbackCallback::Execute(vtkObject*, unsigned long,
void*) + 65
2   libvtkCommon-7.1.1.dylib            0x000000010eef305b
vtkSubjectHelper::InvokeEvent(unsigned long, void*, vtkObject*) + 1115
3   libqSlicerBaseQTCore.dylib          0x0000000103aacfc6
qSlicerCoreApplication::invokeEvent() + 278
4   libqSlicerBaseQTCore.dylib          0x0000000103b0aa3f
qSlicerCoreApplication::qt_static_metacall(QObject*, QMetaObject::Call, int,
void**) + 511
5   QtCore                              0x00000001038666ec
QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 2348
6   QtCore                              0x00000001038622a3
QObject::event(QEvent*) + 51
7   QtGui                               0x0000000102ba5bf2
QApplicationPrivate::notify_helper(QObject*, QEvent*) + 258
8   QtGui                               0x0000000102ba892a
QApplication::notify(QObject*, QEvent*) + 6746
9   libqSlicerBaseQTGUI.dylib           0x000000010036caa3
qSlicerApplication::notify(QObject*, QEvent*) + 19
10  QtCore                              0x000000010384fcd3
QCoreApplication::notifyInternal(QObject*, QEvent*) + 115
11  QtGui                               0x0000000102ba941c
qt_sendSpontaneousEvent(QObject*, QEvent*) + 44
12  QtGui                               0x0000000102b5763b
QEventDispatcherMacPrivate::activateTimer(__CFRunLoopTimer*, void*) + 187
13  com.apple.CoreFoundation            0x00007fff8a616af4
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
14  com.apple.CoreFoundation            0x00007fff8a616783 __CFRunLoopDoTimer +
1075
15  com.apple.CoreFoundation            0x00007fff8a6162da __CFRunLoopDoTimers +
298
16  com.apple.CoreFoundation            0x00007fff8a60d7d1 __CFRunLoopRun + 1841
17  com.apple.CoreFoundation            0x00007fff8a60ce38 CFRunLoopRunSpecific +
296
18  com.apple.HIToolbox                 0x00007fff91a70935
RunCurrentEventLoopInMode + 235
19  com.apple.HIToolbox                 0x00007fff91a7076f ReceiveNextEventCommon
+ 432
20  com.apple.HIToolbox                 0x00007fff91a705af
_BlockUntilNextEventMatchingListInModeWithFilter + 71
21  com.apple.AppKit                    0x00007fff97e39df6 _DPSNextEvent + 1067
22  com.apple.AppKit                    0x00007fff97e39226 -[NSApplication
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
23  com.apple.AppKit                    0x00007fff97e2dd80 -[NSApplication run] +
682
24  QtGui                               0x0000000102b5834a
QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) +
474
25  QtCore                              0x000000010384cdf5
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 501
26  QtCore                              0x000000010385024a
QCoreApplication::exec() + 202
27                                      0x000000010003e1de main + 9182
28                                      0x000000010003bdf4 start + 52


I hope that this is enough information to try to figure out what's going on.
This module is working fine in the last Release.

If you need any other information please feel fry to email me in private, I don't want to bother everybody with more details...

Tx!
Jorge






--
View this message in context: http://slicer-devel.65872.n3.nabble.com/Subject-hierarchy-2-0-tp4038061p4038390.html
Sent from the slicer-devel mailing list archive at Nabble.com.
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
12