# Integrating Sequences into Slicer core

**URL:** <https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744>\
**Category:** Development\
**Created:** [July 23, 2017, 11:51am UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744 "2017-07-23T11:51:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![moselhy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moselhy/32/501_2.png) [@moselhy](https://discourse.slicer.org/u/moselhy)\
**Post date:** [July 23, 2017, 11:51am UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744/1 "2017-07-23T11:51:25Z")

</div>

Seeing as that Sequences are going to be the new era of browsing through multiple volumes, transforms, etc… I think it would be appropriate to integrate sequences into the core of Slicer without being an optional extension.

To do this, I think the following should be done, please let me know if I am missing something:

1. qSlicerSequencesReader to work with the Core IO manager
2. A sample sequence to be included in the SampleData module (one is already uploaded [here](http://slicer.kitware.com/midas3/item/299877) by @lassoan)
3. slicer.util to have a loadSequence method
4. SampleData module to have a method to load a sample sequence

I think I achieved the last two [here](https://github.com/moselhy/Slicer/commit/c663e1f6b8fdcd73f540752b7eaf1a52eef3e843), but the first one requires C++ and I am only proficient with C programming as of yet, so I need some help on this.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 23, 2017, 1:09pm UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744/2 "2017-07-23T13:09:09Z")

</div>

While all these can be added to Slicer without any changes to the core due to plugin interfaces (you can register IO plugins, sample data etc. in extensions and they appear the same way as if they had been implemented in Slicer core). However, I agree that it is probably time to make Sequences extension included in the Slicer download package. If there will be no argument about it, I’ll do it by the end of the week.

---

<div class="post-metadata">

**Author:** ![adamrankin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/adamrankin/32/155_2.png) [@adamrankin](https://discourse.slicer.org/u/adamrankin)\
**Post date:** [July 23, 2017, 1:21pm UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744/3 "2017-07-23T13:21:33Z")

</div>

I will second the vote that it would be valuable as part of the downloaded package.

---

<div class="post-metadata">

**Author:** ![adamrankin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/adamrankin/32/155_2.png) [@adamrankin](https://discourse.slicer.org/u/adamrankin)\
**Post date:** [July 23, 2017, 1:36pm UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744/4 "2017-07-23T13:36:53Z")

</div>

Related to Ben Wilk’s little workaround script for DICOM-\>Sequences, I am going to add the OnNodeLoaded callback from the DICOMDetailsPopup widget.

Then, I’ll investigate a proper solution.

Edit: This has already been accomplished. Simply use the ioManager Qt connect mechanism to catch the nodeLoaded signal

---

<div class="post-metadata">

**Author:** ![moselhy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moselhy/32/501_2.png) [@moselhy](https://discourse.slicer.org/u/moselhy)\
**Post date:** [July 30, 2017, 10:40pm UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744/5 "2017-07-30T22:40:05Z")

</div>

> Simply use the ioManager Qt connect mechanism to catch the nodeLoaded signal

Could you please point me to docs where I can find how to do this?

---

<div class="post-metadata">

**Author:** ![adamrankin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/adamrankin/32/155_2.png) [@adamrankin](https://discourse.slicer.org/u/adamrankin)\
**Post date:** [July 30, 2017, 11:14pm UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744/6 "2017-07-30T23:14:19Z")

</div>

> <https://github.com/adamrankin/SlicerTAVI/blob/master/ValvePlanning/ValvePlanning.py#L702>

---

<div class="post-metadata">

**Author:** ![moselhy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moselhy/32/501_2.png) [@moselhy](https://discourse.slicer.org/u/moselhy)\
**Post date:** [July 31, 2017, 6:33am UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744/7 "2017-07-31T06:33:28Z")

</div>

Thanks. So which file am I supposed to edit to add a SequenceImporterPlugin?

---

<div class="post-metadata">

**Author:** ![adamrankin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/adamrankin/32/155_2.png) [@adamrankin](https://discourse.slicer.org/u/adamrankin)\
**Post date:** [July 31, 2017, 12:49pm UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744/8 "2017-07-31T12:49:17Z")

</div>

Oh!! The proper fix.

@lassoan will have to help with that. You could look for multi volume in DICOM and adapt to handle sequences as well.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [October 19, 2017, 8:02am UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744/9 "2017-10-19T08:02:40Z")

</div>

> [@lassoan](#):
>
> probably time to make Sequences extension included in the Slicer download package […] I’ll do it by the end of the week.

What is the status ? Now we started working toward Slicer 5.x, do you think it is ready for inclusion ?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 19, 2017, 1:04pm UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744/10 "2017-10-19T13:04:16Z")

</div>

The main reason I did not follow through with the integration is that for a nice integration some backward-incompatible changes would be needed in the Slicer core. We can do those for Slicer5!

I added a labs page: [https://www.slicer.org/wiki/Documentation/Labs/Sequences](https://www.slicer.org/wiki/Documentation/Labs/Sequences)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 19, 2017, 2:47pm UTC](https://discourse.slicer.org/t/integrating-sequences-into-slicer-core/744/11 "2017-10-19T14:47:44Z")

</div>

By the way, 4D volumes can be loaded directly into Sequences nodes if Sequences extension is installed. You can set in Application settings to load into Sequence nodes by default (instead of multivolume nodes).
