1

I am trying to install NrrdIO on Ubuntu 18.04, to run Marching Cubes to segment medical images. This is the link from which I'm trying to run it.

http://web.cse.ohio-state.edu/research/graphics/isotable/

I'm trying to install ijkmcube-v0-3-3.tar, which requires the ITKNrrdIO.a library. I'm running into this error:

[  7%] Linking CXX executable ijkmcube
/usr/bin/ld: cannot find -lNrrdIO
collect2: error: ld returned 1 exit status
CMakeFiles/ijkmcube.dir/build.make:406: recipe for target 'ijkmcube' failed
make[2]: *** [ijkmcube] Error 1
CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/ijkmcube.dir/all' failed
make[1]: *** [CMakeFiles/ijkmcube.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

I've installed NrrdIO 1.11.0, and tried with NrrdIO 1.9.0 as well, but while running make I always run into this error, for some reason its not able to find lNrrdIO . Can someone please help? Thanks

Edit:

I think its a problem with the linking, but when I copied the NrrdIO file to /usr/bin and modified the symbolic link, I got an error as follows:

[  7%] Linking CXX executable ijkmcube
collect2: fatal error: cannot find 'ld'
compilation terminated.
CMakeFiles/ijkmcube.dir/build.make:406: recipe for target 'ijkmcube' 
failed
make[2]: *** [ijkmcube] Error 1
CMakeFiles/Makefile2:131: recipe for target ' 
CMakeFiles/ijkmcube.dir/all' failed
make[1]: *** [CMakeFiles/ijkmcube.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Can someone help? Thank you

5
  • I read the linked page and I can't determine the installation procedure. I can recommend you to contact package developer (see page footer or search for e-mail in sources) directly to get complete up-to-date instruction. Also note that libteem-dev exists in Ubuntu repositories and contains nrrd.h, but NrrdIO looks different.
    – N0rbert
    Mar 1, 2019 at 10:21
  • I was doing it in the order which is listed, and if any dependencies are required, installing them as well. But I ran into this roadblock and have been stuck ever since. Yes you are right, NrrdIO is different
    – Jihadi
    Mar 1, 2019 at 10:24
  • How exaclty did you install NrrdIO 1.11.0? the linked archive appears to contain some source files plus a CMakeLists.txt and a skeleton GNU Makefile, neither of which appear to install a library anywhere - did you copy the resulting library manually to a suitable system location? Mar 1, 2019 at 10:54
  • I installed NrrdIO the standard way using CMake, but I didn't change the location, I'll check and get back to you
    – Jihadi
    Mar 2, 2019 at 5:44
  • When I installed NrrdIO the standard way using CMake it was saying that there is no rule to install anything when i ran 'make install' . I tried running it with the Makefile of NrrdIO 1.9.0, and it seemed to compile, but didn't solve the issue. I guess there must be a problem with CMakeLists, as MakeFile is being generated using ccmake.
    – Jihadi
    Mar 2, 2019 at 6:24

1 Answer 1

0

The problem was finally resolved, with the help of Dr. Wenger from the Ohio State University, he suggested making 2 modifications to the CMakeLists of NrrdIO version 1.11.0, by setting the QNANHABIT value to 1 and uncommenting the line ADD_DEFINITIONS(-DTEEM_ZLIB=1) I've attached the modified CMakeLists file for reference:

# NrrdIO: stand-alone code for basic nrrd functionality
# Copyright (C) 2011, 2010, 2009  University of Chicago
# Copyright (C) 2008, 2007, 2006, 2005  Gordon Kindlmann
# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998  University of Utah
#
# This software is provided 'as-is', without any express or implied
# warranty.  In no event will the authors be held liable for any
# damages arising from the use of this software.
# 
# Permission is granted to anyone to use this software for any
# purpose, including commercial applications, and to alter it and
# redistribute it freely, subject to the following restrictions:
# 
# 1. The origin of this software must not be misrepresented; you must
#    not claim that you wrote the original software. If you use this
#    software in a product, an acknowledgment in the product
#    documentation would be appreciated but is not required.
#
#   2. Altered source versions must be plainly marked as such, and must
#    not be misrepresented as being the original software.
# 
# 3. This notice may not be removed or altered from any source distribution.
#    

CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
PROJECT(NrrdIO)
INCLUDE_REGULAR_EXPRESSION("^.*.h$")    

#
# This CMake file configures the NrrdIO library build.  NrrdIO
# is used by Insight/Code/IO/itkNrrdIO for reading/writing 
# "Nearly Raw Raster Data" within the open-source Teem software 
# package. See http://teem.sourceforge.net for more information.
#    

SET(nrrdio_SRCS comment.c enumsNrrd.c mop.c string.c 754.c defaultsNrrd.c
parseAir.c dio.c format.c parseNrrd.c formatEPS.c encoding.c
formatNRRD.c encodingAscii.c formatPNG.c encodingBzip2.c
formatPNM.c accessors.c encodingGzip.c formatText.c 
array.c encodingHex.c formatVTK.c read.c arraysNrrd.c encodingRaw.c 
gzio.c reorder.c write.c axis.c endianAir.c  keyvalue.c
biffbiff.c biffmsg.c endianNrrd.c methodsNrrd.c  sane.c enum.c
miscAir.c simple.c )    

# Turn on TEEM_BUILD so that the proper dll export def's are 
# used on windows builds.
ADD_DEFINITIONS(-DTEEM_BUILD=1)    

#The QNANHIBIT variable is configured by the root level CMakeLists.txt
IF(QNANHIBIT)
  ADD_DEFINITIONS(-DTEEM_QNANHIBIT=1)
ELSE(QNANHIBIT)
  ADD_DEFINITIONS(-DTEEM_QNANHIBIT=1)
ENDIF(QNANHIBIT)    

#DirectIO is the fast way to do multi-gigabyte I/O and currently only available
#for SGI platforms.  Use of DirectIO is enabled manually for now.
#OPTION(USE_DIRECTIO "Use DirectIO for Nrrd file IO.  Only valid on SGI systems." 0)
#MARK_AS_ADVANCED(USE_DIRECTIO)
#IF(USE_DIRECTIO)
#  ADD_DEFINITIONS(-DTEEM_DIO=1)
#ELSE(USE_DIRECTIO)
  ADD_DEFINITIONS(-DTEEM_DIO=0)
#ENDIF(USE_DIRECTIO)    

# Possibly turn on usage of zlib compression (requires linking with libz)
# (i.e., programs compiled with ITKNrrdIO must also be compiled with zlib)
ADD_DEFINITIONS(-DTEEM_ZLIB=1)    

ADD_LIBRARY(NrrdIO ${nrrdio_SRCS} )    

## These are ITK-specific
#TARGET_LINK_LIBRARIES(NrrdIO ${ITK_ZLIB_LIBRARIES} )
#INSTALL_TARGETS(/lib/InsightToolkit ITKNrrdIO)
#INSTALL_FILES(/include/InsightToolkit/Utilities/NrrdIO "(\\.h)$")    

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .