jsrt-parser icon indicating copy to clipboard operation
jsrt-parser copied to clipboard

size error

Open bpgs5316 opened this issue 3 years ago • 0 comments

First of all Thanks for your help, I could manage JSRT dataSet.

I try to crop the image by using yours but there is a problem (I put all image into the All247images folder and CSV file into the Clinical_Information folder )

when i try your sample code below,

jsrtdata = Jsrt().load_images("./All247images/")
nodule_images = jsrtdata.get_images(num_of_images=1, has_nodule=True)

# crop out from image a picture of size 1200 at location 0,0 as center.
image = nodule_images[0].crop(1200, 0, 0)     

plt.imshow(image, cmap=plt.get_cmap('gray'))
plt.show()

I got an error like below → ValueError: cannot reshape array of size 851869 into shape (2048,2048)

The image that I have is also 2048*2048 size Is there anything that I missed?

bpgs5316 avatar Apr 13 '21 05:04 bpgs5316