<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">We also ran an experiment where we moved the ITK Dependency from just the plugin down into one of our lower level libraries. So now we have the plugin dependent on a lower level library which then is dependent on the ITK Libraries. Now the code seems to execute and produce results. This was on OS X 10.9 and 10.10. So it seems that there is some odd issue with loading the ITK libraries through a plugin mechanism? Does ITK need the “-fPIC” added to the list of compile commands?<div class=""><br class=""></div><div class="">Qt is actually built WITHOUT C++11 support but still links against libc++. They (the Qt Devs) set the OS X Min Deployment Version to 10.7. I have no idea what that triggers or not.<br class=""><div class=""><br class=""></div><div class="">Thoughts?<br class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">--</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Mike Jackson [<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>]<br class=""><br class=""></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Oct 28, 2015, at 10:40 AM, Michael Jackson <<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">So we built on an OS X 10.8.5 machine and now the code works completely and gives the correct output. On the 10.8.5 machine all the libraries are linked against “libstdc++” EXCEPT Qt. Where-as on OS X 10.9 and 10.10 they are all linked against libc++. So I am thinking, at least for ITK 4.7.2 we have stumbled upon an issue with the C++ library? We are now recompiling ITK using the USE_COMPIILER_HIDDEN_VISIBILITY=OFF as you have suggested and will report back those findings. <br class="">--<br class="">Mike Jackson [<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>]<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Oct 28, 2015, at 9:21 AM, Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov" class="">blowekamp@mail.nih.gov</a>> wrote:<br class=""><br class="">I believe if Qt used libstdc++ then it would show up on that list. I'd run an otool -L on one of those libraries to double check.<br class=""><br class="">I'd try to build against OSX 10.8 or on a 10.8 system, just to rule out C++ library compatibility issues. I have had very odd things happen when these don't match.<br class=""><br class="">The other issue I have seen some time is run-time information problems when ITK classes are instantiated in different libraries and shared between them. Things like dynamic_cast can fail, along with specific exception types not being caught. We have recently improved the export specification in ITK, and you should upgrade. This may be a larger architectural problem, and techniques like explicit instantiation of object which can be shared can help. <br class=""><br class="">*shameless plug* You could also look into using SimpleITK, which provides a clean interface. It does this by provided a full export specified interface free from templates, and explicitly instantiating many parts of ITK. The SimpleITK object could be the objects that are shared between libraries.<br class=""><br class="">You could try compiling ITK with USE_COMPIILER_HIDDEN_VISIBILITY OFF this will disable the harsh hidden visibility and may help problematic symbols be shared.<br class=""><br class="">HTH,<br class="">Brad<br class=""><br class=""><br class=""><br class=""><br class="">On Oct 28, 2015, at 8:31 AM, Michael Jackson <<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">Yes, All dependent libraries are shared.<br class=""><br class="">otool -L for one of our plugins:<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>@rpath/libDREAM3DWidgetsLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKReview-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKLabelMap-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKQuadEdgeMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBiasCorrection-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPolynomials-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBioCell-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKFEM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOXML-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBioRad-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGDCM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmMSFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkopenjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOMeta-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONIFTI-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKniftiio-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONRRD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKNrrdIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSiemens-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOStimulate-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformHDF5-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_cpp_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformInsightLegacy-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformMatlab-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKKLMRegionGrowing-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>@rpath/libQtSupportLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>@rpath/libSIMPLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbb_debug.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbbmalloc_debug.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.4.0, current version 5.4.2)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.2)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>@rpath/libH5Support_debug.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.4.0, current version 5.4.2)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.4.0, current version 5.4.2)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBMP-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOJPEG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOPNG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkpng-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTIFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitktiff-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKWatersheds-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPath-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKOptimizers-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDICT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmIOD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKEXPAT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDSED-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMetaIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKznz-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkzlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGE-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKStatistics-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkNetlibSlatec-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOImageBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkdouble-conversion-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitksys-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVNLInstantiation-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl_algo-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_lsqr-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvcl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_netlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)<br class=""><br class="">We are using Qt 5.4.2 for our GUI. Looks like libc++. How do I change this? We use the precompiled Qt 5.4 binaries from qtproject.io and I am not sure if they use libstdC++ or libc++. We compile everything else: HDF5, Boost, Qwt, ITK, Eigen and TBB.<br class=""><br class="">The “.lock()” is for a boost::weak_ptr variable that stores one of our own malloc’ed arrays. No threading (at this level).<br class=""><br class="">--<br class="">Mike Jackson [<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>]<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Oct 28, 2015, at 8:21 AM, Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov" class="">blowekamp@mail.nih.gov</a>> wrote:<br class=""><br class="">Hello,<br class=""><br class="">There could also be some symbol resolution issues/ conflicts. Are you using shared libraries? What is the output of otool -L? What GUI library are you using? What C++ library (libc++ vs libstdc++)? Are you consistently using the same c++ library? If you set the CMAKE_OSX_DEPLOYMENT_TARGET to 10.8 you can easily use libstdc++ by default.<br class=""><br class="">I see a use of a "lock" in your code. What do you have going on with threads?<br class=""><br class="">HTH,<br class="">Brad<br class=""><br class="">On Oct 28, 2015, at 7:57 AM, Michael Jackson <<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">Nope. It does not help. I’m going to add some more information and see where that takes the discussion. We are trying to integrate ITK into our project DREAM.3D (<a href="http://github.com/dream3d" class="">github.com/dream3d</a>) which uses a plugin system to load user developed data analysis filters. The failure mode we are seeing is when 2 filters, in different plugins, use the same ITK code. The DREAM.3D plugin that contains the DREAM.3D Filter that gets loaded first will run through without issues. The second DREAM.3D Plugin that contains the second DREAM.3D Filter will fail with the exception message. The ITK code is exactly the same except for the name of the c++ class that holds the code. We have replicated this on OS X 10.9 and 10.10. We can NOT replicate the issue on Windows (VS2013) or Linux (Clang 3.6). We have it down to a fairly simple DREAM.3D test case but not an ITK test case. After moving some codes around and moving some of our looping code inside the “try-catch” block we finally started seeing the exception messages. I am hoping we are just using ITK incorrectly and OS X is just exposing the incorrect use. The weird part is that we get the correct results on the other systems so it is not like the other platforms have a silent failure.<br class=""><br class="">Thanks for any help.<br class="">--<br class="">Mike Jackson [<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>]<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Oct 27, 2015, at 6:22 PM, Matt McCormick <<a href="mailto:matt.mccormick@kitware.com" class="">matt.mccormick@kitware.com</a>> wrote:<br class=""><br class="">Hi Mike,<br class=""><br class="">Does calling<br class=""><br class="">UpdateLargestPossibleRegion()<br class=""><br class="">instead of<br class=""><br class="">Update()<br class=""><br class="">help?<br class=""><br class="">Matt<br class=""><br class="">On Tue, Oct 27, 2015 at 5:59 PM, Michael Jackson<br class=""><<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>> wrote:<br class=""><blockquote type="cite" class="">I have been struggling with this error all afternoon and I just can not “see” what I am doing wrong. I am getting the following exception message from our program:<br class=""><br class="">Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature 9. Error Message returned from ITK:<br class="">itk::ERROR: MultiThreader(0x7fb53486e200): Exception occurred during SingleMethodExecute<br class="">/Users/Shared/DREAM3D_SDK/InsightToolkit-4.7.2/Modules/Core/Common/include/itkImageConstIterator.h:211:<br class="">itk::ERROR: Region ImageRegion (0x12e6f6730)<br class="">Dimension: 3<br class="">Index: [0, 0, 0]<br class="">Size: [64, 64, 4]<br class="">is outside of buffered region ImageRegion (0x7fb53c0a8040)<br class="">Dimension: 3<br class="">Index: [0, 0, 0]<br class="">Size: [0, 0, 0]<br class=""><br class="">So what are the reasons that this can happen? Basically we creating an unsigned char image where we fill in the pixels, then run the Itk filter on each unsigned char image. Finally we want to copy the final output data into one of our own arrays. I will post the code under here. Any help is greatly appreciated.<br class=""><br class="">size_t iDims[3] = { 0, 0, 0 };<br class="">float origin[3] = { 0.0f, 0.0f, 0.0f };<br class="">float resolution[3] = { 0.0f, 0.0f, 0.0f };<br class=""><br class="">image->getDimensions(iDims);<br class="">image->getOrigin(origin);<br class="">image->getResolution(resolution);<br class=""><br class="">int32_t numFeatures = m_SignedDistanceFields.size();<br class=""><br class="">typedef itk::Image<unsigned char, 3> BoolImageType;<br class="">typedef itk::Image<float, 3> FloatImageType;<br class="">std::vector<BoolImageType::Pointer> booleanFeatureImages(numFeatures);<br class="">BoolImageType::IndexType start;<br class="">BoolImageType::SizeType size;<br class="">BoolImageType::RegionType region;<br class=""><br class="">start.Fill(0);<br class=""><br class="">size[0] = iDims[0];<br class="">size[1] = iDims[1];<br class="">size[2] = iDims[2];<br class=""><br class="">region.SetIndex(start);<br class="">region.SetSize(size);<br class=""><br class="">for (int32_t i = 0; i < numFeatures; i++)<br class="">{<br class=""> BoolImageType::Pointer tmpBoolImage = BoolImageType::New();<br class=""> tmpBoolImage->SetRegions(region);<br class=""> tmpBoolImage->Allocate();<br class=""> tmpBoolImage->SetOrigin(origin);<br class=""> tmpBoolImage->SetSpacing(resolution);<br class=""> tmpBoolImage->FillBuffer(0);<br class=""> booleanFeatureImages[i] = tmpBoolImage;<br class="">}<br class=""><br class="">size_t zStride = 0;<br class="">size_t yStride = 0;<br class="">size_t index = 0;<br class=""><br class="">for (size_t z = 0; z < iDims[2]; z++)<br class="">{<br class=""> zStride = z * iDims[1] * iDims[2];<br class=""> for (size_t y = 0; y < iDims[1]; y++)<br class=""> {<br class=""> yStride = y * iDims[0];<br class=""> for (size_t x = 0; x < iDims[0]; x++)<br class=""> {<br class=""> index = zStride + yStride + x;<br class=""> BoolImageType::IndexType pixelIndex;<br class=""> pixelIndex[0] = x;<br class=""> pixelIndex[1] = y;<br class=""> pixelIndex[2] = z;<br class=""> if (x == y && y == z) { booleanFeatureImages[0]->SetPixel(pixelIndex, 255); }<br class=""> booleanFeatureImages[m_FeatureIds[index]]->SetPixel(pixelIndex, 255);<br class=""> }<br class=""> }<br class="">}<br class="">// Compute signed distance field for each Feature<br class="">typedef itk::SignedMaurerDistanceMapImageFilter<BoolImageType, FloatImageType> SignedMaurerFilter;<br class=""><br class="">for (int32_t i = 0; i < numFeatures; i++)<br class="">{<br class=""> if (getCancel() == true) { return; }<br class=""> SignedMaurerFilter::Pointer signedDistMap = SignedMaurerFilter::New();<br class=""> float* tmpDistField = m_SignedDistanceFields[i].lock()->getPointer(0);<br class=""> signedDistMap->SetInsideIsPositive(false);<br class=""> signedDistMap->SetSquaredDistance(true);<br class=""> signedDistMap->SetUseImageSpacing(true);<br class=""> signedDistMap->SetInput(booleanFeatureImages[i]);<br class=""> try<br class=""> {<br class=""> signedDistMap->Update();<br class=""><br class=""> for (size_t z = 0; z < iDims[2]; z++)<br class=""> {<br class=""> zStride = z * iDims[1] * iDims[2];<br class=""> for (size_t y = 0; y < iDims[1]; y++)<br class=""> {<br class=""> yStride = y * iDims[0];<br class=""> for (size_t x = 0; x < iDims[0]; x++)<br class=""> {<br class=""> index = zStride + yStride + x;<br class=""> BoolImageType::IndexType pixelIndex;<br class=""> pixelIndex[0] = x;<br class=""> pixelIndex[1] = y;<br class=""> pixelIndex[2] = z;<br class=""> FloatImageType::Pointer out = signedDistMap->GetOutput();<br class=""> out->SetBufferedRegion(region);<br class=""> tmpDistField[index] = out->GetPixel(pixelIndex);<br class=""> }<br class=""> }<br class=""> }<br class=""> }<br class=""> catch (itk::ExceptionObject& err)<br class=""> {<br class=""> setErrorCondition(-5);<br class=""> QString ss = QObject::tr("Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature %1. Error Message returned from ITK:\n %2").arg(i).arg(err.GetDescription());<br class=""> notifyErrorMessage(getHumanLabel(), ss, getErrorCondition());<br class=""> }<br class="">}<br class="">--<br class="">Mike Jackson<br class="">BlueQuartz Software, LLC<br class="">[e]: <a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a><br class=""><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://www.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-users<br class=""></blockquote></blockquote><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://www.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-users<br class="">_______________________________________________<br class="">Community mailing list<br class="">Community@itk.org<br class="">http://public.kitware.com/mailman/listinfo/community<br class=""></blockquote><br class=""></blockquote><br class=""></blockquote><br class=""></blockquote><br class=""></div></blockquote></div><br class=""></div></div></body></html>