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

SCM Repository

[diderot] Diff of /trunk/src/compiler/fields/image-info.sml
ViewVC logotype

Diff of /trunk/src/compiler/fields/image-info.sml

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

trunk/src/compiler/image-info/image-info.sml revision 130, Thu Jul 1 20:08:43 2010 UTC trunk/src/compiler/IL/image-info.sml revision 165, Wed Jul 21 15:20:53 2010 UTC
# Line 8  Line 8 
8    
9  structure ImageInfo : sig  structure ImageInfo : sig
10    
11      type info = {      datatype info = ImgInfo of {
12                id : OS.FileSys.file_id,            (* ID of image file *)
13              dim : int,                          (* dimension of space *)              dim : int,                          (* dimension of space *)
14              ty : RawTypes.ty,                   (* types of scalar samples *)              ty : RawTypes.ty,                   (* types of scalar samples *)
15              origin : FloatLit.float list,       (* center of first sample *)              origin : FloatLit.float list,       (* center of first sample *)
16              ??              sizes : int list                    (* number of samples along each axis *)
17            }            }
18    
19      (* are the underlying files the same? *)
20        val same : info * info -> bool
21    
22      (* hash value (based on image file ID) *)
23        val hash : info -> word
24    
25      (* get image info from a Nrrd file *)
26      val getInfo : string -> info      val getInfo : string -> info
27    
28    end = struct    end = struct
29    
30        datatype info = ImgInfo of {
31                id : OS.FileSys.file_id,            (* ID of image file *)
32                dim : int,                          (* dimension of space *)
33                ty : RawTypes.ty,                   (* types of scalar samples *)
34                origin : FloatLit.float list,       (* center of first sample *)
35                sizes : int list                    (* number of samples along each axis *)
36              }
37    
38        fun same (ImgInfo{id=a, ...}, ImgInfo{id=b, ...}) = (a = b)
39    
40        fun hash (ImgInfo{id, ...}) = OS.FileSys.hash id
41    
42        fun getInfo fileName = let
43              val {version, header} = RunDNorm.run fileName
44              in
45    (* FIXME*)raise Fail "getInfo"
46              end
47    
48    end    end

Legend:
Removed from v.130  
changed lines
  Added in v.165

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