<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 21, 2010, at 9:48 PM, Grant B. Harris wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>All --<br><br>I put together a preliminary sketch for a set of classes related to Extensions, intended to spark more discussion:<br><br><a href="http://imagejdev.org/trac/imagej/attachment/ticket/15/Class%20Diagram.png">http://imagejdev.org/trac/imagej/attachment/ticket/15/Class%20Diagram.png</a><br></div></blockquote></div><br><div>Hi all, hi Grant,</div><div><br></div><div>I have a question related to ROIs (again), following a question I sent earlier about ROI designs.</div><div><br></div><div>I guess that on Grant's design, the ROI objects will belong to the Viewer object: a Viewer <i>has a</i> ROI. </div><div><br></div><div>I was wondering how to handle the different kind of Viewers. Let us consider 2 viewers that can display only 3D data. </div><div>The first one would display it slice by slice, as existing ImageJ stack. The second one would make a 3D rendering, line Bene Schmidt 3D viewer. </div><div><br></div><div>Let us now consider a 3D ROI, in the shape of a cube. </div><div><br></div><div>To be drawn on the first viewer, the slice viewer, the ROI needs to have a method that specifies what is the currently displayed slice to be properly drawn, something like:</div><div><br></div><div>@Override</div><div>public abstract void draw(final int current_slice);</div><div><br></div><div>On the other hand, the second viewer does not require this, since the ROI will be drawn at once. This gives a draw method in the ROI which is like:</div><div><br></div><div>@Override</div><div>public abstract void draw();</div><div><br></div><div>How do we deal with that in the mother interface? How do we deal with the fact that different viewers might have different requirements for drawing objects (images or ROI) and how do we make a mother interface for ROIs, and a mother interface for Viewer?</div><div><br></div><div>Best</div><div>jy</div><div><br></div></body></html>