<br><br><div class="gmail_quote">On Sat, Jul 11, 2009 at 12:51 PM, Jeremy Douglass <span dir="ltr"><<a href="mailto:jeremydouglass@gmail.com">jeremydouglass@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

I'm a new Kepler and struggling to apply a single actor (e.g. Image<br>
Converter) to a batch of objects (e.g. a directory of images, as<br>
represented by the array generated by Directory Listing).<br>
<br>
I've read the documentation and searched the forums, and tried<br>
modifying examples, but I'm not understanding something paradigmatic,<br>
and would appreciate a tip: how do you pipe an array of files through<br>
single-file actors?<br>
<br>
EXAMPLE:<br>
<br>
In Kepler 1.0.0, 03-ImageDisplay.xml uses an SDC director, and specifies:<br>
   Constant Image Filename --> Image Converter --> ImageJ<br>
</blockquote><div><br>I think you mean SDF here..<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
In an attempt to converter a *directory* of images, I tried adding a<br>
Directory Listing actor:<br>
   Constant Dirname --> Directory Listing --> Image Converter --> ImageJ<br>
<br>
...however this generates an error, as Image Converter will only act<br>
on a string, not an array. So I tried<br>
   Constant Dirname --> Directory Listing --> Array to Sequence --><br>
Image Converter --> ImageJ<br>
<br>
...which almost works if I hand-specified the number of Array elements<br>
in the directory ahead of time), but still only processed the first<br>
file listed in the string (Picture 1.png) -- I'm assuming it just<br>
throws the rest of the string away.<br>
</blockquote><div><br><br>SDF has the restriction that the director needs to know a-priori (ie, before running the wf) how many tokens an actor consumes and produces on each port for each firing. For cases where this is known, SDF is usually a good choice.<br>

However, when processing arrays / lists of varying lengths, you usually don't have this information.<br>Try DDF instead (or PN if you want actors to execute as independent threads).<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
I'm not understanding something about how one processes a list in a<br>
Kepler workflow -- I've looked through Array Operation and Iterative<br>
Operation actors, and none of them seem to be analogous to an<br>
imperative programming loop. Am I using the wrong kind of director?<br>
Something else?</blockquote><div><br>See above: DDF might solve your problem.<br>There is also a different way to work with nested data collections (of which lists are a simple example): using the COMAD director. I'll let the COMAD experts and developes say more about how to use this feature (might not be part of Kepler 1.0, but in the current developers' version; a new COMAD version is also under active development)<br>

</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
Thanks for your help.<br>
</blockquote><div><br>Also, since you mentioned the paradigma / how-to deal with collections, you might want to check out this overview paper:<br><br><ul><li>
        <b><i><span>Scientific workflow design for mere mortals</span>.</i></b>
        <span>Timothy McPhillips and Shawn Bowers and Daniel Zinn and Bertram Ludaescher</span>
        (<span>2008</span>)
        <span>Future Generation Computer Systems</span>. 
        <span>Volume 
        <span>25</span>.</span>
        <span>Pages: 
        <span>541-551</span>.</span>
        <span></span> 
        <span> 
        (<a href="http://dx.doi.org/10.1016/j.future.2008.06.013">Download</a>)
        </span>
        </li></ul><br>from the Kepler pubs page:  <a href="https://kepler-project.org/publications?tags=keplerworkflow">https://kepler-project.org/publications?tags=keplerworkflow</a><br><br>Bertram<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
BACKGROUND: My larger goal is to adapt a frame based image processing<br>
workflow into Kepler (it is currently a combination of python,<br>
javascript, and bash scripts). To illustrate, one part of the workflow<br>
takes a heterogeneous collection of images (all file types and sizes)<br>
and copies them to a new directory as a collection of standardized<br>
collection jpegs. Another part of the workflow dumps a movie to a<br>
frame directory of jpegs, then runs multiple image measurement and<br>
image processing operations (e.g. ImageJ, MATLAB) on each frame and<br>
saves the results to a text file.<br>
_______________________________________________<br>
Kepler-users mailing list<br>
<a href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a><br>
<a href="http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a><br>
</blockquote></div><br>