* Opens a browser for the contents of a Catalogue
  * As command line, performs some basic functionalities as:
    - creating new catalogues ( flag 'createfromvll' ).
    - quering for catalogue contents (flag 'query')
    - adds elements into the catalogue (flag 'add_model')
    - prints simple lists of elements in the catalogue
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  FLAGS
 
     'catalogue', 'c'   : passes a catalogue name.
 
 
      EXAMPLE
 
      % opens an existing catalogue in the catalogue browser.
      dcm -c my_catalogue;
      dcm my_catalogue
 
 
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
    CREATING NEW CATALOGUES
    -----------------------
 
    1) Create a new, empty catalogue
 
       'create'                : logical variable.
                                 if switched to 'on', it will create a
                                 catalogue with the passed name.
 
       EXAMPLE:
 
 
         dcm -create my_catalogue
 
    2) Create a new catalogue on a set of preexisting files
     
       2a) Files are in a text file with extension vll
  
     'createfromvll','vll'      : create a new catalogue using a text
                                  file that lists the tomogram files.
 
      % creates a new catalogue from a given volumelist
      % file (a text file with extension .vll)
 
 
      EXAMPLE:
 
      dcm -c my_catalogue -vll my_file.vll
 
 
      'model_import_modus','mim' : allows the modification of the policy used
                                   to import model files into the catalogue.
                                   This is equivalent to passing a single 'modus'
                                   flag onto all model files when writing the
                                   .vll file.
 
      'delete_old','do'          : boolean.
                                   deletes any catalogue of the same name
                                   previously found in disk.
                                   - default: false
 
 
      2b) Files are simply in a cell array or in  
 
      %     EXAMPLE:
 
      dcm -create my_catalogue -files 'mytomograms/*.rec'
      dcm -create my_catalogue -files {'tomogram1.rec','tomogram2.rec'}
 
 % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
   ADDING TOMOGRAMS
   ----------------
 
   'add_tomogram','at' : adds a tomogram (or tomograms) into the catalogue.
                         [the catalogue is created if not available]
 
   EXAMPLES
 
   dcm -c my_catalogue -at my_tomogram.mrc
  
   % from a pattern of names
   dcm -c my_catalogue -at somepattern*.em
 
  - - - - - -  - - - - - - - - - -  - - - - - - - - - -  - - - - - - - - - -
 
   from a file list
 
   dcm -c my_catalogue -addvll myVLL
 
  - - - - - -  - - - - - - - - - -  - - - - - - - - - -  - - - - - - - - - -
 
   Deleting tomograms
   ------------------
 
   'remove_tomogram','rt'  : numeric index.
                             removes a tomogram from the catalogue.
                             - Indexes of all other tomograms will be
                               recomputed.
                             - Folders with catalogued information corresponding
                               to the deleted tomogram will be removed.
 
 
   'hide_tomogram','ht'    : numeric index.
                             hides a tomogram from the catalogue.
                             The tomogram will not be visible in most catalogue
                             applications, but
                             - Indexes of all other tomograms will NOT be
                               recomputed.
                             - Folders with catalogued information corresponding
                               to the deleted tomogram will NOT be removed.
 
   'unhide_tomogram','uht'  : numeric index.
                              "unhides" a tomogram that was previously
                              hidden.
 
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
   ADDING MODELS
   -------------
 
   'add_model','am' : adds a model (or model array) into a catalogued volume.
                      The argument of 'add_model' is a model file, a model
                      or a cell array of models
                      
 
   'index','i'      : explicites in which tomogram the model will be added.
                      If no index is passed, the model is examined in order
                      to check if if points to some tomogram file or
                      tomogram object that can be recognized in the
                      catalogue.
 
   'overwriteModel','om'  : flag turned by default to true
                       overwrites models with the same name      
 
 
   EXAMPLE
 
   dcm -c my_catalogue -add_model my_model
 
   % adds a model file into an specific volume 
   dcm -c my_catalogue -add_model my_model -index my_index -modelname my_name
 
  
   SEE ALSO 
   dynamo_model_import: creates a model out of other external structures
   
   EXAMPLE
   Simplest case where you have a cloud of points representing your
   particles:
   myModel = dmimport(rand(100,3));
   dcm('c',myCatalogue,'i',1,'am',myModel);
 
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 
   ADDING Supporting files
   -----------------------
 
   This is a minor functionality. Just copies files in the individual space
   of a tomogram, thus linking it to a tomogram,
   The attached files can carry information (word or powerpoint documents
   relevant to the given volume.
  
   'add_supporting_file','asf'   : adds a file to a tomogram entry
                                   the tomogram index needs to be passed
                                   explicitely.
  
   EXAMPLE
   dcm -c cad -asf vesicleMap.fig -i 1
  - - - - - -  - - - - - - - - - -  - - - - - - - - - -  - - - - - - - - - -
 
   Retrieving lists
   -----------------
 
   'list','l'       : basic information retrieval. Possible values are:
                      'catalogues', 'c'
                      'tomograms' , 't'
                      'models'    , 'm'
                      'regions'   , 'r'
                      'support'   , 's' % not yet implemented
 
  
   The 'index' or 'i' flag can accept several integers (or the '*' operator)
 
   EXAMPLES
   dcm -l catalogues                      ; lists all catalogues in folder
   dcm -l c                               ; lists all catalogues in folder
   dcm -c my_catalogue -l tomograms       ; lists all tomograms in catalogue
   dcm -c my_catalogue -i my_index -l m   ; lists all models in tomogram
   dcm -c default -i * -l r               ; lists all regions defined
                                             in ALL tomograms
 
   Regular expressions
   -------------------
 
 
   'regexp','rx'    : you can add a regular expression that will be applied
                      onto the names of the sought objects.
 
   EXAMPLE
 
   dcm -c default -l m -rx '*particl*'  
   Lists models with the string "particl" inside their filenamed
 
  
  'fetch_tomogram', 'ft'  : recovers a tomogram object from the catalogue
                            putting the object that manages it into the
                            current workspace.
                         
   
   EXAMPLE
   o = dynamo_catalogue_manager('c','my_Catalogue,'ft',my_index);
 
  - - - - - -  - - - - - - - - - -  - - - - - - - - - -  - - - - - - - - - -
 
  Maintenance operations
  ----------------------
 
  To ensure that information entered into the catalogue externally does not
  conflict with the current settings in the cataogue.
  For instance, if you create a model file and save it into a catalogue 
  location manually (i.e., without catalogue specifict tools)
 
   'synchronize' : Possible values:
                 'models':  makes certain that model files stored in the
                            catalogue structure contain links to the
                            version of the volume as it is currently
                            contained in disk.
                  - defaut: [] (no synchronization action undertaken)
  
  EXAMPLE
  dcm -c catalogue -synchronize models
    
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  
  Importing catalogues
  --------------------
 
  These functionalities allow you to deploy in your filesystem a catalogue
  that has been constructed in a different filesystem.
 
  This is useful when you and your collaborators have different copies of
  the set of tomograms that you are working with in a common project.
  Your collaborator can create a system of models and regions and then send
  to you the catalogue file and the catalogue folder.
  Obviously, tomogram files will appear with the absolute name they have in
  your collaborator's filesystem. 
  With this utility you can quickly replace inside the catalogue the names
  of the tomogram files (incorrect in your file system) with the correct
  ones, provided you used the same naming convention in both filesystem,
  i.e., the name of each tomogram must be the same in both filesystems.
  
 
  'replace_location','rl'
 
  'new_location','nl'
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  SEE ALSO
  dynamo_catalogue_tutorial, dVolumeList, dynamo_table_crop