Changeset 1001 for trunk/psLib/test/image/tst_psImageIO.c
- Timestamp:
- Jun 11, 2004, 9:18:41 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/image/tst_psImageIO.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/image/tst_psImageIO.c
r999 r1001 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-06-11 1 8:50:49$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-06-11 19:18:41 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 16 16 #include <string.h> 17 17 #include <stdlib.h> 18 #include <sys/stat.h> 19 #include <sys/types.h> 18 20 19 21 #include "psTest.h" … … 172 174 173 175 #define testReadType(TYP,filename) \ 174 testReadTypeSize(1,1,0,0,1,1,TYP,"1x1_" filename); \ 175 testReadTypeSize(M,1,M/4,0,M/2,1,TYP,"Mx1_" filename); \ 176 testReadTypeSize(1,N,0,N/4,1,N/2,TYP,"1xN_" filename); \ 177 testReadTypeSize(M,N,M/4,N/4,M/2,N/2,TYP,"MxN_" filename); 176 mkdir("tmpImages",0777); \ 177 testReadTypeSize(1,1,0,0,1,1,TYP,"tmpImages/1x1_" filename); \ 178 testReadTypeSize(M,1,M/4,0,M/2,1,TYP,"tmpImages/Mx1_" filename); \ 179 testReadTypeSize(1,N,0,N/4,1,N/2,TYP,"tmpImages/1xN_" filename); \ 180 testReadTypeSize(M,N,M/4,N/4,M/2,N/2,TYP,"tmpImages/MxN_" filename); 178 181 179 182 testReadType(U8,"U8.fits"); … … 222 225 223 226 psLogMsg(__func__,PS_LOG_INFO,"Following should be an error as extnum is invalid."); 224 image = psImageReadSection(image,0,0,M,N,0,NULL,4," MxN_F32.fits");227 image = psImageReadSection(image,0,0,M,N,0,NULL,4,"tmpImages/MxN_F32.fits"); 225 228 if (image != NULL) { 226 229 psError(__func__,"Image returned though extnum was invalid."); … … 228 231 } 229 232 psLogMsg(__func__,PS_LOG_INFO,"Following should be an error as extname is invalid."); 230 image = psImageReadSection(image,0,0,M,N,0,"bogus",0," MxN_F32.fits");233 image = psImageReadSection(image,0,0,M,N,0,"bogus",0,"tmpImages/MxN_F32.fits"); 231 234 if (image != NULL) { 232 235 psError(__func__,"Image returned though extnum was invalid."); … … 288 291 GENIMAGE(img,m,n,F32,0); 289 292 GENIMAGE(img2,m,n,F32,row+2*col); 293 mkdir("tmpImages",0777); 290 294 remove 291 295 ("writeTest.fits"); 292 if (psImageWriteSection(img,0,0,0,NULL,0," writeTest.fits") != 0) {296 if (psImageWriteSection(img,0,0,0,NULL,0,"tmpImages/writeTest.fits") != 0) { 293 297 psError(__func__,"Couldn't write writeTest.fits."); 294 298 return 14; 295 299 } 296 if (psImageWriteSection(img2,0,0,0,NULL,0," writeTest.fits") != 0) {300 if (psImageWriteSection(img2,0,0,0,NULL,0,"tmpImages/writeTest.fits") != 0) { 297 301 psError(__func__,"Couldn't overwrite writeTest.fits."); 298 302 return 15; … … 302 306 303 307 // Did it really overwrite the pixel values? Let's read it in and see. 304 img = psImageReadSection(NULL,0,0,m,n,0,NULL,0," writeTest.fits");308 img = psImageReadSection(NULL,0,0,m,n,0,NULL,0,"tmpImages/writeTest.fits"); 305 309 if (img == NULL) { 306 310 psError(__func__,"Could not read in writeTest.fits.");
Note:
See TracChangeset
for help on using the changeset viewer.
