In order to work on my imported MR image, I need to create a Python script in which I need to import as well (separately):
- A txt file with numeric data
- An image that should be handled as an array
Would it be possible to do that in Slicer with Python? I’ve seen that to work with Images, you need to import at least cv2 or Image and they both aren’t available through the execution of “import &”. That leads me to the problem I already reported in a different topic with the importation of “medpy” module (Import medpy fails).
In particular, I’d like to know whether:
- It’d be possible to perform the importation through a button, and add several filters that control the validity of the imported data i.e.: the size of the image
- It’d be possible to convert the image (a JPG image) to an array with the available modules, and without that image being the volume added to Slicer
The reason why that image needs to be imported through the script is that it’s a fixed image (fixed folder and name) and I only want it to extract some coordinates. I don’t need to process it as an image, nor displaying it.
Thank you in advance for any input about this.