Hi all,
Sorry to bother you with my question. I’m new to Slicer and I’m trying to write a scripted python module. I’m trying to recognize MRI images by a deep-learning model. I have already loaded my model and I’m now trying to load my image to my module. My image is a single image in jpg format. I tried this:
name=slicer.mrmlScene.GetNodeByID(imagename)
img=cv2.imread(name)
x = cv2.resize((img), (224, 224), interpolation=cv2.INTER_CUBIC) / 255.0
it didn’t work, I don’t think it read the image.What is the correct way of implementing this?(by the way, I have already installed cv2)