Monday, March 14, 2011

Extracting chromosomes from a complex metaphase

Using the previous code on a real metaphase image, chromosomes can be isolated:
Partial gallery of extracted particles (made with make montage in ImageJ)

 The gray level image:
The labelled image:
The code of the python script to extract particles from an image is modified quick and dirty such:

path='/home/claire/Applications/ImagesTest/JPP60-3/DAPI/'
lab=readmagick.readimg(path+'dapilabel.png')
img=readmagick.readimg(path+'dapi.png')
if __name__ == "__main__":
    Particles=extractParticles(img,lab)
    for i in range(0,len(Particles)):
        file='part'+str(i)+'.png'
        readmagick.writeimg(Particles[i].astype(np.uint16), path+file)    
 

No comments: