CuPy requirement for image proccessing?

I am looking through the image proccessing examples and I get a bunch of errors relating to me not having cupy installed. Even in the examples that arren’t CuPy examples it doesn’t work and I get this output. Is this related to not having CuPy installed?

This output is from the exampleTransform3D file

File “c:\Users\bearl\OneDrive\Documents\GitHub\opentps\opentps_core\opentps\core\examples\imageProcessing\exampleTransform3D.py”, line 230, in
run()
File “c:\Users\bearl\OneDrive\Documents\GitHub\opentps\opentps_core\opentps\core\examples\imageProcessing\exampleTransform3D.py”, line 21, in run
os.makedirs(output_path, ‘exampleTransform3D’)
File “”, line 225, in makedirs
TypeError: ‘str’ object cannot be interpreted as an integer

Dear Ben,

OpenTPS does indeed emit a warning when CuPy is not installed, but no worries—this only matters if you are trying to run it on your GPU. Otherwise, OpenTPS is designed such that you can still run (almost) all of its features without a GPU.

From what I am reading, the issue originates from the line:

os.makedirs(output_path, 'exampleTransform3D')

You could try changing it to:

os.makedirs(output_path)

This should solve your issue.

Please let me know if the issue persists!

Regards,

Eliot

Yes removing that arguement fixed the error. What are the features that are GPU dependant? Also I am currently trying to make a program that can align CT scans with curves over tumors. The CT scans will be from the same person but at different points along treatment. Does OpenTPS have a module already for this alignment?

The GPU features in OpenTPS are used for certain parts of the image processing and registration libraries. Code that requires CuPy—the GPU library we use—is clearly marked as such.

For your program, if I understood correctly, you’re referring to image registration. This is already implemented in OpenTPS, under the registration directory. However, only rigid registration (i.e., without organ deformation) is available without a GPU.

I hope this clarifies things for you!