# Automatic c-MRI heart segmentation

**URL:** <https://discourse.slicer.org/t/automatic-c-mri-heart-segmentation/15047>\
**Category:** Support\
**Tags:** segmentation, dicom, heart\
**Created:** [December 14, 2020, 1:29pm UTC](https://discourse.slicer.org/t/automatic-c-mri-heart-segmentation/15047 "2020-12-14T13:29:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jonathan/32/5635_2.png) [@Jonathan](https://discourse.slicer.org/u/Jonathan)\
**Post date:** [December 14, 2020, 1:29pm UTC](https://discourse.slicer.org/t/automatic-c-mri-heart-segmentation/15047/1 "2020-12-14T13:29:55Z")

</div>

Hello,

I have cardiac short axis scans which I would like to segment at specific phases of the cardiac cycle : at peak-systole and at peak-diatole.

So far, I manually detected the relevant slices and then copied the IMA file to a new folder [one for the systole and one for the diastole] , and then used the DICOM patcher for volumetric segmentation.

\*Is there an automatic feature to extract the slices?  
\*How can I group all the relevant slices to one nrrd flie?  
\*Sometimes I get the following error : Unexpected error after executing the patch command: ‘ForceSamePatientNameIdInEachDirectory’ object has no attribute ‘patientName’  
I tried to change the metadata accordingly - didn’t work.

Thank you for your help,

J

---

<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:** [December 14, 2020, 2:46pm UTC](https://discourse.slicer.org/t/automatic-c-mri-heart-segmentation/15047/2 "2020-12-14T14:46:24Z")

</div>

Latest Slicer version should be able to automatically load 4D cardiac MRI sequence as a volume sequence. If it does not seem to work then you can share an anonymized data set (upload somewhere and post the link here) and we can investigate.

---

<div class="post-metadata">

**Author:** ![Jonathan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jonathan/32/5635_2.png) [@Jonathan](https://discourse.slicer.org/u/Jonathan)\
**Post date:** [December 15, 2020, 5:59am UTC](https://discourse.slicer.org/t/automatic-c-mri-heart-segmentation/15047/3 "2020-12-15T05:59:04Z")

</div>

Thank you for the quick reply.  
I downloaded and installed the latest version. The 4D cardiac MRI sequence was indeed loaded automatically as a volume sequence, and I was able to segment the whole heart at once. However, I wasn’t able to nevigate through time periods. [I was able to segment only the specific loaded time frame].  
Up till now I have uploaded the data without using the DICOM utility and used the scroll bar to choose the desired time period.  
I am newbie to this module and I would appriciate your assistance in the matter.

The entire data is available at the following link:

> **[Meet Google Drive – One place for all your files](https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https:%2F%2Fdrive.google.com%2Fdrive%2Ffolders%2F1f-p8-IOdfVX7YE1pYLy_pNuILdHLGZ49?usp%3Dsharing&followup=https:%2F%2Fdrive.google.com%2Fdrive%2Ffolders%2F1f-p8-IOdfVX7YE1pYLy_pNuILdHLGZ49?usp%3Dsharing)**

J
