changeset 31215:0fb5ca242d66

__tiff__.cc: added documentation to all internal functions * libtinterp/corefcn/__tiff__.cc: Added documentation to all internal functions to enable using help and print_usage.
author magedrifaat <magedrifaat@gmail.com>
date Wed, 07 Sep 2022 18:00:04 +0200
parents ddbed40b811b
children fe776b0e904d
files libinterp/corefcn/__tiff__.cc
diffstat 1 files changed, 262 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/__tiff__.cc	Wed Sep 07 16:27:38 2022 +0200
+++ b/libinterp/corefcn/__tiff__.cc	Wed Sep 07 18:00:04 2022 +0200
@@ -2382,7 +2382,15 @@
 #endif
 
   DEFUN (__open_tiff__, args, ,
-             "Open a Tiff file and return its handle")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{t} =} __open_tiff__ (@var{fname})
+@deftypefnx {} {@var{t} =} __open_tiff__ (@var{fname}, @var{mode})
+Open a tiff file and return its handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -2442,7 +2450,14 @@
 
 
   DEFUN (__close_tiff__, args, ,
-             "Close a tiff file")
+         doc: /* -*- texinfo -*-
+@deftypefn {} __close_tiff__ (@var{t})
+Close the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.close} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -2459,13 +2474,22 @@
 
     return octave_value_list ();
 #else
+    octave_unused_parameter (args);
     err_disabled_feature ("close", "Tiff");
 #endif
   }
 
 
   DEFUN (__tiff_get_tag__, args, ,
-         "Get the value of a tag from a tiff image")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{tagValue} =} __tiff_get_tag__ (@var{t}, @var{tag_id})
+@deftypefnx {} {@var{tagValue} =} __tiff_get_tag__ (@var{t}, @var{tag_name})
+Get the value of the tag from the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.getTag} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -2505,13 +2529,23 @@
 
     return octave_value_list (get_field_data (tif, fip));
 #else
+    octave_unused_parameter (args);
     err_disabled_feature ("getTag", "Tiff");
 #endif
   }
 
 
   DEFUN (__tiff_set_tag__, args, ,
-             "Set the value of a tag in a tiff image")
+         doc: /* -*- texinfo -*-
+@deftypefn {} __tiff_set_tag__ (@var{t}, @var{tag_id}, @var{tag_value})
+@deftypefnx {} __tiff_set_tag__ (@var{t}, @var{tag_name}, @var{tag_value})
+@deftypefnx {} __tiff_set_tag__ (@var{t}, @var{tag_struct})
+Set the value of the tag in the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.setTag} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -2576,7 +2610,14 @@
   }
 
   DEFUN (__tiff_read__, args, nargout,
-             "Read the image in the current IFD")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{imageData} =} __tiff_read__ (@var{t})
+Read the image data from the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.read} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -2630,7 +2671,14 @@
   }
 
   DEFUN (__tiff_read_encoded_strip__, args, nargout,
-             "Read a strip from the image in the current IFD")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{stripData} =} __tiff_read_encoded_strip__ (@var{t}, @var{stripNumber})
+Read the strip data from the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.readEncodedStrip} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -2671,7 +2719,14 @@
   }
 
   DEFUN (__tiff_read_encoded_tile__, args, nargout,
-             "Read a tile from the image in the current IFD")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{tileData} =} __tiff_read_encoded_tile__ (@var{t}, @var{tileNumber})
+Read the tile data from the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.readEncodedTile} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -2712,7 +2767,14 @@
   }
 
   DEFUN (__tiff_read_rgba_image__, args, ,
-         "Read the image data in rgba mode")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{imageData} =} __tiff_read_rgba_image__ (@var{t})
+Read the RGBA image data from the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.readRGBAImage} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -2798,7 +2860,14 @@
   }
 
   DEFUN (__tiff_read_rgba_strip__, args, ,
-         "Read the strip data containing the given row in rgba mode")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{stripData} =} __tiff_read_rgba_strip__ (@var{t}, @var{stripNumber})
+Read the RGBA strip data from the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.readRGBAStrip} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -2910,7 +2979,14 @@
   }
 
   DEFUN (__tiff_read_rgba_tile__, args, ,
-         "Read the stile data containing the given row and column in rgba mode")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{tileData} =} __tiff_read_rgba_tile__ (@var{t}, @var{tileNumber})
+Read the RGBA tile data from the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.readRGBATile} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3031,7 +3107,14 @@
   }
 
   DEFUN (__tiff_write__, args, ,
-             "Write the image data to the current IFD")
+         doc: /* -*- texinfo -*-
+@deftypefn {} __tiff_write__ (@var{t}, @var{imageData})
+Write the image data to the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.write} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3082,7 +3165,14 @@
   }
 
   DEFUN (__tiff_write_encoded_strip__, args, ,
-             "Write an encoded strip to the image")
+         doc: /* -*- texinfo -*-
+@deftypefn {} __tiff_write_encoded_strip__ (@var{t}, @var{stripNumber}, @var{stripData})
+Write the strip data to the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.writeEncodedStrip} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3122,7 +3212,14 @@
   }
 
   DEFUN (__tiff_write_encoded_tile__, args, ,
-             "Write an encoded tile to the image")
+         doc: /* -*- texinfo -*-
+@deftypefn {} __tiff_write_encoded_tile__ (@var{t}, @var{tileNumber}, @var{tileData})
+Write the tile data to the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.writeEncodedTile} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3162,7 +3259,14 @@
   }
   
   DEFUN (__tiff_is_tiled__, args, ,
-             "Get whether the image is tiled")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{tf} =} __tiff_is_tiled__ (@var{t})
+Get whether the tiff image of the given handle is tiled.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.isTiled} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3186,7 +3290,14 @@
   }
 
   DEFUN (__tiff_number_of_strips__, args, ,
-             "Get the number of strips in the image")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{numStrips} =} __tiff_number_of_strips__ (@var{t})
+Get the number of strips of the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.numberOfStrips} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3213,7 +3324,14 @@
   }
 
   DEFUN (__tiff_number_of_tiles__, args, ,
-             "Get the number of tiles in the image")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{numTiles} =} __tiff_number_of_tiles__ (@var{t})
+Get the number of tiles of the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.numberOfTiles} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3240,7 +3358,14 @@
   }
 
   DEFUN (__tiff_number_of_directories__, args, ,
-             "Get the number of tiles in the image")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{numDirs} =} __tiff_number_of_directories__ (@var{t})
+Get the number of directories of the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.numberOfDirectories} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3264,7 +3389,15 @@
   }
 
   DEFUN (__tiff_compute_strip__, args, ,
-             "Get the strip index containing the given row")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{stripNumber} =} __tiff_compute_strip__ (@var{t}, @var{row})
+@deftypefnx {} {@var{stripNumber} =} __tiff_compute_strip__ (@var{t}, @var{row}, @var{plane})
+Get the strip number containing the given row.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.computeStrip} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3321,7 +3454,15 @@
   }
 
   DEFUN (__tiff_compute_tile__, args, ,
-             "Get the tile index containing the given row and column")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{tileNumber} =} __tiff_compute_strip__ (@var{t}, [@var{row}, @var{col}])
+@deftypefnx {} {@var{tileNumber} =} __tiff_compute_strip__ (@var{t}, [@var{row}, @var{col}], @var{plane})
+Get the tile number containing the given row and col.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.computeTile} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3387,7 +3528,14 @@
   }
 
   DEFUN (__tiff_default_strip_length__, args, ,
-         "Get the number of rows of a reasonable strip")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{stripLen} =} __tiff_compute_strip__ (@var{t})
+Get the length of a reasonably sized strip.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.getDsefaultStripLength} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3414,7 +3562,14 @@
   }
 
   DEFUN (__tiff_is_big_endian__, args, ,
-         "Get the whether the tiff file is big-endian")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{tf} =} __tiff_is_big_endian__ (@var{t})
+Get whether the tiff image of the given handle is big-endian.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.isBigEndian} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3439,7 +3594,14 @@
   }
 
   DEFUN (__tiff_current_directory__, args, ,
-         "Get the index of the current directory")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{dirNumber} =} __tiff_current_directory__ (@var{t})
+Get the index of the current directory.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.currentDirectory} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3465,7 +3627,14 @@
   }
 
   DEFUN (__tiff_last_directory__, args, ,
-         "Get the whether the current directory is the last")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{isLast} =} __tiff_last_directory__ (@var{t})
+Get whether the current directory is the last directory.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.lastDirectory} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3490,7 +3659,14 @@
   }
 
   DEFUN (__tiff_next_directory__, args, ,
-         "Set the next IFD as the current IFD")
+         doc: /* -*- texinfo -*-
+@deftypefn {} __tiff_next_directory__ (@var{t})
+Switch to the next directory in the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.nextDirectory} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3520,7 +3696,14 @@
   }
 
   DEFUN (__tiff_set_directory__, args, ,
-         "Set the current IFD using the given index")
+         doc: /* -*- texinfo -*-
+@deftypefn {} __tiff_set_directory__ (@var{t}, @var{dirNumber})
+Switch to the given directory in the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.setDirectory} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3552,7 +3735,14 @@
   }
 
   DEFUN (__tiff_write_directory__, args, ,
-         "Write the current IFD to file and create a new one")
+         doc: /* -*- texinfo -*-
+@deftypefn {} __tiff_write_directory__ (@var{t})
+Write the contents of the current directory and create a new one.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.writeDirectory} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3576,7 +3766,14 @@
   }
 
   DEFUN (__tiff_rewrite_directory__, args, ,
-         "Rewrite modifications to the current IFD")
+         doc: /* -*- texinfo -*-
+@deftypefn {} __tiff_rewrite_directory__ (@var{t})
+Rewrite the modifications of the current directory and create a new one.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.rewriteDirectory} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3602,7 +3799,14 @@
   }
 
   DEFUN (__tiff_set_sub_directory__, args, ,
-         "Set the given offset directory as the current IFD")
+         doc: /* -*- texinfo -*-
+@deftypefn {} __tiff_write_directory__ (@var{t}, @var{offset})
+Set the current directory to the sub-directory with given offset.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.setSubDirectory} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3650,7 +3854,14 @@
   }
 
   DEFUN (__tiff_get_directory_offset__, args, ,
-         "Get the offset of the current directory in file")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{offset} =} __tiff_get_directory_offset__ (@var{t})
+Get the offset of the current directory of the tiff file of the given handle.
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.getDirectoryOffset} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     int nargin = args.length ();
@@ -3675,7 +3886,14 @@
   }
 
   DEFUN (__tiff_version__, , ,
-             "Get the version stamp of LibTIFF")
+        doc: /* -*- texinfo -*-
+@deftypefn {} {@var{verStr} =} __tiff_version__ ()
+Get a string with the version information of LibTIFF
+
+This is a private internal function not intended for direct use.
+Use @code{Tiff.getVersion} instead.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     std::string version = std::string (TIFFGetVersion ());
@@ -3686,7 +3904,13 @@
   }
 
   DEFUN (__tiff_set_errors_enabled__, args, ,
-         "Enables or Disables error output from LibTIFF")
+         doc: /* -*- texinfo -*-
+@deftypefn {} __tiff_set_errors_enabled__ (@var{state})
+Sets whether or not to relay LibTIFF's errors and warning.
+
+This is a private internal function not intended for direct use.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     if (args.length () == 0)
@@ -3706,7 +3930,13 @@
   }
 
   DEFUN (__tiff_make_tagid__, , ,
-         "Create the TagID structure from the internal map")
+         doc: /* -*- texinfo -*-
+@deftypefn {} {@var{tagstruct} =} __tiff_make_tagid__ ()
+Get a struct of the supported tags and their IDs.
+
+This is a private internal function not intended for direct use.
+
+@end deftypefn */)
   {
 #if defined (HAVE_TIFF)
     std::map<std::string, octave_value> tag_ov_map;