Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Overlay a coloured boundary on a gray scale image
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David Fanning  
View profile  
 More options Oct 12 2012, 8:35 am
Newsgroups: comp.lang.idl-pvwave
From: David Fanning <n...@dfanning.com>
Date: Fri, 12 Oct 2012 06:35:42 -0600
Local: Fri, Oct 12 2012 8:35 am
Subject: Re: Overlay a coloured boundary on a gray scale image

titan writes:
> probably my question is not clear :( and I'm sorry for this.
> I try to explain it better:

> I'm able to read a shapefile from which I'm able to obtain the corresponding image which is a binary one. Then I can extract those subscripts values where the boundary is

> boundary_index = WHERE(boundary_array NE 0)

> my gray scale image has the same dimension of the boundary image and as a consequence I can draw the line over it (in white)

> image[boundary_index]=255

> What I would like to do i to understand if I could draw this line not in white but in another color, for example yellow.

> Is there this possibility?

I presume you are using indexed color to display your image.
Simply load your image colors into indices 0 to 254 and
use color index 255 to load whatever color you like.
I would do it like this:

   LoadCT, 0, NColors=254
   TVLCT, 255, 255, 0, 255 ; Yellow in index 255
   scaledImage = BytScl(image, TOP=254
   scaledImage[bounary_index] = 255
   cgImage, scaledImage

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.