Raster format incompatibilities

martijn at scanner.frw.uva.nl martijn at scanner.frw.uva.nl
Thu May 5 06:02:33 EDT 1994


Hi Steve,
Re your 1) I had similarly confusing experiences using xv and then 
r.in.sunrast to convert tiff to grass. I was advised to use r.in.tiff (in 
src-contrib/SCS) and haven't looked back since. Try it!
Re your 2) If you can bear leaving greyscale representation, you can 
increase the number of distinguishable colors to 24 by assigning the rgb 
colortable to your images. Better yet, make your own colortable using for 
example `reddish greys' for the first 8 colors, plain greys for the 
second, and `blueish greys' for the third.
	Good luck'

P. Martijn van Leusen

Institute of Prehistory, University of Amsterdam
martijn at scanner.frw.uva.nl


On Wed, 4 May 1994, Steve Franklin wrote:

>    Although I never would have guessed it, I am back using GRASS for some
> tasks at a new job with a university. The task isn't necessarily GIS
> oriented, but GRASS seems to be perfect for the task of digitization MRI
> scans of the upper torso and internal organs of the body. From this we are
> able to assemble three dimensional images that help us understand greatly
> the propagation of electric fields through the upper chest from the heart.
> As I'm playing with GRASS and getting reaquainted, I'm running into some
> problems that I had had two years ago, and I"m hoping that a solution has
> been found since then.
> 
> 1) We're starting with tif images, and I've always wanted to be able to type:
> tifftopnm file.tif | pnmtorast -standard > file.ras
> Then of course, I'd do an r.in.sunrast on the file. Unfortunately, Grass
> doesn't seem to like the format of the files? I can't understand it. I've
> been using xv to save the tif to a sunrast file, and it works okay, but with
> 50 files per batch, I don't have the time to do this. xv says that they're
> both pretty much the same type of file, but the pnmtorast'd file is a bit
> shorter, implying a different header perhaps. Has anyone found an easy way
> to do this? Am I doing something wrong?
> 
> 2) We'll be working with greyscale images, and I can't seem to trick grass
> into giving me more than 8 greyscales of resolution. I remember discussing
> within this forum this problem years ago, and no one was able to come up
> with a solution... Is there any better alternative? Incedentally, we are
> running grass 4.0. We just don't have the disk space for 4.1, or the need
> for that matter... 
> 
> Any fixes or solutions would be greatly appreciated. Mail can be directed to
> franklin at ug.cs.dal.ca
> 
>    Thanks in advance,
> 
> Steve Franklin, Dalhousie University
> Biophysics
> 



More information about the grass-user mailing list