jist:LayoutTool
From NITRC Wiki
Contents |
Introduction
The Pipeline Layout Tool allows multiple modules, each containing one or more algorithms, to take inputs and outputs and connect them into a “pipeline” of data processing, allowing for complex image data processing that can be automated yet tightly controlled.
Interface:
Upon loading up the Pipeline Layout Tool, you will see 3 panes. Two on the left, stacked on top of one another, and a third one taking up the right half of the window, which we will call the ‘layout pane’. That space is for the layout, while the spaces on the left are for selecting and configuring the modules. In the upper left section, there is a file directory tree, split into 3 sections: Algorithms, Sources, and Destinations. The lower left will show different information depending on which module or data type is selected.
Algorithms, Sources, and Destinations:
Under Algorithms, expand “Base” and there are many modules and folders of red
modules that have already been written which can be used. Modules may also be located in other
directories. The modules take inputs and give outputs, and can be dragged-and-dropped into the
layout pane on the right-hand side of the window. They are the functions or ‘black boxes’ that do
the data processing. They have circles to represent each input and triangles to represent their
outputs. Clicking and holding on a circle or triangle will indicate what kind of data type it takes
or outputs.
‘Sources’ is the next section in the directory tree. The ‘Sources’ folder contains the data
types that can be used with the modules. They are organized and categorized by type, such as
Volume, Surface, String, Selection, Point, File, and Number. Sources are blue in color. Under
each folder with the data type name are the actual inputs for the pipeline. For example, there are
“Volume Collection” and “Volume Directory” data sources, and they are both under the folder
“Volume”. The Sources can be dragged over to the layout pane, too. They are blue and shaped
like a circle with a straight arm coming out of each side.
Last but not least are the Destinations. In a sense, any of the elements described above
can act as a kind of “destination” in that they will take various inputs. However, those will
generally pass those inputs on. A destination will actually store or hold on to the data that it is
passed. Like the other elements here, the Destinations are also drag-and-droppable. They are
green and are shaped like a triangle with a straight arm coming out from each side.
Menus
File:
• New: Opens a new Layout in the layout pane
• Open: Brings up a dialogue box to open a layout file
• Recent Files: Shows recently opened files. Will not work if no files have been opened.
• Save: Save the layout
• Save As: Save the layout in a specific directory
• Close: Closes the current layout, prompting to save if needed
• Clear Image Registry: Clears out the images in the view
• Exit: Quit out of the Pipeline Layout Tool
Edit:
• Delete, Undo, Redo, Cut, Copy, and Paste
Project:
• Layout Preferences: Set the Output path, Max Heap Size, Number of simultaneous processes, and whether or not to use the Grid Engine
• Rebuild Library: Please do not use this yet. As of 02/25/09, it may freeze/crash MIPAV
• Set JRE Location: Browse for the location of your JRE if needed
• Set Library Directory: Sets the location where modules are stored
• Process Manager: Opens up the process manager pertaining to the current process, allowing you to run your layout
Usage
The pipeline layout tool allows the combinations of many actions in one continuous flow of analysis. By cleverly using the inputs (Sources), outputs (Destinations), and modules (Algorithms), we can do very useful work.
Hooking Up the Modules
There are several ways of connecting elements in the Pipeline Layout Tool. It can be
accomplished by 1) dragging triangles to circles or vice versa, 2) Selecting them in the lower left
pane, or 3) Not linking them, since not everything must be linked in order for the layout to work.
Dragging the inputs and outputs together to form the desired connection is perhaps the
easiest and most intuitive way to connecting elements. As you click and hold the mouse button
down, the data types will appear over the circles and triangles, at which point it can be checked
whether the data types are compatible. If they are not, the line will not draw. Note that all
compatible, unfilled docking locations will turn green, showing you which locations are valid.
Selecting elements in the lower left pane gives more options and customizability than dragging the lines around. Source data does not necessarily have to come from a blue element in the layout tool. Virtually all parameters, or inputs, can be either “browsed for” in the computer or typed in by hand (if the parameter is a number, string, etc). In the tabs for the modules, there are arrows or arrows with red X’s over them for various sections of each tab. When there is an arrow, it indicates that that parameter is currently or can be linked with a line on the layout, and when the red X is present, it means that there is nothing for that parameter to connect to using a line, but it may still be filled by a manually (or automatically) filled value. When the red X is not present, there are drop-down boxes for selecting one of the other elements in the layout that are compatible with that particular parameter. Note that “NONE” is an option here. The arrows and red X’s are clickable; it toggles between connecting with a line and manual input.
Sometimes modules and other elements don’t need all of their parameters or all of the their outputs connected to generate a result. Often there are default parameters that are present when the element is first dragged over. Filled circles represent connected or fulfilled parameters, while the parameters that are still waiting to be connected are open. This is also true of the triangles for outputs.
Taking Apart the Modules
The lines connecting the elements can be selected and deleted just like the modules. When a module is deleted, its connections are deleted as well. Also, multiple elements and lines can be selected by either holding the Control Key (in windows) and clicking, or by selecting a region in the layout by clicking, holding, and dragging out a rectangular region to select. Additionally, selecting “NONE” as the connection of two elements will also remove that particular connection.
Deleting and Moving Modules
It is easy to move modules around by dragging them individually, but you can also select a group of modules and drag them around as one unit. This applies to deleting modules as well; just don’t delete too much! (The undo button can recover deleted modules, to a point.)
Multiple Inputs and Outputs
Many modules can take many, many inputs, and may have many more outputs, but that does not mean they all need to be filled. Additionally, you can group multiple files through one input for batch processing. Some modules that can accept multiple inputs do not require all of them to be filled in order to function, so understanding how a module works is key to knowing what inputs and how many inputs are needed, at a minimum. Single input nodes can often accept multiple inputs, though not at once. Each file or input gets placed in a queue whose order you can arrange. When the pipeline runs, it will run once for each file or input. This is best shown through an example. There is a module called “4D Volumes to 3D Volumes” contained under Algorithms - >Base ->IACL ->Utilities ->Volume. It transforms a 4D volume into a 3D volume. After finding the module in the directory from the Pipeline Layout Tool, drag it into the layout. The screen should look something like this:
The module takes volume files as input, and we can get them from whichever directory they are stored under by clicking “Add” and browsing to the appropriate folder. You can select multiple files at once by holding down “Ctrl” and clicking on the files:
Click open to have them set as inputs to the module.
You can rearrange the order of the files by selecting them and clicking “Up” or “Down.” Now
you are ready to batch process multiple images. There is another way to do this, using Sources. We will delve into this next.
Under Sources ->Volume, drag Volume Collection onto the layout.
Under the Volume Collection tab in the lower left pane of the window, find the “Volumes” section, and click Add. You can now select images in the same way as before, but now they will be stored in a Volume Collection rather than with the module and algorithm. After the files are added to the Volume Collection, drag the lower triangle of the Volume Collection to the circle input of the module.
Note that the tab containing the module has changed to reflect that the inputs are no longer in the module, but are being passed by a Source object:
The arrow now no longer has a red “X” over it, indicating that it is now being passed data by a source. That source is stated, and there is no longer an option to “add” files. As a reference, here is what the module window looked like before we compartmentalized the inputs to a Volume Collection object:
MAPS Adapter
Under Algorithms ->Base, there is a module called MAPS Adapter. This can be used to truly compartmentalize layouts. It wraps an entire layout into one module that sits on the current layout. So entire layouts can become one module, analogous to a method in JAVA or other computing languages. Layouts are saved as *.maps, and that’s exactly what this adapter takes for an input. Say I made a layout and saved it as “five.maps”. I could turn it into a single module on a new layout. This allows for much greater levels of complexity in pipelining. It would look something like this when placed onto a layout:


















