Comments (4)
This worked for me:
else:
print("Clean Dataset",pid)
patient_clean_dir_image = CLEAN_DIR_IMAGE
patient_clean_dir_mask = CLEAN_DIR_MASK
# Path(patient_clean_dir_image).mkdir(parents=True, exist_ok=True)
# Path(patient_clean_dir_mask).mkdir(parents=True, exist_ok=True)
#There are patients that don't have nodule at all. Meaning, its a clean dataset. We need to use this for validation
for slice in range(vol.shape[2]):
if slice >50:
break
lung_segmented_np_array = segment_lung(vol[:,:,slice])
lung_segmented_np_array[lung_segmented_np_array==-0] =0
lung_mask = np.zeros_like(lung_segmented_np_array)
# CN= CleanNodule, CM = CleanMask
# nodule_name = "{}/{}_CN001_slice{}".format(pid,pid[-4:],prefix[slice])
# mask_name = "{}/{}_CM001_slice{}".format(pid,pid[-4:],prefix[slice])
nodule_name = pid[-4:] + '_CN001_slice' + prefix[slice]
mask_name = pid[-4:] + '_CM001_slice' + prefix[slice]
meta_list = [pid[-4:],slice,prefix[slice],nodule_name,mask_name,0,False,True]
self.save_meta(meta_list)
np.save(str(patient_clean_dir_image) + '/' + nodule_name, lung_segmented_np_array)
np.save(str(patient_clean_dir_mask) + '/' + mask_name, lung_mask)
from lidc-idri-preprocessing.
Can you help me?
from lidc-idri-preprocessing.
did you find any solution for this?
from lidc-idri-preprocessing.
very good suggestion..its also worked for me...Thanks
from lidc-idri-preprocessing.
Related Issues (20)
- dataset HOT 1
- Error saving clean dataset HOT 1
- AttributeError: 'NoneType' object has no attribute 'cluster_annotations' HOT 15
- RuntimeError: Could not establish path to dicom files. Have you specified the `path` option in the configuration file C:\Users\rahul\pylidc.conf? HOT 7
- Installation help HOT 1
- ]
- Issue in LIDC-IDRI-Segmentation HOT 1
- OSError: Couldn't find DICOM files for Scan(id=12,patient_id=LIDC-IDRI-0001). HOT 1
- I can't produce all files in 'data' folder
- NoneType' object has no attribute 'cluster_annotations' HOT 2
- pleas help me need work withe data but the data complexity
- Generating masks for multiple nodules within the same slice
- ImportError HOT 4
- RuntimeError: Could not establish path to dicom files. HOT 2
- cluster_annotations HOT 8
- FileNotFoundError for "Clean" data HOT 8
- How many classes HOT 1
- Error running prepare_dataset
- problem in running the code HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lidc-idri-preprocessing.