The Coordinate Systems

 

SliceOmatic use a number of different coordinate systems to express positions.

 

Points and Regions are defined in one of these systems and operations on them are restricted to elements that are in the same system.  However, it is fairly simple to transform a Point or a Region from one system to another.

 

 

"Frm": The Frame System

 

This is the system that is used to access the frame's pixels. This is a 2D system where the "x" axis is aligned with the frame's rows and the "y" axis is aligned with the frame's columns.  In this system, 0,0 is at the upper left corner of upper left pixel and the width and height of of each image's pixel are 1x1.

 

Normally, there is 1 to 1 relationship between the frame pixels and the pixels of the image associated with the frames.  However, some classes may change this relationship (as for example the ROI class).  If this is the case, then the classes variable "m_ident" will be 0 and the matrices "m_old2new" and "m_new2old" are used to express the relation between frame pixels and image pixels.  These matrix are already taken into account when you use the frame's method: "Fct_pixel_Get..." and "Fct_Pixel_Set_...", so specifying a coordinate in "Frm" space in these function will return the correct pixel from the original images.

 

You can go from "Frm" space to "Inf" space with the frame's method "SliceO_Frame::Frm_2_Inf"

You can go from "Frm" space to "Org" space with the frame's method "SliceO_Frame::Frm_2_Org"

 

 

"Inf": The Infinite System

 

This 2D system is an intermediary system between "Frm" and "Wnd".  

 

In the Display Mode One (one image displayed), there is a 1 to 1 relationship between the "inf" and the "Wnd" systems.  In the Display Mode All, all the classes are positioned in a theoretical infinite display. The "wnd" system will represent a window on this theoretical display.  All the image(s) fit in this space. and the display scale factor and image aspect ratio are already taken into account. (a 100x100 "Frm" pixel image with a scale fact of 3 will cover 300x300 "inf" pixels).  Since the "Inf" position of an frame depend on the display mode of a window, the "Inf" position of a frame will be different in each window.

 

0,0 is at the upper left corner of the infinite space.

 

Each classes are placed in Infinite space.  The region covered by each classes in "Inf" system can be obtained with "SliceO_Class::Inside_Get".

 

The units of the "Inf" system are the same as the "Wnd" system, they are screen pixels.

 

You can go from "Inf" space to "Frm" space with the frame's method "SliceO_Frame::Inf_2_Frm"

You can go from "Inf" space to "Wnd" space with the window's method "SliceO_Window::Inf_2_Wnd"

 

 

"Wnd": The Window System

 

This is the 2D Window system that is used to draw the windows.

 

The origin is at the bottom left corner of window. 

 

The "Wnd" system is a window on the "Inf" space. If not all of the frames in "Inf" space fit inside the "Wnd" system, the position of the bottom left corner of the "wnd" system in the "Inf" system is defined by the "val_x" and "val_y" sliders.  In other words, the lower left corner (0,0) in "Wnd" system, is at (val_x,val_y) in "Inf" system. The upper right corner is dim_x, dim_y pixel from the origin. In other words, the upper right corner is at (val_x+dim_x, val_y+dim_y).

 

You can go from "Wnd" space to "Inf" space with the window's method "SliceO_Window::Wnd_2_Inf"

 

 

"Org": The 3D Original System

 

This is a 3D system as defined in DICOM:

x increase from left to right

y increase from front to back

z increase from head to feet

 

Origin is defined at upper left corner of the upper left pixel of a frame. 

 

It is derived from the origin provided by the file, but slightly different: The DICOM origin of an image is define as the center of the upper left pixel.  We recompute this origin 1/2 a pixel higher and to the left so that our 0,0 is at the upper left corner of the upper left pixel.

 

You can go from "Org" space to "Frm" space with the frame's method "SliceO_Frame::Org_2_Frm"

 

 

"3D": The 3D Final System

 

This is the 3D system where all the object have been placed by their individual transformations.

 

Note:

 

Only 3D object read in the program from 3D files can have a transformation, for 3D objects created from the frames, that transformation is identity and the "Org" sytem is equal to the "3D" system.