can't run CLI modules from command line if they link to vtk

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

can't run CLI modules from command line if they link to vtk

Lauren O'Donnell
Hi everyone,

I am trying to automate some preprocessing steps potentially with
iPython.  But the command line module that I want to use does not run
from the command line. On my machine all CLIs that link to vtk have
dynamic library loading errors from the command line. However, those I
tested that only link to ITK (such as OtsuThreshold modules and
RigidRegistration) do not give errors. It seems the LD_LIBRARY_PATH
(DYLD_LIBRARY_PATH on Mac) is not set right somehow...  However
setting it in the shell does not fix the problem, it seems to be
ignored.  Any ideas about what is going on??

I am running Mac OS X 10.5.8 and the slicer head version as of right
now, compiled with getbuildtest.  Slicer3 runs fine and the VTK
libraries are located in Slicer3-lib/VTK-build/bin/  with the ITK ones
in Slicer3-lib/Insight-build/bin/. The CLIs work fine within Slicer3,
just not from the command line.

Here are examples of the errors I get:

brage:~ odonnell$
Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/PolyDataToLabelmap
dyld: Library not loaded: libvtkIO.5.4.dylib
  Referenced from:
/Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/PolyDataToLabelmap
  Reason: image not found
Trace/BPT trap
brage:~ odonnell$
Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/MultipleModelsExample
dyld: Library not loaded: libvtkImaging.5.4.dylib
  Referenced from:
/Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/MultipleModelsExample
  Reason: image not found
Trace/BPT trap
brage:~ odonnell$
Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/ModelMaker
dyld: Library not loaded: libvtkImaging.5.4.dylib
  Referenced from:
/Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/ModelMaker
  Reason: image not found
Trace/BPT trap
brage:~ odonnell$
Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/GrayscaleModelMaker
dyld: Library not loaded: libvtkImaging.5.4.dylib
  Referenced from:
/Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/GrayscaleModelMaker
  Reason: image not found
Trace/BPT trap
brage:~ odonnell$
Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/Seeding
dyld: Library not loaded: libvtkIO.5.4.dylib
  Referenced from:
/Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/Seeding
  Reason: image not found
Trace/BPT trap
brage:~ odonnell$
Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/DiffusionTensorEstimation
dyld: Library not loaded: libvtkzlib.5.4.dylib
  Referenced from:
/Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/DiffusionTensorEstimation
  Reason: image not found



Here's one that works that only uses ITK
brage:~ odonnell$
Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/OtsuThresholdSegmentation
PARSE ERROR:
             One or more required arguments missing!

Brief USAGE:
   Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/OtsuThresholdSeg
                                        mentation
                                        [--processinformationaddress
                                        <std::string>] [--xml] [--echo]
                                        [--minimumObjectSize <int>]
                                        [--faceConnected] [--numberOfBins
                                        <int>] [--brightObjects] [--]
                                        [--version] [-h] <std::string>
                                        <std::string>

For complete USAGE and HELP type:
   Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/OtsuThresholdSegmentation
--help



Thanks!
Lauren
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: can't run CLI modules from command line if they link to vtk

Andrey Fedorov
Hi Lauren,

This should work: Slicer3 --launch <module name>. The paths are set by Slicer3.

If you really want to run the module directly, you can try "source
Slicer3-build/bin/Slicer3SetupPaths.sh" to set the paths prior to
executing the CLI. This is useful if you want to run the debugger for
the CLI. But usually you would use "--launch".

AF



On Wed, Dec 9, 2009 at 17:05, Lauren O'Donnell <[hidden email]> wrote:

> Hi everyone,
>
> I am trying to automate some preprocessing steps potentially with
> iPython.  But the command line module that I want to use does not run
> from the command line. On my machine all CLIs that link to vtk have
> dynamic library loading errors from the command line. However, those I
> tested that only link to ITK (such as OtsuThreshold modules and
> RigidRegistration) do not give errors. It seems the LD_LIBRARY_PATH
> (DYLD_LIBRARY_PATH on Mac) is not set right somehow...  However
> setting it in the shell does not fix the problem, it seems to be
> ignored.  Any ideas about what is going on??
>
> I am running Mac OS X 10.5.8 and the slicer head version as of right
> now, compiled with getbuildtest.  Slicer3 runs fine and the VTK
> libraries are located in Slicer3-lib/VTK-build/bin/  with the ITK ones
> in Slicer3-lib/Insight-build/bin/. The CLIs work fine within Slicer3,
> just not from the command line.
>
> Here are examples of the errors I get:
>
> brage:~ odonnell$
> Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/PolyDataToLabelmap
> dyld: Library not loaded: libvtkIO.5.4.dylib
>  Referenced from:
> /Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/PolyDataToLabelmap
>  Reason: image not found
> Trace/BPT trap
> brage:~ odonnell$
> Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/MultipleModelsExample
> dyld: Library not loaded: libvtkImaging.5.4.dylib
>  Referenced from:
> /Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/MultipleModelsExample
>  Reason: image not found
> Trace/BPT trap
> brage:~ odonnell$
> Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/ModelMaker
> dyld: Library not loaded: libvtkImaging.5.4.dylib
>  Referenced from:
> /Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/ModelMaker
>  Reason: image not found
> Trace/BPT trap
> brage:~ odonnell$
> Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/GrayscaleModelMaker
> dyld: Library not loaded: libvtkImaging.5.4.dylib
>  Referenced from:
> /Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/GrayscaleModelMaker
>  Reason: image not found
> Trace/BPT trap
> brage:~ odonnell$
> Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/Seeding
> dyld: Library not loaded: libvtkIO.5.4.dylib
>  Referenced from:
> /Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/Seeding
>  Reason: image not found
> Trace/BPT trap
> brage:~ odonnell$
> Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/DiffusionTensorEstimation
> dyld: Library not loaded: libvtkzlib.5.4.dylib
>  Referenced from:
> /Users/odonnell/Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/DiffusionTensorEstimation
>  Reason: image not found
>
>
>
> Here's one that works that only uses ITK
> brage:~ odonnell$
> Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/OtsuThresholdSegmentation
> PARSE ERROR:
>             One or more required arguments missing!
>
> Brief USAGE:
>   Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/OtsuThresholdSeg
>                                        mentation
>                                        [--processinformationaddress
>                                        <std::string>] [--xml] [--echo]
>                                        [--minimumObjectSize <int>]
>                                        [--faceConnected] [--numberOfBins
>                                        <int>] [--brightObjects] [--]
>                                        [--version] [-h] <std::string>
>                                        <std::string>
>
> For complete USAGE and HELP type:
>   Software/Slicer3-HEAD/Slicer3-build/lib/Slicer3/Plugins/OtsuThresholdSegmentation
> --help
>
>
>
> Thanks!
> Lauren
> _______________________________________________
> slicer-devel mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
>
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject