Connor323 / Lung-Lobes-Segmentation-in-CT-Scans

Segmentation of lung, pulmonary vessels and pulmonary fissures in CT Scans
MIT License
88 stars 23 forks source link

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

Open NullBirdie opened 6 years ago

NullBirdie commented 6 years ago

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?

0point618 commented 6 years ago

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

woofyzhao commented 6 years ago

I also encountered the same problem.

SCP-173-cool commented 6 years ago

I also encountered the same problem.

daoyijushi commented 6 years ago

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

Ranglage commented 6 years ago

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

Ranglage commented 6 years ago

however the result is quite unacceptable

fjzpcmj commented 5 years ago

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

fjzpcmj commented 5 years ago

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.

Ranglage commented 5 years ago

@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.

IngridvanP commented 3 years ago

@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.

hanlu-zju commented 3 years ago

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

pangyuteng commented 3 years ago

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