Is it possible to convert/cast a .NET SimpleITK Image to python SimpleITK Image ?
Has anyone successfully fused .NET c# SimpleITK images to python.
I have the main application in .NET where I use SimpleITK to perform image registration and a few other task , and want to use its results ( SimpleITK Image) as inputs to PyRadiomics which takes in SimpleITK Images but their python type.
I am using Python.NET to bridge between .NET and Python
Thank you , that is the current approach I am using , writing the files to disk on the C# side and reading them in on the python side.
It is becoming a nightmare writing and reading from and disk.
My application receives dicom files from a dicom server , writes them to disk just so I can use SimpleITK, process the files in SimpleITK , write them to disk again, read them again from Python , process them and write again .
I am dying for some way to direct link the data via a memory stream or connection pipeline or casting of sorts if it exists .
Again thank you very much
Grasping at straws here, possibly define a RAM disk?
Setup is specific to your operating system, but using this approach will give you fast read-write while maintaining the standard ITK/SimpleITK code which assumes disk IO.
Not as portable as moving code around, but the same code will work on all machines, just faster on those configured with a RAM disk.