The Beginners Guide to MPE

MPE Programming

For the Siemens ICON © Nuclear Medicine System

I hope to give a few examples of MPE programming for the beginner who wants to have a go ....

If you want to go straight to the second set of examples - Plotting a curve, Click Here

First of all, MPE programming is based on PASCAL, so if you know that, its a good start. The power of MPE is partly due to the numerous library of procedures and functions that Siemens provide, they are all listed in the progammers manual, along with numerous examples.

Information on MPE Controls and Errors

So, before you can do much else, you need to start ICON, and load up an image.You can't get into MPE otherwise. In the following example, I would like you to open a dynamic scan of, say 10 or more images.

We will work on a program to simply totalise up a user-inputted number of images, and place them in an image as decided by the user.

This is it - it looks complex, but we will work through it step by step.


MACRO FirstProgram;       
VAR
anImage,composite: Image;
Lastframe,NumOfImg,Firstframe,putit, FrameNo: INTEGER;
OK: BOOLEAN;
BEGIN
(* Firstly, get number of Images in study *)
NumOfImg := GETNUMBEROF(1,143);
OK := GETINTEGER('FIRST FRAME? ',TRUE,{200,200},1,NumOfImg,Firstframe);
If (not OK) then Stop();
OK := GETINTEGER('LAST FRAME? ',TRUE,{200,200},1,NumOfImg,Lastframe);
OK := GETINTEGER('PUT IT IN IMAGE...',FALSE,{200,200},1,NumofImg,putit);
 
composite :={1, putit};
IMGCLEAR(composite);
 
(* Totalise images, using loop *)
 
FOR frameno := Firstframe TO Lastframe DO imgadd(composite,{1,frameno});
 
END.


Go to explanation
J.Guffogg ©1996