[ITK] [ITK-users] [ITK-dev] Problems with the integration of LASPack package into ITK

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Jul 25 15:44:51 EDT 2014


Hello,

I am not certain but I just was looking around at a few things and found some work related to ITKv4 Numerics Refactors[1] here on github that's a bit out dated:
https://github.com/chuckatkins/ITK/commits/numlibs_refactor

Looks like similar work and my first search reveals this may be of use:
https://github.com/chuckatkins/ITK/commit/2c773edc695cbe7b907bebf356ee14e0af66b01a

Brad

[1] http://www.itk.org/Wiki/ITK_Release_4/Refactor_Numerical_Libraries

On Jul 25, 2014, at 3:32 PM, Fotis Drakopoulos <fdrakopo at gmail.com> wrote:

> Hi ITK developers,
> 
> I am working on the integration of the LASPack package (http://www.netlib.org/linalg/) inside the ITK for solving for solving large sparse systems of linear equations with iterative methods.
> I created a new folder with name laspack under the directory : Modules/ThirdParty/VNL/src/vxl/v3p/netlib/ with the following CMakeList.txt :
> 
> PROJECT( laspack )
> 
> # List sources for each library component.
> SET(V3P_NETLIB_laspack_SOURCES
>     eigenval.c
>     errhandl.c
>     factor.c
>     itersolv.c
>     matrix.c
>     mlsolv.c
>     operats.c
>     precond.c
>     qmatrix.c
>     rtc.c
>     vector.c
>     eigenval.h
>     elcmp.h
>     errhandl.h
>     factor.h
>     itersolv.h
>     lastypes.h
>     matrix.h
>     mlsolv.h
>     operats.h
>     precond.h
>     qmatrix.h
>     rtc.h
>     vector.h
>     version.h
>     copyrght.h
>     xc/getopts.c
>     xc/xstring.c
>     xc/getopts.h
>     xc/version.h
>     xc/xstring.h
>     xc/xtypes.h
>   )
> 
> # Create a library .
> ADD_LIBRARY(itkv3p_laspack ${V3P_NETLIB_laspack_SOURCES})
> IF(UNIX)
>   TARGET_LINK_LIBRARIES( itkv3p_laspack m )
> ENDIF(UNIX)
> IF(ITK_LIBRARY_PROPERTIES)
>   SET_TARGET_PROPERTIES(itkv3p_laspack PROPERTIES ${ITK_LIBRARY_PROPERTIES})
> ENDIF(ITK_LIBRARY_PROPERTIES)
> 
> IF(NOT VXL_INSTALL_NO_LIBRARIES)
>   INSTALL(TARGETS itkv3p_laspack
>     EXPORT ${VXL_INSTALL_EXPORT_NAME}
>     RUNTIME DESTINATION ${VXL_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries
>     LIBRARY DESTINATION ${VXL_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries
>     ARCHIVE DESTINATION ${VXL_INSTALL_ARCHIVE_DIR} COMPONENT Development)
> ENDIF(NOT VXL_INSTALL_NO_LIBRARIES)
> IF(NOT VXL_INSTALL_NO_DEVELOPMENT)
>   INSTALL_NOBASE_HEADER_FILES(${VXL_INSTALL_INCLUDE_DIR} ${V3P_NETLIB_laspack_SOURCES})
> ENDIF(NOT VXL_INSTALL_NO_DEVELOPMENT)
> 
> Also in the CMakeLists.txt located in direcory : Modules/ThirdParty/VNL/src I added the new itkv3p_laspack library as follows: 
> 
> add_subdirectory(vxl)
> foreach(lib itkvcl itkv3p_netlib itkv3p_lsqr itkv3p_laspack itktestlib itkvnl itkvnl_algo)
>   itk_module_target(${lib} NO_INSTALL)
> endforeach()
> 
> When I build ITK I do not get any errors and the libitkv3p_laspack. a  is normally created like all the other ITK libraries.
> However when I compile an external project which links to ITK with TARGET_LINK_LIBRARIES(PROJECT_NAME ${ITK_LIBRARIES}),   I am getting the following link error:
> 
> /home/fdrakopo/local/bin/ITKDev/release/lib/libitkvnl_algo-4.1.a(vnl_sparse_iterative_solver.cxx.o): In function `vnl_sparse_iterative_solver::vnl_sparse_iterative_solver(vnl_sparse_matrix<double> const&)':
> vnl_sparse_iterative_solver.cxx:(.text+0x6a): undefined reference to `Q_SetName(QMatrixType*, char*)'
> collect2: error: ld returned 1 exit status
> make[2]: *** [PAPBNRR] Error 1
> make[1]: *** [CMakeFiles/PAPBNRR.dir/all] Error 2
> make: *** [all] Error 2
>  
> The vnl_sparse_iterative_solver is a new class I created under : Modules/ThirdParty/VNL/src/vxl/core/vnl/algo 
> and encapsulates the implemented calls (functions, etc.) to the LASPack package (similarly to vnl_sparse_lu class that calls Kenneth's Kundert SPARSE package).
> Also the itkvnl_algo inks to itkv3p_laspack :
> TARGET_LINK_LIBRARIES( itkvnl_algo ${NETLIB_LIBRARIES} itkvnl itkv3p_lsqr itkv3p_laspack ) 
> 
> Any ideas how can I solve the above link error?
> 
> Regards,
> Fotis Drakopoulos
> CRTC lab
> 
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140725/b1b7fad5/attachment-0005.html>
-------------- next part --------------
_____________________________________
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://www.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-users


More information about the Community mailing list