The images are already rendered before they are Append'd. Although in the final example, I am just reading them from a file. Do you mean Render twice or loop twice?
Yes, I would be very interested in seeing an example. Thanks, Al Quoting Jonathan Hedstrom <[EMAIL PROTECTED]>: > Try sending the images through Render and AutoCamera first, then into your > Append/GetLocal/SetLocal loop. Finally run Append through arrange, only > after the final N--do this by using a Switch or Route module. I have > written several various programs that do this, and I could send you one as > a sample if you want. > > Cheers, > Jonathan > > __________________________________________________ > > Jonathan Hedstrom tel: (408) 927-3766 > IBM Almaden Research Center fax: (408) 927-2100 > 650 Harry Rd. [EMAIL PROTECTED] > San Jose, CA 95120 > > > > > [EMAIL PROTECTED] > Sent by: [EMAIL PROTECTED] > 10/03/02 10:11 AM > Please respond to opendx-users > > > To: [email protected] > cc: > Subject: [opendx-users] Newbie: Collecting in a ForEachN > loop... > > > > I am relatively new to DX. The data set I have is a 3D intensity which is > generated by a modeling program. The data is generated in slices, and > I've been > able to import and display the data in 3D. However, this type of data has > not > been traditionally displayed as a 3D isosurface, but rather as a series of > slices taken through one direction. Typically the 2D images are collected > together to form a single diagram which contains several 2D intensity > plots. I > am hoping to display the information in a tradional way while providing a > mechanism to view the data in more sophisticated ways. > > For each slice, I run the data through Isosurface to create the isolines, > and in > parallel run it through RubberSheet to get a colorized intensity. These > two > images are Rendered and Overlay'd to get a single plot which shows a color > representation of the intensity and several of the isolines. > > What I am having trouble with is the collecting of these images into a > single > Display. Since the number of files/slices generated can be variable, I > didn't > want to limit my network to fixed number of slices. So, I tried to > implement > the importing of the data as a ForEachN loop. The original idea was to > import > each file, create the colorized intensity plot, and arrange it with the > other > plots, but the arranging does not work the way I would expect. Instead of > showing each plot side-by-side, it shows each plot in sequence at the same > spot. > > To simplify the task, I generated image files for each of the plots and > wrote a > small network which reads these files with a ForEachN loop. The file is > added > to a group using Append, and sent to Arrange. This doesn't work. I've > tried > Collect, CollectSeries, CollectNamed, and Append, but in none of the cases > does > the Arrange create an array of plots. However, if I read each file in > separately with a ReadImage for each file (instead of the ForEachN loop), > the > Arrange works fine. The problem seems to lie in the fact that every time > through the loop, the group used by Append, Collect, CollectSeries, > CollectNamed > is reinitialized or created fresh. The Append does not append to a group > within > a ForEachN loop. > > The documentation makes it clear that a ForEachXX loop used in a top-level > network means that everything within that network gets executed for each > time > through the loop. It suggested using a macro if this wasn't the desired > behavior. So, I moved the reading of the images into a macro and tried to > output the group of images to be fed into the Arrange. However, the > Append, > Collect, CollectSeries, and CollectNamed work exactly the same way, i.e. > they do > not continue to collect items into a previously created group. I even had > the > group be an input into the macro and used Append within the macro, but > this > didn't work either. IN EVERY CASE, if I output the group each time > through the > loop with a Describe, it said that the group contained exactly ONE member. > I > should probably point out that I did use the index of the loop as an input > into > the Append and CollectSeries, but this had no effect. > > Am I missing something simple when it comes to working with groups? It > seems to > me that one should be able to compile a group within a loop and use that > group > outside of the loop. Is there an easier way to do this? All of the > examples > that use groups or Arrange do so with manually (i.e. not within a loop) > created > groups. Does someone have an example of using a group within a loop? > > Some more side questions, how do you use the "last" parameter of the > ForEachXX > loops? If everything within a top-level network is executed each time > through > the loop, why would someone need to know you've reached the last item? > Wouldn't > this be the same as ending a loop (which apparently you cannot do in a > top-level > network)? Would this provide a method for executing something after the > loop is > done? > > To test further, I attempted to use the SimpleGetSetLoop.net example to > execute > my loop. This has the same effect. > > It is probably not critical that I get an answer to this as I can do what > I want > with a fixed number of inputs. But this seems to be a poor solution to > the > problem. I would imagine there is a simple solution, or this is a serious > deficiency (in my opinion) in the program. If anyone is interested, I can > forward my examples and some data. > > Thanks for the help. > > Al > > > > > ------------------------------------------------- > This mail sent by http://webmail.rushmore.com > > > ------------------------------------------------- This mail sent by http://webmail.rushmore.com
