[Swift-devel] mappers on files that are inputs and outputs
Ben Clifford
benc at hawaga.org.uk
Wed May 16 10:26:10 CDT 2007
Here's a code fragment:
type volume {
imagefile img;
headerfile hdr;
};
volume atlas <simple_mapper;prefix="atlas">;
atlas = softmean(slices);
string directions[] = [ "x", "y", "z"];
foreach direction in directions {
giffile outputgif
<single_file_mapper;file=@strcat("atlas-",direction,".gif")>;
string option = @strcat("-",direction);
outputgif = slice_to_gif(atlas, option, ".5");
}
When this is run as part of a workflow, there are no atlas.* files and the
atlas = softmean(slices) line causes atlas.hdr and atlas.img files to be
created and placed in my working directory, and also used in the
subsequent slice_to_gif calls.
If I prune the program in a text editor so that the altas = ... line is
not called, and leave the atlas.hdr and atlas.img files in place in my
current directory (so that the files are now input files, rather than
intermediate files), I get this error:
$ swift -debug -tc.file tc.data play.swift
WARN - Failed to configure log file name
Swift v0.1-dev
RunID: mx49u8a36d1m0
Execution failed:
java.lang.RuntimeException: Data set initialization failed for
true. Missing required field: img mapped to atlas
I think its probably a desirable feature that the same mapping that maps
ok for intermediate files to map for input files too.
--
More information about the Swift-devel
mailing list