[ITK-dev] SimpleITK build failure on Fedora 23

Dmitry Mikhirev mikhirev at gmail.com
Thu Dec 10 14:56:08 EST 2015


Thank you again!

I submitted a bug report for InsigtToolkit package in Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1290564

If maintainer will not disable ITKv3 compatibility, I will use your
patch.

В Mon, 7 Dec 2015 11:06:17 -0500
Bradley Lowekamp <brad at lowekamp.net> пишет:

> Hello,
> 
> I uses SimpleITK’s Superbuild with -DITKV3_COMPATIBILITY:BOOL=ON
> -DITK_LEGACY_REMOVE=OFF, and got the same error.
> 
> The good news is that this is the only error, and when it’s fixed it
> compiles.
> 
> I have two solutions which I tested to suggest:
> 
> First, is modifying SimpleITK so that the
> HistogramMatchingImageFilter is only instantiated with real number
> something like this: diff --git
> a/Code/BasicFilters/json/HistogramMatchingImageFilter.json
> b/Code/BasicFilters/json/HistogramMatchingImageFilter.json index
> a84dc83..89524fe 100644 ---
> a/Code/BasicFilters/json/HistogramMatchingImageFilter.json +++
> b/Code/BasicFilters/json/HistogramMatchingImageFilter.json @@ -5,7
> +5,7 @@ "filter_type" :
> "itk::HistogramMatchingImageFilter<InputImageType, OutputImageType>",
> "number_of_inputs" : 2, "doc" : "",
> -  "pixel_types" : "BasicPixelIDTypeList",
> +  "pixel_types" : "RealPixelIDTypeList",
>    "members" : [
>      {
>        "name" : "NumberOfHistogramLevels",
> @@ -41,6 +41,8 @@
>        "description" : "Simply run with default settings",
>        "settings" : [],
>        "tolerance" : "0.0001",
> +      "inputA_cast" : "sitkFloat32",
> +      "inputB_cast" : "sitkFloat32",
>        "inputs" : [
>          "Input/Ramp-One-Zero-Float.nrrd",
>          "Input/RA-Slice-Float.nrrd"
> @@ -63,6 +65,8 @@
>          }
>        ],
>        "md5hash" : "a963bd6a755b853103a2d195e01a50d3",
> +      "inputA_cast" : "sitkFloat32",
> +      "inputB_cast" : "sitkFloat32",
>        "inputs" : [
>          "Input/RA-Short.nrrd",
>          "Input/RA-Short.nrrd”
> 
> This caused some minor testing problems[1]. And may cause some
> runtime compatibility issues with supported types for the filter with
> releases of SimpleITK.
> 
> 
> The other option is to remove that ITKv3 code block from the
> Histogram class. These legacy methods are problematic and using them
> cause case problems of the wrong method being called.
> 
> With the ITK change and the Superbuild all the tests pass.
> 
> I do have to restate that SimpleITK is not tested with the
> ITKv3_COMPATIBILITY flag. I don’t know if there are other
> implications for difference with the expected ITK configuration for
> building.
> 
> Hope this helps,
> Brad
> 
> 
> [1] https://open.cdash.org/viewTest.php?onlyfailed&buildid=4136189
> 
> 
> > On Dec 7, 2015, at 4:26 AM, Dmitry Mikhirev <mikhirev at gmail.com>
> > wrote:
> > 
> > В Sun, 6 Dec 2015 20:28:07 -0500
> > Bradley Lowekamp <brad at lowekamp.net> пишет:
> > 
> >> Hello Dmitry,
> > 
> > Hello Brad! Thank you for your reply!
> >> 
> >> SimpleITK is not built or tested against ITK with ITKv3
> >> compatibility turned on. And Most projects have this option turned
> >> off, so it’s not as well tested as it used to be. 
> >> 
> >> This problem looks to be solely with ITK. It appears like the error
> >> will happen just with the instantiation of:
> >> 
> >> itk::Statistics::Histogram<long int, DenseGrequencyContainer2….>
> >> 
> >> This issue looks fixable. I don’t know how many other errors will
> >> occur when you get past this one.
> > 
> > Well, most code is already compiled before this error occurs. So I
> > guess there will not me much more. Can you give an advice what
> > changes are needed to fix it?
> >> 
> >> I’d recommend using the SimpleITK Superbuild by point CMake toward
> >> the Superbuild subdirectory on the initial configuration.
> >> 
> >> BTW, what is the reason you are “required” to used the system ITK?
> > 
> > I'm going to build a package for official Fedora repo. That's why I
> > have to link to other libraries shipped by Fedora and not to bundle
> > them. Of course, if the error were unfixable on SimpleITK side, I
> > could send a bug report for InsigtToolkit package and ask
> > maintainer to disable ITKv3 compatibility, but I afraid it can
> > break some other packages.
> >> 
> >> Brad
> >> 
> > 
> > -- 
> > Regards,
> >       Dmitry Mikhirev
> > _______________________________________________
> > Powered by www.kitware.com
> > 
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> > 
> > Kitware offers ITK Training Courses, for more information visit:
> > http://kitware.com/products/protraining.php
> > 
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> > 
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/insight-developers
> 



-- 
Regards,
        Dmitry Mikhirev


More information about the Insight-developers mailing list