# Lung CT segmenter

**URL:** <https://discourse.slicer.org/t/lung-ct-segmenter/21493>\
**Category:** Support\
**Created:** [January 17, 2022, 1:27pm UTC](https://discourse.slicer.org/t/lung-ct-segmenter/21493 "2022-01-17T13:27:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![opetne](https://avatars.discourse-cdn.com/v4/letter/o/71e660/32.png) [@opetne](https://discourse.slicer.org/u/opetne)\
**Post date:** [January 17, 2022, 1:27pm UTC](https://discourse.slicer.org/t/lung-ct-segmenter/21493/1 "2022-01-17T13:27:04Z")

</div>

Operation system: Windows 10  
Slcier version: 4.11 20210226

I tried to run the Lung CT segmenter module on a dog CT series.  
Preview was ok but after applying I got this error message:  
Saving fiducials in root directory …  
Saving fiducials in volume directory …  
Failed to compute results: expected str, bytes or os.PathLike object, not NoneType  
Traceback (most recent call last):  
File “C:/Users/petnehazyors/AppData/Local/NA-MIC/Slicer 4.11.20210226/NA-MIC/Extensions-29738/LungCTAnalyzer/lib/Slicer-4.11/qt-scripted-modules/LungCTSegmenter.py”, line 397, in onApplyButton  
self.saveFiducialsGlobalAndLocal()  
File “C:/Users/petnehazyors/AppData/Local/NA-MIC/Slicer 4.11.20210226/NA-MIC/Extensions-29738/LungCTAnalyzer/lib/Slicer-4.11/qt-scripted-modules/LungCTSegmenter.py”, line 465, in saveFiducialsGlobalAndLocal  
baseFolder, tail = os.path.split(inputFilename)  
File “C:/Users/petnehazyors/AppData/Local/NA-MIC/Slicer 4.11.20210226/bin/…/lib/Python/Lib\ntpath.py”, line 205, in split  
p = os.fspath(p)  
TypeError: expected str, bytes or os.PathLike object, not NoneType

Where was the problem and how can I solve it?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [January 17, 2022, 1:37pm UTC](https://discourse.slicer.org/t/lung-ct-segmenter/21493/2 "2022-01-17T13:37:16Z")

</div>

The error message suggests that maybe empty path was given? I guess not, but double-checking (looking at the log you were kind to paste, it seems it got past the first round of saving). Is this module available for the latest Preview version (almost 5.0 so time to try to switch)? If so, does the error occur in that as well? Thanks!

---

<div class="post-metadata">

**Author:** ![opetne](https://avatars.discourse-cdn.com/v4/letter/o/71e660/32.png) [@opetne](https://discourse.slicer.org/u/opetne)\
**Post date:** [January 17, 2022, 2:16pm UTC](https://discourse.slicer.org/t/lung-ct-segmenter/21493/3 "2022-01-17T14:16:34Z")

</div>

Dear Csaba,

Thank you for the answer. I ran into another problem trying to download the latest version. It is not possible to download it…

Best,

Ors

Csaba Pinter via 3D Slicer Community \<[slicer@discoursemail.com](mailto:slicer@discoursemail.com)\> ezt írta (időpont: 2022. jan. 17., H, 14:37):

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [January 18, 2022, 8:43am UTC](https://discourse.slicer.org/t/lung-ct-segmenter/21493/4 "2022-01-18T08:43:13Z")

</div>

Thanks for your report.

I just tested the LungCTSegmenter and do not get this exception when loading a CT dataset from my local harddrive.  
In your case, `inputFilename` is obviosly empty for some reason and so the exception is thrown.  
Will try to fix this, but:

How did you load the CT data?  
What version does LungCTAnalyzer show on your system ?

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [January 18, 2022, 8:46am UTC](https://discourse.slicer.org/t/lung-ct-segmenter/21493/5 "2022-01-18T08:46:07Z")

</div>

How did you try to download it?  
I have no problem installing the LungCTAnalyzer extension from the Extensions Manager in 4.11.  
Could you provide more details?

---

<div class="post-metadata">

**Author:** ![opetne](https://avatars.discourse-cdn.com/v4/letter/o/71e660/32.png) [@opetne](https://discourse.slicer.org/u/opetne)\
**Post date:** [January 18, 2022, 9:17am UTC](https://discourse.slicer.org/t/lung-ct-segmenter/21493/6 "2022-01-18T09:17:18Z")

</div>

Dear Rudolf,

I tried to download the Slicer latest release and this didn’t work.

Best,

Ors

Rudolf Bumm via 3D Slicer Community \<[slicer@discoursemail.com](mailto:slicer@discoursemail.com)\> ezt írta (időpont: 2022. jan. 18., K, 9:46):

---

<div class="post-metadata">

**Author:** ![opetne](https://avatars.discourse-cdn.com/v4/letter/o/71e660/32.png) [@opetne](https://discourse.slicer.org/u/opetne)\
**Post date:** [January 18, 2022, 9:20am UTC](https://discourse.slicer.org/t/lung-ct-segmenter/21493/7 "2022-01-18T09:20:41Z")

</div>

Dear Rudolf,

I’ve found the solution for the Lung CT segmenter problem based on your comment. The problem was:

1. I downloaded from our server a series with Radiant
2. Radiant put 2 series from 2 separate dogs in 1 folder.
3. Slicer recognized this as two separate examinations
4. The original folder didn’t contain any information with the same name as Slicer recognised the series.

Now I separated the series and made the folders with the appropriate names and it works.

Thank you for the suggestion!

Best regards,

Ors

Rudolf Bumm via 3D Slicer Community \<[slicer@discoursemail.com](mailto:slicer@discoursemail.com)\> ezt írta (időpont: 2022. jan. 18., K, 9:43):

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [January 18, 2022, 9:21am UTC](https://discourse.slicer.org/t/lung-ct-segmenter/21493/8 "2022-01-18T09:21:25Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/0/70b047465165012da5a3a48f1c91778a98775ff5.png)

Click one of the preview release buttons, download is starting here without problems …

Your problem will probably be unrelated to these Slicer versions because LungCTAnalyzer works in both stable and preview release.

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [January 18, 2022, 9:23am UTC](https://discourse.slicer.org/t/lung-ct-segmenter/21493/9 "2022-01-18T09:23:32Z")

</div>

Great, I have implemented a small change in the LungCTSegmenter and -Analyzer source (V2.46) to avoid the exception in the future.
