Lung-Lobes-Segmentation-in-CT-Scans icon indicating copy to clipboard operation
Lung-Lobes-Segmentation-in-CT-Scans copied to clipboard

vector_region_growing program would expire "Segmentation fault (core dumped)"

Open NullBirdie opened this issue 7 years ago • 12 comments

vector_region_growing program will raise Segmentation fault (core dumped) error in my computer. The error line number is No. 193 which is const OutputImageType::RegionType region = VecEigHImagePointer->GetBufferedRegion(); so how to solve this? plus... in your notebook, line No. 5 in Vasculature Segmentation vs.generate_lung_mask(lunglabel=[1,-5000], offset = 0) where I find VesselSegment.generate_lung_mask only recive one arg "offset" def generate_lung_mask(self, offset = 0): """ Generate lung mask :return: None """ self.img = sitk.GetArrayFromImage(self.original_img).copy() - offset self.img[self.closing_img == 0] = 0 so ...what this [1,-5000] means?

NullBirdie avatar May 07 '18 09:05 NullBirdie

@NullBirdie I also encountered the same problem, Segmentation fault: 11 , have you solved it yet?

0point618 avatar Jul 13 '18 01:07 0point618

I also encountered the same problem.

woofyzhao avatar Aug 04 '18 02:08 woofyzhao

I also encountered the same problem.

SCP-173-cool avatar Aug 04 '18 12:08 SCP-173-cool

@kiritodog @NullBirdie @woofyzhao @SCP-173-cool 请问你们有能跑通他这个实验的嘛,为什么我得不到任何结果呢

daoyijushi avatar Aug 28 '18 09:08 daoyijushi

yeah...i solved it...the answer is the data feed to this module is part of preprocessed data...read the notebook first.

Ranglage avatar Aug 28 '18 09:08 Ranglage

however the result is quite unacceptable

Ranglage avatar Aug 28 '18 09:08 Ranglage

@Ranglage hello, I have encountered the same problem. How to solve this problem?

fjzpcmj avatar Oct 12 '19 11:10 fjzpcmj

I know how to run the c++ part. The vector_region_growing should process Lung_mask generated from python code. The code uses recursive way to region growing, so Segmentation fault may happen due to stack overflow. I have enlarged the stack size in visual studio 2013, then I get the result.

fjzpcmj avatar Oct 13 '19 12:10 fjzpcmj

@Ranglage hello, I have encountered the same problem. How to solve this problem? read the notebook the author provided. However the result is not good enouth to me.

Ranglage avatar Oct 14 '19 07:10 Ranglage

@Ranglage hello, I still have a problem with running the C++ code. In my case the code doesn't show any error messages, But it I run the code, I never get the resulting image of the vector region growing. I tried debugging, but every line of the code seems to work, but it never comes to the saving part of the code. Can you please walk me through it step by step. This is what I did: Download ITK package -> Cmake configure and generate > VS 2019 to build for Release Download this repository -> Cmake configure and generate > VS 2019 to build for Release Open command prompt and navigate to the Release folder of this repository run: vector_region_growing.exe C:\Users\IngridVanPeufflik\Pictures\LOLA11\lola11-01.mhd C:\Users\IngridVanPeufflik\Pictures\LOLA11\lola11-01_t.mhd Then it indeed start running to code and terminates without any errors, but doesn't save the image.

IngridvanP avatar Mar 11 '21 14:03 IngridvanP

I know how to run the c++ part. The vector_region_growing should process Lung_mask generated from python code. The code uses recursive way to region growing, so Segmentation fault may happen due to stack overflow. I have enlarged the stack size in visual studio 2013, then I get the result.

@fjzpcmj I enlarged the stack size in visual studio, then I also get the result. But how about your result(FISSURE_EXTRACT_REFINED.mhd)? My result showed that there is no big difference between FISSURE_EXTRACT.mhd and FISSURE_EXTRACT_REFINED.mhd

hanlu-zju avatar May 26 '21 09:05 hanlu-zju

Thank you Connor323 for sharing!

I have made a dockerfile to build the cxx code within a container, also provided a few scripts for getting a sample image and to preprocess the image prior feeding it to the filters:

updated files available here https://github.com/Connor323/Lung-Lobes-Segmentation-in-CT-Scans/pull/10

pangyuteng avatar Sep 03 '21 00:09 pangyuteng