HDTenEightyP/NetNews huggingface dataset:
From: marko@ringding.cs.umd.edu (Marko Teittinen)
Newsgroups: comp.graphics
Subject: Re: BGI and PCX
Date: 25 Jan 93 20:57:41 GMT
X-Newsreader: TIN [version 1.1 PL6]

Roy J. Davis (davisrj@signal.ece.clarkson.edu) wrote:
> 	I've been doing a little graphics programming with the Borland BGI
> 	interface using 16 color, 4 plane PCX files.  I've had no problems
> 	decoding the image but have not been able to get the palette
> 	correct.  I've been trying to use setrgbpalette() with the palette
> 	values from the PCX file.  What am I doing wrong?
> 
> 	Will I also have this problem when I try doing the same thing with
> 	the 256 color files?
> 
> 	Anyone out there have some simple C code that might show me what my
> 	porblem is?

Your problem is that VGA uses double mapping in its 16 color mode.
When you use setcolor(), you select the color index in the 16-color
palette, but these 16-colors have a mapping to the first 64 colors
in the full 256 color palette. And setrgbpalette uses these 256 color
palette indexes. This is a bit complicated, buy a book and read the
details there.

But the simplest solution to your palette problem is the following.

  for (i = 0; i < 16; i++)
      setpalette(i,i);  /* match 16-color index with 256 color code */

After that piece of code, the setrgbpalette() calls work as expected.

This double indexing is done to maintain some EGA-compatibility.

Marko
--
            Marko Teittinen, PhD student, Computer Science
                 University of Maryland, College Park
                           marko@cs.umd.edu
Newsgroups: comp.graphics
From: jsuen@sfsuvax1.sfsu.edu (Julian Suen)
Subject: Diamond Stealth VRAM
Organization: San Francisco State University
 
 
Date: Sat, 23 Jan 1993 17:57:27 GMT


Newsgroups: comp.graphics.explorer
From: feuille@sc2a.unige.ch
Subject: importing 3D-objects into Showcase
Organization: University of Geneva, Switzerland
Date: Tue, 26 Jan 1993 16:59:32 GMT

  Hye,
      

      I was wondering if there is an easy way to input 3D objects created
 with Explorer into Showcase. And If it's possible which are the tools
 that would allow me to do that.

Feuilleaubois Eric
Lab. ITODYS
University Paris 7
Paris, France
E-mail: feuilleauboi@jupiter.itodys.jussieu.fr
From: ciemo@bananapc.csd.sgi.com (Dave Ciemiewicz)
Newsgroups: comp.graphics.explorer
Subject: Re: importing 3D-objects into Showcase
Date: 27 Jan 93 04:03:36 GMT
Organization: Silicon Graphics, Customer Support Division

In article <1993Jan26.185932.1@sc2a.unige.ch>, feuille@sc2a.unige.ch writes:
|>   Hye,
|>       
|> 
|>       I was wondering if there is an easy way to input 3D objects created
|>  with Explorer into Showcase. And If it's possible which are the tools
|>  that would allow me to do that.
|> 

It is not really possible now but may be in future releases of Explorer
and Showcase.

-- 

    __   * __   _  __  ___			
   /  \ / / /  / \/  \/   \ 	He was a man like any other man, however, not
  /    /  \/  /  /\  /    /	quite like any other man.
  \___/\__/\_/  /_/ / \__/	
	           *
From: mnn@ecs.soton.ac.uk (Mufeed Na'eem Ni'man)
Newsgroups: comp.graphics.explorer
Subject: dscribe
Summary: Can you reverse bytes on the dscribe?
Keywords: bytes reversal
Date: 21 Jan 93 14:01:39 GMT

Is it possible to reverse data types scalar(ie: bytes,int,char..etc)
in the dscribe,,,and if not could the SGI people add this to the
dscribe pallete under the scalars..?
-- 
Thanks!

			Mufeed.
(email:mnn@uk.ac.soton.ecs)
Newsgroups: comp.graphics.explorer
From: zundel@cc.gatech.edu (Eric Zundel Ayers)
Subject: Re: Renderer Performance, Interactivity
Keywords: Renderer, geometry, Glyphmaker
Reply-To: zundel@cc.gatech.edu (Eric Zundel Ayers)
Organization: Georgia Institute of Technology
Date: Fri, 22 Jan 1993 02:10:59 GMT

In article <1jmom9INN7ld@fido.asd.sgi.com> hashimoto@sgi.com (Roy Hashimoto) writes:
>In article <1993Jan21.052834.29868@cc.gatech.edu> zundel@cc.gatech.edu (Eric Zundel Ayers) writes:
>>Is it possible that the renderer module for Explorer 2.0 will be 
>>substantially quicker than the current version? 
>
>Geometry transmission time from one module to another has been one focus of
>the 2.0 effort.  Performance has been improved in this area.  Actual rendering
>performance has also been improved for certain primitives and situations.
>Another source of inefficiency is the amount of memory that the Render module
>chews up; this has also been addressed.

I have just looked at a visualization done with AVS similar to some of the 
ones we have been working with Explorer.  AVS includes a slider to
control tessellation, and by adjusting this, we were able to watch
a molecule made up of around 200 spheres rotate nicely, with about
1/2 seconds between re-draws (Running on a DECstation 5000).  
Our visualizations haven't come close to that, using Explorer.
You would think that changing the complexity of spheres would make a 
drastic difference for transformations, but it doesn't seem to.  I added a 
dial on my module to change complexity, but I think it would be a handy 
addition (or at least as a decoration to) the the Renderer.

Of course, the AVS renderer is assuming that you want all of your
spheres to have the same complexity.  Although I haven't tried it myself, 
I suppose Explorer would allow many spheres with different levels 
of complexity which might come in handy to someone.

>>The pick-box is nice,
>>but we'd like to get information about the original geometry from the
>>renderer, such as  "spheres 34, 35, and 36 are in the selection set"
>>and then, say,  perform an operation that makes those spheres transparent.
>
>The 2.0 beta contains a new picking scheme for Render that should provide
>you with the information you want.  You can label objects in your module
>and have those labels returned to you in the pick information.
>
>Roy Hashimoto
>hashimoto@sgi.com

This sounds like just what we need, (if it doesn't cost us in performance!)

Someone suggested that we would need faster hardware for better
performance in rendering spheres.  Is the DEC station hardware
really faster than SGI hardware?

Thanks for the info!
Eric.
Eric Z. Ayers
zundel@cc.gatech.edu
Graphics, Visualization, and Usability Center (GVU)
Georgia Institute of Technology, Atlanta, GA 30213 USA 
Newsgroups: comp.graphics.explorer
From: howardy@freud.nia.nih.gov (Howard Wai-Chun Yeung)
Subject: I solve the problem
Organization: (Natl. Institutes of Health, Bethesda, MD)
Date: Tue, 26 Jan 1993 20:12:11 GMT

|Here are some additional information about my problem:

|I connect my module with another module.
|My module is fired.  The module will turn yellow for a while, but
|the next module seems have no response - it doesn't turn yellow!
|I don't know whether it is a error in my module or some tricks I i
|am not aware of.

|Any suggestion is wellcome.

I shouldn't ask the module builder to write the MDW code for my module
since I make no connection between my lattice and output port in 
module builder. 
So, appearantly, the 

  cxOutputDataSet(cxOutputPortOpen("slice_lattice"), lattice_2d);

in my program get overwritten by the MDW.



Newsgroups: comp.graphics.explorer
From: howardy@freud.nia.nih.gov (Howard Wai-Chun Yeung)
Subject: Need help with my module
Organization: (Natl. Institutes of Health, Bethesda, MD)
Date: Mon, 25 Jan 1993 19:58:23 GMT


I write the following simple program using module muilder functions.
The problem is that it cannot send the lattice data to other modules.
I make a connection to WriteLat(), but no data is written.  It seems
like the lattice is empty.  But I retrive the data pointer from the 
lattice.  It does have data!
The problem has bug me for a few days.  I wish it will just be a small
mistake I am not aware of.



#include <stdio.h>

#include "cx/PortAccess.h"
#include "cx/DataTypes.h"
#include "cx/DataAccess.h"
#include "cx/UserFuncs.h"

#define  MAX_DIM        250
#define  SLICE_DIM      2


translate_u3l(file_name, x_dim, y_dim, z_dim, slice_no)
char *file_name;
long x_dim, y_dim, z_dim;
long slice_no;
{
  char *var;
  int *int_ptr;
  int i, j, k, size = 1;
  FILE *in_file;
  char *lat_file;
  long slice_dim[2];
  cxPrimType prim_type = cx_prim_long;
  cxLattice *lattice_2d;
 
  /*check any parameter error*/
  if (x_dim > 250 || y_dim >250 || z_dim >250)
  {
	printf("Dimension of the volume is too large.\n");
	return 0;;
  }

  /*set the maximum number of slice available*/
  cxInWdgtLongMinMaxSet("slice_no", 0, z_dim-1);

  /* open the input file */
  if((in_file=fopen(file_name, "r")) == NULL)
  {
        char str[128];
        sprintf(str,"cannot open input file %s", lat_file);
        cxModAlert( str );
 	fclose(in_file);
        return 0;
  }

  if((var = (char *)malloc(size)) == NULL)
  {
	printf("Memory allocation failed\n");
	exit(1);;
  }



   slice_dim[0] = x_dim;
   slice_dim[1] = y_dim;
   lattice_2d = cxLatNew(SLICE_DIM,slice_dim,NO_VARIABLE,prim_type,
			SLICE_DIM,cx_coord_uniform);

        
 
    /*no error in share memory allocation*/
   if (!cxDataAllocErrorGet())
   {
	cxLatPtrGet(lattice_2d, NULL, &int_ptr, NULL, NULL);
   }
   else
   {
	printf("Lattice allocation error.\n");
        return 0;
   }

   /*in_file then is the pointer to the opened file read only 
	the portion of file which is the slice*/
   fseek(in_file, 0L, 0); 
   fseek(in_file, x_dim*y_dim*slice_no, 1);
    
   /*x_dim is number of colums while y_dim is number of row*/
   for (i=0; i<y_dim; i++){
	for (j=0; j<x_dim; j++){      
		fread(var, size, 1, in_file);
		int_ptr[i*x_dim + j] = (long) (*var); 
	}
   }
    
   /*x_dim is number of colums while y_dim is number of row*/
  cxOutputDataSet(cxOutputPortOpen("slice_lattice"), lattice_2d);
  free(var);
  fclose(in_file);
  return;
}



With thousand thanks!







Newsgroups: comp.graphics.explorer
From: lnspet@forest.nia.nih.gov (Jim Haxby)
Subject: debugging in module builder
Organization: National Institutes of Health, Bethesda, MD
Date: Thu, 21 Jan 1993 20:59:47 GMT

Is there any ways that I can debug interactively?
Or any duggging scheme form someone who are experienced with
module builder.

Thanks in advance.

Newsgroups: comp.graphics.explorer
From: howardy@freud.nia.nih.gov (Howard Wai-Chun Yeung)
Subject: rendering a surface instead of whole volume
Organization: (Natl. Institutes of Health, Bethesda, MD)
Date: Mon, 25 Jan 1993 16:22:31 GMT

I have a MRI file of a human brain (5 meg of pixel values)
so the rendering of the data set takes more than a few seconds.
Is there any way that I just render the surface of the brain instead the
whole data set?  

Newsgroups: comp.graphics.explorer
From: howardy@freud.nia.nih.gov (Howard Wai-Chun Yeung)
Subject: Additional info about my module.
Organization: (Natl. Institutes of Health, Bethesda, MD)
Date: Mon, 25 Jan 1993 22:12:26 GMT

Here are some additional information about my problem:

I connect my module with another module.
My module is fired.  The module will turn yellow for a while, but
the next module seems have no response - it doesn't turn yellow!
I don't know whether it is a error in my module or some tricks I i
am not aware of.

Any suggestion is wellcome.



Newsgroups: comp.graphics.explorer
From: lnspet@forest.nia.nih.gov (Jim Haxby)
Subject: how to print out **dims
Organization: National Institutes of Health, Bethesda, MD
Date: Fri, 22 Jan 1993 22:05:27 GMT

How can I print out the dimension info of a 2d-lattice

I call the cxLatDescGet function:

        long d_nDims;
        long **d_nDim;
        long d_hasData;
        long d_nDataVar;
        cxPrimType d_primType;
        long d_hasCoord;
        long d_nCoordVar;
        cxCoordType d_coordType;

        cxLatDescGet(lattice_2d, &d_nDims, d_nDim, &d_hasData, &d_nDataVar,
                        &d_primType, &d_hasCoord, &d_nCoordVar, &d_coordType);


I have been trying various ways to print out the 'd_nDim' content and
have been geeting segmentation fault all the time.

Thanks.   



Newsgroups: comp.graphics.explorer
From: sougata@cc.gatech.edu (Sougata Mukherjea)
Subject: Using deffierent colors inside a single group of spheres
Reply-To: sougata@cc.gatech.edu (Sougata Mukherjea)
Organization: College of Computing
Date: Wed, 27 Jan 1993 18:56:47 GMT

Hi,
I am defining a group of spheres with cxGeoSpheresDefine.
Is it possible to assign different colors to the individual spheres of that
group?
If so, how is it possible?

Note that I can call cxGeoSpheresDefine for each group of spheres with 
different colors. But that results in performance degradation during rendering
time.

Any help will be appreciated,
- Sougata

=============================================================================	
  Sougata Mukherjea (sougata@cc.gatech.edu)
  Graphics Visualization and Usability Center, College of Computing,
  Georgia Institute of Technology. 
=============================================================================
From: anadeem@ampere.comp.graphics.exlorer (Ahmed Nadeem)
Newsgroups: comp.graphics.explorer
Subject: MRI And CT-SCAN Images For Dogs
Date: 27 Jan 93 18:12:10 GMT
Article-I.D.: ampere.ANADEEM.93Jan27111210
Distribution: comp.graphics.explorer
Organization: /home/ampere1/anadeem/.organization

Netters,
      I am currently working on a research project that involves construction 
of realistic, solid or geometric models for dogs.
      Does anyone know where I can get serial section images( MRI, CT-SCAN, 
etc ) for dogs?
                                                       Thanks,
                                                              Ahmed Nadeem
Newsgroups: comp.graphics.explorer
From: justin@scs.leeds.ac.uk (J M Ware)
Subject: help with geometry datatype
Originator: justin@csparc5
Organization: The University of Leeds, School of Computer Studies
Date: Wed, 27 Jan 93 11:12:27 GMT


Hi,

could anyone direct me towards example of modules that produce geometry data
rather than lattices or pyramids.  I'm particularly interested in examples that
have source code as I'm interested in writing a module that produces geometry
data for `render'.  Simple examples will probably be of more use than huge
complex ones (though I'm *not* that fussy).  I've written modules before and 
reasonably competent with the module builder etc.

Has anyone successfully got the example in chapter 3 of the module writers
guide to work correctly?  If you have, could you let me have the details of
what you did.

Thanks in advance for any help,

Justin (justin@scs.leeds.ac.uk)

Newsgroups: comp.graphics.explorer
From: srfergu@rufus.erenj.com (Scott Ferguson)
Subject: Re: Renderer Performance, Interactivity
Keywords: Renderer, geometry, Glyphmaker
Organization: Exxon Research & Engineering Co.
Date: Thu, 21 Jan 1993 13:50:20 GMT

In article <1993Jan21.052834.29868@cc.gatech.edu>, zundel@cc.gatech.edu (Eric Zundel Ayers) writes:
|> 
|> 1) In a scene with  160 spheres, rendering takes from 3 - 9 seconds,
|>    and rotations in the renderer take between 5 and 10 seconds. 
|>    This is on the edge of what we have defined as "interactability"
|> 
|> 2) In a scene with 1200 spheres (which is not uncommon in the kind of 
|>    data we are working with right now) Times increase to well over a
|>    minute to render but still around 10 seconds to rotate.  
|> 
|> 3) In a scene with 2500 spheres, the renderer has lots of problems,
|>    with rendering time increasing exponentially for each attempt to
|>    render the same scene.(first 2 minutes, then 4 minutes, then 8 minutes...) 

Spheres take a long time to draw, regardless. If you want interactivity
in rotating 2000 spheres, you're going to need a graphics controller with
hardware for fast sphere rendering. 

Does SGI have anything like this? In the Reality Engine or something? I'm
not intimate with the different levels of graphics boards on SGI just yet.

The only system I've used that actually has this is a Stardent 750 with
G3 graphics board (hardware spheres, multipass transparency, and texture
mapping). The sphere hardware came from older Stellar workstations.

On my Stardent system, I can rotate a 2000-sphere molecule as if it was in
my hand.
-- 
----------------------------------------------------------------------
Scott Ferguson                        Exxon Research & Engineering Co.
Project Engineer                      New Jersey
----------------------------------------------------------------------
"When I was your age son, dogs didn't even have the right to vote!"
(J. Seinfeld)
Newsgroups: comp.graphics.explorer
From: lnspet@forest.nia.nih.gov (Jim Haxby)
Subject: compiler warning from mbuilder
Organization: National Institutes of Health, Bethesda, MD
Date: Fri, 22 Jan 1993 19:36:33 GMT

I compile my program with the module builder and I
get the following warnings:

ccom: Warning: unformat_to_3dLat.c, line 87: Argument 3 Type Doesn't Match prototype description; prototype: pointer to pointer to void is different from actual: pointer to pointer to int
        cxLatPtrGet(lattice_2d, 0, &int_ptr, 0, 0);
      -------------------------------------------^
--- ReadBin ---
        rm -f ReadBin
        cc -o ReadBin  /usr/explorer/lib/cxMcw.o   ReadBin.mdw.o unformat_to_3dLat.o -g -prototypes -cckr -float  -L  -L/lib -L/usr/lib   -L/usr/explorer/lib -lfortranApi -lapi -lcxna -L/usr/lib -lm   -lsun -lc_s -lmpc    
/usr/bin/ld:
Warning: malloc: multiply defined
        previous (used) definition from '/usr/lib/libc_s.a';
        new (ignored) definition from '/usr/lib/libmpc.a'
Warning: free: multiply defined
        previous (used) definition from '/usr/lib/libc_s.a';
        new (ignored) definition from '/usr/lib/libmpc.a'
Warning: realloc: multiply defined
        previous (used) definition from '/usr/lib/libc_s.a';
        new (ignored) definition from '/usr/lib/libmpc.a'


Are these warning bad? 
Any ways to eliminate the warnings?

Thanks in advance.
From: demers@cs.ucsd.edu (David DeMers)
Newsgroups: comp.graphics.explorer
Subject: Newbie data question
Date: 22 Jan 93 00:49:08 GMT
Organization: =CSE Dept., U.C. San Diego


So, I haven't used Explorer before, except once about
a year ago when it was brand new.  I'm finding it hard 
to get the answer out of the documentation (we didn't
get any Explorer manuals with the upgrade to IRIX 4.0.1), 
for what should be a simple question.  I have a data file 
consisting of four values per line; 
x-coord, y-coord, z-coord, datavalue.

How do I get this into Explorer?


I can probably write a GL program in a few days to
do this, but seems like  something Explorer should 
handle easily.  

Thanks for any pointers!

Dave

-- 
Dave DeMers			 	        demers@cs.ucsd.edu
Computer Science & Engineering	C-014		demers%cs@ucsd.bitnet
UC San Diego					...!ucsd!cs!demers
La Jolla, CA 92093-0114	(619) 534-0688, or -8187, FAX: (619) 534-7029
From: hwa@batman.asd.sgi.com (John Hwa)
Newsgroups: comp.graphics.explorer
Subject: Re: Newbie data question
Date: 22 Jan 93 22:55:14 GMT
Organization: Silicon Graphics, Inc.
NNTP-Posting-Host: batman.asd.sgi.com

In article <43847@sdcc12.ucsd.edu>, demers@cs.ucsd.edu (David DeMers) writes:
|> 
|> So, I haven't used Explorer before, except once about
|> a year ago when it was brand new.  I'm finding it hard 
|> to get the answer out of the documentation (we didn't
|> get any Explorer manuals with the upgrade to IRIX 4.0.1), 
|> for what should be a simple question.  I have a data file 
|> consisting of four values per line; 
|> x-coord, y-coord, z-coord, datavalue.
|> 
|> How do I get this into Explorer?
|> 
|> 
|> I can probably write a GL program in a few days to
|> do this, but seems like  something Explorer should 
|> handle easily.  
|> 
|> Thanks for any pointers!
|> 
|> Dave
|> 
|> -- 
|> Dave DeMers			 	        demers@cs.ucsd.edu
|> Computer Science & Engineering	C-014		demers%cs@ucsd.bitnet
|> UC San Diego					...!ucsd!cs!demers
|> La Jolla, CA 92093-0114	(619) 534-0688, or -8187, FAX: (619) 534-7029

In the ftp site, swedishchef.lerc.nasa.gov (139.88.54.33), you can
find some dscribe examples that are similiar to what you want.
Look under the directory explorer/modules/Datascribe_Examples.
Once you extract the files, the dscribe modules you want to look at
is ReadXYZData.


John P. Hwa
hwa@sgi.com
Organization: University of Maine System
Date: Thursday, 21 Jan 1993 13:05:05 EST
From: <SHALEE@MAINE.MAINE.EDU>
Newsgroups: comp.graphics.explorer
Subject:    image warping

I am trying to implement an image correlation procedure for identifying
displacements of selected points by comparing two images.  I need a warping
function to do this.  I haven't found one using explorer.  The ImageVision
library does have one, as well as BiCubic resampling.  Does this capability
exist in explorer?  Thanks

Stephen Shaler
University of Maine
steve@pith.umecfr.maine.edu
From: robert@texas.asd.sgi.com (Robert Skinner)
Newsgroups: comp.graphics.explorer
Subject: Re: Need help with my module
Date: 27 Jan 1993 01:02:48 GMT
Organization: Silicon Graphics, Inc.  Mountain View, CA
NNTP-Posting-Host: texas.asd.sgi.com


In article <1993Jan25.195823.12754@alw.nih.gov>, howardy@freud.nia.nih.gov writes:
>     
>    /*x_dim is number of colums while y_dim is number of row*/
>   cxOutputDataSet(cxOutputPortOpen("slice_lattice"), lattice_2d);

Everything looks OK to me.  I'd start debugging at the output
and work my way up:

	what does cxOutputPortOpen("slice_lattice") return?
		-- should be >= 0, if not, then port "slice_lattice"
		   doesn't exist

	what is lattice_2d?
		-- should not be != NULL, if it is, then something
		   is wrong with the inputs to cxLatNew.  Print them
		   out.  If its not obvious what the problem is, post 
		   another article.



Robert Skinner

PSALM OF THE TWENTY-THIRD YEAR

	Dr. (     ) is my professor
	I shall not pass.
	He maketh me to exhibit mine ignorance before the whole class.
	He telleth me more than I can write.
	He lowreth mine grades.
	Yea, though I walk through the corridors of knowledge, I do not learn.
	He tryeth to teach me.
	He writeth equations before me in hopes that I will understand them.
	He bombardeth my head with integrations.
	My calculator freezeth up.
	Surely enthalpies and entropies shall follow me all the days of my life
	And I shall dwell in the School of
	Engineering forever.
From: hwa@batman.asd.sgi.com (John Hwa)
Newsgroups: comp.graphics.explorer
Subject: Re: VectorGen
Date: 22 Jan 93 00:20:01 GMT
Organization: Silicon Graphics, Inc.
NNTP-Posting-Host: batman.asd.sgi.com

In article <1993Jan21.134454.14054@erenj.com>, srfergu@rufus.erenj.com (Scott Ferguson) writes:
|> In article <1993Jan20.143702.3470@julian.uwo.ca>, lferjo@gfx.engga.uwo.ca (Lisa Ferjo) writes:
|> |> 
|> |> I have a question about VectorGen. I read in 4 data variables using a dscribe
|> |> module.  By using ChannelSelect I use the 4th data variables to map specific
|> |> colours onto my image.  I want to use the first three variables as input 
|> |> to VectorGen.  But I get the error:
|> |>           Type Mismatch: Input port "Input" of type cxLattice received 
|> |>                   unexpected data.
|> |>    INput port wants NUM data Variables : [1..3]
|> |>    incoming data is Num data Variables: 4
|> |> Is there any way around this besides creating two dscribe modules, one to 
|> |> read in the values for colourmap and another for VectorGen.
|> |> 
|> |> Thanks Lisa
|> 
|> What you need is a module to extract a vector rather than a single channel,
|> much like ChannelSelect. Looks like you'll need to write your own at this
|> point, with mbuilder.
|> 
|> Will there be a module like this in the standard 2.0 module set?

One thing you can try is to build a dscribe module with 2 lattices
defined in an output Explorer template.  One lattice contains data
from first three variables which can feed into VectorGen and the
other lattice contains the 4th variable for color mapping purposes.

John P. Hwa
hwa@sgi.com