MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: several messages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31340] Re: several messages
  • From: "P.J. Hinton" <paulh at wolfram.com>
  • Date: Mon, 29 Oct 2001 02:23:24 -0500 (EST)
  • Organization: "Wolfram Research, Inc."
  • Sender: owner-wri-mathgroup at wolfram.com

On Fri, 26 Oct 2001, Kari Krueckl wrote:

> I am a Mathematica beginner and am having a little trouble. I am
> scanning 12-bit images that are being converted to 16-bit grayscale
> TIFFs.  I need to read the 16-bit TIFF files in Mathematica. I realize
> that this is not a supported format and I am not concerned about
> displaying the image in Mathematica. I only need to some how import and
> manipulate the 16-bit grayscale data from the file. Is there any way to
> extract the data array? Or directly read the file into Mathematica?

On Sat, 27 Oct 2001, Tomas Garza wrote:

> Not a supported format? See the Help browser under "Import". TIFF
> appears there as one of the supported formats (unless, of course, you
> are using an older version of Mathematica, where "Import" had not been
> implemented) .

The following information is valid for Mathematica version 4.0 and later.

The Mathematica TIFF import function is capable of reading TIFF images
that comply with the revision 6 standard as published by Adobe and its
predecessor Aldus.  The standard only provides for an eight-bit grayscale
tag, so 16-bit grayscales are a proprietary extension that cannot be read.

A possible workaround is to configure the generating application to save
the data either as a portable pixmap (PPM) or a 24-bit color TIFF.
Mathematica can read both of these formats with the Import[] function.
This will result in rasters of RGB values.  One can then use a dithering
function to collapse down the RGB color into a single grayscale value.

-- 
P.J. Hinton
User Interface Programmer                         paulh at wolfram.com
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.



  • Prev by Date: Re: 2D to 3D graphics?
  • Next by Date: Re: Simplify with If and UnitStep
  • Previous by thread: Re: several messages
  • Next by thread: SQP code