コード例 #1
0
ファイル: pcond2.c プロジェクト: germolinal/Schedules
extern COLOR *
firstscan(void)				/* return first processed scanline */
{
	if (mbcalfile != NULL)		/* load macbethcal file */
		getmbcalfile(mbcalfile, &mbcond);
	else if (cwarpfile != NULL) {
		if ((cwarp = load3dw(cwarpfile, NULL)) == NULL)
			syserror(cwarpfile);
	} else
		if (lumf == rgblum)
			comprgb2rgbWBmat(mbcond.cmat, inprims, outprims);
		else
			compxyz2rgbWBmat(mbcond.cmat, outprims);
	if (what2do&DO_ACUITY)
		initacuity();
	scanbuf = (COLOR *)malloc(scanlen(&inpres)*sizeof(COLOR));
	if (scanbuf == NULL)
		syserror("malloc");
	nread = 0;
	return(nextscan());
}
コード例 #2
0
ファイル: pcond.c プロジェクト: Pizookies/Radiance
static void
mapimage(void)				/* map picture and send to stdout */
{
	COLOR	*scan;

	comphist();			/* generate adaptation histogram */
	check2do();			/* modify what2do flags */
	if (what2do&DO_VEIL)
		compveil();		/* compute veil image */
	if (!(what2do&DO_LINEAR))
		if (mkbrmap() < 0)	/* make tone map */
			what2do |= DO_LINEAR;	/* failed! -- use linear */
#if ADJ_VEIL
		else if (what2do&DO_VEIL)
			adjveil();	/* else adjust veil image */
#endif
	if (what2do&DO_LINEAR) {
		if (scalef <= FTINY) {
			if (what2do&DO_HSENS)
				scalef = htcontrs(Lb(0.5*(Bldmax+Bldmin))) /
						htcontrs(Lb(bwavg));
			else
				scalef = Lb(0.5*(Bldmax+Bldmin)) / Lb(bwavg);
			scalef *= WHTEFFICACY/(inpexp*ldmax);
		}
		fputexpos(inpexp*scalef, stdout);	/* record exposure */
		if (lumf == cielum) scalef /= WHTEFFICACY;
	}
	fputformat(COLRFMT, stdout);	/* complete header */
	putchar('\n');
	fputsresolu(&inpres, stdout);	/* resolution doesn't change */
					/* condition our image */
	for (scan = firstscan(); scan != NULL; scan = nextscan())
		if (fwritescan(scan, scanlen(&inpres), stdout) < 0) {
			fprintf(stderr, "%s: scanline write error\n",
					progname);
			exit(1);
		}
}
コード例 #3
0
ファイル: RedFly.cpp プロジェクト: CMon/arduinoWifiRemote
uint8_t REDFLY::nextscan(char *ssid) { nextscan(ssid, 0, 0); }
コード例 #4
0
ファイル: cps.c プロジェクト: timburrow/ovj3
/*-----------------------------------------------------------------------
|  createPS(int arrayDim)
|	create the acode for the Pulse Sequence.
+-----------------------------------------------------------------------*/
void createPS(int arrayDim)
{
    int i;

    if (ra_flag)
    {
      ra_inovaacqparms(ix);
    }

    set_counters();

    /* code for HSrotor? */

    new_lcinit_arrayvars();

    if ( ix == getStartFidNum() )
    {
       /*
        *  We may have a monitor system (ILI, ISI, ...) and
        *  we might have an MTS Grad Power Amp attached
        *
        *  SAFETY CHECK & setupcode
        */

    }

    /*
         Do initialization for RF , DDR & Gradient that happens for each FID
         setRF();
    */
    postInitScanCodes();


    /*
      if (ix == getStartFidNum())
      {
        ifzero(initflagrt);
          reset_pgdflag();
          initHSlines();
        endif(initflagrt);
      }
    */

    arrayedshims();	/* if shims arrayed, set them again, load will be  */
			/* set to 'y' in arrayfuncs  */

    if (vttemp != oldvttemp)	/* change vt setting only if it changed */
    {				/* why?, (because it takes time) */
	    setvt();		/* And it includes fifoStop/Sync */
        wait4vt();		/* And this includes fifoStop/Sync */
    }
    oldvttemp = vttemp;		/* if arrayed, vttemp will get new value */

    if (spin != oldspin) 	/* chag spin setting only if it changed */
    {				/* why?, (because it takes time) */
       setspin();		/* And it includes fifoStop/Sync */
       wait4spin();		/* And this includes fifoStop/Sync */
    }
    oldspin = spin;

    /* capture elapsed time prior to pad and nt looping */
    preNextScanDuration();
    ifzero((oph-8));
    preacqdelay(padactive);
    endif((oph-8));

    /* ###################################################################### */

    nextscan();  /* nt looping reset to this point.  */

    /* ###################################################################### */


    loadtablecall = -1; /* initializes loadtablecall variable       */
    inittablevar();     /* initialize all internal table variables  */
    initparms_img();    /* does getval on many variables            */
    enableHDWshim();    /* config done internally */
    setAmpBlanking();   /* if unblank mode, restore unblank */
    if ( doSampling() )
    {
       zerofid=0;
       pulsesequence();	/* generate Acodes from USER Pulse Sequence */
       initializeSeq = 0;
    }
    else
    {
       zerofid=1;
       sendzerofid(arrayDim);
    }

    /* reset tables between array elements */
    for (i = 0; i < MAXTABLE; i++)
    {
       tmptable_order[i] = table_order[i];
       if (Table[i]->reset)
          reset_table(Table[i]);
    }

    return;
}