Getting Started Quickly with MIPAV and Getting Started with Eclipse: Difference between pages

From MIPAV
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
MIPAV>Senseneyj
(→‎Code Conventions: these bugs are no longer present in Eclipse)
 
Line 1: Line 1:
== Getting Started Quickly with MIPAV ==
Eclipse is one of many good IDEs for developing MIPAV plugins and helping with the MIPAV project.  Here you can find out how to get started using Eclipse.
[[File:MipavSplash.gif|158px|thumb|right|MIPAV]]


This [http://mipav.cit.nih.gov/wiki/index.php/Main_Page#Documentation MIPAV WIKI] provides information to help you get started quickly using MIPAV. It explains basic tasks, such as starting and ending the program, opening and loading images, creating new images, and saving and printing images. In addition, it discusses how to create volumes of interest (VOIs), how to compare images using alphablending, and how to customize the program.
== Requirements ==


Sample images to start with MIPAV can be found here [[Sample images]].
Here are locations for downloading both Java and Eclipse. Note that Java may already be installed on your system.  Find out what version of Java you have [http://www.java.com/en/download/installed.jsp?detect=jre&try=1 here].


See also: [http://mipav.cit.nih.gov/pubwiki/index.php?title=MIPAV_change_list&oldid=39297 MIPAV change list].
* Java SE Runtime Environment ('''JRE''') or Java Development Kit ('''JDK'''). Version 1.6 or higher is needed.  You can either [http://java.sun.com/javase/downloads/?intcmp=1281 download it here] or use the JRE bundled with an installed version of MIPAV.
* Eclipse IDE for Java Developers.  The current version is recommended. [http://www.eclipse.org/downloads/ Download here]


=== [http://mipav.cit.nih.gov/wiki/index.php/Main_Page#Documentation Contents] ===
=== Installing Java ===
*[[Introducing MIPAV]]
*[[MIPAV mailing list]]
*[[Installing mipav#MipavNews|Viewing MIPAV News and Updates]]
*[[Supported Formats]]
*[[FAQ: Understanding Image Basics#FilesExtensions | Image files supported by MIPAV]]
*[[Installing mipav|Installing MIPAV]]
*[[MIPAV system requirements]]
*[[Installing mipav|Installing MIPAV]]
*[[Installing mipav#MipavUpgrade|Upgrading MIPAV]]
*[[Installing mipav#MipavUninstall|Uninstalling MIPAV]]
*[[Quitting MIPAV]]
*[[Allocating Memory in MIPAV]]
*[[Opening and loading image files]]
*[[MIPAV toolbars]]
*[[Displaying MIPAV Toolbars]]
*[[Displaying images]]
*[[Modifying image resolutions]]
*[[Changing Image Contrast]]
*[[Creating new images]]
*[[Saving and printing images]]
*[[Delineating volumes of interest (VOIs)| Volumes of Interest]]
*[[ImageJ | Working with ImageJ]]
*[[Customizing MIPAV]]
*[[Developing new tools using the API]]
*[[Technical Support | Contacting MIPAV support]]


Back to [http://mipav.cit.nih.gov/wiki/index.php/Main_Page#Documentation MIPAV WIKI]
If you downloaded Java, simply follow the installation prompts provided.
<div id="StartingMIPAV"></div>


== Starting MIPAV ==
=== Installing Eclipse ===
[[File:MIPAV_FirstAppear.jpg|450px|thumb|left|MIPAV: Main and Output windows]]
{| border="1" rules="all" cellpadding="5"
Starting MIPAV differs depending on your platform. To begin a MIPAV session, do the following:<br />
|+ ''Steps for building MIPAV.''
 
! Step
{| border="1" cellpadding="5"
! Text
|+
! Picture
|- bgcolor="#CCCCCC"
!
<div class="CellHeading">If your platform is . . .</div>
!
<div class="CellHeading">Then . . .</div>
|-
|
<div class="CellBody">Windows 95, 98, 2000, NT, XP, Vista</div>
|
<div class="CellBody">Select Start &gt; Programs &gt; mipav &gt; mipav.</div>
|-
|
<div class="CellBody">Linux</div>
|
<div class="CellBody">Open a shell. Go to the directory where you installed MIPAV, or the location you choose for the MIPAV links. At the prompt, type <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">./mipav</font>'''</span>. </div>
|-
|
<div class="CellBody">Mac Operating System (OSX)</div>
|
<div class="CellBody">Unzip the installer. Double-click the installer icon on your desktop.</div>
|-
|
<div class="CellBody">Unix OS (Sun Solaris, OS/2 Warp, and others</div>
|
<div class="CellBody">In a shell tool, command tool, or terminal window, go to the directory where you installed MIPAV. At the prompt, type <br /><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">./mipav</font>'''</span>.</div>
|}
 
 
 
Both the main Medical Image Processing, Analysis, &amp; Visualization (MIPAV) window and the Output window appear on your desktop. You can access most of [[Introducing MIPAV | MIPAV's features]] from [[Customizing MIPAV | the main menu bar]].
 
<div id="MipavMainWindow"></div>
=== Main and Output windows options===
 
{| border="1" cellpadding="5"
|+ '''The Output window menu options'''<br />
|-
|'''File'''||
'''Save Messages'''-Saves all of the messages displayed on the currently open page (e.g., Global Data page, Data page, or Debug page). When you select this command, the Save dialog box opens.
'''Add tab'''- Adds a new tab to the Output window. When you select this option, the Add Tab dialog box opens. In this dialog box, enter the name for the new tab and press OK.
|-
|'''Edit'''
|'''Clear messages'''-Clears all of the messages that are displayed on the currently open page. Be sure that you want to use this command. There is no undo!
'''Copy'''-Copies the selected text on the currently open page. <br />
'''Cut'''-Removes the selected text from the currently open page. <br />
'''Select All'''-Selects all of the text on the currently open page.<br />
|-
| rowspan="1" colspan="2" |
'''The Output window toolbar'''
|-
|
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Save Results</font>'''</span></div>
|
<div class="CellBody">Saves all of the messages displayed on the currently open page. When you select this command, the Save dialog box opens.</div>
|-
|
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Copy</font>'''</span></div>
|
<div class="CellBody">Copies the selected text on the currently open page.</div>
|-
|-
|
| 1
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Paste</font>'''</span></div>
| Download "Eclipse IDE for Java Developers" from [http://www.eclipse.org/downloads/ http://www.eclipse.org/downloads/]. 
|
|  
<div class="CellBody">Pastes copied text into the currently open page at the cursor point.</div>
|-
|-
|
| 2
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Cut</font>'''</span></div>
| Unzip Eclipse to an area where you have permission to change/install files, such as your user folder.
|
| [[Image: unzipEclipse.png|thumb|499px]]
<div class="CellBody">Removes the selected text from the currently open page.</div>
|-
|-
|
| 3
<div class="CellBody">'''Remove selected tab'''</div>
| Open "eclipse.ini" in the Eclipse folder you've just unzipped.  Increase the two memory values at the bottom of the file.  In the picture, I changed the minimum (-Xms) to 512m and the maximum to (2048m) in an 8MB machine.
|
| [[Image:FixEclipse.png|thumb|555px]]
<div class="CellBody">Removes selected tab from the output window.</div>
|-
|-
| rowspan="1" colspan="2" |
| 4
<div class="CellBody">'''The Output window default tabs'''</div>
| Start Eclipse, press Go to Workbench, and then press Window->Preferences.  It's time to link to the MIPAV JRE.  Navigate to the Installed JREs section you see in this picture, and add a Standard VM.
| [[Image:AddJRE.png|thumb|550px]]
|-
|-
|
| 5
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Data tab</font>'''</span></div>
| Use the Directory... button to locate the MIPAV JRE.  This is located inside of the folder where you installed MIPAV.
|
| [[Image:newJRE.png|thumb|550px]]
<div class="CellBody">Displays messages that apply to the currently active image.</div>
|-
|
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Debug tab</font>'''</span></div>
|
<div class="CellBody">Displays debugging information for the currently selected image.</div>
|}
|}


<br />
Click Finish, the project will now be initialized.  A new project called mipav-plugin should appear.  You're now ready to run MIPAV.
 
After starting MIPAV, you can open and load image files, create new images, access DICOM images, customize MIPAV, and end the session.
 
<div id="ManagingMemoryResources"></div>
 
== Managing memory resources ==


MIPAV requires at least 35 Mb of random access memory (RAM). Additional memory is needed to correctly display image files and to quantify the data. To determine the amount of additional memory needed, multiply the size of the image file that you want to display by 10. Thus, if an image file is 2 Mb, you must allocate an additional 20 Mb of RAM (in addition to the base of 35 Mb) for it to display correctly. Because memory requirements fluctuate depending on the size and number of image files open, it may be necessary to allocate additional memory during a session. Refer to [[FAQ: Understanding Memory]] for more examples on required memory calculations.
== Code Conventions ==


For more information, refer to: [[Allocating Memory in MIPAV]] and [[FAQ: Understanding Memory]].
MIPAV code is written in Java and conforms to many of the standard Java code conventions.  In addition, here are some things you can set Eclipse to do:
*Insert spaces when the Tab key is pressed.


== See also: ==
== Now What? ==
*[[Sample images]]
*[[Allocating Memory in MIPAV]]
*[[Opening and loading image files]]
*[[MIPAV toolbars]]
*[[Displaying images]]
*[[FAQ: Understanding Memory]]
*[[FAQ: Customizing MIPAV]]
*[[FAQ: Understanding Image Basics]]
*[[FAQ: Understanding Changes in MIPAV]]


[[Category: Help]]
With Java and Eclipse installed, you're all set to [[Writing MIPAV plugins without MIPAV source code|write MIPAV plugins]].
[[Category: Getting started]]

Revision as of 14:42, 26 May 2011

Eclipse is one of many good IDEs for developing MIPAV plugins and helping with the MIPAV project. Here you can find out how to get started using Eclipse.

Requirements

Here are locations for downloading both Java and Eclipse. Note that Java may already be installed on your system. Find out what version of Java you have here.

  • Java SE Runtime Environment (JRE) or Java Development Kit (JDK). Version 1.6 or higher is needed. You can either download it here or use the JRE bundled with an installed version of MIPAV.
  • Eclipse IDE for Java Developers. The current version is recommended. Download here

Installing Java

If you downloaded Java, simply follow the installation prompts provided.

Installing Eclipse

Steps for building MIPAV.
Step Text Picture
1 Download "Eclipse IDE for Java Developers" from http://www.eclipse.org/downloads/.
2 Unzip Eclipse to an area where you have permission to change/install files, such as your user folder.
UnzipEclipse.png
3 Open "eclipse.ini" in the Eclipse folder you've just unzipped. Increase the two memory values at the bottom of the file. In the picture, I changed the minimum (-Xms) to 512m and the maximum to (2048m) in an 8MB machine.
FixEclipse.png
4 Start Eclipse, press Go to Workbench, and then press Window->Preferences. It's time to link to the MIPAV JRE. Navigate to the Installed JREs section you see in this picture, and add a Standard VM.
AddJRE.png
5 Use the Directory... button to locate the MIPAV JRE. This is located inside of the folder where you installed MIPAV.
NewJRE.png

Click Finish, the project will now be initialized. A new project called mipav-plugin should appear. You're now ready to run MIPAV.

Code Conventions

MIPAV code is written in Java and conforms to many of the standard Java code conventions. In addition, here are some things you can set Eclipse to do:

  • Insert spaces when the Tab key is pressed.

Now What?

With Java and Eclipse installed, you're all set to write MIPAV plugins.