MR Urography Plug-in for ImageJ User s Guide

Full text


Version 3.0 August 2006

MR Urography Plug-in for ImageJ

User’s Guide

Quant-if laboratory – University of Rouen/CHU of Rouen


Table of contents







I) “Area under the curve” 11 II) Volume assessment 15 III) Using both area under the curve and volume 19



Store an image 21


I) Brightness/Contrast 26

II) Recal 27

III) OK 27


I) Save a ROI and an exam 30 II) Save the Graph point value 30 III) Get the stack information 30 IV) Change the graph option 32

V) Dynamic 3D stack 33

VI) The menu bar 33




This plug-in was basically designed to process the functional part of MR Urography. - Assessment of excretion

- Assessment of split renal function

o From calculating the area under the glomerular filtration curve o From calculating the renal parenchyma volume

o Or both


New Features

It is the third version of the MR Urography plug-in. Here is the list of the new features of version 3:

- Normalization of the different curves

- Two colored area curves on the same graph for comparison - New volume manager

o Based on the Belief Functions Theory o Mouse Event redefinition

- Study manager - Stack Manager

o Open 3D dynamic stack o Exam with stop and go - Largest compatibility



The plug-in is developed with the Java language version 1.4.1. It works with ImageJ software that was created by the National Institute of Health (NIH). You can find this application at: ImageJ is in the public domain.

For implementation we use a library under GPL license which name is itext version 1.3. This library allows to export pdf reports. (

The MRU plug-in can be freely downloaded on the NIH website. We decline any responsibility in its usage, particularly in medical conclusions which could be drawn from its use.

In order to use the plug-in you have first to download ImageJ software and install it. Be careful, it is important to download the imageJ version running with java 5.0 (ImageJ bundled with Java 5.0_6).

Then, in the ImageJ “plugins” folder, create a new folder. Then, copy either the jar file or the zip file in the new folder.



Due to the image number (hundreds) or the processing memory, some dysfunction may happen. We recommend to increase the memory used by ImageJ. Go in the “Edit” menu and choose “Options”. Then click on “Memory …”.

A new interface appears. In this one, increase the value allocated to the memory. Be careful to stay under the capacities of your computer. Today (2006), 512 MB seems a good alternative.


The main interface

The main interface is composed by four independent sections (numbered 1-4 on the following image) as well as some helpful tools (at the bottom of the interface).

(1) – Renal excretion assessment

(2) – Renal function examination (area and volume can be used independently) (3) – Collecting information for the report

(4) – Image manager to capture and manage images from the stack Brightness/Contrast – Tool to improve the viewing (ImageJ tool) Recal – Tool that allows image registration


The excretion assessment

The goal is to obtain the excretion curve for each kidney. 1) Launch the application under ImageJ

2) On Main interface, click on RK/Upper Pole if you wish to assess either the excretion of the whole right kidney or the excretion of the upper pole of any kidney. Click on LK/Lower Pole if you wish to assess either the excretion of the whole left kidney or the excretion of the lower pole of any kidney.

3) Choose the appropriate stack of images (dynamic study). The program opens it automatically.


After this operation, you obtain two new windows. The first one is the image stack and the other one is the ROI manager (ROI: Region Of Interest) that allows you to analyze different ROIs by saving or loading them.

On the stack window, select an irregular ROI like in the following example. The ROI can surround either the entire kidney (or pole) or be limited to the excretory system.

Then click on the button “add” of the ROI manager. A dialog box asks you the name for the ROI to be added at the end of the ROI list. Default one is an alternate choice. You can add as many ROIs as desired and select anyone, then click on the “MRUGraph” button.


The result is a new window showing the “Excretion curve” (dynamic analysis of the ROI signal intensity).

Be careful:

This curve is normalized according to (Si-So)/So Si: Signal intensity for any point

So: Averaged signal intensity of the two first points of the curve

Make these actions for each kidney (pole) to obtain the different curves. If you want to examine the other kidney (pole), do not forget to click previously on the other button (LK/Low. Pole for example).


Split renal function

The goal is now to evaluate the respective contribution of each kidney in the total renal function (split renal function). Different MR methods have been described. Some only compare the volume of the kidneys (1). Others use the area under the curve from basis level to glomerular peak (ROI of renal parenchyma - cortex plus medulla). At least, others recommend the association of both methods (2).

(1) - Grattan-Smith JD, Perez-Bayfield MR, Jones RA, Little S, Broecker B, Smith EA, Scherz HC, Kirsch AJ. MR imaging of kidneys: functional evaluation using F-15 perfusion imaging. Pediatr Radiol. 2003 May; 33(5): 293-304

(2) - Rohrschneider WK, Haufe S, Clorius JH, Troger J. MR to assess renal function in children. Eur Radiol. 2003 May;13(5):1033-45. Erratum in: Eur Radiol. 2003 Aug; 13(8):2059

I) “Area under the curve”:

The principle is the same as for excretion. Click on one of the buttons “RK/Up. Pole” - “LK/Low. Pole” on the main interface “curves” line (page 7). The ROI manager appears directly if the dynamic stack is opened. If not, the plug-in requests you to select the appropriate stack.

Once the stack is opened, you have to create a ROI with the ImageJ tools (freehand ROI is strongly recommended). This ROI must be limited to the parenchyma (cortex and medulla – excluding excretory system). You can see an example on the following image:

Once your ROI is created, add it to the ROI manager list. It may be necessary to adapt the ROI of the 4 first minutes images to the breathing motion of the kidney


(use Recal tool – see Other Features page 27). Then, click on the MRUGraph Button to get the graph window. Be careful, the curve is normalized (see excretion section).

By clicking on “ZOOM”, you can focus on the relevant part of the curve. This part begins at the minimum intensity point (P: Peak Trough) after the vascular peak (P level) and ends with the maximum intensity point (G for glomerular point).


We need now to compute the area under the curve limited by these points. Click on the “evaluation” button. Click on the first point (P), then on the second one (G). A new window appears to choose the interpolation type.

You can choose any solution (but you have to choose the same one for the two kidneys or poles). You obtain a result that appears in the graph window and in the main interface and information about the time of the first and the second point and the time interval between these two points. The computed area is blue colored in the graph window.


Repeat these actions for the other kidney (pole) to get the area under the curve. Once you have got the area for the two kidneys, the main interface computes the kidney function (only from the area values).

If you decide to modify manually the values (not recommended), the application automatically computes the percentage.

If you keep the two MRUGraph windows opened, a new window appears. It shows a superposition of the two curves to allow comparison. The intersection is orange colored.


II) Volume assessment:

A stack of approximately ten joint images (T1 weighted, Fat suppressed images, 4mm thickness not overlapped) is necessary to assess the renal volume (2D or 3D acquisition).

To compute the volume the algorithm used is based on the “Belief Functions Theory”. It consists on computing the mass of a pixel weighted by the information of its neighborhood in order to classify it in a region determine by the k-mean algorithm.

Open the T1 weighted stack. Indicate the first, then the last image showing the studied kidney (pole). Draw a square ROI around it.


Then click on the segmentation button. A modal window appears showing the status of the work.

You got now three windows showing each a different information:

Left window: Shows the original stack and the computed ROI. It does not allow modification.

Right window: Displays reduced ROIs (less points) open to modifications. Fat and pelvi calyced system segmentation is shown in black (modifiable).

Bottom window: The volume manager to guide modifications.

If automatic segmentation is appropriate, just “Compute”. Technical information appears and needs control. If the information is correct, click “OK”, if not change it.


To switch between the ROI modification tool and the fat and cavities modification tool, you can either use the checkbox on the Volume manager or press the T key of your keyboard.

ROI modification:

1 – Move a point by select and drag (left mouse button) 2 – Move the ROI by select and drag (left mouse button) 3 – Delete a point by right clicking on it

4 – Delete a ROI by a double right click

5 – Create a new ROI by clicking on the left mouse button (point by point)

6 – To cut a ROI, click left on two points to be connected. Then, you can add intermediate points. Start from the last clicked point, and click left toward the first clicked one. Validate the result by a single right click.

For renal cavities and fat:

1 – Add Cavities/Fat: Press the left mouse button and use the cursor as a brush 2 – Remove Cavities/Fat: Press the right mouse button and use the cursor as a brush 3 – Remove all selected cavities: press the “R” key on your keyboard.

Note: By pressing the “escape” key, you can cancel the last modification.


Volume (in ml) appears in the main interface as well. To compare two kidneys (poles), you have to do the same action with the other one.


III) Using both area under the curve and volume:

As soon as possible, the application computes the ratio between the right kidney (upper pole) and the left kidney (lower pole).

Three ratios are computed:

(1) – Ratio obtained from the glomerular filtration curves of the kidneys (poles) (2) – Ratio obtained from the volume of the kidneys (poles)


The information section

Type the indication (kind of disease) in the indication section. Type the findings in the diagnosis section.


The image manager

The image manager is a part of the main interface that allows the user to add images to the report.

There are three buttons in this manager. “Store” button allows to add an image to the report. “Delete” button removes the selected image from the image list. “Comment” button adds or modifies the comment of a selected image.

Store an image:

Click on “Store” in the image manager. Such window opens then.

Select a folder. All following images and reports will be subsequently stored in the same folder. A comment field can be completed (optional). Stored images will be numbered 1 to n.

Write your comment, then click on the “OK” button to validate this operation. You can let a blank comment. Comment remains modifiable afterwards. Your image appears with the name image + number in the list.


This method allows the user to capture jpg images with or without ROIs from the Dicom image stack.

It is also possible to add curves to the report.

When you get a graph in the MRUGraph window, you can add it to the report images list by clicking on the “Save Graphics” button from the MRUGraph interface.


Once this operation is done, a dialog box appears with different choice for the name of the graph. You had to select one and validate.

The image name appears in the images list and a default comment related to the image is included (modifiable).

If the graph is already saved, a warning message appears. You have three choices: Delete the existing one and save the new graph, cancel the operation or choose another caption for the graph. If you choose an existing type of graph, the same dialog box appears again.


You can also save the graph showing superimposed curves by clicking on the “Save Curves” button on the window. As before, you will have to choose the graph name between three choices.


- The examination type is indicated in the title of the ROI Manager window - You can watch an image by double clicking on it in the images list


Main interface – Other features

I) Brightness/Contrast:

This button opens a window that allows the user to modify the Brightness and Contrast of the image stack. This window is an ImageJ window.


II) Recal:

Due to breathing, the kidney can move from one image to another.

We created a tool that moves each image of the stack in order to re place the ROI around the kidney (remember that the kidney shape does not change with breathing).


The “OK” button creates the report in two formats (html and pdf). When you click on this button, the files are created and saved in the selected folder. Then the interface is closed.

Some information is automatically included in the report: patient last name, first name, examination date and type… This information is drawn from the Dicom fields.


Html format:


Plug-in - Other features

I) Save a ROI and an exam:

You can save a ROI or an examination by clicking on the “save ROI” or the “save Exam” button in the ROI manager window.

II) Save the Graph point value:

To save the numeric values of any graph, click on “Results Table” in MRUGraph window. Then in the new window (named: Results of Dicom Stack), click on “Save As…” in File menu.

III) Get the stack information:

To get the stack information, click on the “stack Info …” button in the MRUGraph window. You can add information to this section, but only when you open a stack.

When you open a stack, you obtain the following window:


To add information, click on a line in the left section and then click on the “->” button. When you finish, click on “OK”.

When you click on the “stack info …” button in the MRUGraph window you get the following window:


IV) Change the graph option:

It is possible to change the scale of the graph in the MRUGraph window. You just have to click on the “Graph Options” button and then modify the value in the following window. Evaluation only works when the abscise scale is in seconds (*).


V) Dynamic 3D stack:

Version 2 of the plug-in did not allow opening 3D dynamic stacks. In version 3, this problem was solved. However the user is asked to choose the best slice location to recreate a 2D stack.

VI) The menu bar:

New functionalities from the menu bar. “File” menu:

– New: Restart with a blank interface

– Save: Save the study in order to re-open it in the future. The study is saved with the data and the different images added. Nor the ROIs, nor the stack are saved.

– Open: Open the previously saved study (save function). When you open the file, the program asks you to determine a workspace in order to work on this folder. Then all the things you will do and save will be added to this folder.

“?” menu:


Advice to avoid problems

- Have only one stack opened

- Open the stack with the plug-in (we keep information when opening it) - Never associate different stacks in the same folder

- Respect the Dicom fields

- Follow the preceding instructions - And read good articles ☺


Contact us

Professor Jean-Nicolas Dacher: Michael Dolores:





Related subjects :