Browsing DICOM images and Building and compiling plug-in programs: Difference between pages

From MIPAV
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
MIPAV>Angelfish100
(Created page with 'To build a new plug-in program for MIPAV, you must first install a build environment, alter the path environment variable, and compile the plug-in files.<br /> ==== Installing a...')
 
Line 1: Line 1:
To build a new plug-in program for MIPAV, you must first install a build environment, alter the path environment variable, and compile the plug-in files.<br />


MIPAV includes a browser that is specifically designed for examining DICOM images. The DICOM browser allows you to view a list of all of the images in a dataset and quickly display each one individually. The browser provides a fast way of locating and selecting specific image slices.<br />'''Tip:''' You can open a DICOM browser at any time after starting MIPAV; and, depending on your computer's memory resources, you can open more than one DICOM browser.<br />
==== Installing a build environment ====


=== Displaying an image dataset in the DICOM browser ===
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  1 Download and install <span style="font-style: normal; font-weight: normal; text-transform: none; vertical-align: baseline"><u><font color="#000000">[http://java.sun.com Java SE Development Kit (JDK), version 1.6 (JDK 6u2) ]</font></u></span><span style="font-style: normal; text-transform: none; vertical-align: baseline"><u>'''<font color="#0023a9">&lt;http://java.sun.com/javase/downloads/index.jsp&gt;</font>'''</u></span>. <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  2 Download and install<span style="font-style: normal; font-weight: normal; text-transform: none; vertical-align: baseline"><u><font color="#0023a9"> </font></u></span><span style="font-style: normal; font-weight: normal; text-transform: none; vertical-align: baseline"><u><font color="#0023a9">[http://ant.apache.org ][http://ant.apache.org Apache Ant 1.7]</font></u></span><span style="font-style: normal; font-weight: normal; text-transform: none; vertical-align: baseline"><u><font color="#0023a9">.0 &lt;http://ant.apache.org/&gt;</font></u></span>.<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">
1 Select File &gt; DICOM browser (see Figure 2-1, and Figure 2-2). The Choose Directory dialog box opens, see Figure 2-3.<br />
2 Select the directory in which the DICOM image datasets are stored.<br />
3 Click Open. The DICOM browser (Figure 2-4) appears showing the directory tree in the panel on the upper left of the window.<br />
4 Navigate, if necessary, to the correct subdirectory and select it.<br />
5 Click Parse directory (Figure 2-4). Information appears in the three panels on the right side of the window: patient and study information at the top, dataset information in the middle, and image information at the bottom.<br />
6 Select one of the images listed in the image information panel (Figure 2-5). The image appears in the panel on the left side of the window below the tree structure (Figure 2-6). <br />
You can now continue to browse the images, or you can perform one or more of the following tasks:<br />
*Adjust the image contrast and brightness.
*Open selected images.
*View another image dataset.
*Create a movie from the image dataset.


==Opening the DICOM browser and parsing the image directory==
{| 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 2. Opening the DICOM browser and parsing the image directory<br /></font>'''</div>
|+ <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 13. Download pages for Java SE Development Kit (JDK) and Apache Ant 1.7.0<br /></font>'''</div>
|-
|-
|
|
[[Image:DICOM_Browser_Parse.jpg]]
[[Image:MIPAVPluginsDownloadPages.jpg]]
|}
|}


<br />
==== Configuring the environment ====
'''Tip:''' You can select consecutive slices by clicking the first slice, pressing and holding down Shift, and then clicking the last slice. To select nonconsecutive slices, press and hold down Ctrl and then click each slice.
'''To adjust image contrast and brightness in the DICOM browser<br />'''


The Window and Level sliders that appear in the left bottom panel of the DICOM browser allow you to adjust both the contrast and brightness in the image being displayed. Refer to Figure 2-6.<br />
<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"> To configure your environment, you need to add two new variables-<span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">JAVA_HOME</font></span> and <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">ANT_HOME</font></span>-and update the path variable in your system.<br /></font></div>
1 Select a slice from the slice listing in the DICOM browser.<br />
2 Move the Window slider to the right to lessen contrast or to the left to intensify contrast.<br />
3 Move the Level slider to the right to increase brightness or to the left to decrease brightness.<br />'''To open selected images in the image dataset'''<br />


[[Image:DicomOpenSelectedImagesIco.jpg]] One of the advantages of using the DICOM browser is that you can quickly identify which images in the dataset you wish to work with. Once you've determined the required images, you can open just the slices you selected.
===== On Windows workstations =====


<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  1 Click Start &gt; Control Panel. The Control Panel window opens.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  2 Double-click the System icon. The System Properties dialog box opens. <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  3 Click Advanced. The Advanced page of the System Properties dialog box appears.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  4 Click Environment Variables. The Environment Variables dialog box opens.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  5 Decide whether to add and edit variables in the User variables box or the System variables box based on which users should have access to the Java SDK and Ant.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  6 Add the <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">JAVA_HOME</font></span> variable to your environment:<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  a Click New. The New User Variable dialog box or the New System Variable dialog box opens.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  b Type <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">JAVA_HOME</font></span> in Variable name.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  c Type the path for the Java SDK on your computer (e.g., <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">C:\Program Files\Java\jdk1.6.0_02</font></span>) in Variable value.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  d Click OK. The<span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000"> </font>''</span><span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">JAVA_HOME</font></span> variable appears in either the User variables box or System variables box as appropriate.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  7 Add the <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">ANT_HOME</font>'''</span> variable to your environment by doing the following:<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  a Click New under either the User variables box or the System variables box. The New User Variable dialog box or the New System Variables dialog box opens as appropriate.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  b Type <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">ANT_HOME</font>'''</span> in Variable name.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  c Type the path for the Ant on your computer (e.g., <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">C:\Program Files\Ant\apache-ant-1.7.0</font></span>) in Variable value.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  d Click OK. The <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">ANT_HOME</font></span> variable appears in either the User variables box or System variables box as appropriate.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  8 Update either the <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">PATH</font></span> variable in the User variables box or the <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">Path</font></span> variable in the System variables box by doing the following:<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  a Select the <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">PATH</font></span> variable in the User variables box, or select the <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">Path</font></span> variable in the System variables box.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  b Click Edit under the User variables box, or click Edit under the System variables box. Either the Edit User Variable dialog box or the Edit System Variable dialog box opens.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  c Type <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000"><nowiki>;%JAVA_HOME%\bin;%ANT_HOME%\bin</nowiki></font></span><span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000"> </font></span>to the end of the <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">PATH </font></span>variable or to the end of the Path variable.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  d Click OK. The edited variable appears either in the User variables box or the System variables box. See also Figure 14.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  9 Open a new terminal for the change to take effect by doing the following:<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  a Click Start &gt; Run. The Run dialog box opens.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  b Type <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">cmd</font>'''</span> in Open, and click OK. A terminal window opens. <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  10 Retrieve the<span style="font-style: normal; font-weight: normal; text-transform: none; vertical-align: baseline"><u><font color="#000000"> sample Ant build file (build.xml)</font></u></span> from the MIPAV web site and place it in the same directory as the plug-in<span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">.java</font></span> files you want to compile.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  11 Alter the <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">dir.mipav</font>''</span> and <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">dir.jdk</font>''</span> properties within the <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">build.xml</font></span> to point to the directory where MIPAV and the SDK are installed, respectively.<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">


1 Display an image dataset in the DICOM browser.<br />
2 Browse through all of the images in the dataset to identify the slice numbers of the images.<br />
3 Select each of the appropriate slice numbers.<br />
4 Select the Open Selected Images icon. MIPAV opens all of the slices in an image window. You can now use the Image Slice slider in the MIPAV window to view and work with each slice.<br />
'''To view another image dataset<br />'''
[[Image:NewTopDirectoryICo.jpg]] Once you've opened the DICOM browser, you can quickly switch between working directories. In order to do that:
1 Click the New Top Directory icon. The Choose Directory dialog box opens.<br />
2 In the dialog box, select a directory of interest.Click Open. <br />
3 The DICOM browser appears showing the directory tree in the panel on the upper left of the window.<br />
4 Navigate, if necessary, to the correct subdirectory and select it.<br />
5 Now, click Parse Directory. Information about the new image dataset replaces the information about the previous dataset in the three panels on the right of the window. See also "DICOM browser interface summary".<br />
'''To create a movie from the image dataset'''<br />
[[Image:DicomExtractImagesToAVIIco.jpg]] Using the DICOM browser you can create an *.AVI file or movie from the selected dataset or chosen slices.<br />
1 Obtain and install, if you have not already done so, the following file from the Sun Java web site: ''jmf-2_1_1e-windows-i586.exe.'' This file installs file formats necessary for creating movies.<br />
2 Display an image dataset of interest in the DICOM browser.<br />
3 Browse through all of the images in the dataset to identify the slice numbers of the images you want to appear in the movie.<br />
4 Select each of the appropriate slice numbers. Note that in order to create a movie, you must select at least two slices.<br />
5 Select the Extract image to AVI movies icon. The Set AVI Options dialog box (Figure 3) opens.<br />
6 Specify whether to subsample the image by 1, 2, 3, or 4.<br />
7 Click OK. The Save dialog box opens.<br />
8 Type a name for the movie in File Name.<br />
9 Click Save. The Choose Type of AVI File dialog box (Figure 4) opens.<br />
10 Select one of the methods of writing the file.<br />
11 Type the value for the M-JPEG quality if you selected M-JPEG as the writing method.<br />
12 Click OK. A pop-up window appears with the status. <br />
When the algorithm finishes running, the pop-up window closes. The movie is saved in the directory you specified, and, depending on the file format, the movie may appear in a new window. <br />
==Set AVI Options dialog box==
{| 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 3. Set AVI Options dialog box  <br /></font>'''</div>
|+ <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 14. Configuring system variables for MS Windows<br /></font>'''</div>
|-
|-
|
|
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Subsample image</font>'''</span></div>
[[Image:EnvironmentVariables.jpg]]
|
<div class="CellBody">Subsamples each image dimension by a factor of 1, 2, 3, or 4.</div>
| rowspan="3" colspan="1" |
[[Image:DICOMSSetAVIOptions.jpg]]
|-
|
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Frame rate</font>'''</span></div>
|
<div class="CellBody">Specifies how many frames, or slices, should appear in 1 second.</div>
|-
|
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">OK</font>'''</span></div>
|
<div class="CellBody">Applies the parameters that you specified.</div>
|-
|
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Cancel</font>'''</span></div>
| rowspan="1" colspan="2" |
<div class="CellBody">Disregards any changes you made in this dialog box, closes the dialog box, and does not save the file.</div>
|}
|}


<br />
<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> Add and edit the variables in the User variables box if you want to limit the build environment to just yourself and no other users. Add and edit the variables in the Systems variables box to make the environment accessible to anyone who uses the workstation.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; 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">Recommendation:</font>'''</span> Although it is possible to update the path variable in either the User variables box or System variables box, you should add the statement to the same box in which you added the <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">JAVA_HOME</font>''</span> and <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">ANT_HOME</font>''</span> variables. <br /></font></div>
 
<span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">See also:</font>'''</span>
 
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -12pt; text-transform: none; vertical-align: baseline"><font color="#000000">  "Installing Ant" on &lt;<span style="font-style: normal; font-weight: normal; text-transform: none; vertical-align: baseline"><u><font color="#000000">[http://ant.apache.org/manual/index.html http://ant.apache.org/manual/index.html&gt;]</font></u></span>.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -12pt; text-transform: none; vertical-align: baseline"><font color="#000000">  [http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html "JavaTM SE 6 Release Notes-Microsoft Windows Installation (32-bit)" on &lt;]<span style="font-style: normal; font-weight: normal; text-transform: none; vertical-align: baseline"><u><font color="#000000">http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html&gt;</font></u></span>.<br /></font></div>
 
===== On Linux or UNIX workstations =====
 
Bash users should do the following:
 
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  1 Edit the file <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">$HOME/.bash_profile</font></span> and add lines similar to following:<br /></font></div><div style="font-style: normal; margin-bottom: 2pt; 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"> <br /></font>'''</div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -24pt; text-transform: none; vertical-align: baseline"><font color="#000000">  ANT_HOME=/path/to/apache-ant-1.6.3<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -24pt; text-transform: none; vertical-align: baseline"><font color="#000000">  JAVA_HOME=/path/to/j2sdk1.4.2_08<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -24pt; text-transform: none; vertical-align: baseline"><font color="#000000">  PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -24pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -24pt; text-transform: none; vertical-align: baseline"><font color="#000000">  export ANT_HOME<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -24pt; text-transform: none; vertical-align: baseline"><font color="#000000">  export JAVA_HOME<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -24pt; text-transform: none; vertical-align: baseline"><font color="#000000">  export PATH<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> where <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">ANT_HOME</font></span> and <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">JAVA_HOME</font></span><span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000"> </font>''</span>are the paths where each application was installed.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  2 [http://mipav.cit.nih.gov/documentation/presentations/plugins/build.xml Retrieve the ]<span style="font-style: normal; font-weight: normal; text-transform: none; vertical-align: baseline"><u><font color="#000000">sample Ant build file</font></u></span> from the MIPAV web site, and place it in the same directory where the plug-in <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">.java</font></span> files you want to compile are located.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  3 Alter the <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">dir.mipav</font>''</span> and <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">dir.jdk</font>''</span> properties within <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">build.xml</font></span> to point to the directory where MIPAV and the SDK are installed, respectively.<br /></font></div>


==Choose Type of AVI File dialog box==
==== Build.xml ====
{| 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 4. Choose Type of AVI File dialog box <br /></font>'''</div>
|-
|
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Write file as</font>'''</span></div>
|
<div class="CellBody">Specifies the file format in which to save the movie. Choose one of the following:</div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 6pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -12pt; text-transform: none; vertical-align: baseline"><font color="#000000">  24-bit uncompressed RGB, 8-bit RLE with LUT, Quicktime movie, M-JPEG, IR32, IR41, Indeo Video 5, MS-MPEG4 V1<br /></font></div> <div class="CellBody">Â </div>
|
[[Image:DICOM_WriteAVIFileAs.jpg]]
|-
|
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">M-JPEG quality (0.1 - 1.0)</font>'''</span></div>
| rowspan="1" colspan="2" |
<div class="CellBody">Specifies the level of quality, which may be from 0.1 to 1.0, in the M-JPEG file type. This box is only available if you selected M-JPEG in the Write file as box.</div>
|-
|
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">OK</font>'''</span></div>
| rowspan="1" colspan="2" |
<div class="CellBody">Applies the parameters that you specified.</div>
|}


<br />
<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">Figure 15 below displays the content of the <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">build.xml</font>'''</span> file. build.xml is also available on the MIPAV web site <span style="font-style: normal; font-weight: normal; text-transform: none; vertical-align: baseline"><u><font color="#000000">[http://mipav.cit.nih.gov/documentation/presentations/plugins/build.xml &lt;http://mipav.cit.nih.gov/documentation/presentations/plugins/build.xml&gt;]</font></u></span><span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">.</font></span><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">


==Quicktime Movie==
{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
|+ '''Figure 5. Quicktime movie-one of the eight supported file formats for making movies from DICOM images '''
|+ <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 15. The contents of the build.xml file <br /></font>'''</div>
|-
|-
|
|
[[Image:exampleSmitheQuicktimeMovie.jpg]]
<div style="font-style: normal; margin-bottom: 6pt; margin-left: 6pt; margin-right: 6pt; margin-top: 6pt; text-align: center; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> build.xml<br /></font>'''</div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 1 &lt;!-- build file for MIPAV plugin class --&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 2 -<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 3 &lt;project basedir="." default="compile" name="mipav_plugin"&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 4 &lt;property name="dir.mipav" value="c:\\Program Files\\mipav\\"/&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 5 &lt;property name="dir.jdk" value="c:\\Program Files\\Java\\jdk1.6.0_02"/&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 6 -<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 7 &lt;target name="init"&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 8 &lt;tstamp/&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 9 -<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 10 &lt;path id="build.classpath"&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 11 &lt;pathelement path="${dir.mipav}"/&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 12 &lt;pathelement location="${dir.mipav}/InsightToolkit/lib/InsightToolkit/InsightToolkit.jar"/&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 13 -<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 14 &lt;fileset dir="${dir.mipav}"&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 15 &lt;filename name="*.jar"/&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 16 &lt;/fileset&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 17 &lt;/path&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 18 &lt;property name="build.cp" refid="build.classpath"/&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 19 &lt;/target&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 20 -<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 21 &lt;target name="compile" depends="init"&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 22 &lt;echo&gt;classpath: ${build.cp}&lt;/echo&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 23 -<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 24 &lt;javac debug="true" deprecation="true" description="Builds MIPAV" verbose="no" listfiles="yes" nowarn="no" fork="true" memoryInitialSize="220M" memoryMaximumSize="1000M" id="mipav build" source="1.4" target="1.4" destdir="." srcdir="." compiler="modern"&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 25 &lt;classpath refid="build.classpath"/&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 26 &lt;/javac&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 27 &lt;/target&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 28 -<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 29 &lt;target name="clean" depends="init"&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 30 -<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 31 &lt;delete&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 32 -<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 33 &lt;fileset dir="."&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 34 &lt;include name="**/*.class"/&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 35 &lt;/fileset&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 36 &lt;/delete&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 37 &lt;/target&gt;<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 30pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: -30pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 38 &lt;/project&gt;<br /></font></div>
|}
|}


<br />
==== Compiling the plug-in files ====
'''To configure columns in the DICOM browser'''<br />


[[Image:DicomConfigureColumnsIco.jpg]] You can customize the DICOM browser by choosing which columns to display. In order to do that:<br />
<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> You should keep back-up copies of the source and compiled files in case you need to update or change the plug-in.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  1 Type <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">ant compile</font></span> on your workstation (e.g., <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">cmd ant compile</font></span><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000"> </font>'''</span>on Windows or <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">xterm</font></span> <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">ant compile</font></span> on UNIX platforms). The BUILD SUCCESSFUL message should appear at the end of the Ant output.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  2 Copy the <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">.class</font></span> files that Ant produced into MIPAV's plug-in directory.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -12pt; text-transform: none; vertical-align: baseline"><font color="#000000">  On Windows platforms:<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 4pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">C:\Documents and Settings\username\mipav\plugins</font></span><br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -12pt; text-transform: none; vertical-align: baseline"><font color="#000000">  On UNIX platforms:<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 36pt; margin-right: 0pt; margin-top: 4pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">/home/username/mipav/plugins</font></span><br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> where <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">username</font></span> is the name of your account on the system.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000">  3 Install the plug-in file. Select PlugIns &gt; Install Plugin in the main MIPAV window. In the Install PlugIn dialog box, use the Browse buton to navigate to the <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">\plugins</font></span> directory . Select the plug-in and Press OK.<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">
1 Click the Configure Columns icon. <br />
2 In the Configure DICOM Columns dialog that appears, select a field from the left dialog window and then click the Add button. The field now appears in the Selection window. <br />
3 Repeat step 2 as many times as necessary.<br />
4 Then, use the Move Up and Move Down buttons to set the column order. Refer to Figure 6.<br />
5 The field at the top of the list will appear as the leftmost column in the browser. You can easily change the order by working within the Selection box. Click a column name to select it, and then click Move Up or Move Down button to move the column up or down in the list.<br />


==Configure DICOM columns dialog box==
{| 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 6. Configure DICOM columns dialog box<br /></font>'''</div>
|+ <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 16. Installing a MIPAV plug-in.<br /></font>'''</div>
|-
|-
|
|
[[Image:DICOM_ConfiguringColumns.jpg]]
[[Image:MIPAV_installPlugIn.jpg]]
|}
|}


<br />
<br />


'''Selecting all rows (slices)'''<br />
[[Creating a self-contained plug-in frame]]
[[Image:DicomSelectAllRowsIco.jpg]]
To select all rows in the DICOM browser (or all slices in the dataset), simply click the Select All Rows icon on the browser's toolbar.<br />
 
== DICOM browser interface summary ==
 
{| border="1" cellpadding="5"
|+ 
|-
| <div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Menu: File</font>'''</span></div>
| rowspan="1" colspan="2" | <div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Disregard series numbers </font>'''</span>- DICOM images use the DICOM Universal Identifier (UID) stored in the DICOM header to name the image files on the local disk. This long string of numbers and dots is designed to be unique among all DICOM images ever created. The <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Disregard series numbers</font>'''</span> option, if checked, disregards this number when shows images in MIPAV DICOM browser.</div> <div class="CellBody">Exit - exit the browser.</div>
|-
| <div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Toolbar</font>'''</span></div>
| <div class="CellBody">[[Image:DicomOpenSelectedImagesIco.jpg]] - Open Selected Image(s);</div> <div class="CellBody">[[Image:DicomParseDirectoryIco.jpg]] - Parse Directory;</div> <div class="CellBody">[[Image:NewTopDirectoryICo.jpg]] - New Top Directory (use to open a new image dataset);</div> | <div class="CellBody">[[Image:DicomExtractImagesToAVIIco.jpg]] - Extract Images to AVI Movie;</div> <div class="CellBody">[[Image:DicomConfigureColumnsIco.jpg]] - Configure DICOM Columns;</div> <div class="CellBody">[[Image:DicomSelectAllRowsIco.jpg]] - Select All Rows.</div> <div class="CellBody"> </div>
|}
 
'''Next:''' [[Sending and retrieving DICOM images]]
 
[[Category:Help]]

Revision as of 15:52, 22 February 2012

To build a new plug-in program for MIPAV, you must first install a build environment, alter the path environment variable, and compile the plug-in files.

Installing a build environment

1 Download and install Java SE Development Kit (JDK), version 1.6 (JDK 6u2) <http://java.sun.com/javase/downloads/index.jsp>.
2 Download and install [1]Apache Ant 1.7.0 <http://ant.apache.org/>.
Figure 13. Download pages for Java SE Development Kit (JDK) and Apache Ant 1.7.0

MIPAVPluginsDownloadPages.jpg

Configuring the environment

To configure your environment, you need to add two new variables-JAVA_HOME and ANT_HOME-and update the path variable in your system.
On Windows workstations
1 Click Start > Control Panel. The Control Panel window opens.
2 Double-click the System icon. The System Properties dialog box opens.
3 Click Advanced. The Advanced page of the System Properties dialog box appears.
4 Click Environment Variables. The Environment Variables dialog box opens.
5 Decide whether to add and edit variables in the User variables box or the System variables box based on which users should have access to the Java SDK and Ant.
6 Add the JAVA_HOME variable to your environment:
a Click New. The New User Variable dialog box or the New System Variable dialog box opens.
b Type JAVA_HOME in Variable name.
c Type the path for the Java SDK on your computer (e.g., C:\Program Files\Java\jdk1.6.0_02) in Variable value.
d Click OK. The JAVA_HOME variable appears in either the User variables box or System variables box as appropriate.
7 Add the ANT_HOME variable to your environment by doing the following:
a Click New under either the User variables box or the System variables box. The New User Variable dialog box or the New System Variables dialog box opens as appropriate.
b Type ANT_HOME in Variable name.
c Type the path for the Ant on your computer (e.g., C:\Program Files\Ant\apache-ant-1.7.0) in Variable value.
d Click OK. The ANT_HOME variable appears in either the User variables box or System variables box as appropriate.
8 Update either the PATH variable in the User variables box or the Path variable in the System variables box by doing the following:
a Select the PATH variable in the User variables box, or select the Path variable in the System variables box.
b Click Edit under the User variables box, or click Edit under the System variables box. Either the Edit User Variable dialog box or the Edit System Variable dialog box opens.
c Type ;%JAVA_HOME%\bin;%ANT_HOME%\bin to the end of the PATH variable or to the end of the Path variable.
d Click OK. The edited variable appears either in the User variables box or the System variables box. See also Figure 14.
9 Open a new terminal for the change to take effect by doing the following:
a Click Start > Run. The Run dialog box opens.
b Type cmd in Open, and click OK. A terminal window opens.
10 Retrieve the sample Ant build file (build.xml) from the MIPAV web site and place it in the same directory as the plug-in.java files you want to compile.
11 Alter the dir.mipav and dir.jdk properties within the build.xml to point to the directory where MIPAV and the SDK are installed, respectively.
Figure 14. Configuring system variables for MS Windows

EnvironmentVariables.jpg


Note: Add and edit the variables in the User variables box if you want to limit the build environment to just yourself and no other users. Add and edit the variables in the Systems variables box to make the environment accessible to anyone who uses the workstation.
Recommendation: Although it is possible to update the path variable in either the User variables box or System variables box, you should add the statement to the same box in which you added the JAVA_HOME and ANT_HOME variables.

See also:

On Linux or UNIX workstations

Bash users should do the following:

1 Edit the file $HOME/.bash_profile and add lines similar to following:

ANT_HOME=/path/to/apache-ant-1.6.3
JAVA_HOME=/path/to/j2sdk1.4.2_08
PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin

export ANT_HOME
export JAVA_HOME
export PATH
where ANT_HOME and JAVA_HOME are the paths where each application was installed.
2 Retrieve the sample Ant build file from the MIPAV web site, and place it in the same directory where the plug-in .java files you want to compile are located.
3 Alter the dir.mipav and dir.jdk properties within build.xml to point to the directory where MIPAV and the SDK are installed, respectively.

Build.xml

Figure 15 below displays the content of the build.xml file. build.xml is also available on the MIPAV web site <http://mipav.cit.nih.gov/documentation/presentations/plugins/build.xml>.
Figure 15. The contents of the build.xml file
build.xml
1 <!-- build file for MIPAV plugin class -->
2 -
3 <project basedir="." default="compile" name="mipav_plugin">
4 <property name="dir.mipav" value="c:\\Program Files\\mipav\\"/>
5 <property name="dir.jdk" value="c:\\Program Files\\Java\\jdk1.6.0_02"/>
6 -
7 <target name="init">
8 <tstamp/>
9 -
10 <path id="build.classpath">
11 <pathelement path="${dir.mipav}"/>
12 <pathelement location="${dir.mipav}/InsightToolkit/lib/InsightToolkit/InsightToolkit.jar"/>
13 -
14 <fileset dir="${dir.mipav}">
15 <filename name="*.jar"/>
16 </fileset>
17 </path>
18 <property name="build.cp" refid="build.classpath"/>
19 </target>
20 -
21 <target name="compile" depends="init">
22 <echo>classpath: ${build.cp}</echo>
23 -
24 <javac debug="true" deprecation="true" description="Builds MIPAV" verbose="no" listfiles="yes" nowarn="no" fork="true" memoryInitialSize="220M" memoryMaximumSize="1000M" id="mipav build" source="1.4" target="1.4" destdir="." srcdir="." compiler="modern">
25 <classpath refid="build.classpath"/>
26 </javac>
27 </target>
28 -
29 <target name="clean" depends="init">
30 -
31 <delete>
32 -
33 <fileset dir=".">
34 <include name="**/*.class"/>
35 </fileset>
36 </delete>
37 </target>
38 </project>

Compiling the plug-in files

Note: You should keep back-up copies of the source and compiled files in case you need to update or change the plug-in.
1 Type ant compile on your workstation (e.g., cmd ant compile on Windows or xterm ant compile on UNIX platforms). The BUILD SUCCESSFUL message should appear at the end of the Ant output.
2 Copy the .class files that Ant produced into MIPAV's plug-in directory.
On Windows platforms:
C:\Documents and Settings\username\mipav\plugins
On UNIX platforms:
/home/username/mipav/plugins
where username is the name of your account on the system.
3 Install the plug-in file. Select PlugIns > Install Plugin in the main MIPAV window. In the Install PlugIn dialog box, use the Browse buton to navigate to the \plugins directory . Select the plug-in and Press OK.
Figure 16. Installing a MIPAV plug-in.

MIPAV installPlugIn.jpg


Creating a self-contained plug-in frame