[Insight-users] ManageITK : Problem with custom filter
Dan Mueller
dan.muel at gmail.com
Tue Jun 7 08:54:09 EDT 2011
Hi Kuleesha,
Thanks for providing the extra information.
I was able to use your files without any major issue. (I did encounter
one minor issue: I needed to add CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
to the CMakeLists.txt file).
Re-reading your email I think I see the issue: external projects are
designed to be build _outside_ of ManagedITK. That is, you first build
ManagedITK, then you build each external project separately (without
needing to rebuild ManagedITK again).
In short, the steps you should follows are this:
1. Create a new folder anywhere on your drive eg. D:\ERProject\ManagedDemoFilter
2. Place your files in this folder: CMakeLists.txt, managed_xxx.cmake,
filter h and txx files
3. Run CMake
4. Point CMake to the source folder, choose a build folder
5. Configure, specify ITK_DIR and ManagedITK_DIR as required
6. Generate
7. Run FinishCMake.bat
8. Open solution and build
Then you simply need to place all ManagedITK dlls (eg
ManagedITK.Common.dll, ManagedITK.Calculators.dll,
ManagedITK.Demo.dll) in the binary folder for your C# executable.
HTH
Cheers, Dan
On 7 June 2011 09:12, KY <kuleesha26 at gmail.com> wrote:
> http://itk-insight-users.2283740.n2.nabble.com/file/n6448385/itkDemoFilter.h
> itkDemoFilter.h
> http://itk-insight-users.2283740.n2.nabble.com/file/n6448385/itkDemoFilter.txx
> itkDemoFilter.txx
> http://itk-insight-users.2283740.n2.nabble.com/file/n6448385/managed_Demo.cmake
> managed_Demo.cmake
> http://itk-insight-users.2283740.n2.nabble.com/file/n6448385/CMakeLists.txt
> CMakeLists.txt
>
> Hi Dan,
>
> As i mentioned before I renamed itkFlipImageFilter to itkDemoFilter just to
> test it initially. I have attached
> the .cmake and cmakelist.txt. I checked in Object Browser
> ManagedITK.Demo.dll shows only itkDemoFilter.
>
> Also, I tried moving the files to
> D:\ERProject\ManagedITK\Source\Modules\Demo and edited the cmakefile
> of the module folder by adding SUBDIRS(Demo). I followed the usual steps to
> build the ManagedITK project.
> Thus i got ManagedITK.Demo.dll which had itkDemoFilter_IUC2. But, when i
> used the created dlls in my application i got this error "Could not load
> file or assembly 'ManagedITK.Calculators.DLL' or one of its dependencies.
> The specified module could not be found".
>
> In fact i got this error with dlls created by downloaded ManagedITK source
> code without adding Demo folder.
>
> Regards,
> Kuleesha
More information about the Insight-users
mailing list