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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/nrrd/nrrd-info.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/nrrd/nrrd-info.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4431, Thu Aug 18 23:21:27 2016 UTC revision 4432, Fri Aug 19 15:10:12 2016 UTC
# Line 13  Line 13 
13    
14  structure NrrdInfo : sig  structure NrrdInfo : sig
15    
16      datatype info = NrrdInfo of {      datatype t = NrrdInfo of {
17          id : OS.FileSys.file_id,        (* ID of nrrd file *)          id : OS.FileSys.file_id,        (* ID of nrrd file *)
18          dim : int,                      (* dimension of space *)          dim : int,                      (* dimension of space *)
19          ty : RawTypes.t,                (* types of data values *)          ty : RawTypes.t,                (* types of data values *)
# Line 26  Line 26 
26        }        }
27    
28    (* are the underlying files the same? *)    (* are the underlying files the same? *)
29      val same : info * info -> bool      val same : t * t -> bool
30    
31    (* hash value (based on nrrd file ID) *)    (* hash value (based on nrrd file ID) *)
32      val hash : info -> word      val hash : t -> word
33    
34    (* get info from a Nrrd file.  If the file does not exist, then a warning is inserted    (* get info from a Nrrd file.  If the file does not exist, then a warning is inserted
35     * into the error stream and NONE is returned.     * into the error stream and NONE is returned.
36     *)     *)
37      val getInfo : Error.err_stream * string -> info option      val getInfo : Error.err_stream * string -> t option
38    
39      val dim : info -> int               (* dimension of space *)      val dim : t -> int                  (* dimension of space *)
40      val sizes : info -> int list        (* size of each dimension (not including the data axis) *)      val sizes : t -> int list           (* size of each dimension (not including the data axis) *)
41      val voxelInfo : info -> {           (* get information about the data in the file *)      val voxelInfo : t -> {              (* get information about the data in the file *)
42              elemTy : RawTypes.t,          (* type of voxel elements *)              elemTy : RawTypes.t,          (* type of voxel elements *)
43              kind : NrrdEnums.axis_kind,   (* nrrd file kind of voxel *)              kind : NrrdEnums.axis_kind,   (* nrrd file kind of voxel *)
44              nElems : int                  (* number of elements per voxel *)              nElems : int                  (* number of elements per voxel *)
45            }            }
46      val voxelSzB : info -> int          (* size in bytes of a voxel *)      val voxelSzB : t -> int             (* size in bytes of a voxel *)
47      val stride : info -> int            (* for non-scalar data, this returns the *)      val stride : t -> int               (* for non-scalar data, this returns the *)
48                                          (* number of samples between voxels *)                                          (* number of samples between voxels *)
49      val sampleTy : info -> RawTypes.t   (* representation type of samples *)      val sampleTy : t -> RawTypes.t      (* representation type of samples *)
50    
51    end = struct    end = struct
52    
53      datatype info = NrrdInfo of {      datatype t = NrrdInfo of {
54          id : OS.FileSys.file_id,        (* ID of nrrd file *)          id : OS.FileSys.file_id,        (* ID of nrrd file *)
55          dim : int,                      (* dimension of space *)          dim : int,                      (* dimension of space *)
56          ty : RawTypes.t,                (* the type of the elements *)          ty : RawTypes.t,                (* the type of the elements *)

Legend:
Removed from v.4431  
changed lines
  Added in v.4432

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