Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /branches/vis12/src/lib/common/nrrd.c
ViewVC logotype

Annotation of /branches/vis12/src/lib/common/nrrd.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2035 - (view) (download) (as text)

1 : jhr 2035 /*! \file nrrd.c
2 :     *
3 :     * \author John Reppy
4 :     *
5 :     * Common utility code for dealing with nrrd files.
6 :     */
7 :    
8 :     /*
9 :     * COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu)
10 :     * All rights reserved.
11 :     */
12 :    
13 :     #include "Diderot/diderot.h"
14 :     #include <teem/nrrd.h>
15 :    
16 :     Nrrd *Diderot_LoadNrrdFile (WorldPrefix_t *wrld, const char *filename)
17 :     {
18 :     /* create a nrrd; at this point this is just an empty container */
19 :     Nrrd *nin = nrrdNew();
20 :    
21 :     /* read in the nrrd from file */
22 :     if (nrrdLoad(nin, filename, NULL) != 0) {
23 :     char *msg = biffGetDone(NRRD);
24 :     biffMsgAdd(wrld->errors, msg);
25 :     FREE (msg);
26 :     return 0;
27 :     }
28 :    
29 :     return nin;
30 :    
31 :     }

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0