Hi GT,
I've looked into it a bit. If this is something you want me to maintain, then SWIG is probably the way to go, as that would also enable python wrapping. Let me know if you want to pursue this direction.
If you are maintain to maintain it yourself, then you have additional choices. I will admit I don't understand the details, but roughly speaking the choices are C++/CLI, P/Invoke, and COM. I can give you a few links to get started for the first two options. (I am assuming you aren't interested in COM.)
https://learn.microsoft.com/en-us/cpp/dotnet/mixed-native-and-managed-assemblies?view=msvc-170
https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke
Greg
From: plast...@googlegroups.com <plast...@googlegroups.com>
On Behalf Of G Tom
Sent: Saturday, October 22, 2022 9:57 AM
To: Plastimatch <plast...@googlegroups.com>
Subject: [Plastimatch] Re: Using plastimatch in c# application
External Email - Use Caution
--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
plastimatch...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/plastimatch/f82dc854-6986-4a94-92b7-329ba1bc07adn%40googlegroups.com.
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline .
Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.
Wow, great. Thank you for getting the ball rolling!
Let me take a crack at it. If you don't hear from me by next week give me a ping. I'll need to read the documentation a bit, it's been over 20 years since I last used SWIG.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/71630148-a693-4538-90ad-b1f87d841402n%40googlegroups.com.
OK, I made some progress.
Give it a try! Probably won't work the first time.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/BL0PR04MB45935965502FAF560836EBCACF3E9%40BL0PR04MB4593.namprd04.prod.outlook.com.
Hi GT,
The error message might be a bit misleading. You need all the dependency DLLs in the path (or same folder): plmutil.dll plmbase.dll, plmsys.dll. Also if you compiled ITK or DCMTK as shared libraries, those DLLs need to be found.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/29533f50-e331-4f7b-b5a4-b55058c7a714n%40googlegroups.com.
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline .
Hi GT,
I need to do a bit more wrapping before you can use it. And also I need to provide C# access to the 3D memory array.
Could you describe (roughly) what kinds of operations you might want? So far I'm assuming you will want to load images, calc gamma, display gamma, change parameters, and save gamma, and should will wrap those parts first.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/d709cc88-156c-4448-9b2d-372a16408fe3n%40googlegroups.com.
Hi GT,
Excellent, thank you for the feedback. The test was successful, we are close.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/1dbc9264-f1c5-41e0-a143-7ba999609d2en%40googlegroups.com.
Hi GT,
Indeed. Voxel-level access is needed for the function to be useful.
There seem to be a few options. (1) Wrap the ITK data structure and access it directly from C#, (2) Copy into an instance of the plastimatch Volume class, (3) Copy into a new C# class.
Are there any popular Medical Imaging applications / frameworks for C#? If so, converting into its API could also be an appealing approach.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/ccf07049-16d0-45b2-bd43-37f6eae66900n%40googlegroups.com.