changeset 10433:2c01d24459fb

Detabify scripts in 'scripts/image/'
author Soren Hauberg <hauberg@gmail.com>
date Mon, 22 Mar 2010 12:36:30 -0700
parents 10207338603a
children f387c5b3a369
files scripts/ChangeLog scripts/image/gmap40.m scripts/image/hot.m scripts/image/hsv2rgb.m scripts/image/image.m scripts/image/image_viewer.m scripts/image/imfinfo.m scripts/image/imread.m scripts/image/imshow.m scripts/image/saveimage.m
diffstat 10 files changed, 43 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Mar 22 13:54:22 2010 +0100
+++ b/scripts/ChangeLog	Mon Mar 22 12:36:30 2010 -0700
@@ -1,3 +1,9 @@
+2010-03-22  Soren Hauberg  <hauberg@gmail.com>
+
+	* image/gmap40.m, image/hot.m, image/hsv2rgb.m, image/image.m,
+	image/image_viewer.m, image/imfinfo.m, image/imread.m, image/imshow.m,
+	image/saveimage: Detabify.
+
 2010-03-21  Soren Hauberg  <hauberg@gmail.com>
 
 	* general/quadv.m: Replace 'quadl' with 'quadv' in help text.
--- a/scripts/image/gmap40.m	Mon Mar 22 13:54:22 2010 +0100
+++ b/scripts/image/gmap40.m	Mon Mar 22 12:36:30 2010 -0700
@@ -41,7 +41,7 @@
 
   if (number >= 1)
     map = repmat ([1, 0, 0; 0, 1, 0; 0, 0, 1; 1, 1, 0; 1, 0, 1; 0, 1, 1],
-		  ceil (number / 6), 1) (1:number, :);
+          ceil (number / 6), 1) (1:number, :);
   else
     map = [];
   endif
--- a/scripts/image/hot.m	Mon Mar 22 13:54:22 2010 +0100
+++ b/scripts/image/hot.m	Mon Mar 22 12:36:30 2010 -0700
@@ -31,7 +31,7 @@
   if (nargin == 0)
     number = rows (colormap);
   elseif (nargin == 1) 
-	if (! isscalar (number))
+    if (! isscalar (number))
       error ("hot: argument must be a scalar");
     endif
   else
--- a/scripts/image/hsv2rgb.m	Mon Mar 22 13:54:22 2010 +0100
+++ b/scripts/image/hsv2rgb.m	Mon Mar 22 12:36:30 2010 -0700
@@ -77,8 +77,8 @@
 
   ## add s*v* hue-function to rgb map
   rgb_map = rgb_map +  f .* (6 * (hue < 1/6) .* hue
-			     + (hue >= 1/6 & hue < 1/2)
-			     + (hue >= 1/2 & hue < 2/3) .* (4 - 6 * hue));
+                    + (hue >= 1/6 & hue < 1/2)
+                    + (hue >= 1/2 & hue < 2/3) .* (4 - 6 * hue));
 
   ## If input was an image, convert it back into one.
   if (is_image)
--- a/scripts/image/image.m	Mon Mar 22 13:54:22 2010 +0100
+++ b/scripts/image/image.m	Mon Mar 22 12:36:30 2010 -0700
@@ -116,7 +116,7 @@
   ca = gca ();
 
   tmp = __go_image__ (ca, "cdata", img, "xdata", xdata, "ydata", ydata,
-		      "cdatamapping", "direct", varargin {:});
+                      "cdatamapping", "direct", varargin {:});
 
   ## FIXME -- how can we do this and also get the {x,y}limmode
   ## properties to remain "auto"?  I suppose this adjustment should
--- a/scripts/image/image_viewer.m	Mon Mar 22 13:54:22 2010 +0100
+++ b/scripts/image/image_viewer.m	Mon Mar 22 12:36:30 2010 -0700
@@ -70,7 +70,7 @@
 
   if (isempty (view_fcn))
     if (isempty (view_cmd)
-	&& compare_versions (__gnuplot_version__ (), "4.0", ">"))
+        && compare_versions (__gnuplot_version__ (), "4.0", ">"))
       view_fcn = "gnuplot_internal";
     else
       view_fcn = @__img_via_file__;
@@ -92,7 +92,7 @@
     if (nargin < 3)
       zoom = 1;
       if (nargin < 2)
-	fcn = [];
+        fcn = [];
       endif
     endif
 
@@ -102,17 +102,17 @@
 
     if (nargin > 1)
       if (isa (fcn, "function_handle"))
-	view_fcn = fcn;
+        view_fcn = fcn;
       else
-	error ("image_viewer: expecting second argument to be a function handle");
+        error ("image_viewer: expecting second argument to be a function handle");
       endif
     endif
 
     if (nargin > 2)
       if (isnumeric (zoom) && isscalar (zoom) && isreal (zoom))
-	view_zoom = zoom;
+        view_zoom = zoom;
       else
-	error ("image_viewer: expecting third argument to be a real scalar");
+        error ("image_viewer: expecting third argument to be a real scalar");
       endif
     endif
 
--- a/scripts/image/imfinfo.m	Mon Mar 22 13:54:22 2010 +0100
+++ b/scripts/image/imfinfo.m	Mon Mar 22 12:36:30 2010 -0700
@@ -110,11 +110,11 @@
       [fn, status, msg] = urlwrite (filename, tmp);
 
       if (! status)
-	error ("imfinfo: cannot find %s", filename);
+        error ("imfinfo: cannot find %s", filename);
       endif
 
       if (! isempty (fn))
-	delete_file = true;
+        delete_file = true;
       endif
 
     endif
--- a/scripts/image/imread.m	Mon Mar 22 13:54:22 2010 +0100
+++ b/scripts/image/imread.m	Mon Mar 22 12:36:30 2010 -0700
@@ -66,9 +66,9 @@
     try
       vars = load (fn);
       if (isstruct (vars))
-	img_field = isfield (vars, "img");
-	x_field = isfield (vars, "X");
-	map_field = isfield (vars, "map");
+        img_field = isfield (vars, "img");
+        x_field = isfield (vars, "X");
+        map_field = isfield (vars, "map");
       endif
     catch
       error ("imread: invalid image file: %s", magick_error);
@@ -77,9 +77,9 @@
     if (map_field && (img_field || x_field))
       varargout{2} = vars.map;
       if (img_field)
-	varargout{1} = vars.img;
+        varargout{1} = vars.img;
       else
-	varargout{1} = vars.X;
+        varargout{1} = vars.X;
       endif
     else
       error ("imread: invalid Octave image file format");
--- a/scripts/image/imshow.m	Mon Mar 22 13:54:22 2010 +0100
+++ b/scripts/image/imshow.m	Mon Mar 22 12:36:30 2010 -0700
@@ -95,22 +95,22 @@
     arg = varargin{narg++};
     if (isnumeric (arg))
       if (numel (arg) == 2 || isempty (arg))
-	display_range = arg;
+        display_range = arg;
       elseif (columns (arg) == 3)
-	indexed = true;
-	colormap (arg);
+        indexed = true;
+        colormap (arg);
       elseif (! isempty (arg))
-	error ("imshow: argument number %d is invalid", narg+1);
+        error ("imshow: argument number %d is invalid", narg+1);
       endif
     elseif (ischar (arg))
       switch (arg)
-	case "displayrange";
-	  display_range = varargin{narg++};
-	case {"truesize", "initialmagnification"}
-	  warning ("image: zoom argument ignored -- use GUI features");
-	otherwise
-	  warning ("imshow: unrecognized property %s", arg);
-	  narg++;
+        case "displayrange";
+          display_range = varargin{narg++};
+        case {"truesize", "initialmagnification"}
+          warning ("image: zoom argument ignored -- use GUI features");
+        otherwise
+          warning ("imshow: unrecognized property %s", arg);
+          narg++;
       endswitch
     else
       error ("imshow: argument number %d is invalid", narg+1);
@@ -124,14 +124,14 @@
     t = class (im);
     switch (t)
       case {"double", "single", "logical"}
-	display_range = [0, 1];
+        display_range = [0, 1];
       case {"int8", "int16", "int32", "uint8", "uint16", "uint32"}
-	## For compatibility, uint8 data should not be handled as
-	## double.  Doing so is a quick fix to allow the images to be
-	## displayed correctly.
-	display_range = double ([intmin(t), intmax(t)]);
+        ## For compatibility, uint8 data should not be handled as
+        ## double.  Doing so is a quick fix to allow the images to be
+        ## displayed correctly.
+        display_range = double ([intmin(t), intmax(t)]);
       otherwise
-	error ("imshow: invalid data type for image");
+        error ("imshow: invalid data type for image");
     endswitch
   endif
 
@@ -144,7 +144,7 @@
   nans = isnan (im(:));
   if (any (nans))
     warning ("Octave:imshow-NaN",
-	     "imshow: pixels with NaN or NA values are set to minimum pixel value");
+             "imshow: pixels with NaN or NA values are set to minimum pixel value");
     im(nans) = display_range(1);
   endif
 
--- a/scripts/image/saveimage.m	Mon Mar 22 13:54:22 2010 +0100
+++ b/scripts/image/saveimage.m	Mon Mar 22 12:36:30 2010 -0700
@@ -156,7 +156,7 @@
     time_string = ctime (time ());
     time_string = time_string (1:length (time_string)-1);
     tagline = sprintf ("# Created by Octave %s, %s",
-		       OCTAVE_VERSION, time_string);
+                       OCTAVE_VERSION, time_string);
 
     if (grey && bw)