1

I git clone SimpleElastix [1] project from https://github.com/kaspermarstal/SimpleElastix, and built and compiled it successfully on my PC. The WRAP_CSHARP option was set in CMAKE. I would like to use this project as a reference/framework to implement a new medical image registration GUI with C#. However, I didn't find any .dll file in the compiled SimpleElastix solution. I have also tried to create a new C# project from the existing SimpleElastix project via Visual Studio, the new solution cannot be built successfully. Does anybody knows where to find th .dll file of SimpleElatix? Or how to use SimpleElastix as reference/framework in a new C# Project?

[1] SimpleElastix is a project based on ITK and SimpleITK for medical image registration, which is compatible with python, C#, Java etc. Here is the documentation http://simpleelastix.readthedocs.io/

best, Siming

blowekamp
  • 1,401
  • 7
  • 7
Siming
  • 11
  • 1

2 Answers2

0

SimpleElastix is derived from the SimpleITK project[1]. From SimpleITK's wiki[2], you can find more information about how to use SimpleITK in various configurations and languages. There is even a "Visual Guide to SimpleITK with CSharp"[3].

The instructions in short say to add the manage library to the project "SimpleITKCSharpManaged.dll" in the ReferenceManager. Then add the native library, "SimpleITKCSharpNative.dll", as an exist item with the "Add As Link" option with a build option of "Copy always". If you do this with the SimpleElastix libraries it should work.

Here is a related question as to where to find more information about SimpleITK Where can I find the SimpleITK documentation and reference information?

[1] http://www.simpleitk.org//

[2] https://itk.org/Wiki/SimpleITK

[3] https://itk.org/Wiki/SimpleITK/GettingStarted/A_visual_guide_to_SimpleITK_with_CSharp

Community
  • 1
  • 1
blowekamp
  • 1,401
  • 7
  • 7
  • Thanks for your useful information!! I will definitively read the instruction and documents about SimpleITK more carefully again. However my problem was, that I even did´t find any .dll files in the compiled SimpleElastix solution. There are simply no "SimpleITKCSharpManaged.dll", "SimpleITKCSharpNative.dll" or any other .dll libraries. So do you know if there are any .dll files in the compiled SimpleElastix solution? Or even where to find it? – Siming Dec 05 '16 at 10:22
0

You can find the 2 required DLLs in the folder SimpleITK-build\Wrapping\CSharp\CSharpBinaries, relative to the directory that you specified as the build output. The folder should contain

  • SimpleITKCSharpNative.dll (a huge DLL)
  • SimpleITKCSharpManaged.dll (a small one - that's the actual C# wrapper)

With those two DLLs, proceed as described in the answer by blowekamp

Anton Schwaighofer
  • 3,119
  • 11
  • 24