gzuidhof / luna16

LUNA16 Lung Nodule Analysis - NWI-IMC037 Final Project
BSD 2-Clause "Simplified" License
185 stars 73 forks source link

data wrong #11

Closed Bonsen closed 7 years ago

Bonsen commented 7 years ago

in src/data_processing/create_same_spacing_data_NODULE.py:

.............. .............. ` lung_slice_512[upper_offset:-lower_offset,upper_offset:-lower_offset] = lung_slice lung_mask_slice_512[upper_offset:-lower_offset,upper_offset:-lower_offset] = lung_mask_slice nodule_mask_slice_512[upper_offset:-lower_offset,upper_offset:-lower_offset] = nodule_mask_slice

    for i in range(0, len(nodule_mask_slice_512)):              
        for j in range(0, len(nodule_mask_slice_512[i])):
            if nodule_mask_slice_512[i][j]==1:
                print i           # 159 , equals to the pic output (pixel is 1)
                print j           # 232 , equals to the pic output (pixel is 1)
    print image_coord[0] + upper_offset # it should =x, but not.   
    print image_coord[1] + upper_offset # it should =y, but not.  
    print image_coord[2] + upper_offset # z

Image.fromarray(nodule_mask_slice_512*255).convert('L').save("/home/zhangboheng/luna16/luna16/src/data_processing/"+str(counr)+".png")

Image.fromarray(lung_mask_slice_512*255).convert('L').save("/home/zhangboheng/luna16/luna16/src/data_processing/"+str(counr)+"_2.png")

Image.fromarray(lung_slice_512*255).convert('L').save("/home/zhangboheng/luna16/luna16/src/data_processing/"+str(counr)+"_3.png") break ` The pixel 1 in nodule_mask_slice_512 locates(same x,y) in lung_mask_slice_512 and lung_slice_512 which pixel is 0.?????(it should locate in 1)

..............

gzuidhof commented 7 years ago

I am not sure I understand, did you figure it out?

For the DSB competition I created a script to draw the actual annotations of the radiologists as the ground truth, that should be a lot cleaner than above code (and confirmed error free).