Difference between revisions of "Understanding plug-in programs"

From MIPAV
Jump to: navigation, search
(Created page with ' == Understanding plug-in programs == <div style="font-style: normal; font-weight: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: ...')
 
m
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
Plug-in programs, also known simply as ''plug-ins,'' are utilities or sets of instructions that add functionality to a program without changing the program. In MIPAV, you use Java to write and compile plug-in programs to perform specific functions, such as automatically removing all odd-numbered images from the image dataset or adding support for a new file format. There are three types of plug-in programs that you may write for MIPAV:<br />
 +
'''Algorithm''' -An algorithm type of plug-in performs a function on an image. An example is a plug-in that applies a radial blur algorithm to an image. You can create plug-in algorithms through Java.<br />
 +
'''File''' -A file type of plug-in allows MIPAV to support a new file format. An example is a plug-in that allows MIPAV to view Kodak Photo CD files (.pcd).<br />
 +
'''View''' -A view type of plug-in introduces a new view, or the way in which the image is displayed. Examples include the lightbox, triplanar, and animate views.<br />
 +
'''Note:''' Because MIPAV already supports a large number of file formats and views and its development team makes it a practice to extend its capabilities in these areas, it is generally unnecessary to add file or view types of plug-ins. Most plug-in programs, therefore, are algorithms.<br />
  
== Understanding plug-in programs ==
+
== In this chapter ==
  
<div style="font-style: normal; font-weight: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> Plug-in programs, also known simply as <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">plug-ins, </font>''</span>are utilities or sets of instructions that add functionality to a program without changing the program. In MIPAV, you use Java to write and compile plug-in programs to perform specific functions, such as automatically removing all odd-numbered images from the image dataset or adding support for a new file format. There are three types of plug-in programs that you may write for MIPAV:<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 24pt; margin-right: 0pt; margin-top: 5pt; text-align: left; text-decoration: none; text-indent: -24pt; text-transform: none; vertical-align: baseline"><font color="#000000">  <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Algorithm</font>'''</span>-An algorithm type of plug-in performs a function on an image. An example is a plug-in that applies a radial blur algorithm to an image. You can create plug-in algorithms through Java.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 24pt; margin-right: 0pt; margin-top: 5pt; text-align: left; text-decoration: none; text-indent: -24pt; text-transform: none; vertical-align: baseline"><font color="#000000">  <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">File</font>'''</span>-A file type of plug-in allows MIPAV to support a new file format. An example is a plug-in that allows MIPAV to view Kodak Photo CD files (.pcd).<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 24pt; margin-right: 0pt; margin-top: 5pt; text-align: left; text-decoration: none; text-indent: -24pt; text-transform: none; vertical-align: baseline"><font color="#000000">  <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">View</font>'''</span>-A view type of plug-in introduces a new view, or the way in which the image is displayed. Examples include the lightbox, triplanar, and animate views.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 5pt; margin-left: 0pt; margin-right: 0pt; margin-top: 5pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Note:</font>'''</span> Because MIPAV already supports a large number of file formats and views and its development team makes it a practice to extend its capabilities in these areas, it is generally unnecessary to add file or view types of plug-ins. Most plug-in programs, therefore, are algorithms.<br /></font></div>
+
*[[Using the API documentation]]
 +
*[[Developing plug-in programs]]
 +
*[[Creating a self-contained plug-in frame]]
 +
*[[Installing a plug-in]]
 +
*[[Examples of MIPAV plug-ins]]
 +
**[[Plug-in CT_MD, a typical plug-in program]]
 +
***[[PlugInAlgorithmCT_MD.java]]
 +
***[[Plug-in CT_MD.java]]
  
After developing a plug-in program, you can then install the plug-in program into the MIPAV application and access it from the PlugIns menu in the MIPAV window. The MIPAV window labeled "(A)" in [MIPAV_Plugins.html#1176702 Figure 305] shows the PlugIns menu as it appears before any plug-in programs are installed. The picture labeled "(B)" in [MIPAV_Plugins.html#1176702 Figure 305] shows the PlugIns menu as it appears after two plug-in programs-in this case, the Fantasm plug-in program and the Talairach Transform plug-in program-are installed. Because the Fantasm and Talairach Transform plug-in programs are algorithms, they appear under the PlugIns &gt; Algorithm menu.
+
== Installing a plug-in==
 +
After developing a plug-in program, you can then install the plug-in program into the MIPAV application and access it from the PlugIns menu in the MIPAV window.  
  
<div style="font-style: normal; font-weight: normal; margin-bottom: 5pt; margin-left: 0pt; margin-right: 0pt; margin-top: 5pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Note:</font>'''</span> If a plug-in program is a file type of plug-in, it would appear under a <br />PlugIns &gt; File menu. If it is a view type, it would appear under a PlugIns &gt; View menu. <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
+
 
 +
The MIPAV window labeled "(A)" in Figure 1 shows the PlugIns menu as it appears before any plug-in programs are installed. The picture labeled "(B)" in Figure 1 shows the PlugIns menu as it appears after two plug-in programs-in this case, the Fantasm plug-in program and the Talairach Transform plug-in program-are installed. Because the Fantasm and Talairach Transform plug-in programs are algorithms, they appear under the PlugIns &gt; Algorithm menu.
 +
 
 +
 
 +
'''Note:''' If a plug-in program is a file type of plug-in, it would appear under a <br />PlugIns &gt; File menu. If it is a view type, it would appear under a PlugIns &gt; View menu. <br />
  
 
{| border="1" cellpadding="5"
 
{| border="1" cellpadding="5"
|+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 1. Plug-ins menu in the MIPAV window: (a) Before a plug-in was installed and (b) after two plug-ins were installed<br /></font>'''</div>
+
|+ '''Figure 1. Plug-ins menu in the MIPAV window: (a) Before a plug-in was installed and (b) after two plug-ins were installed'''
 
|-
 
|-
 
|
 
|
Line 19: Line 36:
 
<br /> <div class="CellBody">b</div>
 
<br /> <div class="CellBody">b</div>
 
|}
 
|}
 +
 +
''' Next:'''
 +
[[Using the API documentation]]
 +
 +
== See also: ==
 +
*[[Understanding plug-in programs]]
 +
*[[Using the API documentation]]
 +
*[[Developing plug-in programs]]
 +
*[[Creating a self-contained plug-in frame]]
 +
*[[Installing a plug-in]]
 +
*[[Examples of MIPAV plug-ins]]
 +
**[[Plug-in CT_MD, a typical plug-in program]]
 +
***[[PlugInAlgorithmCT_MD.java]]
 +
***[[Plug-in CT_MD.java]]

Latest revision as of 12:14, 24 June 2013

Plug-in programs, also known simply as plug-ins, are utilities or sets of instructions that add functionality to a program without changing the program. In MIPAV, you use Java to write and compile plug-in programs to perform specific functions, such as automatically removing all odd-numbered images from the image dataset or adding support for a new file format. There are three types of plug-in programs that you may write for MIPAV:
Algorithm -An algorithm type of plug-in performs a function on an image. An example is a plug-in that applies a radial blur algorithm to an image. You can create plug-in algorithms through Java.
File -A file type of plug-in allows MIPAV to support a new file format. An example is a plug-in that allows MIPAV to view Kodak Photo CD files (.pcd).
View -A view type of plug-in introduces a new view, or the way in which the image is displayed. Examples include the lightbox, triplanar, and animate views.
Note: Because MIPAV already supports a large number of file formats and views and its development team makes it a practice to extend its capabilities in these areas, it is generally unnecessary to add file or view types of plug-ins. Most plug-in programs, therefore, are algorithms.

In this chapter

Installing a plug-in

After developing a plug-in program, you can then install the plug-in program into the MIPAV application and access it from the PlugIns menu in the MIPAV window.


The MIPAV window labeled "(A)" in Figure 1 shows the PlugIns menu as it appears before any plug-in programs are installed. The picture labeled "(B)" in Figure 1 shows the PlugIns menu as it appears after two plug-in programs-in this case, the Fantasm plug-in program and the Talairach Transform plug-in program-are installed. Because the Fantasm and Talairach Transform plug-in programs are algorithms, they appear under the PlugIns > Algorithm menu.


Note: If a plug-in program is a file type of plug-in, it would appear under a
PlugIns > File menu. If it is a view type, it would appear under a PlugIns > View menu.

Figure 1. Plug-ins menu in the MIPAV window: (a) Before a plug-in was installed and (b) after two plug-ins were installed

MIPAV PlugInmenuBefore.jpg


a

MIPAV PlugInmenuAfter.jpg


b

Next: Using the API documentation

See also: