CommandLineAccess.wiki - Vaa3D/Vaa3D_Wiki GitHub Wiki

Content

Command-line execution of Vaa3D program

The Mac and Linux versions of Vaa3D program can also be run from command line directly. You only need to locate the actual executable program, called

 *vaa3d*  # for Linux
 *vaa3d64 # for Mac 64bit build, under the vaa3d64.app/ folder
 *vaa3d   # for Mac 32bit build, under the vaa3d.app/ folder

and type such program name on a terminal. You can also invoke plugins from command line.

Help information of Vaa3D

If you type the following command for Linux and Mac

vaa3d -h

or for Windows command line console

vaa3d64.exe /h

You will see something like the following help information.

Vaa3D: a 3D image visualization and analysis platform developed by Hanchuan Peng and colleagues.

Usage: v3d -h -M moduleCode [all other options specific to different modules]
    -h/H         help information.
    -i <file>                    open single or multiple image (.tif/.tiff, .lsm, .mrc, .raw/.v3draw) / object (.ano, .apo, .swc, .marker) files
    -o <file>                    indicates single or multiple outputs
    -x <plugin_dll_full_path or unique partial path>    a string indicates the full path or a unique partial path of a dll (for a plugin) to be launched.
    -m <menu_name>               a string indicates which menu of a plugin will be called.
    -f <function_name>           a string indicates which function of a plugin will be called.
    -p <parameters>              a string indicates parameters that plugin function use
    -pf <configuration>          a string read from configuration file indicates parameters that plugin function use
    -v                           force to open a 3d viewer when loading an image, otherwise use the default v3d global setting (from "Adjust Preference")
    -na                          open NeuronAnnotator work-mode directly
    -.wiki  [headless command-line arguments, intended for compute grid use. Try '-.wiki -h' for more information on this option]
Searching in ./plugins ...... 
Searching ./plugins done.

Found [42] plugins
#1          /Users/pengh/work/v3d_external/bin/plugins/_Vaa3D_plugin_creator/libplugin_creator_debug.dylib
#2          /Users/pengh/work/v3d_external/bin/plugins/celegans/atlasguided_seganno/libplugin_atlasguided_stranno_partial_debug.dylib
#3          /Users/pengh/work/v3d_external/bin/plugins/celegans/celegans_straighten/libcelegans_straighten_debug.dylib
#4          /Users/pengh/work/v3d_external/bin/plugins/data_IO/load_image_using_Bioformats/libimageIO_Bioformat_debug.dylib
#5          /Users/pengh/work/v3d_external/bin/plugins/data_type/5D_Stack_Converter/libmovieZCswitch_debug.dylib
#6          /Users/pengh/work/v3d_external/bin/plugins/data_type/Convert_8_16_32_bits_data/libdatatypeconvert_debug.dylib
#7          /Users/pengh/work/v3d_external/bin/plugins/data_type/Convert_Image_to_AtlasViewMode/libconvert_img_to_atlasview_debug.dylib
#8          /Users/pengh/work/v3d_external/bin/plugins/image_blending/blend_multiscanstacks/libblend_multiscanstacks_debug.dylib
#9          /Users/pengh/work/v3d_external/bin/plugins/image_edge_detection/Edge_Extraction_from_Mask_Image/libedge_of_maskimg_debug.dylib
#10          /Users/pengh/work/v3d_external/bin/plugins/image_filters/Fast_Distance_Transform/libdt_debug.dylib
#11          /Users/pengh/work/v3d_external/bin/plugins/image_filters/Gaussian_Filter/libgaussianfilter_debug.dylib
#12          /Users/pengh/work/v3d_external/bin/plugins/image_filters/Grayscale_Image_Distance_Transform/libgsdt_debug.dylib
#13          /Users/pengh/work/v3d_external/bin/plugins/image_filters/min_Max_Filter/libminMaxfilter_debug.dylib
#14          /Users/pengh/work/v3d_external/bin/plugins/image_geometry/Montage_All_Z_Sections/libmontage_image_sections_debug.dylib
#15          /Users/pengh/work/v3d_external/bin/plugins/image_geometry/ReCenter_Image/librecenterimage_debug.dylib
#16          /Users/pengh/work/v3d_external/bin/plugins/image_geometry/Rotate_Image/librotateimg90_debug.dylib
#17          /Users/pengh/work/v3d_external/bin/plugins/image_registration/SSD_registration/libplugin_PQ_imagereg_debug.dylib
#18          /Users/pengh/work/v3d_external/bin/plugins/image_resolution/XYZ_Resolution/libexample_reset_xyz_resolution_debug.dylib
#19          /Users/pengh/work/v3d_external/bin/plugins/image_ROI/ROI_Editor/libroi_editor_debug.dylib
#20          /Users/pengh/work/v3d_external/bin/plugins/image_segmentation/Label_Objects/libregiongrow_debug.dylib
#21          /Users/pengh/work/v3d_external/bin/plugins/image_segmentation/lobeseger/liblobeseg_debug.dylib
#22          /Users/pengh/work/v3d_external/bin/plugins/image_stitching/ifusion/libifusion_debug.dylib
#23          /Users/pengh/work/v3d_external/bin/plugins/image_stitching/istitch/libimageStitch_debug.dylib
#24          /Users/pengh/work/v3d_external/bin/plugins/image_stitching/Map_View/libmapviewer_debug.dylib
#25          /Users/pengh/work/v3d_external/bin/plugins/image_thresholding/Simple_Adaptive_Thresholding/libada_threshold_debug.dylib
#26          /Users/pengh/work/v3d_external/bin/plugins/linker_file/Linker_File_Generator/liblinker_file_generator_debug.dylib
#27          /Users/pengh/work/v3d_external/bin/plugins/movies/Simple_Movie_Maker/libmoviefrom3dviewer_debug.dylib
#28          /Users/pengh/work/v3d_external/bin/plugins/neuron_utilities/Enhanced_SWC_Format_Converter/libeswc_converter_debug.dylib
#29          /Users/pengh/work/v3d_external/bin/plugins/neuron_utilities/global_neuron_feature/libglobal_neuron_feature_debug.dylib
#30          /Users/pengh/work/v3d_external/bin/plugins/neuron_utilities/resample_swc/libresample_swc_debug.dylib
#31          /Users/pengh/work/v3d_external/bin/plugins/neuron_utilities/sort_neuron_swc/libsort_neuron_swc_debug.dylib
#32          /Users/pengh/work/v3d_external/bin/plugins/neuron_utilities/swc_to_maskimage/libswc_to_maskimage_debug.dylib
#33          /Users/pengh/work/v3d_external/bin/plugins/pixel_intensity/Canvas_Eraser/libcanvas_eraser_debug.dylib
#34          /Users/pengh/work/v3d_external/bin/plugins/pixel_intensity/Change_single_pixel_value/libupdatepxlval_debug.dylib
#35          /Users/pengh/work/v3d_external/bin/plugins/principal_skeleton_detection/libprincipalskeleton_detection_debug.dylib
#36          /Users/pengh/work/v3d_external/bin/plugins/refExtract/librefExtract_debug.dylib
#37          /Users/pengh/work/v3d_external/bin/plugins/Vaa3D_PluginInterface_Demos/3D_viewer_data_push_and_display/libex_push_debug.dylib
#38          /Users/pengh/work/v3d_external/bin/plugins/Vaa3D_PluginInterface_Demos/call_each_other/libex_call_debug.dylib
#39          /Users/pengh/work/v3d_external/bin/plugins/Vaa3D_PluginInterface_Demos/call_each_other/libex_matrix_debug.dylib
#40          /Users/pengh/work/v3d_external/bin/plugins/Vaa3D_PluginInterface_Demos/mouse_event_monitor/libmouse_monitor_debug.dylib
#41          /Users/pengh/work/v3d_external/bin/plugins/Vaa3D_PluginInterface_Demos/Multi_Image_Interface/libnewwindow_debug.dylib
#42          /Users/pengh/work/v3d_external/bin/plugins/Vaa3D_PluginInterface_Demos/Single_Image_Interface/libextrafilters_debug.dylib

Find & Invoke Plugins

How to find the list of plugins

From command line, you can type the command

vaa3d -h

(or a similar way to launch the executable, -- depending on your OS, -- on Windows you need to replace '-' with '/') to print all available modules/plugins.

In the example shown above, Vaa3D will print out information of available plugins as the lower part of the help information.

How to run a particular plugin and its modules

You can directly invoke particular plugins from the command line. This is particularly useful for large-scale pipeline using the Vaa3D programs and its plugins.

  1. If you run command line, you can type the command
vaa3d -h -x <unique_sub_string_of_the_plugin_dynamic_library_file>

to get the available do_menu and do_func lists for this plugin. Then you can directly invoke particular plugin menu or func by using the command

vaa3d -x <unique_sub_string_of_the_plugin_dynamic_library_file> -m <menu_name>
vaa3d -x <unique_sub_string_of_the_plugin_dynamic_library_file> -f <func_name> -i <input image> -o <output> -p <parameter list> -pf <parameter_file>

Note, a useful feature is to locate a plugin using a unique sub-string of the entire path (or name of the dynamic linked library file). For example, if you want to access the "Enhanced_SWC_Format_Converter" plugin, you can find the plugin library file in the "vaa3d -h" print out as ".../libeswc_converter_debug.dylib". Then you can directly run it using something like the following (where "eswc_converter" is a unique substring of the entire path):

vaa3d -h -x eswc_converter
  1. You may also access Vaa3D plugins from Matlab console. This depends on a yet-to-release Vaa3D-Matlab toolbox.

Run Vaa3D on servers without X Server installed

You may see an error message : cannot connect to X server when you run vaa3d command on a server without X server installed. To bypass the X server check, run vaa3d with the following command instead

export DISPLAY=:30;Xvfb :30 -auth /dev/null & vaa3d -h -x PLUGIN -f ... -p ...

For further discussions, please refer to this issue

⚠️ **GitHub.com Fallback** ⚠️