SimpleITK/GettingStarted/A visual guide to SimpleITK with CSharp: Difference between revisions
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{SimpleITKMigrationHeader}} | |||
[[Image: Simpleitk_logo.png|center]] | |||
In this guide we will show how to setup a C# project in Microsoft Visual Studio 2012 which uses the available built binaries for SimpleITK. The same steps and options are needed for the other versions of Visual Studio. | In this guide we will show how to setup a C# project in Microsoft Visual Studio 2012 which uses the available built binaries for SimpleITK. The same steps and options are needed for the other versions of Visual Studio. | ||
Latest revision as of 18:18, 13 December 2019
NOTICE |
This page is being migrated to Read The Docs!
For the up to date version please see this page! |
In this guide we will show how to setup a C# project in Microsoft Visual Studio 2012 which uses the available built binaries for SimpleITK. The same steps and options are needed for the other versions of Visual Studio.
Download
Binary downloads are readily available for C# for Microsoft Visual Studio. They are available on SourceForge.
C# for SimpleITK has two components: Native and Managed. The native code contains the SimpleITK C++ library and is compiled for the particular architecture. There is the "win32" for the Intel x86 32-bit architecture, and the "win64" for the Intel x64 architecture. The correct architecture needs to be chosen.
Inside you will find two "dll" files: "SimpleITKCSharpManaged.dll" and "SimpleITKCSharpNative.dll", as well as some documentation files. |
Adding C# SimpleITK to a Project
We will start off with a new C# console solution.
|
Select Architecture
The SimpleITK binary only supports a single architecture platform. Your project should be configured to match that same platform. By default, in the Toolbar "Debug" is selected for the Solution Configuration and "Any CPU" is selected for the Solution Platform, this needs to be changed. | |
|
Add Managed Library
|
Add Native Library
| |
|
Building an Example
If all the steps were followed correctly you should now have an executable which can be run from the command line or from within Visual Studio with the appropriate arguments provided. |