DGtal-team / DGtalTools

Tools associated with DGtal Library
http://dgtal.org
GNU Lesser General Public License v3.0
44 stars 38 forks source link

volSurfaceRegularization #437

Open ngophuc opened 2 years ago

ngophuc commented 2 years ago

I got the following errors while compiling volSegment: error: no template named 'not_equal_to' in namespace 'Eigen::numext'; did you mean 'itksys_VA_LIST::not_equal_to'? inline const CwiseBinaryOp<numext::not_equal_to, const Derived, const OtherDerived> ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__functional/operations.h:436:29: note: 'itksys_VA_LIST::not_equal_to' declared here struct _LIBCPP_TEMPLATE_VIS not_equal_to error: no member named 'get_fixed_value' in namespace 'Eigen::internal' typename FixedBlockXpr<internal::get_fixed_value::value,internal::get_fixed_value::value>::Type


error: 'NRowsType' does not refer to a value
typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
error: expected member name or ';' after declaration specifiers
typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
dcoeurjo commented 2 years ago

Hi @ngophuc, thx for the bug report.

Just to clarify: is it related to volSegment or volSurfaceRegulariation ?

The issue seems to be related to Eigen, which version of eigen are you using ?

dcoeurjo commented 2 years ago

ping @ngophuc ?

kerautret commented 1 year ago

@ngophuc always present ? or can we close it?

kerautret commented 11 months ago

@dcoeurjo I just have the same issue than @ngophuc for me it is in volSurfaceRegularization only

dcoeurjo commented 11 months ago

Well... it is not really related to the regularization tool. Maybe a side effect with the ITK internal eigen version. Maybe more an itk bug than a DGtal one

kerautret commented 11 months ago

I see, I confirm that only appears when ITK is activated in DGtal. Looks complicated to solve perhaps by forcing to use the DGtal eigen version instead the one ITK but sure if cmake can do it.

dcoeurjo commented 11 months ago

When including ITk, is there a way to disable its internal eigen version ?

kerautret commented 11 months ago

I remember some option in cmake process configuration with some use "system eigen" but not sure that will avoid the issue.

kerautret commented 11 months ago

When including ITk, is there a way to disable its internal eigen version ?

Potentially "ITK_USE_SYSTEM_EIGEN"
However I not sure that it is related because for me, it well mention the eigen version of the local fetched eigen version (perhaps boost related in fact). Else people from kitware suggest me to use superbuild using the ExternalProject_Add cmake command to avoid conflicting dependancies. It could be interesting to test it (https://cmake.org/cmake/help/latest/module/ExternalProject.html)

kerautret commented 10 months ago

looks very strange, I tested other tools with itk activated and it produce also some. eigen related errors but it come well with the same version of eigen, so it looks like that ITK activation make eigen compilation issue. Perhaps @phcerdan have you an idea of such potential issue (here are another example of issue:) (the version of eigen is well the fetch by DGtal I verified it) DGtalTools-contrib/build/_deps/eigen-src/Eigen/src/SparseCore/../plugins/MatrixCwiseBinaryOps.h:42:28: error: no template named 'equal_to' in namespace 'Eigen::numext'; did you mean 'boost_swap_impl::equal_to'? inline const CwiseBinaryOp<numext::equal_to<Scalar>, const Derived, const OtherDerived>

phcerdan commented 10 months ago

I cannot reproduce it. I build DGtal with default options, build DGtalTools (default options) pointing to it: OK I build DGtal with ITK (ITK from a local build), build DGtalTools (default options) pointing to it: OK.

Do I have to add any extra option to DGtalTools?

phcerdan commented 10 months ago

Not sure from that cryptic error, but seems you are maybe missing linking to the target Eigen3::Eigen?

kerautret commented 10 months ago

many thanks @phcerdan for the tests. I obtain it by defining a new tools based on polyscope viewer which is on my branch here: https://github.com/kerautret/DGtalTools-contrib/tree/polyMeshEdit

phcerdan commented 10 months ago

I cannot reproduce it either. I had to fix a missing include for the polyscope project (from FetchContent), but polyscope compiles all right, and DGtalTools-contrib with main and your polyMeshEdit branch compiles good here.

It would be awesome to know what's going on.

My ITK settings are default, with ITK_USE_SYSTEM_EIGEN:BOOL=OFF

kerautret commented 10 months ago

Thanks again! perhaps it is something wrong installed on my system. I will try to remove ITK and retest again in particular with the ITK_USE_SYSTEM_EIGEN perhaps.

kerautret commented 10 months ago

which version of ITK did you have ?

phcerdan commented 10 months ago

which version of ITK did you have ?

I tested it with a recent master I had installed: sha a661e0e7

phcerdan commented 10 months ago

I have been thinking about this. Not sure what generates that error that you see. Do you have any eigen library installed in your system (/usr/include?)

If a fresh build of ITK, DGtal and DGtalTools-contrib doesn't solve, we can investigate a bit more. Let me know!