# Registration Namespace Reference

## Functions
def | initWindow
| initialize some varibles when window pops up
def | cleanUp
| cleanUp when windows are closed
def | getPatientRecordID
| get the DB record ID for a patient given MRO number
def | sendQuery
| send a query to the Database and return the result set
def | updateRecords
| update Records in GUI
def | loadImageList
| load Image List for a patient
def | loadGUILists
| load GUI List
def | loadRegItem
| load Registration Items
def | selectChanged3D
| pop up the context menu
def | getImageFileName
| getImage File Name bsaed on image ID
def | loadImage
| load Images into either srcImgLoad or TargetImgLoad control
def | select3DAsSource
| select 3D As Source
def | regExist
| check if the registration exists given a srcID and target image ID
def | reg3DExist
| check if 3D-3D image registration exist
def | select3DAsDest
| once the user selects a 3D image as target, ImageRegManual page will be popped up for registration.
def | register
| do registration with given Src and target Image.
def | redo
| redo the registration
def | setMatrixValues
| set the initial values in ImRegManual module
def | deleteReg
| delete the registration from database and file system
def | selectRegImg
| pop up the context menu
def | delete
| delete the registration from the registered image list
def | save3DReg
| save or update the registration into a file and database and return the record ID in database
def | save2DReg
| Save 2D registration into File and Database Due to the lack of store procedure support of MevisLab, the database queries are made individually type is inferred or not.
def | getFinalMatrix
| get the matrix that can be stored in database.
def | saveApprovalStatus
| save or update the approval status for a given object(a registration here)
def | getInversedM
| get the inverse of a matrix
def | regMultiply
| multiple regMatrix and Affine Matrix
def | propagateTo2D
| propagate the registration to 3D and 2D registration
def | propagateTo3D
| propagate the registration to 3D and 3D registration For example if registration for 3D image 1 and 2 exist, 2 and 3 exist, we need to infer registration for 1 and 3 and save it into database
def | directRegExist
| This function is to check if the registration exists and is direct.
def | saveOnRegManual
| the function is called when user clicks "save" button
def | approveOnRegManual
| the function is called when user clicks "save and approve" button
def | cancelonRegManual
| the function is called when user clicks "cancel" button
def | saveRegAndApprovalStatus
| save the registration and approval status
def | help
| show Help
def | getInitialRegMatrix
| get the initial Matrix when there is no registration
## Variables
| source = None
| Global varibles.
| dest = None
int | srcID = 0
string | regMatrix = ""
| wind = None

## Detailed Description

    * Copyright (c) 2009 Stanford University, School of Medicine All rights reserved.
    *
    * STANFORD ACADEMIC SOFTWARE LICENSE AGREEMENT
    * FOR AngioLocalize SOURCE CODE:
    *
    * 1.  This is a legal agreement between you, RECIPIENT, and STANFORD UNIVERSITY.
    *       By accepting, receiving, and using AngioLocalize.including any accompanying information, materials or
    *       manuals (Program), you are agreeing to be bound by the terms of this Agreement.
    *       If you do not agree to the terms of this Agreement, promptly return the Program to the STANFORD.

    * 2.  STANFORD grants to RECIPIENT a royalty-free, nonexclusive, and nontransferable license to use the Program
    *       and accompanying source code furnished hereunder, upon the terms and conditions set out below.
    *       documentation and/or other materials provided with the distribution.
    * 3.  RECIPIENT acknowledges that the Program is a research tool still in the development stage and that
    *       it is being supplied as is, without any accompanying services, support or improvements from STANFORD.
    * 4.  RECIPIENT agrees to use the Program solely for internal non-commercial purposes.
    * 5.  RECIPIENT may create derivatives and further transfer the Program under the following terms and conditions:
    *        A) Recipient agrees to not commercially exploit the Program and agrees all uses will be for non-commercial purposes; and,
    *        B) Recipient may not mark any derivatives with the title of Program and may not to use iPad mark for any derivatives; and,
    *        C) Recipient agrees to mark and acknowledge all derivatives as follows: "This is a derivative work based on AngioLocalize:
    *           Frameless AVM localization with 2D Digital Subtraction Angiography (DSA) and 3D Rotational Angiography (DRA) Images developed
    *           by Dimitre Hristov, Lina Liu.
    *        D) Recipient agrees to make all improvements, enhancements and derivatives available under
    *           similar terms and conditions to the research community.
    * 6.   RECIPIENT warrants that RECIPIENT will not remove or export any part of the software or Program from the United
    *       States except in full compliance with all United States and other applicable laws and regulations.
    * 7.  RECIPIENT will use the Program in compliance with all applicable laws, policies and regulations including, but not
    *       limited to, any approvals, informed consent and patient confidentiality principles.
    * 8.   RECIPIENT will indemnify, hold harmless, and defend Stanford against any claim of any kind arising out of or
    *       related to the exercise of any rights granted under this Agreement or the breach of this Agreement by RECIPIENT.
    * 9.  Title and copyright to the Program and any associated documentation shall at all times remain with STANFORD,
    *       and RECIPIENT agrees to preserve same.

## Function Documentation

def Registration::getFinalMatrix | ( |  | ) |

get the matrix that can be stored in database.

The final matrix is the multiplication of matrix in reformat and the one in InitialAlignment

Definition at line 345 of file Registration.py.

def Registration::register | ( |  | regMatrix | ) |

do registration with given Src and target Image.

Definition at line 246 of file Registration.py.

def Registration::save2DReg | ( |  | insertOp,
|  |  | srcID,
|  |  | targetID,
|  |  | status,
|  |  | regS,
|  |  | perspect,
|  |  | postAffine,
|  |  | type |
| ) |  |  |

Save 2D registration into File and Database Due to the lack of store procedure support of MevisLab, the database queries are made individually type is inferred or not.

Definition at line 327 of file Registration.py.

def Registration::select3DAsDest | ( |  | ) |

once the user selects a 3D image as target, ImageRegManual page will be popped up for registration.

If the registration already exists, user can redo, delete or cancel the registration

Definition at line 225 of file Registration.py.

All Classes Namespaces Files Functions Variables Enumerator Friends