Copyright (c) 2004 Albert Cardona Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". A 3D editing plugin by Albert Cardona at albert at pensament.net Copyrigth (C) 2004 Albert Cardona GPL as published by the Free Software Foundation. Documentation Version 1.1 This file contains: 0- Setting the plugin. 1- How to launch the plugin. 2- The interface. 3- How to make objects. Tools details. 4- How to model. 5- How to modify curves which have been already added. A stack of images represents a volume. This plugin has been designed to model 3D objects using a few tools: bezier curves, pipes, balls, bspline curves, brush painted perimeters and wand selections, which are used to outline "things" (organs, compartments, cells) and then a skin is made, which makes a 3D object (DXF format). It works with magnification (use glass and hand tools in ImageJ icon menu). 0-Setting the plugin: ================= - Place the plugin files in the ImageJ plugins folder - Do Plugin->Compile and Run on the file A_3D_editingXXx.java - After restarting ImageJ, the plugin will be available in the Plugin menu. 1-How to launch the plugin: ======================= -Open a stack of images. -Go to the Plugins menu and click on the plugin. 2-The interface: ============== -State label: prints the current working mode. Building is normal mode. Editing enables to modify objects already saved. -Switch to Editing/Building: toggles state mode. -Add: adds current object to the list. -Delete: deletes selected object on the list. -View all/View current: toggles view state. 'View all' draws all objects added to this slice. 'View current' shows current drawing object only. -Clone: makes copies of current object in selected slices. Works with bezier and bspline curves. -Bezier/Pipe/Ball/Brush/Wand/BSpline pulldown menu: toggles object type. -History popup menu: lists last actions, enabling undo. -Group pulldown menu: toggles group name and color. This allows for different objects to have different names in the 3D model. It is very important that there is never more than one curve (any type of curve, including Brush, Wand, Bspline and Bezier) belonging to one group in the same slice. It would mess up the 3D model. -Set groups: popup menu to create and delete groups. -Pipe name: allows to name each pipe. The group and color will be given by selected group. -Radius: allows to set pipe, ball and brush radius. It can take decimals. -Draw stack: opens a copy of the image stack and draws in it all objects. -Save DXF: generates the DXF file containing the model. Can take several minutes if there are many objects. Beware: can generate gigantic files, over 50 megabytes. -Save P: enables to save current objects, to be reloaded when needed. -Open P: enables loading saved objects. It can either append to current objects or delete all existing objects first ('replace'). -Measure: provides volume info about the objects created. Wroks group wise and for bezier curves only. -Options: settings. Allows changing which objects are seen when on view all mode. Set bezier and pipe finess parameter. Set bspline degree and finess parameter. Set Brush/Wand parameters for the 3D model to be generated (used to interpolate points in a attempt to refine the rough perimeter of brush and wand curves). Set overwrite files yes/no . Enable/disable visualization of hints for the ball tool. -Clear: destroys current object. On editing mode it will affect selected objects on the list. On building mode erases screen only. -O: show/hide ovals (clicked points). -Real: show/hide all points in curve (not implemented everywhere). -DF: mark bezier curve as belonging to a Density Field object (under development. Should be kept unselected for now). -Mouse x,y position on screen is shown. 3-How to make objects: ==================== -Select the square selection tool in the ImageJ bar. -Select the object type in the pulldown menu of the interface (Bezier, Pipe, Ball, BSpline, Brush, Wand). -Click on screen to mark points. Each tool works slightly different; see below. -Click the "Add" button to add the current object to the current slice object list. -The group the object will belong to has to be selected anytime before adding it to the slice list. The Bezier tool: ----------------- -Click anywhere to add a point. Click on the curve to add a point there. -Click+drag to add a point and set interpolation points. -Drag the point to move it. -Drag interpolation points to modify the curve. -Alt+drag on a point to reset its interpolation points. -Control+click a point to delete it. -Shift+click to toggle open/closed bezier -Alt+click on screen to drag the entire curve. While the curve is open, new points can be added either at the end or in between two exiting points, by clicking on the curve. You have to click on the curve to add a new point once the curve is closed. WARNING: use closed curves only to make 3D models. The Pipe tool: --------------- -Set pipe's name in the box before starting. -Set the point width in the box before adding a point. -Click to add a point. -Click+drag to add a point and set interpolation points. -Alt+drag on a point to reset its interpolation points. -Drag the point to move it. -Drag interpolation points to modify the curve. -Control+click a point to delete it. Points can be in different slices. Scroll through the stack to reach desired slices. Points belonging to slices above the current slice are paited in red; points below in blue; points in the current slice are white. Points belonging to the same pipe can have different widths. The Ball tool: -------------- -Set the ball radius in the "Radius" textbox before adding a point. -Click to add ball. -Shift+drag to resize a ball. Works when making the ball and on an existing ball. -Control+click to delete a ball. -Drag to move a ball. Current ball object is not deleted when added to the list, so you may need to push "Clear" in order to start the next slice from scratch. This is normal behaviour for all objects. Balls in the previous slice are red; in the current slice white; balls in next slice are blue. This is useful when modeling many cells, to avoid repeating them. Once all balls have been build for this slice and for this group, click the "Add" button to add it to the current slice ball list. So what you are actually adding is a field of balls. There can be many ball fields belonging to the same group in the same slice. This is a exception compared to other objects. The BSPline tool: ------------------ -Click or Click+drag to add point. -Drag to move a point. -Control+click to delete a point. -Alt+click to drag the whole curve. -Shift+click to resize the curve (works funny). The curve is drawn after the third point has been added. Further points are added clicking anywhere; it will be inserted between the 2 closest points. The Brush tool: --------------- - Type in the desired radius of the brush in the text field labeled "Radius:" - Click or drag to paint - uncheck/check the "O" (ovals) checkbox below the image to hide/show the individual point ovals. - drag individual points, or control-click to delete one by one The Wand tool: -------------- - click on the image to make a selection based on the ImageJ built-in wand tool. - uncheck/check the "O" (ovals) checkbox below the image to hide/show the individual point ovals. - drag individual points, or control-click to delete one by one As of Version 46a, the options dialog allows to switch the wand engine between the Segmenting Assistant plugin wand and the ImageJ built-in wand. 4- How to model: ==================== -Set as many groups as objects you will need to model. Be sure they don't have the same name if you want them separated in the 3D model. -Get into Building mode, which is the default. -Scroll to a desired slice, for instance slice 3 where the tip of an interesting organ is showing. -Draw the bezier curve and add it. See that the name of the curve appears in the list at the rigth. -The drawn curve has not disappeared. -Scroll to the next slice. -Under building mode, this curve can be modified without altering the saved one in the previous slice. Modify it to adjust to this section of the organ you are modelling. On the other hand, you may erase screen by pushing 'clear' and start anew if you like. -Add it and proceed again as described until the whole organ has been outlined. At any time, you may click on the Clear button (bottom left, clears screen) and restart drawing the curve. -Proceed to draw pipes and balls as needed. Drawing them after the skin of the organ makes it easier to locate them exactly, using the 'view all' mode that will show the perimeter of the previously outlined organ in every slice. -Once finished (or whenever you feel), click on "Save P" if you'd like to save the curve's you've drawn for a future session. If you have many objects to model, it may be a good idea to save them in separate files. These files are text files, editable with any text editor, and have the extension .shapes appended. -Click on "Save DXF" to generate the 3D model. If the object has many curves it can take a few minutes. You may load the generated DXF file in several applications such as Blender (free), Amira (limited time shareware), or Maya, AutoCAD, etc. 5- How to modify curves which have been already added: ================================================ Either of the following: A) -delete it and redo it from scratch. B) - delete it, click the previous slice on the slice number list, select the previous curve so that it is shown in screen, modify it and add it. Don't worry, it will automatically be added in the present slice list, not in the previous (where the curve to modify/start with was selected). C)- use 'editing' mode: -Scroll to the slice where you'd like to edit a curve. -Switch to editing mode by clicking on the top rigth button; the label should say "State: EDITING". -Click the curve in the list so it is displayed on the screen. You have to click in it even if it was selected before switching to Edit mode. -Modify the curve as needed. -Switch to Building mode by clicking on the same button again.