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