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

SCM Repository

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

Diff of /branches/vis12/src/compiler/fields/image-info.sml

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

trunk/src/image-info/image-info.sml revision 106, Tue Jun 15 15:29:37 2010 UTC trunk/src/compiler/IL/image-info.sml revision 192, Mon Aug 2 16:23:42 2010 UTC
# Line 8  Line 8 
8    
9  structure ImageInfo : sig  structure ImageInfo : sig
10    
11      val getInfo : string -> {      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
27    
28        val toString : info -> string
29    
30    end = struct    end = struct
31    
32        datatype info = ImgInfo of {
33                id : OS.FileSys.file_id,            (* ID of image file *)
34                dim : int,                          (* dimension of space *)
35                ty : RawTypes.ty,                   (* types of scalar samples *)
36                origin : FloatLit.float list,       (* center of first sample *)
37                sizes : int list                    (* number of samples along each axis *)
38              }
39    
40        fun same (ImgInfo{id=a, ...}, ImgInfo{id=b, ...}) = (a = b)
41    
42        fun hash (ImgInfo{id, ...}) = OS.FileSys.hash id
43    
44        fun getInfo fileName = let
45              val {version, header} = RunDNorm.run fileName
46              in
47    (* FIXME*)raise Fail "getInfo"
48              end
49    
50        fun toString (ImgInfo{...}) = "IMAGE" (* FIXME *)
51    
52    end    end

Legend:
Removed from v.106  
changed lines
  Added in v.192

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