Flipping images and Getting Started with Eclipse: Difference between pages

From MIPAV
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
m (1 revision imported)
 
Line 1: Line 1:
MIPAV allows you to flip images either horizontally, or vertically, or invert the order of slices in the image dataset. The last option is available via the Utilities&gt;Flip Image&gt; In Depth menu.<br />
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.
'''To flip an image, '''<br />
# Call Utilities &gt; Flip &gt; Horizontal, Vertical of In Depth.
# Then, complete the dialog box that appears, and press OK.
# After a few moments, the flopped image replaces the original image in the same image window. For dialog box options, refer to Figure 21. <br />


== Requirements ==


{| border="1" cellpadding="5"
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].
|+ ''' Figure 21. The Flip Image dialog box options '''
 
* 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]
 
=== Installing Java ===
 
If you downloaded Java, simply follow the installation prompts provided. 
 
=== Installing Eclipse ===
{| border="1" rules="all" cellpadding="5"
|+ ''Steps for building MIPAV.''
! Step
! Text
! Picture
|-
|-
|
| 1
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Options</font>'''</span></div>
| Download "Eclipse IDE for Java Developers" from [http://www.eclipse.org/downloads/ http://www.eclipse.org/downloads/]. 
|
|  
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Flip all VOIs </font>'''</span>- flips an image along with all VOIs.</div>
| rowspan="2" colspan="1" |
[[Image:FillImage.jpg]]
|-
|-
|
| 2
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Flip Axis</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">Vertical (X Axis) - flips the image vertically;</div> <div class="CellBody">Horizontal (Y Axis) - flips the image horizontally;</div> <div class="CellBody">Depth (Z Axis) - flips the image about the Z axis.</div>
|-
|-
|
| 3
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">OK</font>'''</span></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.  
| rowspan="1" colspan="2" |
| [[Image:FixEclipse.png|thumb|555px]]
<div class="CellBody">Applies the parameters that you specified to flip the image.</div>
|-
|-
|
| 4
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Cancel</font>'''</span></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.
| rowspan="1" colspan="2" |
| [[Image:AddJRE.png|thumb|550px]]
<div class="CellBody">Disregards any changes you made in this dialog box, closes the dialog box, and does not flip the image.</div>
|-
|-
|
| 5
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Help</font>'''</span></div>
| Use the Directory... button to locate the MIPAV JRE.  This is located inside of the folder where you installed MIPAV.
| rowspan="1" colspan="2" |
| [[Image:newJRE.png|thumb|550px]]
<div class="CellBody">Displays online help for this dialog box.</div>
 
|}
|}


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


{| border="1" cellpadding="5"
== Code Conventions ==
|+ '''Figure 22. An original image (A), image flipped horizontally (B), and then vertically (C)'''
|-
|
[[Image:Originala.jpg]]
A
|
[[Image:Horizontal.jpg]]
B
|
[[Image:Vertically.jpg]]
C
|}
'''To invert the order of images in datasets'''<br />
1 Open an image that contains slices.<br />
2 Select Utilities &gt; Flip&gt; Flip in Depth.<br />
A status message appears and indicates that the software is reordering the slices in the dataset. In a moment or two the MIPAV window refreshes, and the image window in which the original dataset appeared displays the reordered slices.<br />


==See also: ==
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:
[[Changing Image Datasets Using MIPAV Utilities]]
*Insert spaces when the Tab key is pressed.


[[Image Calculator]]
== Now What? ==


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

Latest revision as of 16:28, 9 February 2024

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.