Changes between Version 1 and Version 2 of LincolnSummary


Ignore:
Timestamp:
09/25/06 14:59:14 (12 years ago)
Author:
ebmoore
Comment:

Updated some of the links to the javadoc

Legend:

Unmodified
Added
Removed
Modified
  • LincolnSummary

    v1 v2  
    77Creating a plug-in for handling a new data type or a new visualization method may require implementing at least one of the classes and interfaces listed below.  Depending on the complexity or existing support for that new ability, a developer may have to implement all of the main components; however, it remains a good idea to check if certain elements of the new task are at least partially supported in order to maximize code reuse.  This section lists each of the main interfaces and abstract base classes that a plug-in may need to implement.  Most of the interfaces have a partial default implementation which can handle returning default values for less commonly overridden methods. 
    88 
    9 === Interface CreateFileFilter === 
    10 Implementations of the CreateFileFilter interface declare the types of supported files.  They also link decoders and encoders to file types through static calls to the factory-class CodecFactory.  There are several useful file type helpers in the edu.washington.biostr.sig. 
     9=== Interface [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/CreateFileFilter.html CreateFileFilter] === 
     10Implementations of the [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/CreateFileFilter.html CreateFileFilter] interface declare the types of supported files.  They also link decoders and encoders to file types through static calls to the factory-class [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/CodecFactory.html CodecFactory].  There are several useful file type helpers in the edu.washington.biostr.sig. 
    1111vault.files package for defining these types. 
    1212 
    13 === Interface Decoder === 
     13=== Interface [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/Decoder.html Decoder] === 
    1414Implementations of the Decoder interface are designed to load a specified file, or a group of files, into a single, corresponding instance of the Data class.  Decoders are called upon to load these files to respond to user or programmatic requests to load a file group that has not already been loaded or is not currently in memory.  Each type of Decoder is only expected to handle at least one file type (or group of file types). 
    1515 
    16 === Interface Encoder === 
     16=== Interface [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/Encoder.html Encoder] === 
    1717Implementations of the Encoder interface are designed to write an instance of the Data class out to a single file or a group of files.  Encoders are called upon to save the files at a user’s request.  Encoders may also be used to save the data to a temporary disk cache during low memory conditions, if the programmer deems the encoder sufficiently fast.  Each type of Encoder is only expected to handle at least one Data type. 
    1818 
    19 === Abstract Class Data === 
     19=== Abstract Class [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/Data.html Data] === 
    2020The Data class is designed to store a single set of data; for example, an instance of the VolumeData class allocates a large array for storing volumetric data.  Data can be mutable or static; however, implementers must account for the fact that even if the data is used in multiple viewers or used by multiple users at a given instant, only one instance of the Data object exists for a given group of files.  Thus the data can be shared among multiple views.  This is done to reduce loading times and memory impact for repeated load requests. 
    2121 
    22 === Interface DataView === 
    23 Implementations of the DataView interface handle the multi-user situation.  While only one instance of the Data object may exist for a given file group, each of the users’ viewers uses its own instance of the DataView.  DataViews are designed to provide a layer between the source data and the viewer.  They also handle changed parameter events and store any necessary rendering attributes.  The minimum implementation of a new visualization method of an existing data type will likely implement this interface. 
     22=== Interface [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/DataView.html DataView] === 
     23Implementations of the  [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/DataView.html DataView] interface handle the multi-user situation.  While only one instance of the Data object may exist for a given file group, each of the users’ viewers uses its own instance of the  [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/DataView.html DataView].   [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/DataView.html DataViews] are designed to provide a layer between the source data and the viewer.  They also handle changed parameter events and store any necessary rendering attributes.  The minimum implementation of a new visualization method of an existing data type will likely implement this interface. 
    2424 
    2525=== Interface DataController === 
    26 Implementations of the DataController interface provide a user interface for manipulating the settings for a particular DataView instance.  These controls will appear on the Data tab.  GUI events are processed through the Listener interface’s method somethingHappened(Event) and, after processing, should be dispatched to the appropriate DataView.  Generally, controls for this type of controller should only manipulate the DataView instance.  If no such controls are to be presented to the user, then use an instance of NullController. 
     26Implementations of the DataController interface provide a user interface for manipulating the settings for a particular  [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/DataView.html DataView] instance.  These controls will appear on the Data tab.  GUI events are processed through the Listener interface’s method somethingHappened(Event) and, after processing, should be dispatched to the appropriate  [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/DataView.html DataView].  Generally, controls for this type of controller should only manipulate the  [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/DataView.html DataView] instance.  If no such controls are to be presented to the user, then use an instance of NullController. 
    2727 
    2828=== Abstract Class ViewPort<V extends DataView> === 
     
    4040== Registering New Classes == 
    4141Because MindSeer is implemented using a factory-style of programming, existing code can immediately access new implementations of existing abstract classes and interfaces simply by registering the new code. 
    42 In the resources folder, there is a file named mindseer.xml.  It contains a listing of all registered CreateFileFilters and all mappings from Data to DataView, ViewPort to ViewPortControllers, and DataView to default ViewPort.  Many examples are already listed in this file, and there are XML comments provided in the file to explain the XML schema used. 
     42In the resources folder, there is a file named mindseer.xml.  It contains a listing of all registered CreateFileFilters and all mappings from Data to  [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/DataView.html DataView], ViewPort to ViewPortControllers, and  [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/DataView.html DataView] to default ViewPort.  Many examples are already listed in this file, and there are XML comments provided in the file to explain the XML schema used. 
    4343 
    4444== Helpers == 
    4545In order to make implementation of current code and future plug-ins easier, there are many helper classes, usually affixed with the word “Helper” at the end of the class name.  These provide some supplementary and useful implementation for performing various tasks that span across the MindSeer code base. 
    4646One of the helpers, named class Helper, provides easy controls for dispatching LongTasks.  Additionally, it provides getter methods for the timer, which displays the status of a long operation, and the session, for loading files and issuing other main UI events. 
    47 Another helpful class is the SharingDataView<D extends Data, S> class, which derives from the DataView interface.  It provides support for data views that need to know of the existence of other identically typed data views in their model.  While it is possible to extract this information without using this class, using this class makes it easy to use an auxiliary class for managing these relationships.  The VolumePlaneView and ColorizedVolumeSurface3DView classes are good examples of using this helper class.  
     47Another helpful class is the SharingDataView<D extends Data, S> class, which derives from the  [http://femur/~mindseer/doc/edu/washington/biostr/sig/brainj3d/data/DataView.html DataView] interface.  It provides support for data views that need to know of the existence of other identically typed data views in their model.  While it is possible to extract this information without using this class, using this class makes it easy to use an auxiliary class for managing these relationships.  The VolumePlaneView and ColorizedVolumeSurface3DView classes are good examples of using this helper class.  
    4848 
    4949== Summary == 
    50 To conclude, it is relatively easy to create a simple plug-in to MindSeer.  More complicated plug-ins may require writing code over many of the interfaces and the creation of several supporting classes.  In any case, there are many examples of how to go about creating an addition to the program within the source code.  The plain text handler and 2D image handler are both good examples of writing a simple plug-in that spans all of the necessary classes for handling a completely new data type.  Additionally, many of the necessary interfaces and supporting classes are supplemented with JavaDoc to aid in understanding their functionality.  By examining this framework, future developers should be able to extend MindSeer with ease. 
     50To conclude, it is relatively easy to create a simple plug-in to MindSeer.  More complicated plug-ins may require writing code over many of the interfaces and the creation of several supporting classes.  In any case, there are many examples of how to go about creating an addition to the program within the source code.  The plain text handler and 2D image handler are both good examples of writing a simple plug-in that spans all of the necessary classes for handling a completely new data type.  Additionally, many of the necessary interfaces and supporting classes are supplemented with [http://femur.biostr.washington.edu/~mindseer/doc/ JavaDoc] to aid in understanding their functionality.  By examining this framework, future developers should be able to extend MindSeer with ease.