imgrdfptiff

Capsim Block Documentation

Short Description

Read a floating point TIFF image.

Top
Parameters
Num Description Type Name Default Value
0 File that contains floating point TIFF image file fileName image.tif
Top
States
Num Type Name Initial Value Description
0 int obufs
1 int haveRead 0
Top

Declarations


 

	int i,j,k;
	float x;
	int  n;
	image_t	img;
	dsp_floatMatrix_Pt	tiffImage_P;



Top

Initialization Code



 

	if( (obufs = NO_OUTPUT_BUFFERS()) < 1 ) {
		fprintf(stderr,"rdfptiff: no output buffers\n");
		return(2);
	}
        for(j=0; j
    
Top

Main Code



 

while(!haveRead) {
	
	  tiffImage_P=IIP_ReadFloatTIFFMatrix(fileName);
	  if(tiffImage_P == NULL) {
		fprintf(stderr,"imgrdfptiff: could not read image\n");
		return(3);
	  }
	  haveRead=1;

	  for(j=0; jmatrix_PP;
		img.width = tiffImage_P->width;
		img.height = tiffImage_P->height;
		OUTIMAGE(j,0) = img;
	  }
}
return(0);
	




Top

Wrapup Code



 

        return(0);




Top

License



/*  Capsim (r) Text Mode Kernel (TMK) Star Library (Blocks)
    Copyright (C) 1989-2002  XCAD Corporation 

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    http://www.xcad.com
    XCAD Corporation
    Raleigh, North Carolina */
*/


Top

Description



 

/*************************************************************
			imgrdfptiff()
***************************************************************
Description:  Read a floating point TIFF  image.
	Auto fan-out.
Programmer: Sasan Ardalan
Date:  October 14, 1993 
*/