How To's

From bone.wiki
Jump to navigation Jump to search



HowTo Library

In addition to this HowTo library, much information is also available at the Scanco Medical FAQ.
  • users@scanco.ch
  • basser5dorf









File Transfer

HowTo: SC5019 (vivaCT) files to Sodor

$ ftp hal.kin.ucalgary.ca
220 Microsoft FTP Service
Connected to hal.kin.ucalgary.ca. 
Name (hal.kin.ucalgary.ca:microct): hpl-nt\skboyd
331 Password required for hpl-nt\skboyd.
Password: 
230 User hpl-nt\skboyd logged in.
FTP> 

Note that you can log in as either:

  • hpl-nt\skboyd
  • skboyd@kin.ucalgary.ca

On the HPL network, open the window file program and type: \\hal\FTP Home

Other options for file transfer:

$ sftp   ! haven't tried it much
$ scp    ! doesn't work well with openvms

HowTo: FTP to douglas and donald (only in KIN network)

There are FTP servers running on douglas and donald for file transfer WITHIN the KIN network only, e.g. percy or your PC. If you are connecting from home, establish a PPTP VPN connection to nt-hpl first to be virtually in the KIN network. Access from scanners at the hospital (VivaCT) is not possible at the moment. Use user guest and correpsonding password for login to either douglas.kin.ucalgary.ca or donald.kin.ucalgary.ca:

$ douglas.kin.ucalgary.ca
220 Welcome to Dougla's FTP Service
Name (douglas.kin.ucalgary.ca:ypauchard): guest
331 Password required for guest.
Password: 
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
FTP> 

Scanco Finite Element Analysis

Running the FE code on the VMS system

Read the PDF file that is located in the "documents" directory for documentation and pick a problem number and output type. Make sure that your image is suitable for the slected analysis (see page 7 in the Scanco FE guide). You can use your segmented AIM from morphological analysis for FE analysis.

Edit the IPl file used in batch job mode DISK1:[MICROCT.EVAL]IPL_FE_VM.COM on percy to include the desired analysis, e.g.:

FE_PROBLEM :== 9 !combination of 1 - 6
FE_PAR_NO :== 42 ! von Mises equivalent stress

Start the evaluation as a batch job in queue SC3309_FE

$ fem DISK3:[MICROCT.PROJECTS.DEFROM.MODELS]SHAM_A12_W12_SEG.AIM

Look at the log file SYS$SCRATCH:SHAM_A12_W12_SEG_FE.LOG during execution to verify the process.

The job is submitted using:

SUBMIT/NOPRINT/NOTIF/LOG=SYS$SCRATCH:SHAM_A12_W12_SEG_FE.LOG/QUE=UCT_FE_QUEUE UE:IPL_FE_VM.COM/PARA=DISK3:[MICROCT.PROJECTS.DEFROM.MODELS]SHAM_A12_W12_SEG.AIM

You can copy the IPL_FE_VM.COM to your project directory and use the above command to submit it.

Alternatively, FE analysis can be run interactively

$ iplfe

Extracting results

Creates a total result file called .post file. Then, by default, it extracts one parameter (e.g. von mises stress), and produces stats file .postlist and a colorful .aim file (_fe_par_42.aim) which you can view with uct_3d.

If you then want other parameters extracted, or other colorful images, you only need to do a very quick operation in iplfe:

$ iplfe
/fe_post

give .post file and write out the resulting .aim file, and it produces also the .postlist file.

Scanco Image Registration

On percy, check out the DISK1:[MICROCT.EVAL]IPL_REGISTER*.COM scripts. You can also use it interactively by starting

$ iplreg
ipl> register
ipl> transform

Use the ipl help function for more info and read the PDF guide (in Documents).

SimilarityRegistration

Understanding rotation parameters (versors)

In SimilarityRegistration, former AppSimilarityRegistrationV3, used when registering images with Shape, the config file allows for setting inital rotations initial_transform_axis_x, initial_transform_axis_y, initial_transform_axis_z. These correspond to the versor components and are calculated as follows:

initial_transform_axis_x = n_x * sin(alpha/2)
initial_transform_axis_y = n_y * sin(alpha/2)
initial_transform_axis_z = n_z * sin(alpha/2)

where n=[n_x,n_y,n_z]^T is the unit vecotr representing the axis of rotation and alpha is the angle of rotation. Example 45 degree rotation around x-axis:

initial_transform_axis_x = 1 * sin(45/2) = 0.382
initial_transform_axis_y = 0 * sin(45/2) = 0
initial_transform_axis_z = 0 * sin(45/2) = 0

The rotations after registration final_transform_axis_x, final_transform_axis_y, final_transform_axis_z can be interpreted the same way. ITK provides the functions GetAxis() and GetAngle to obtain [n_x, n_y, n_z] and alpha respectively, which are calculated as follows:

v_1 = initial_transform_axis_x
v_2 = initial_transform_axis_y
v_3 = initial_transform_axis_z
magnitude = sqrt(v_1^2 + v_2^2 + v_3^2)
n_x = v_1/magnitude
n_y = v_2/magnitude
n_z = v_3/magnitude
alpha = 2 * atan(magnitude/1)

Statistics and Analysis

JAGS (analysis of Bayesian models using Markov Chain Monte Carlo)

See JAGS Usage.