How To's
HowTo Library
- In addition to this HowTo library, much information is also available at the Scanco Medical FAQ.
- users@scanco.ch
- basser5dorf
General
Errors and Fixes
HowTo: Align the whole body device to be in the field of view
It's important to have your whole sample in the field of view for accurate density measurements. Follow the instructions in this PDF to align the device.
HowTo: Fix "last slice" error problem when extracting AIM from ISQ
Sometimes the evaluation script (i.e., voi) converting the ISQ to an AIM fails because it tries to read one slice more than what is available in the ISQ data. The result of this failure is that the 3D analysis appears to fail and no .AIM or _SEG.AIM is created in the data directory. For example, it may have tried to read 261 slices, but there were only 260 slices available. The easiest work around is to make sure that the white bounding box in the uct_evaluation program does not include the last slice (largest Z dimension). Scanco is aware of this problem and will fix it in future software releases (V5.2).
HowTo: Fix sample data when results fail to print/list/show after evaluation
There are a number of reasons the results may not print:
Incorrect first measurement number
When sample information (such as patient name, DOB, remark) is changed DURING scanning, this can over write the 1st Scan measurement number, resulting in the evaluation sheet not being printed, and data not shown when running upat_list. For example, this happens when:
1) open sample program, enter name, hit save, leave program open
2) start scan (which would write correct record with 1st meas. in sample database)
3) in sample program: then only enter DOB, and hit 'save' again in the sample program --> it 'overwrites' the 1st meas. with an empty string again.
If you want to enter DOB after the scan has started, you HAVE to 'Find...' and re-load that patient first (so it correctly loads the 1st meas. entry also). It is best to just not use the sample management program whilst scanning is taking place.
However, if you do encounter this problem, use the following to fix (shown using patient 668 as an example. 1st scan measurement number was 2672):
$ set host 0 calibration xxxxx $ spb $ @[microct]microct_setup $ run [calibration.util]uct_correct_first $ r UCT_CORRECT_FIRST Patient Nr.: 668 SampleNr.: 668 First: 0 2672 Patient Nr.:
and continue with next non-working patient, give patient number 0 to exit.
$ logout
Evaluation completed (aim files produced) but results not written to database
If the first measurement number and DOB are correct... check the .log file of the evaluation... However, if there is no upat*.log file available for that scan, use:
upat_list -v=2 and you will see (for eg sample 594):
Found sample 594, CAMOS_0018 Found measurement 2536 made 19-MAR-2007 12:52:58.48 Measurement site RL found in list at index 0 Measurement 2536 within measurement period ERROR finding evaluation for measurement 2536 No valid evaluation found for measurement 2536
So it seems the 3D upat eval never wrote anything to the database for that scan. In this case, you can run:
$ @ue:ipl_upat_eval_again_quick.com
and let it run for the missing data. NOTE it will only need the aim files and gobj files that you still have in your 'models' directory.
Incorrect sequence of measurement numbers
Finally, if none of these options work... check the order of measurement numbers: especially if an import has occured, first check the first measurement number is correct (as above). Then run sys$Scratch:uct_correct_prev_next.exe and correct the order of the measurements: The database keeps a 'daisy' chain of meas. numbers, each meas. knows which one was the previous meas and the next meas.
0 means: no prev. meas (or no next meas) So corrected the order for you like this:
$ r UCT_CORRECT_prev_next Measurement No. (0 to stop) [0]: 2821 MeasNo.: 2821 PatientNo: 723 Previous [0]: <-- leave 0 Next [0]: 2828 <-- give next meas number Measurement No. (0 to stop) [2828]: MeasNo.: 2828 PatientNo: 723 Previous [0]: 2821 <-- give prev. meas number Next [0]: <-- leave 0 for very last meas.
Please note: the series of meas. numbers per patient is NOT separate per meas. site, thus radius and tibia meas. are linking to each other. Do not mess up!
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.