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 3291 - (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 : jhr 3291 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
10 :     *
11 :     * COPYRIGHT (c) 2015 The University of Chicago
12 : jhr 2035 * All rights reserved.
13 :     */
14 :    
15 :     #include "Diderot/diderot.h"
16 :     #include <teem/nrrd.h>
17 :    
18 :     Nrrd *Diderot_LoadNrrdFile (WorldPrefix_t *wrld, const char *filename)
19 :     {
20 :     /* create a nrrd; at this point this is just an empty container */
21 :     Nrrd *nin = nrrdNew();
22 :    
23 :     /* read in the nrrd from file */
24 :     if (nrrdLoad(nin, filename, NULL) != 0) {
25 :     char *msg = biffGetDone(NRRD);
26 :     biffMsgAdd(wrld->errors, msg);
27 :     FREE (msg);
28 :     return 0;
29 :     }
30 :    
31 :     return nin;
32 :    
33 :     }

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