(* image-info.sml * * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu) * All rights reserved. * * Information about a NRRD file *) structure ImageInfo : sig datatype info = ImgInfo of { id : OS.FileSys.file_id, (* ID of image file *) dim : int, (* dimension of space *) ty : RawTypes.ty, (* types of scalar samples *) origin : FloatLit.float list, (* center of first sample *) sizes : int list (* number of samples along each axis *) } (* are the underlying files the same? *) val same : info * info -> bool (* hash value (based on image file ID) *) val hash : info -> word (* get image info from a Nrrd file *) val getInfo : string -> info val toString : info -> string end = struct datatype info = ImgInfo of { id : OS.FileSys.file_id, (* ID of image file *) dim : int, (* dimension of space *) ty : RawTypes.ty, (* types of scalar samples *) origin : FloatLit.float list, (* center of first sample *) sizes : int list (* number of samples along each axis *) } fun same (ImgInfo{id=a, ...}, ImgInfo{id=b, ...}) = (a = b) fun hash (ImgInfo{id, ...}) = OS.FileSys.hash id fun getInfo fileName = let val {version, header} = RunDNorm.run fileName in (* FIXME*)raise Fail "getInfo" end fun toString (ImgInfo{...}) = "IMAGE" (* FIXME *) end
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: (* FIXME*)raise Fail "getInfo" end fun toString (ImgInfo{...}) = "IMAGE" (* FIXME *) end