acil-bwh / ChestImagingPlatform

Chest Imaging Platform (CIP)
Other
55 stars 34 forks source link

Exception in GeneratePartialLungLabelMap: Number of objects greater than maximum of output pixel type #17

Closed jmschabdach closed 7 years ago

jmschabdach commented 7 years ago

I'm trying to extract a partial lung label map for each of ~1600 lung CT images using GeneratePartialLungLabelMap. The utility runs without a problem for all but about 20 subjects. For those 20 subjects, I get the following error:

$ GeneratePartialLungLabelMap --ict K0026/K0026_original_3D.nrrd -o K0026/K0026_partialLungLabelMap.nrrd
Clipping low CT image values...
Clipping upper CT image values...
Executing partial lung filter...
Exception caught segmenting lungs:
itk::ExceptionObject (0x2ccd880)
Location: "unknown" 
File: /pylon1/ms4s88p/batmangh/gitSandbox/ChestImagingPlatform/build/ITKv4/Modules/Core/Common/src/itkMultiThreader.cxx
Line: 420
Description: itk::ERROR: MultiThreader(0x2ab9040): Exception occurred during SingleMethodExecute
/pylon1/ms4s88p/batmangh/gitSandbox/ChestImagingPlatform/build/ITKv4/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx:347:
itk::ERROR: ConnectedComponentImageFilter(0x2abd880): Number of objects greater than maximum of output pixel type 

I've tried extracting the simple lung masks using GenerateSimpleLungMask and supplementing with them, but I get the same error.

Generating the simple lung masks: GenerateSimpleLungMask -i K0026/K0026_original_3D.nrrd -o K0026/K0026_simpleLungMask.nrrd

Generating the lung label map using the simple lung mask: GeneratePartialLungLabelMap --ict K0026/K0026_original_3D.nrrd --hm K0026/K0026_simpleLungMask.nrrd -o K0026/K0026_partialLungLabelMap.nrrd

I'm using the develop branch, and one of the images I'm having problems with can be found here: (https://www.dropbox.com/s/xbrupfheng6sw2m/K0026_original_3D.nrrd?dl=0).

Any help you can offer would be greatly appreciated.

jcross186 commented 7 years ago

Try running ‘GenerateMedianFilteredImage’ on your data before passing it to ‘GeneratePartialLungLabelMap’. Try the default parameters for the median filter, and increase the radius if needed (the defaults worked on the data set you supplied). If you continue to have issues, please let us know.

Best,

-James Ross

From: jmschabdach notifications@github.com<mailto:notifications@github.com> Reply-To: acil-bwh/ChestImagingPlatform reply@reply.github.com<mailto:reply@reply.github.com> Date: Sunday, February 19, 2017 at 6:53 PM To: acil-bwh/ChestImagingPlatform ChestImagingPlatform@noreply.github.com<mailto:ChestImagingPlatform@noreply.github.com> Cc: Subscribed subscribed@noreply.github.com<mailto:subscribed@noreply.github.com> Subject: [acil-bwh/ChestImagingPlatform] Exception in GeneratePartialLungLabelMap: Number of objects greater than maximum of output pixel type (#17)

I'm trying to extract a partial lung label map for each of ~1600 lung CT images using GeneratePartialLungLabelMap. The utility runs without a problem for all but about 20 subjects. For those 20 subjects, I get the following error:

$ GeneratePartialLungLabelMap --ict K0026/K0026_original_3D.nrrd -o K0026/K0026_partialLungLabelMap.nrrd Clipping low CT image values... Clipping upper CT image values... Executing partial lung filter... Exception caught segmenting lungs: itk::ExceptionObject (0x2ccd880) Location: "unknown" File: /pylon1/ms4s88p/batmangh/gitSandbox/ChestImagingPlatform/build/ITKv4/Modules/Core/Common/src/itkMultiThreader.cxx Line: 420 Description: itk::ERROR: MultiThreader(0x2ab9040): Exception occurred during SingleMethodExecute /pylon1/ms4s88p/batmangh/gitSandbox/ChestImagingPlatform/build/ITKv4/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx:347: itk::ERROR: ConnectedComponentImageFilter(0x2abd880): Number of objects greater than maximum of output pixel type

I've tried extracting the simple lung masks using GenerateSimpleLungMask and supplementing with them, but I get the same error.

Generating the simple lung masks: GenerateSimpleLungMask -i K0026/K0026_original_3D.nrrd -o K0026/K0026_simpleLungMask.nrrd

Generating the lung label map using the simple lung mask: GeneratePartialLungLabelMap --ict K0026/K0026_original_3D.nrrd --hm K0026/K0026_simpleLungMask.nrrd -o K0026/K0026_partialLungLabelMap.nrrd

I'm using the develop branch, and one of the images I'm having problems with can be found [here].(https://www.dropbox.com/s/xbrupfheng6sw2m/K0026_original_3D.nrrd?dl=0).

Any help you can offer would be greatly appreciated.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/acil-bwh/ChestImagingPlatform/issues/17, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD2glD-6oLAI8tSXTIe9vd40krc6NQHPks5reNXdgaJpZM4MFpKb.

The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.

jmschabdach commented 7 years ago

Looks like that did the trick! Thank you.

ShibaPrasad commented 4 years ago

Hi jmschabdach,

I need small help for the Chest Imaging Platform (CIP) installation in Linus Ubuntu & python set up and looking for the installation steps. Basically I would like to use the “GeneratePartialLungLabelMap” function in my main python code for whole lung segmentation.

CIP git repository is provided at - https://github.com/acil-bwh/ChestImagingPlatform.

I am not sure which version of CIP - need to install for my whole lung segmentation. As it has two options for download - 1) CIP Library, 2) Slicer CIP

Please advise me.

Thank You Shiva