After this is rerun cmake (version 3.10) and configured the build with Module_ITKOBBLabelMap=ON.
Clicked Configure, then Generate.
When I opened the solution file in VS2015 the external module is listed as project âITKOBBLabelMap-allâ. I built the project. The build was successful (at least what VS said).
Once I open a file from the module. I got errors because of missing header files for ITK modules. For example in âitkBoundingBoxImageLabelMapFilter.hâ âitkInPlaceLabelMapFilter.hâ could not be found. I checked the project configurations and neither include paths (except from the standard paths are set) nor libs were set/linked.
When I set up an own project with the module the headers are found (CMakeLists.txt and testfile.cxx below). But if I want to build it the same errors are shown as before.
Unfortunately External Module Wikipage does not provide more information.
Maybe the CMakeLists file of the external module is not up-to-date or did i miss a step?
(I am using Windows 10, 64bit, cmake-gui, VS2015)
where ITKOBBLabelMap is the name of the module, and <OtherModule1> <OtherModule2> [...] are the other modules that your code needs. These can be found by running the WhatModulesITK.py script.
I scanned through the proposed additions but I didnt find anything helpful.
After incorporating your change in the CMakeLists.txt the errors still exist.
By running the WhatModulesITK.py script the result was that I need one module since I have only a single include.
interestingly if I use the right-click to open the itkobb-include files using the dropdown menu it works in my test example but not in the ITK-project with the external module.
That is my module I worked on quite a few years ago at this point. Has not been updated much, and the documentation was thin to say the least.
The computations for the Oriented Bounding Box has been integrated in ITK as part of the LabelShapObject computed in the ShapeLabelMapFilter which is utilized by the convenient LabelImageToShapLabelMapFilter. This method has been improved for performance, and accuracy along with now being thoroughly tested with non-trivial oriented images.
The one filter you utilized, OrientedBoundingBoxImageLabelMapFilter, utilizes that above it formation to resample into original image in to oriented smaller images. This has not been incorporated into ITK (yet?). But itâs fairly trivial to just use the ResampleImageFilter.
There is also a SimpleITK note book which demonstrates this usage:
Hello Brad,
thank you for pointing out that the itkOBBImageFilter is already include in the ITK. This helped my immediate problem. The general problem still exist.
I will try to create an external module for my topic. Along the way I can describe what problems I encounter. This might clarify things for me. I will report back.
i wrote a doucmentation about my process for dowloading and building an external module.
I tried two different ways (td;dr):
Src in ITK source tree/Modules/External/MyModule and build in the ITK build tree/Modules/External/MyModule
Build was successful(?) but (itk-)header could not be found.
Src in somewhereElse/MyModule and build in the ITK build tree/Modules/External/MyModule
Build was successful. Test finished fine but the module is not listed in the itk_modules.
If someone is interested in the document (it not so much to read) I would mail it and we could discuss the unclear topics here so that everyone else can participate.
I have no idea what the cause of this is but I would like to have it sorted out.
The ideal approach is for both the MyModule source and build trees to be outside the ITK source and build trees. The ITKModuleTemplate that @jhlegarreta referenced makes this possible.
I have a rather simple question regarding external modules as well. Iâm interested in using the code for Label object representation and manipulation with ITK. However, when I download the source code, place it in ITK/Modules/External and rerun CMake, I donât see any flag to turn on this particular module. Could you please help me with this?