Scanco Administration
OpenVMS
[edit]OpenVMS References
[edit]
Return to Contents or Return to Main Page
Unix related
[edit]
Return to Contents or Return to Main Page
Unix filenames on VMS with multiple '.'
[edit]The directory names would have been cvs-1.11.21.dir on Linux. However VMS doesn't allow more than 1 . in the name. If you enter
$ set process/parse=extended
in a terminal you'll be able to access these files. You could consider renaming them i.e. cvs-1_11_21.dir.
Return to Contents or Return to Main Page
Unix command line basics
[edit]Twelve Essential Commands
[edit]These are the commands which you have to know in order to be basically functional with a shell (command line).
| ls | List directory contents.
ls -l long listing with dates and permissions ls -a list all, including hidden files (hidden files start with a period) |
| cd | Change directory.
cd - change to previous directory cd ~ change to home directory cd .. change to parent directory |
| pwd | Print current (working) directory. |
| cp | Copy file(s).
cp -r somedir somedest Copy recursively (directory and all contents) |
| mv | Move (or rename) a file (or directory) |
| rm | Delete (remove) a file.
rm -r somedir Delete recursively (directory and all contents) rm -ri somedir Delete recursively, but prompt before each removal rm -rf somedir Delete recursively, never prompt |
| mkdir | Create directory. |
| rmdir | Remove (empty) directory. |
| cat | Print file contents (to console). |
| less | Scroll through file contents, one page at a time. SPACEBAR to advance a page, B to go back a page, Q to quit, /pattern to search for pattern |
| man | Get help on command. (eg. man ls for help on ls). You move around in man as you do with less: SPACEBAR is forward a page, and so on. |
| exit | Close shell (i.e. the terminal). If this is your login shell, you will log out. |
Return to Contents or Return to Main Page
File names with spaces
[edit]Spaces on the command line separate arguments. Therefore file names containing spaces require special treatment to avoid being interpreted as two separate files. There are a couple of methods. You can use quotes:
cp "file name with spaces" file_name_without_spaces
You can also use the backslash, which indicates that any special significance is to be removed from the following character. Thus a space, instead of being the delimiter for arguments on a command line, is to be interpreted as a regular character.
cp file\ name\ with\ spaces file_name_without_spaces
Return to Contents or Return to Main Page
Copying and pasting
[edit]Copying and pasting in a terminal is generally done with the middle mouse button. Just mark the text you want to copy with the mouse, holding down the left mouse button in the usual way. Then move the cursor (which is different than the mouse pointer - move the cursor with arrow keys typically) to where you want to insert and click the middle mouse button (on a wheel mouse the middle button is the wheel).
Tip: You can double-click to mark a whole work, or triple-click to mark a whole line. Remember - you haven't only marked it, you've put it in the clipboard.
Note: This applies to X11, for example on Linux. If using OS-X, just use Option-C and Option-V as usual.
Return to Contents or Return to Main Page
Recalling previous commands
[edit]You can scroll though your previous commands (command history) by using the UP and DOWN arrow keys.
A more advanced trick is to use CTRL-R, which is particularly useful when you want to recall a command you used some time ago. Hit CTRL-R and then start typing some fragment of the command you're searching for. The prompt will automatically update to show you the most recent match to the fragment you've typed so far. If you want the matching command previous to the one shown, hit CTRL-R again. Once you've got the previous command you're looking for, hit ENTER to run it again, or start editing it.
Return to Contents or Return to Main Page
Be lazy: use TAB to minimize typing
[edit]Some commands and especially some file names can be pretty long. Don't want to type it all? Type the first few letters, then hit TAB. The shell will fill in the rest, as far as there is a unique completion (either command or filename). If there is not a unique completion to the end, you might have to type another character or two and then hit TAB again.
Return to Contents or Return to Main Page
Keyboard Shortcuts
[edit]Here are some common command line keyboard shortcuts. Some of these are bash-specific shortcuts, so not all of them will work on all systems.
Note: If you're using OS-X, a number of the editing shortcuts below work in ALL programs in OS-X. (With the sad exception of Microsoft Office, which overrides the system-wide key bindings.)
| CTRL-A | Move to the end of the line. |
| CTRL-E | Move to the beginning of the line. |
| CTRL-F | Move forward one character. |
| CTRL-B | Move backward one character. |
| ALT-F | Move forward one word. |
| ALT-B | Move backward one word. |
| CTRL-D | Delete one character forward. |
| CTRL-H | Delete one character backward. |
| ALT-D | Delete one word forward. |
| CTRL-W | Delete one word backwards. |
| CTRL-K | Delete (Kill) everything from the cursor forwards (to the end of the line). |
| CTRL-U | Delete everything from the cursor backwards (to the beginning of the line). |
| CTRL-T | Transpose two characters. |
| ALT-T | Transpose two words. |
| ESC . | Insert the last argument (word) from the previous command. |
| CTRL-X-X | Move between end of line and current cursor position |
| CTRL-C | Terminate the current program, or sometimes cancel some operation. |
| CTRL-\ | Seriously kill the current program! Use only after CTRL-C has failed. |
| CTRL-D | End-of-file. This is often used to signal the end of input, or to exit a program. |
| CTRL-G | Cancel the current operation. An occasionally useful command to get yourself out of things. |
| CTRL-L | Redraw the console. Mostly useful if some program running in the background spews a lot of stuff onto your terminal. |
| CTRL-Q | The only time you need this is if you accidently hit CTRL-S. In that case the console is locked until you hit CTRL-Q to unlock it. Apparently once a long long time ago this was actually a useful feature. |
| CTRL-R | Recall command containing characters. After hitting CTRL-R, type the fragment you want to search for. If it returns a command which isn't the one one want, hit CTRL-R again to cycle through matches. |
| CTRL-Z | Suspend the current program and put it in the background. This is very useful once you figure out how it works. Refer to the section on putting jobs in the background. |
Return to Contents or Return to Main Page
Using scp to copy files between computers
[edit]scp is a secure copy command that works bewteen computers. Typically any computer that supports ssh also supports scp. You must have an actual user account on the target computer, so for example you typically won't be able to scp to mike.kin .
scp works just like the cp command, with a few extra decorations:
scp eric@mighty-mac.kin.ucalgary.ca:Documents/important_file.txt .
In this example the file I want to copy is on the computer mighty-mac.kin.ucalgary.ca, and I used eric@ to specify my user name. You can leave off the user name if it is the same on both computers. The period as the destination is just standard Unix short-hand for the current directory. You can use the -r flag to copy whole directories. For example:
scp -r calculations mighty-mac.kin.ucalgary.ca:Documents/Projects
In this example calculations is a directory containing many files, and possibly subdirectories. This example copies files to mighty-mac instead of from it.
Return to Contents or Return to Main Page
Running long calculations
[edit]Here are some useful tips for running long jobs.
Getting the prompt back after starting a job
[edit]Use & at the end of the command. This puts the job in the background. For example:
./myjob someargs &
To see all your background jobs (the ones started in the current shell), enter:
jobs
To bring one of these to the foreground, use:
fg %n
where n is the job number (yes it needs a % in front of it). To move it to the background again, hit CTRL-Z. This however doesn't just move the job to the background, it suspends it. To get it running again, use
bg %n
Return to Contents or Return to Main Page
Keeping a job running after you log out
[edit]Use nohup. For example, suppose you want to run ./myjob 20. In this case, you could use:
nohup nice ./myjob 20 &> output &
There are several things to note here:
- The & at the end of the command line is there so you get the command prompt back immediately (see the previous section).
- We have redirected the output to a file out_file with &> output. If you don't do this, any output to STDIN (normally the console) will automatically go into a file called nohup.out.
- We've niced the job to reduce it's execution priority. This is courteous if you're a multiuser system.
If you want to see what's in nohup.out (or whatever you called it) at any time, you can do the usual
cat nohup.out
Here's another potentially more useful command:
tail -f nohup.out
tail shows you the last few lines of the files. In addition, the -f flag ("follow") means that as lines get added to the file, they are displayed on the screen. This looks just like when you run the program without nohup, except when you hit CTRL-C, the program keeps on running in the background.
Return to Contents or Return to Main Page
Finding out if any of your jobs are still running
[edit]This command will show all jobs that belong to user "eric":
ps -u eric
Another useful command is "top", which will show interactively which processes are using the most processor cycles.
Return to Contents or Return to Main Page
Terminating a job prematurely
[edit]If you decide that you want to kill the job before it completes, this is the command:
kill PID
where PID is the actual PID (a number) of the process. You find the PID with 'top' or 'ps -u eric' (replace eric by your user ID of course).
Occasionally a process will decline to terminate when you request it to. This is the more brutal, never-fails method to kill a job immediately:
kill -s KILL PID
Return to Contents or Return to Main Page
Suspending a long-running job and restarting it later
[edit]First find the PID (process ID) with top or with ps. For example, I might list all jobs belonging to me with:
ps -u eric
To stop the job, send it a STOP signal:
kill -s STOP PID
(replace PID with the actual PID number). It is now no longer running, but it still occupies memory (although the memory it uses will probably be swapped out to disk). When you want to resume execution, give it a CONT signal:
kill -s CONT PID
Return to Contents or Return to Main Page
Graphical Applications
[edit]Calendar - Fix corruption
[edit]Sometimes the calendar file can be corrupted, which is annoying every time you log onto the system.
When we login to a server through a workstation, there is a "File is not a Calendar Datafile." information message pops up.
This means that the calendar database got corrupted during an improper interruption such as a system crash due to a power outage.
To fix this, you will need to login to the Server through the Workstation
Once logged in:
cd xdefaults dir *calendar*.dat /date
Delete the calendar file for the workstation, such as the following James workstation:
del decw$calendar_sc3401.dat
Once logged out and logged in again, you will be asked if you want to create a new calendar file. Say "yes" there and a new calendar will open.
In the calendar window menu "options" -> "general" set the "start iconized" -> apply and "ok", then "options" -> "save settings".
So next time you log in, the calendar window will be minimized in the right lower corner.
Return to Contents or Return to Main Page
Session Manager - Create a customized button
[edit]The session manager part to enable the double-click on the AIM file: Session Manager, 'Options', 'Menu', enter new item SAP with command:
@decw$user_defaults:sap$vue
Then move that menu point into 'Applications' menu. Also: 'Options', 'File types', Create 'AIM' file type. Move 'rename', 'copy', 'purge' etc. into menu, Select 'SAP', click on 'Change double click', and also move SAP into menu.
Return to Contents or Return to Main Page
EVE Editor
[edit]Launch EVE editor
[edit]On the command line
$ edit/display=decwindows/tpu fname.txt
Or to set it up permanently, edit DISK1:[MICROCT]MICROCT_SETUP_USER.COM to include
Return to Contents or Return to Main Page
Configure EVE editor
[edit]The following file, called tpu.dat, should be installed in disk1:[microct.xdefaults]:
# # DECTPU V3.1 1993-04-22 15:50 defaults # CHANGED B.KOLLER 21-JUN-90 # # Copyright (c) 1993 Digital Equipment Corporation. All rights reserved. # # # The following are all the resource names that DECTPU supports. # Tpu.Tpu$MainWindow.Title: DECTPU Copyright © Digital Equipment Corporation 1992. All Rights Reserved. Tpu.Tpu$MainWindow.ApplicationTitle: DECTPU Tpu.Tpu$MainWindow.IconName: DECTPU Tpu.Tpu$MainWindow.X: 610 Tpu.Tpu$MainWindow.Y: 0 # # The following resource names are commented out so that users can specify # *rows and *columns and have DECTPU obey those directives. If DECTPU finds # finds no resource names governing the number of rows and columns it should # have, it uses 24 rows and 80 columns. # # Tpu.Tpu$MainWindow.Columns: 80 Tpu.Tpu$MainWindow.Rows: 56 *EVE_MENU_BAR*background: #ADADADADADAD Tpu*XmScrollBar*background: #ADADADADADAD Tpu*XmDialogShell*background: #ADADADADADAD Tpu*XmMenuShell*background: #ADADADADADAD *background: white Tpu*condensedFont: OFF Tpu*fontSetSelection: 0 # 0 = big font # 1 = little font # 2 = GS font (German Standard) # 3 = Fine font (used only for non-latin 1 fonts?)
Return to Contents or Return to Main Page
EVE editor Commands
[edit]- mark -> ctrl-space
- delete -> remove (delete)
- insert -> insert here (insert)
- learn -> ctrl-k (ctrl-r to stop)
- The right 'alt' key on the PC accesses the menu for EVE.
| copy | <PF1><Remove> on VMS
|
| paste | <Insert Here> on VMS or <ctrl><insert> on PC
|
| cut | <Remove> on VMS or <delete> on PC
|
| learn | <CTRL><K>
|
| stop | <CTRL><R> (then give a key sequence such as <CTRL><Q>)
|
| repeat | <PF1><#><(CTRL-Q)> (the CTRL-Q depends on the given key sequence).
|
| find next | <PF3>
|
| enter search string | <PF1><PF3>
|
| replace string | <PF1><S>
|
| margins | Mouse click bottom of window type: set right 999
|
| kill line | <PF4>
|
| kill word | - (minus key on number pad) |
| advance next line | 0 (zero on number pad)
|
| select text | <CTRL><SPACE>
|
- To avoid having the EVE editor automatically create multiple lines from a long input sequence set the margins [FORMAT - SET MARGINS] to some high number eg. 500.
Return to Contents or Return to Main Page
Use Commands Remotely with XWin32
[edit]Default key settings:
| remove (cut) and append to previous paste buffer | 9 (nine on number pad)
|
| paste | <insert>
|
| learn | <CTRL><K>
|
| stop | <CTRL><R> (then give a key sequence such as <CTRL><Q>)
|
| repeat | <CTRL>-Q or given key sequence
|
| kill word | - (minus key on number pad) |
| advance next line | 0 (zero on number pad)
|
| go to end of line | 2 (two on number pad) or <CTRL><E>
|
| go to start of line | <backspace> or <CTRL><H>
|
| go to start of word | 1 (one on number pad)
|
| delete line to left of cursor | <CTRL><U>
|
| turn on/off select text | <CTRL><SPACE> or . (on number pad)
|
| select all text | <CTRL><O>
|
| turn on/off overstrike | <CTRL><A>
|
| save and exit | <CTRL><Z>
|
| enter command | <CTRL><B>
|
You may find it useful to define keys. For example, define keys to cut, copy and paste:
- To Cut
<CTRL><X>:
<CTRL><B>(enter command)- Command:
define key=Ctrl/x cut
- To Copy
<CTRL><C>:
<CTRL><B>(enter command)- Command:
define key=Ctrl/c copy
- To Paste
<CTRL><V>:
<CTRL><B>(enter command)- Command:
define key=Ctrl/v paste
Return to Contents or Return to Main Page
Use terminal based editor (EVE)
[edit]$ edit file.txt
If you are using this from a remote terminal, you will need to initiate a vt100 terminal.
$ set term /vt100
Some useful commands:
- ctrl-z -> exit with save
- ctrl-y -> kill without saving
- do-key, then type 'quit' or 'exit' (what is the do key on a remote terminal?)
- PF2 -> shows special keypad functions
- GoldKey -> PF1
Use EVE editor Remotely
[edit]For remote sessions, once used $ EVE to start the text editor, press Ctrl-B to bring up a command line at the bottom of the screen.
- Command: @eveconfig
This will set backspace to delete normally.
- Ctrl-X cut
- Ctrl-C copy
- Ctrl-V paste
- Ctrl-S save file
- Ctrl-L learn command
- Ctrl-F find next
- Ctrl-Q quit
- Ctrl-O open
- Ctrl-space to select
Return to Contents or Return to Main Page
Scout Views
[edit]Understanding scout views
[edit]Each time a participant is scanned a scout view is generated for each skeletal site. There are two copies kept of the scout view:
1. In the measurement directory.
$ dir DISK2:[XTREMECT2.DATA.00002836.00014976]*.SCV Directory DISK2:[XTREMECT2.DATA.00002836.00014976] D0013035.SCV;1 Total of 1 file.
2. In the common directory.
$ dir DISK1:[XTREMECT2.DATA.SCOUTS]*00002836* Directory DISK1:[XTREMECT2.DATA.SCOUTS] 00002836020.SCV;1 00002836021.SCV;2 00002836021.SCV;1 00002836038.SCV;1 00002836039.SCV;1 Total of 5 files.
A scout view is created each time a patient is scanned. That is stored in the measurement directory. For follow-up scans, the scout view shown is whatever was stored in the common directory (not the measurement directory).
Return to Contents or Return to Main Page
Naming convention of scout views
[edit]The scout view stored in the measurement directory follows the same format as all the other files associated with that measurement (e.g. D0013035.SCV).
The scout view stored in the common directory is named according to an eight digit patient number (e.g. 00002836), followed by a "0", followed by a two digit skeletal site code (RL=20, RR=21, TL=38, TR=29). The following scout view is for patient 2836 at the left radius (20):
DISK1:[XTREMECT2.DATA.SCOUTS]00002836020.SCV
Return to Contents or Return to Main Page
Viewing and printing a scout view
[edit]You can use ximage as follows:
$ x DISK1:[XTREMECT2.DATA.SCOUTS]00002836020.SCV
Or you can load uct_evaluation and select the scout view radio button.
Using either method, simply print the scout view to a printer or file.
Return to Contents or Return to Main Page
Scout views on the microCT cluster
[edit]VivaCT side:
$ cd ADISK1:[VIVACT.DATA.SCOUTS]
Return to Contents or Return to Main Page
Reassignment of Scout Views
[edit]Sometimes you may want to manipulate what scout view is shown to the operator at the time of a follow-up exam using uct_measurement. This involves making changes in the common directory (e.g. DISK1:[XTREMECT2.DATA.SCOUTS]). Note that any changes made to the scout view stored in the measurement directory will not influence what is shown by the uct_measurement program.
One scenario may be that there are two versions of the same scout view. The uct_measurement program always displays the most recent version. You can see an example here with two versions (you would just rename files appropriately so that the most recent version is what you want shown):
$ dir DISK1:[XTREMECT2.DATA.SCOUTS]00002836021.SCV* Directory DISK1:[XTREMECT2.DATA.SCOUTS] 00002836021.SCV;2 00002836021.SCV;1 Total of 2 files.
Another scenario is that you want a scout view associated with a specific patient number. If we scanned somebody as CAMOS_0456 (patient ID 1248) years ago and today we want to scan them as CABHS_8765 (patient ID 2946), then we make a copy of the scout view for each skeletal site. In this example there is a radius left and tibia left site, so two files need to be copied:
$ cd DISK1:[XTREMECT2.DATA.SCOUTS] $ copy 00001248020.SCV 00002946020.SCV $ copy 00001248038.SCV 00002946038.SCV
When uct_measurement is started and CABHS_8765 (patient ID 2946) is loaded the operator will now see the scout views.
Return to Contents or Return to Main Page
File Operations
[edit]Copy and Move
[edit]Copy files between accounts/users
[edit]As user system you can copy files between accounts (e.g., microct and devel). There is no need to set user/priv=bypass as this is set by default as user system.
If you want to copy between two users (i.e. normal users, not calibration or system), then you can only write on the user directories for which you are logged in. So, if you want to copy files from account xtremect2 to microct, you need to log into microct account and copy the file from xtremect2 to microct
If you want to use the backup command for copying multiple subdirectories with
the three dots (e.g., disk2:[microct.data.00000034...]) then you HAVE to put an /owner=devel at the end:
$ backup/log disk2:[microct.data.00000034...] -
disk2:[devel.data.00000034...]/own=devel
Return to Contents or Return to Main Page
Move a directory on the same device
[edit]You can simply use the rename command to move a directory on the same device, but you need to set DELETE protection for the file owner for this to work
$ set prot=o:rwed <dir>.dir $ ren <dir>.dir new:[parent.directory] $ set prot=o:rwe new:[parent.directory]<dir>.dir
Return to Contents or Return to Main Page
Move a whole directory structure with BACKUP command
[edit]Sometimes we want to move entire directories. For example, moving a measurement directory from DISK2 to DISK6, or moving a project to another disk.
Here is how to move a project:
$ BACKUP DISK2:[MICROCT.PROJECTS...] DISK3:[MICROCT.PROJECTS...]/VERIFY
Note the use of ... in both places.
If you move a data measurement, you could do it as follows:
$ BACKUP DISK2:[XTREMECT2.DATA...] DISK6:[XTREMECT2.DATA...]/LOG/VERIFY
In both cases, you can add a /DELETE command to so that it deletes after the move is completed and verified (files will be deleted, but not folders).
$ BACKUP/VERIFY/DELETE DISK2:[XTREMECT2.DATA...] DISK6:[XTREMECT2.DATA...]/LOG/VERIFY
Alternatively, you can simply check that the move was successful, and then delete the original files (be very careful!!):
$ delete disk2:[microctt.projects...]*.*;* $ dl disk2:[microctt.projects...]*.dir ! A for all; do until sub-dirs are gone
Note that I've misspelled "microctt" on purpose as these commands are VERY dangerous. You could wipe out a lot of data by accident. Be careful!
Return to Contents or Return to Main Page
Fix corrupted VMS files when moved to or from a PC
[edit]There seem to be two options. The most simple one is to simply run:
$ set file/attr=(lrl:512, rfm:fix) filename.isq
Alternatively, we start by getting good file format/attributes from a good aim/isq/gobj, etc.
$ ana/rms/fdl/out=correct.fdl good.aim
Then we edit the file correct.fdl, leaving only 5 lines:
RECORD
BLOCK_SPAN yes
CARRIAGE_CONTROL none
FORMAT fixed
SIZE 512
Now we have to set the file attributes of the affected aim (isq, gobi) file:
$ set file/attr=lrl=514 bad.aim ! Yes, 514 $ set file/attr=lrl=514 *.AIM ! do a bunch at a time
Finally we create a fixed file
$ convert/fdl=correct.fdl/trunc bad.aim converted.aim
This process discards the superfluous 2 bytes, usually caused by transferring to/from a PC.
Return to Contents or Return to Main Page
Delete
[edit]Delete older versions of files
[edit]Use the PURGE command.
Warning: Extreme caution!
$ PURGE !Removes older versions of all files in the directory! CAREFUL!!!! $ PURGE myfile.aim !Removes older versions of myfile.aim. $ PURGE /KEEP=3 !Removes all but the three most recent versions of all files. $ HELP PURGE !More information on the PURGE command.
Return to Contents or Return to Main Page
Undelete Files
[edit]The Disk/File Utility (DFU) will allow you to restore files that have been deleted, however, you will only be able to do so if the disk space hasn't been overwritten. This means that unless all scanning and access to the disk is stopped, you likely only have a couple of hours at most to undelete the files.
Login as the system user and start the disk file utility program, DFU.
$ dfu DFU> undelete diskX: /file=myfile OR undelete filepath/filename
For example, suppose we want to restore an RSQ (C0001234.RSQ) that was deleted from the BH data disk (disk2):
DFU> undelete disk2:/file=C0001234.RSQ
If the file can be undeleted successfully (i.e., without corruption), then you will be asked if you wish to restore the file. Type "y" or "n".
When done restoring desired files, to get out of dfu:
DFU> exit $ logout
- The undelete function will lock access to the disk while it searches for a file and until you respond "y" or "n" to restoring it. This means that all programs and commands trying to access the disk (i.e., by other people using the system) will appear to freeze momentarily until the disk is unlocked.
- If you search for a specific file, the lock period will be very short (maybe 15-30 seconds). If you search for files in general (e.g., *.RSQ), the lock period will be longer (maybe 5 to 10 minutes).
- You cannot search specific locations for files (i.e., a folder on a disk).
- Files are restored to their original location on disk.
- More information on DFU can be found here: http://digiater.nl/dfu.html
Return to Contents or Return to Main Page
Delete a directory/file
[edit]Use the DL command (this calls the script $ @SCOM:DL.COM), but first remove all files from the directory.
Warning: Extreme caution!
$ DEL [.subdir...]*.*;* !Deletes all files in subdir. CAREFUL!!! $ DL subdir.dir; !Deletes subdir.dir with confirmation. $ DL disk:[dir.subdir...]*.dir !* for all; do until subdirs are gone.
Use the DELETE command, but first remove all files from the directory and set file protections to enable deletion of the directory.
$ SET FILE/PROT=O:RWED [.subdir...]*.*;* !Changes protections so you can delete the files. O is short for OWNER and RWED refers to Read, Write, Edit, Delete. $ DEL [.subdir...]*.*;* !Deletes all files in subdir. CAREFUL!!! $ SET FILE/PROTECTION=O:RWED subdir.dir !Changes protections so you can delete the subdirectory subdir.dir. $ DEL subdir.dir; !Deletes the subdirectory.
If the file cannot be deleted to due a permission error
$ purge 12_RAD_FX.AIM %PURGE-W-FILNOTPUR, error deleting DISK4:[BONELAB.PROJECTS.MULTILOAD.CAMOS]12_RAD_FX.AIM;1 -RMS-E-FLK, file currently locked by another user
Do the following:
$ set ho 0 ! log in as calibration $ spb $ del DISK4:[BONELAB.PROJECTS.MULTILOAD.CAMOS]12_RAD_FX.AIM;1 $ logout
If that still doesn't work, then maybe you need to kill a process first:
$ show device disk4 /file ! shows all the files currently involved in a process $ set ho 0 ! log in as 'system' $ stop /id=2081F1EC $ del DISK4:[BONELAB.PROJECTS.MULTILOAD.CAMOS]12_RAD_FX.AIM;1 $ logout
Or if you have a lot of sub directories in the main directory, you can use our script:
$ @IDISK1:[XTREMECT2.COMMANDS]BACKUP_DELETE.COM
Return to Contents or Return to Main Page
Authorizations
[edit]Can not access a Projects directory
[edit]In principal, all Scanco user accounts (even including the calibration ones) should have read and write access to the Projects directories. While it (denied reading or writing access to a Project folder) did happen for a reason (used different accounts to create a file or a subfolder within a Projects folder), you could let lab administrator know and carefully run the following command to overwrite the authority, or switch to microct or xtremct2 account to perform as a walkaround.
$ set file/prot=(g:rwe,o:rwe) disk4:[bonelab.projects.danielle...]*.*;*
To avoid this happening again, make use always using the same account consistently to create all files and subfolders within their Project folder.
Return to Contents or Return to Main Page
Administrative Commands
[edit]User accounts
[edit]The xtremect2 and xt2recalib passwords are the same and have all the same settings, except data disks DK0 points to DISK2 or to DISK6, respectively.
The bonelab and bonelabknee passwords are the same and have all the same settings, except they point to DISK2 and DISK6, respectively.
Any users who want to work at a VMS terminal should log in with bonelab or bonelabknee. This will ensure uct_evaluation is accessing the correct data.
Any user who wants to remotely log into the system will be using SSH authentication at users xtremect2 or xt2recalib. Access by SSH requires Steve to set up your SSH public key. He has instructions on how to do this in his list of SOPs.
Any users who need to scan patients log into xtremect2, microct2 or xt2recalib should use a password. This password is restricted to only a small handful of people.
Set password on VMS system
[edit]For OpenVMS access (which includes FTP, SSH as well) you can simply use:
$ set password
Also see https://wiki.vmssoftware.com/SET_PASSWORD
We usually do the password change from system account for any users. It's easier as you can change any users password in the same tool. Here how this goes (as system):
$ cd sys$system $ mcr authorize UAF> mod microct /pass=test1234 /nopwdlife /nopwdexp ... next user if wished ... UAF> exit
Then you may have to update the password for Samba access as well, if users use Samba. And that's also a reason we do it all as system, as this can only be done there anyway.
$ @samba$root:[bin]samba$define_commands $ pdbedit -x microct $ pdbedit -a microct
and enter new password.
Query commands
[edit]Check licenses on VMS system
[edit]This can be used to see what educational licenses (and other licenses) are currently on the system:
$ SHOW LICENSE
To apply for an educational license go to http://www.openvmsedu.com
Return to Contents or Return to Main Page
Check MAC address of VMS system
[edit]You can check them using the command
$ mcr lancp sh dev/char
For example, the result on percy.kin.ucalgary.ca gives
Device Characteristics EIA0:
Value Characteristic
----- --------------
1500 Device buffer size
Normal Controller mode
External Internal loopback mode
00-02-A5-20-29-99 Hardware LAN address
Multicast address list
CSMA/CD Communication medium
FF-FF-FF-FF-FF-FF Current LAN address
128 Minimum receive buffers
256 Maximum receive buffers
Yes Full duplex enable
Yes Full duplex operational
TwistedPair Line media type
100 Line speed (mbps)
Disabled/No Failset Logical LAN state
0 Failover priority
Return to Contents or Return to Main Page
Update commands
[edit]Change hosts
[edit]$ mcr latcp show service * ! and if it shows you SCTHIN: $ set host scthin ! or $ set host scthin/lat
Return to Contents or Return to Main Page
Update OpenVMS Licenses
[edit]This needs to be done on all the Calgary workstations, XtremeCT, vivaCT40/uCT35, and uCT100.
Request licenses from HP:
- School Identification (for U of C): 855803-9502
- License type: OpenVMS VAX/Alpha (uCT100: OpenVMW Integrity) Layered Products? (Or try others)
- Member of DSPP or AlicanceONE: No
- Do you use a VAX or Alpha Emulator: No
On every workstation, you need to check which licenses are loaded and update those with a termination date.
$ show license Active licenses on node SCEVA3: ------- Product ID -------- ---- Rating ----- -- Version -- Product Producer Units PCL Activ Version Release Termination C DEC 0 0 100 0.0 (none) 1-OCT-2012 CMS DEC 0 0 100 0.0 (none) 1-OCT-2012 CXX-V DEC 0 0 100 0.0 (none) 1-OCT-2012 FORTRAN DEC 0 0 100 0.0 (none) 1-OCT-2012 LSE DEC 0 0 100 0.0 (none) 1-OCT-2012 MMS DEC 0 0 100 0.0 (none) 1-OCT-2012 VMSCLUSTER DEC 0 0 100 0.0 (none) 1-OCT-2012 OPENVMS-I64-FOE HP 4 1 0 0.0 (none) (none)
- HP will provide you with a script file (Example script from HP ) containing a large number of licenses.
- Modify the script to contain only the relevant licenses and load the licenses (Example modified script).
- Login as user: system
- Re-check the licenses on the workstation to ensure that the termination date has been updated.
- The date after expiry, if cannot log in, then there is a problem with the VMS Cluster license, which was installed by Scanco. Contact Mark Blanchard (mblanchard@scanco.ch) about this problem.
Return to Contents or Return to Main Page
Understanding how to set default parameters with OpenVMS
[edit]Here is how the files all hang together...
LOGIN.COM is called automatically during login and calls
- MICROCT_SETUP.COM, which sets the scanner ID, data device, etc. This file calls
- MICROCT_SETUP_COMMON.COM to create general settings. This file is located in DISK0:[MICROCT_COMMON] and calls
- MICROCT_FE.COM, if present, to setup the environment for Bert's FE program
- MICROCT_SETUP_SITE_SPECIFIC.COM to create local settings for all accounts (e.g. ICALC)
- MICROCT_SETUP_COMMON_*.COM, if present, typically to create application-specific settings for all accounts
- MICROCT_SETUP_GROUP_*.COM, if present, to create local settings for specific groups (e.g. group 3401)
- MICROCT_SETUP_COMMON.COM to create general settings. This file is located in DISK0:[MICROCT_COMMON] and calls
- MICROCT_SETUP_USER.COM to create user-specific settings.
- MICROCT_SETUP.COM, which sets the scanner ID, data device, etc. This file calls
Note that the $UM designation is the MAIN directory, and the location of the binary files. To see a list:
$ dir DISK0:[MICROCT_COMMON.MAIN]
This is where you'll find IPL_SCANCO_FE.EXE, IPL_SCANCO_M.EXE, etc.
Lots of stuff here:
Directory DISK0:[MICROCT_COMMON]
3309.DIR;1 DATABASE.DIR;1 DEMO.DIR;1 EVAL.DIR;1 MAIN.DIR;1 TEMPLATES.DIR;1 TIPS.DIR;1 UIL.DIR;1 UTIL.DIR;1 WWW.DIR;1
UE and other symbols like UT, UM, UU, etc, are kind of search-lists of directory. As you see in the example below:
$ dir ue:iplv6_upat_redo_e5e6_xt2*.com /size/date
Directory IDISK1:[XTREMECT2.][EVAL]
IPLV6_UPAT_REDO_E5E6_XT2_FIX_GOBJ.COM;2
15KB 19-DEC-2019 09:53:04.69
IPLV6_UPAT_REDO_E5E6_XT2_FIX_GOBJ.COM;1
15KB 26-JUL-2018 07:22:37.54
IPLV6_UPAT_REDO_E5E6_XT2_OLD.COM;1
15KB 19-DEC-2019 09:53:04.69
Total of 3 files, 45KB
Directory IDISK0:[MICROCT_COMMON.][EVAL]
IPLV6_UPAT_REDO_E5E6_XT2.COM;5
13KB 7-AUG-2017 14:31:15.91
Total of 1 file, 13KB
UE shows files in the user specific eval directory and then the common files. "common" because these are common to all accounts on your system.
If there is ever a file with the same file name in both locations, it will always take the one on the specific directory. Also if you save a file under ue:... it will be stored into your user specific directory.
Common directories are protected and files in there cannot be changed by a "normal" user account. Only calibration accounts can do so, after evaluated privileges with $ spb.
Return to Contents or Return to Main Page
Edit Symbol
[edit]Edit SCANCO_SUBMIT_COMMAND
[edit]- Check the current setting:
$ show sym *submit*
In directory DISK2:[MICROCT]MICROCT_SETUP_USER.COM add the following line:
$ SCANCO_SUBMIT_COMMAND :== SUBMIT/NOPRINT/QUE=SYS$SLOW /NOTIFY/LOG=SYS$SCRATCH:
Then end session and log in again. Definition of the symbol in the
MICRO_SETUP_USER.COM supersedes the standard setting.
Return to Contents or Return to Main Page
Edit AIX
[edit]
Warning: Extreme caution! Explicit permission for this change or similar changes must be obtained from Dr. Steven Boyd.
Log in as user calibration (Xtremect: calibration; VivaCT40: calib5019; uCT35: calib2339), the password is the same as for the system user. Set priviledges to bypass.
$ set proc/priv=bypass
Or
$ spb
Change to the MICROCT_COMMANDS directory.
$ cdc $ sea *.com aix $ eve microct_setup_common.com
Edit the file which is called MICROCT_SETUP_COMMON.COM
Another example: To make the backspace/insert keys work properly, edit the login.com and insert the line
$ set terminal/insert
Anywhere suitable.
Return to Contents or Return to Main Page
Setup Time
[edit]Change system date and time
[edit]The OpenVMS system should adjust for daylight savings, however, this is currently incorrect for the alpha systems. The alpha systems will need to be manually moved forward in March and moved back in April. To do this, you will need to login as system
$ set host 0
user: system
password:
$ show time
$ set time=dd-mmm-yyyy:hh:mm:ss/cluster !/cluster to change the time on all computers at once
$ set time=01-APR-2012:18:00/cluster !Example: Set the system to April 1, 2012, 6 pm.
Return to Contents or Return to Main Page
Set time zone
[edit]As user system:
$ @sys$startup:utc$time_setup
Choose "CANADA" from the menu. Choose "MOUNTAIN" from the menu.
Return to Contents or Return to Main Page
Disable Distributed Time Synchronization Service (DTSS)
[edit]DTSS will automatically adjust the clocks for daylight savings (i.e., 2am to 1am on the 2nd Sunday in March, 2am to 3am on the 1st Sunday in November). As user system:
$ mcr ncl disable dtss $ mcr ncl delete dtss $ eve sys$startup:sylogicals.com
Add line to disable DTSS
$ DEFINE/SYSTEM/EXEC NET$DISABLE_DTSS TRUE
Save and exit. Now re-set the time zone.
Return to Contents or Return to Main Page
Configure Network Time Protocol (NTP) server to synchronize clocks
[edit]- NTP must be configured for each node (computer). Login as user system.
NTP can only synchronize the system clock if the error is less than 1000 seconds.
Synchronize the system clock to UofC's NTP server (ensures time is correct to within 1000s):
$ mcr sys$system:tcpip$ntpdate ntp.cpsc.ucalgary.ca
Enable NTP:
$ cd sys$startup $ @tcpip$config 3 - Server components 12 - NTP 1 – Enable service on this node E – Exit menu E – Exit configuration procedure N – don’t start service
Create the NTP configuration file:
$ sys$sysroot:[tcpip$ntp] $ copy/log tcpip$ntp.template tcpip$ntp.conf $ eve tcpip$ntp.conf
Comment out existing peer and server entries (# for comments). Add entries for local servers.
server ntp.cpsc.ucalgary.ca
server ntp1.cpsc.ucalgary.ca
Save and exit.
Start NTP:
$ @sys$startup:tcpip$ntp_startup
Check the log:
$ type/cont/int=1 sys$sysroot:[tcpip$ntp]tcpip$ntp_run.log
Sample log file:
$ Set NoOn
$ VERIFY = F$VERIFY(F$TRNLNM("SYLOGIN_VERIFY"))
11 Apr 09:22:34 ntp[547708872]: ntpd version = 4.1.0
11 Apr 09:22:34 ntp[547708872]: precision = 976 usec
11 Apr 09:22:34 ntp[547708872]: drift file 'SYS$SPECIFIC:[TCPIP$NTP]TCPIP$NTP.DRIFT' does not exist: no such file or directory
11 Apr 09:22:34 ntp[547708872]: will attempt to create drift file
Return to Contents or Return to Main Page
Setup Email
[edit]Setup email server
[edit]The SMTP protocol is not enabled by default. If you use tcpip$config you can switch on the mail server under Client Components. As system:
$ set host 0
user: system
password:
$ @SYS$MANAGER:TCPIP$CONFIG
Or
$ @tcpip$config -> 2 (client components) -> 6 (SMTP) -> 2 (Enable & Start services)
- Select option 2 (client components) from the menu.
- Select option 6 (SMTP) from the next menu to enable and start it.
Since your smtp server is not registered anywhere, it can be that emails sent from this server will be filtered out as spam on the way to your mailbox. In that case you would need a so called MX record for your mail server. Contact UofC IT to resolve this issue.
Return to Contents or Return to Main Page
Send an email
[edit]Example: Send an email without an attachment.
$ mail sys$scratch:email_message.txt/subject="email subject" "hbuie@ucalgary.ca,mkan@ucalgary.ca"
Example: Send an email with an attachment.
$ MIME :== $MIME.EXE $ MIME MIME> NEW /NOEDIT sys$scratch:file.txt MIME> ADD /TEXT thisattached.txt MIME> ADD /BINARY thatattached.zip MIME> ADD /MESSAGE this_is_written.txt MIME> SAVE MIME> EXIT $ MAIL /SUBJECT="MIME-encoded Message" - sys$scratch:file.txt "hbuie@ucalgary.ca,mkan@ucalgary.ca" $
- MIME> ADD /TEXT *.txt does not work
Return to Contents or Return to Main Page
Action commands
[edit]Send a message to terminals
[edit]$ reply /all "Merry Christmas to Bone Imaging Lab!" Reply received on SCEVA2 from user XTREMECT2 at _SCEVA2$FTA8473: 09:21:58 Merry Christmas to Bone Imaging Lab! 4 terminals have been notified on SCEVA2. $ 1 terminal has been notified on SCSRV2. $ 1 terminal has been notified on SC3309. $ 3 terminals have been notified on SCEVA1. $
Return to Contents or Return to Main Page
mcr vs run command
[edit]The command mcr is the same as run, but only with mcr you can hand over 'in-line' parameters to an .exe file:
$ run ut:ctheader.exe c000124.isq
does not work, but you have to say
$ mcr ut:ctheader.exe c000124.isq
But funnily if you define a symbol in microct_setup_user.com (or login.com),
$ ctheader :== $ut:ctheader.exe
with just neither run nor mcr, but the 'funny' $ sign, then you can also hand over the ISQ name in-line.
Small detail with big effect...
Return to Contents or Return to Main Page
Using fda, pipe and search
[edit]The fda (file do all) command in conjunction with sys$pipe and search can be quite helpful. Generally, use fda if you want to have a wildcard to capture many files in one command line, otherwise simply use sys$pipe and search.
It's easiest to simply see examples. In this case, read the ISQ headers and use ... to include all subdirectories:
$ fda ctheader dk0:[microct.data.0001234...]*.isq
Here we include all AIM files, no matter whether it's a C1234567.AIM or C1234567_SEG.AIM or whatever else:
$ fda "aix -l" dk0:[microct.data.0001234.00005678]*.aim
Note the use of double-quotes around the target of the fda command when there are more than one strings in the command.
In this example we ensure the filename is exactly 8 characters using "%" instead of "*":
$ fda aix dk0:[microct.data...]C%%%%%%%.AIM
Warning! It's a good practise to always test your wildcard usage with dir before applying a large command:
$ dir dk0:[xxx...]*.aim
Combine fda with sys$pipe and search:
$ pipe fda "aix -l" dk0:[microct...]*.aim | search sys$pipe "Slope"
And you can redirect the output into a file:
$ fda/output=sys$scratch:all_headers.log aix dk0:[microct...]*.aim $ pipe fda type *.log | search sys$pipe "BV/TV" /output=BVTV.txt $ pipe fda/output=sys$scratch:zscan.txt "aix -l" C%%%%%%%.AIM | search sys$pipe "Original Creation-Date","Index Patient","Index Measurement","Patient Name","Site","Time"
Again, if the command consists of multiple words with spaces between (e.g. mcr ut:xxx.exe), then enclose the command in double-quotes.
$ fda "mcr ut:uct_ext_header_display" dk0:[microct...]*.isq
Grab more than one line using pipe and search command:
$ pipe aix *.aim | search sys$pipe "dim", "pos", "name"
Some common examples I use, without fda, are:
pipe aix -l D0013580.AIM | search sys$pipe "Original file","Index Patient","Index Measurement","Patient Name","Site","Time" pipe ctheader D0013580.ISQ | search sys$pipe "Patient Name","Patient Index","Measurement Index","Creation Date","Site"
Return to Contents or Return to Main Page
Putting multiple commands on a single line
[edit]The key is to use the PIPE command. Basically separate all commands with ;
$ pipe cd DISK2:[XTREMECT2.DATA.00003089.00016318] ; dir
It has also some nice features of passing input and output along to the next command (see help), eg if you want to see the integration time of a certain scan :
$ pipe ctheader C0014998.ISQ | search sys$pipe "Sampletime"
Sampletime : 900000 [µs]
You can even submit a multi-line command to a remote computer using SSH:
$ ssh -p22 -c 3des-cbc -o KexAlgorithms=+diffie-hellman-group1-sha1 -o HostKeyAlgorithms=+ssh-dss microct@12.618.196.561 'commands.txt'
where 'commands.txt' can be replaced by 'pipe cd DISK2:[XTREMECT2.DATA.00003089.00016318] ; dir'
Return to Contents or Return to Main Page
Make commands available to all users with symbols or paths
[edit]DCL$PATH is one way to do that, WE don't use it...
$ def dcl$path disk1:[microct.main],disk1:[microct.util]
then, if you type
$ uct_t
it will first try to
$ @uct_t.com
and then
$ r uct_t.exe
however, we usually define it by giving full path:
$ progx :== $disk1:[microct.main]progx.exe $ com_proc_x :== @disk1:[microct.main]procedure.com
then, you can just type the shortcut ('symbol' in VMS language)
We use the 'cd' to set the default path, you may also use this in your command procedure:
proc.com:
$ cd 'p1' $ dir *.*/size $ define COM disk1:[microct.commands] $ p :== @COM:PROC.COM
these both go into login.com, but see the Wiki entry above to confirm exactly where...
then, you can just type:
$ p disk4:[microct.data.0000007.000009]*.ISQ
Return to Contents or Return to Main Page
Stopping disconnected sessions
[edit]As system user you can check if there are any disconnected sessions, with $ show user/full:
$ sh user/full
OpenVMS User Processes at 5-JUN-2021 03:14:06.45
Total number of users = 2, number of processes = 7
Username Process Name PID Terminal
MICROCT DECW$MWM 00000EA4 MBA6597: (disconnected)
MICROCT DECW$SESSION 00000EA2
MICROCT VUE$MICROCT_3 00000EA6 MBA6601: (disconnected)
MICROCT VUE$MICROCT_4 00000EA7 (subprocess of 00000EA2)
MICROCT VUE$MICROCT_5 0000289E (subprocess of 00000EA2)
MICROCT _FTA24: 00012284 FTA24:
SYSTEM _FTA30: 000129DC FTA30:
and kill any as follows:
$ stop/id=00000EA4 $ stop/id=00000EA6
There may also be FTP connections that aren't closed properly. You can check for open FTP connection with this:
$ sh sys/proc=tcpip$ftp* OpenVMS V8.3-1H1 on node SC4209 5-JUN-2021 03:12:53.14 Uptime 73 13:39:10 Pid Process Name State Pri I/O CPU Page flts Pages 00000426 TCPIP$FTP_1 LEF 9 786428 0 00:00:12.51 1089 751 N 000129E0 TCPIP$FTPC00046 HIB 4 106 0 00:00:00.03 431 353 N
and again kill any with:
$ stop/id=000129E0
But DO NOT kill the TCPIP$FTP_1 as this is the actual FTP server process.
Remember, in a cluster there will almost always be other open sessions which have their DECW$SM.LOG files locked. You don't need to delete them all!
Return to Contents or Return to Main Page
Calibration and QC
[edit]System Updates
[edit]| XtremeCT II |
|
|---|---|
| XtremeCT I | |
| vivaCT80 |
|
| vivaCT40 |
|
| µCT35 |
|
Return to Contents or Return to Main Page
Calibration and Conversion
[edit]Attenuation measured by µCT
[edit]A micro-CT 3D image of an object is basically a 3D map of local x-ray absorption in the object. The reconstruction from multiple angular views provides information on how much x-ray absorption is happening within each cubic voxel element of the scanned volume.
It is important to understand what is meant by “density” in a µCT image. The reconstructed grey-scale intensity of each image voxel does not relate directly to mass density alone, thus do not expect it to correspond with measurements of weight per volume, e.g. g.cm-3. The primary entity that is measured is x-ray absorption, defined as the x-ray linear attenuation coefficient in units of 1/distance, specifically, 1/cm. This is determined both by mass density and x-ray mass attenuation coefficient which is determined by the elemental composition of the material. The x-ray linear attenuation coefficients of typical material is shown blow.
The images we obtain from the scanner are in a special scanner manufacturer format called AIM files. Each voxel in these images contains a scaled linear attenuation value (mu-value) to save disk space.
| Symbol | Name | Unit | Value Range | Meaning or Comments |
|---|---|---|---|---|
| µ | x-ray linear attenuation coefficient | 1/cm | µ > 0 | A constant that describes the fraction of attenuated incident photons in a monoenergetic beam per unit thickness of a material |
| mu_value | linear attenuation in Scanco images | 1/cm | -8~8 typically | mu value represented in Scanco images |
| pixel_Scanco | pixel intensity value in Scanco images | - | −32768~32767 | Original format of Scanco images in 16-bit signed |
| pixel_uint | pixel intensity value in converted Scanco images | - | 0~65535 | Converted format of Scanco images in 16-bit unsigned, using the same slope (unscaled) but an updated intercept |
pixel_Scanco = mu-value * scaling_factor
Return to Contents or Return to Main Page
Calibration by BMD
[edit]When we know that the x-ray absorption of a material is dominated by one specific material, then we can relate the measured x-ray linear attenuation coefficient (mu_value) to the mass density of that material. The calibration of Bone Mineral Density (BMD) is an example of this. We assume that the x-ray attenuation within mineralized tissues such as bone, dentine and enamel is dominated by, and can be approximated as, the x-ray attenuation of the mineral compound calcium hydroxyapatite (CaHA) which has the formula Ca5(PO4)3(OH).
Then we obtain “phantoms” with two or more known mass concentrations of CaHA. By linking these mass concentrations of CaHA with measured mu_value in the micro-CT images, we can establish calibration linking the two quantities, allowing us to infer from the micro-CT measured linear attenuation coefficient (mu_value) in a mineralized tissue, to the density of CaHA in mg.cm-3.
- The assumption of linear correlation between the two quantities is based on a well-applied beam hardening correction and the phantoms' diameter matching with the size of bone within the sample.
- This calibration system could be used to calibrate measurement of other substances apart from CaHA and bone, where x-ray absorption is known to be dominated by a certain substance and phantoms can be prepared with known concentrations of that substance.
| Symbol | Name | Unit | Value Range | Meaning or Comments |
|---|---|---|---|---|
| BMD | Bone Mineral Density | mg HA/ccm | 0~3000 | Volumetric density of calcium hydroxyapatite (CaHA) in a biological tissue in terms of mg/cm^3 |
| BMD_value | Bone Mineral Density in Scanco images | mg HA/ccm | -1500~3000 typically | BMD value in Scanco images |
Return to Contents or Return to Main Page
Conversion between Attenuation and Bone Density
[edit]BMD_value = mu-value * slope + intercept mu-value = (BMD_value – intercept) / slope pixel_Scanco = scaling_factor * (BMD_value – intercept) / slope
For example, to convert mu_value of 1.7923 (1/cm) to BMD (mg HA/ccm):
BMD_value = 1.7923 * 3.67162994e+02 + -2.06399002e+02 = 451.667 (mg HA/ccm)
For example, to convert the lower threshold of 125 mg HA/ccm that is in the IPL script to pixel intensity in Scanco images:
pixel_Scanco = 4096 * (125 - -2.06399002e+02) / 3.67162994e+02 = 3697
- You could get the scaling_factor, intercept and slope values from the AIM header of your scan by using aix -l command:
Return to Contents or Return to Main Page
Convert CT numbers to mg HA/ccm / Houndsfield units (HU)
[edit]The two byte numbers (short) can be converted to mu values by first dividing by mu_scaling which is probably 4096 (uCT35, vivaCT40) or 8192 (XtremeCT).
Houndsfield units (HU)
Here is the conversion formula from mu (lin.att. in 1/cm, our original, 'physical' image numbers) to HU:
HU(pixel) = -1000 + mu(pixel) * 1000/mu(water)
so the mu(water) is the 'constant' that is needed for this conversion of any pixel value mu(pixel) to HU of that pixel.
divide the 2-byte numbers in our dicom/aim/isq files by 4096 to get mu. (4096 --> 'mu_scaling' in our headers). E.g. you see gray-scale number 8192 in our files --> mu = 2 [1/cm].
A reasonable result for the uCT35 is:
HU = (CT / 4096) * 1718.19 - 1000
and that means 1000/mu(water) = 1718.19 --> mu(water) = 0.58299 which is a reasonable number.
mg HA/ccm
mg HA/ccm = (AIM/mu_scaling) * slope + intercept mg HA/ccm = (AIM/4096) * 295.494 - 189.695 ! vivaCT40 mg HA/ccm = (AIM/4096) * 256.51 - 172.99 ! uCT35 mg HA/ccm = (AIM/8192) * 1402.549 - 340.953 ! XtremeCT
These numbers are available in the AIM header, or the ISQ header ($ run ut:ctheader).
To look up slope, intercept and mu_scaling, check either the AIM header
$ aix C1234567.AIM
or
$ run ut:uct_update_calibration
and look at a record, and you'll find slope and intercept and mu-water.
vivaCT40 !---------------------------------------------------------------------- Mu_Scaling 4096 Calibration Data 55 kVp, 200mg HA wedge, 4096 scaling Calib. default unit type 2 (Density) Density: unit mg HA/ccm Density: slope 2.95493988e+02 Density: intercept -1.89695007e+02 HU: mu water 0.58200 !----------------------------------------------------------------------
XtremeCT !------------------------------------------------------------------------------- Mu_Scaling 8192 Calibration Data 60kVp, BH: 200 mg HA/ccm, Scaling 8192 Calib. default unit type 2 (Density) Density: unit mg HA/ccm Density: slope 1.40254895e+03 Density: intercept -3.40953003e+02 HU: mu water 0.23900 !-------------------------------------------------------------------------------
Return to Contents or Return to Main Page
Fix the calibration data stored in the RSQ header
[edit]You can see what calibration file is stored with your scan a few ways. One is to use aix -l to view the log file. You should see this part:
!------------------------------------------------------------------------------- Mu_Scaling 8192 Calibration Data 60kVp, BH: 200 mg HA/ccm, Scaling 8192 Calib. default unit type 2 (Density) Density: unit mg HA/ccm Density: slope 1.40254895e+03 Density: intercept -3.40953003e+02 HU: mu water 0.23900 !-------------------------------------------------------------------------------
Another is to use the extended header command for RSQ and ISQ files:
$ run ut:UCT_EXT_HEADER_DISPLAY.EXE UCT_EXT_HEADER_DISPLAY V 1.3 Raw-Data-File []: DK0:[MICROT.DATA.00000006.00000011]C0002519.RSQ Reading Raw Data ... Found valid hext of type CALIBRATION: 8 Found valid hext of type UCT_BH-Corr: 7 Hext type [8]:8 hext 8 read. Calibration No. 1 Valid Flag 1 Description 60 kVp, BH: 200 mg HA/ccm, Scaling 8192 Scanner-ID 3307 Energy [V] 59400 Intensity [▒A] 0 Antiring Enable 0 Beamhardening Enable 1 Beamhardening Coeff file UCTD:UCT_BH_COEFF_60KV_0200HA_3418.TXT Beamhardening Checksum 0 Default unit type (1=▒, 2=mg, 3=HU, 4=Custom) 2 ▒ Enable 1 ▒-scaling 8192 Density Enable 1 Density units mg HA/ccm Density Slope 1489.406 Density Intercept -370.3510 HU Enable 1 ▒ of water 0.2447000 CUSTOM Enable 0
If you need to fix it, use the UCT_EXT_HEADER_ADD_CALIB.EXE command:
run ut:UCT_EXT_HEADER_ADD_CALIB.EXE UCT_EXT_HEADER_ADD_CALIB V 1.1 Raw-Data-File []: DK0:[MICROT.DATA.00000006.00000011]C0002519.RSQ Reading Raw Data ... IDX Calib Description 1 1 68 kVp, BH: 0200 mg HA/ccm, Scaling 8192 Calibration Record No [0]:1
Return to Contents or Return to Main Page
Calibration FAQ
[edit]Change brightness scaling
[edit]- Refer to Change the brightness scaling.
Return to Contents or Return to Main Page
Update a scan after pixel correction
[edit]Contact Lab personnel with system-level priviledges to perform
$ set host 0
! Username: calib2339 (µCT35)
! Username: calib5019 (vivaCT40)
$ spb ! set priviledge bypass to write in other user accounts
$ run ut:pixel_corr_apply
PIXEL_CORR_APPLY Version 1.5
Scanner ID from UCTD:UCT_SCANNER_2339.DAT : 2339 !2339 for µCT 35, 5019 for vivaCT 40
Is this Scanner ID correct ? [?]: y
Give RSQ-Filename (leave empty to exit) []: DISK4:[BONELAB.DATA.00005283.00011668]C0005128.RSQ
...
...
Copy .RSQ to _CORRECTED.RSQ befor correction ? [?]: y
$ logout
Return to Contents or Return to Main Page
Update calibration in ISQ
[edit]If DICOM files are converted to ISQ with IPL and then used for patient evaluation, the calibration data in the ISQ header needs to be present and correct. If this information is missing, utilizing upat_list to extract the values will say 'Error: Density calibration not valid'. In order to add calibration data to an ISQ file, do the following as user calibration:
$set proc/priv=bypass ! gain read/write access to the files $mcr ut:uct_ext_header_add_calib ! provide ISQ file name and header type (I chose [2])
If you need to adjust the calibration of a file, without changing the system calibration data, copy the calibration database into a different directory, e.g. sys$scratch. Then, add a new calibration record to this temporary calibration database. This way your new, temporary values will not show up in the scan program.
$ copy uctd:uct_calibration_3401.dat sys$scratch:
Define the following logical in a terminal MAKE SURE TO DO THIS!!!!
$ def UCT_CALIBRATION_DATABASE sys$scratch:uct_calibration_3401.dat
Run uct_update_calibration and click trough the current calibration record (always enter).
$ r ut:UCT_UPDATE_CALIBRATION.EXE select current calibration record enter...
$ r ut:UCT_UPDATE_CALIBRATION.EXE
Then select the last number (New Record), copy all values from above, change slope and intercept.
Then use
$ mcr ut:uct_ext_header_add_calib
for ISQ and RSQ.
At the end, close the terminal!
Return to Contents or Return to Main Page
Quality Control (QC)
[edit]Scope
[edit]- Only Authorized XCT and µCT Operators are permitted to perform QC scans, including both scan acquisition and analysis.
- Authorization is a formal process. If you are not sure whether you have or should have authorization, speak to Dr. Boyd or Dr. Hallgrimsson or the MoJo Operations Manager.
- Authorized XCT and µCT Operators are responsible for ensuring a QC schedule is maintained.
- Only the manufacturer can calibrate the scanner! QC only checks the calibration.
Return to Contents or Return to Main Page
Overview
[edit]- Micro-CT systems cannot directly measure the density of a material, however, the density is linearly correlated to the x-ray absorption (assuming a proper beam-hardening correction is applied), which can be measured by micro-CT. Density is therefore determined by measuring a reference material of known density (i.e., a phantom) to define a conversion function to relate x-ray absorption to density. Quality control of density and structural measurements for the micro-CT systems is achieved through weekly checks of phantom values to their reference values and recalibrating the system (i.e., defining a new conversion function) as necessary.
- Performing QC is essential to the:
- Safety of our study participants and lab members
- Validity of our research data

- Reference: Koller B, Laib A (2007) Calibration of micro-CT data for quantifying bone mineral and biomaterial density and microarchitecture. In: Advanced bioimaging technologies in assessment of the quality of bone and scaffold materials: techniques and applications. Springer, pp 79-84.
Return to Contents or Return to Main Page
Density QC1
[edit]QC1 measures the density of 5 different rods of known hydroxyapatite (HA) densities within the QC phantom: approximately 0, 100, 200, 400, and 800 mg HA/cm3. This tests 3 things:
- That the scanner’s last calibration is still valid. This is done by comparing daily QC values to an acceptable range.
- The presence of drifts and shifts in the calibration. This is done by plotting daily QC results over time and using Shewart’s Controls to mathematically look for drifts and shifts. (Shewart’s Controls replaces visual assessment.)
- The correct functioning of scanner hardware and electrical components. This is done by visual inspection for image artifacts.
- QC1 is checked daily or 3 times a week on XtremeCT scanners whenever used and weekly on microCT scanners.
Return to Contents or Return to Main Page
Structural QC2
[edit]QC2 measures the volume of 3 fine aluminum rods within the QC phantom (Al rod volume measurement). This tests for:
- Alignment of the gantry (or stability of architectural parameters)
- The correct functioning of scanner hardware and electrical components. This is done by visual inspection for image artifacts.
- QC2 is checked weekly on both XtremeCT and microCT scanners.
Return to Contents or Return to Main Page
QC Scan Instructions
[edit]- XtremeCT QC Scan Instructions: Boyd Drive:\02 - Operations\01 - Scanner QC, Specifications, & Maintenance\QC Workflows\QC 001.2 - XCT Quality Control.docx
- µCT35 QC Instructions or µCT35 QC another Instructions
- VivaCT40 QC Instructions or VivaCT40 QC another Instructions
Return to Contents or Return to Main Page
Print out QC reports
[edit]After running a QC1 or QC2 analysis, the results are output to:
- DISK4:[BONELAB.PROJECTS.QC] for XtremeCT QC results
- DISK3:[MICROCT.PROJECTS.CALIBRATION] for microCT QC results performed by BH lab
- login with microct account
- DISK5:[BONELAB.PROJECTS.CALIBRATION] for microCT QC results performed by Bone Imaging lab
- RESULTS_QC1_UCT35.TXT;2
- RESULTS_QC1_VIVACT.TXT;4
- RESULTS_QC2_UCT35.TXT;2
- RESULTS_QC2_VIVACT.TXT;2
As usual as print out report sheets, you have two options.
On new systems you can simply run:
@ut:qc_list_qc1 sys$scratch:qc1.txt @ut:qc_list_qc2 sys$scratch:qc2.txt
Or the more traditional approach is:
$ upat_list
When it asks for a template, you can select for a graphical report
UU:UCT_EVAL_PHANTOM_SCANCO.PS
or for a text output
UU:UCT_3D_LIST.TXT UU:UCT_3D_MEANS.TXT
Return to Contents or Return to Main Page
System Stability and Precision
[edit]System Stability and Precision here is based on the QC measurement, QC1 for density variations and QC2 for structure variations.
| System Stability and Precision | XtremeCT | vivaCT40 | µCT35 |
|---|---|---|---|
| Long Term Precision |
|
(Ref term: 26-NOV-2010 to 8-APR-2011) |
(Ref term: 26-NOV-2010 to 8-APR-2011) |
| Short Term Precision |
|
(Ref term: 4-MAR-2011 to 8-APR-2011) |
(Ref term: 6-MAR-2011 to 8-APR-2011) |
Return to Contents or Return to Main Page
QC FAQ
[edit]Determine calibration drift for microCT QC1
[edit]The microCT QC1 analyses provide an estimate of the calibration drift by considering 'mean5' values. Use $ uct_list and make sure to use UU:UCT_3D_MEANS.TXT as the template. Then give the measurement numbers of the QC1 measurements (or all of them and remove what's not needed later).
Return to Contents or Return to Main Page
Update QC1 contours
[edit]If the QC contours don't line up on the phantom, then the contours need to be updated on the system. Normally this should not happen unless the phantom has become loose - if this is the case, re-fix it.
1. Login as user system. Do not use the $ set host 0 command since you will not be able to open windows for program.
2. Run the login script for the user that does the QC scans so that Scanco logicals point to that scan database.
$ @adisk1:[microct]login.com on the XtremeCT cluster
$ @adisk1:[microct]login.com on the vivaCT cluster
$ @disk1:[microct]login.com on the µCT100 cluster
3. Run the evaluation program.
$ uct_evaluation
4. Load the most recent QC scan and locate the contours. File-->Load Gobj... Filter: uctd:*.GOBJ. Locate the contours for the phantom: UCT_PHANTOM_KP_HA_XXXX_Y.GOBJ where XXXX corresponds with the scanner ID (XtremeCT 3309, vivaCT 5019, µCT35 2339, µCT100 6002) and Y corresponds with the rod number (1-5 and results mean1 - mean5.
5. Adjust the contours to centre on the rods.
Load a contour. Move the contour on the first slice to be centred on the rod. Copy the contour. Delete the contours on slices 2 to the end. Paste the contour on the last slice. Morph between the two contours. Save the contours. They should be saved to (A)DISK0:[000000.MICROCT_COMMON.DATABASE].
6. Perform a new QC scan as the standard (i.e., microct) user. Check that the contours line up for the evaluation. Evaluate and check the results.
Return to Contents or Return to Main Page
Update Gobj for QC1 Analysis
[edit]Refer to Fix QC1 Gobj for instructions.
Return to Contents or Return to Main Page
Update XtremeCT QC1 calibration
[edit]This procedure needs to be done for each beam hardening correction (e.g., QC1 with 200 mg HA/cm3, QC1 with 1200 mg HA/cm3) and for each scan energy.
1. Perform 3 back-to-back QC1 scans, which ensures the x-ray tube is very warm.
2. Evaluate the last QC1 scan.
3. After the evaluation is done, determine parameters for the new calibration
$ uct_calib_phantom UCT_CALIB_PHANTOM Version V1.0 Reading UCTD:UCT_CALIB_PHANTOM_KP_HA_3309.TXT Phantom Type in file: 6 Phantom Number in file: 304 Voltage in file: 0 No of Materials in file: 1 With each, no of steps: 5 and mus: 1.000000 No. of Cylinders: 5 Measurement No. (0 to Stop) [0]: 11404 Mus: 0.2382 0.3163 0.3823 0.5358 0.8112 ***************************************************** Calibration: Slope Intercept: 1398.628 -339.819 Enter in Calibration Records if wished. ***************************************************** Measurement No. (0 to Stop) [0]: End of program $
4. Save the above screen output in a file called CALIB_3309_YYYY-MM-DD.TXT.
5. Now update the calibration. For most settings, you will use the default value by pressing return. You need to choose the correct calibration record, the one that corresponds with the energy and beam hardening correction used in the QC1 scans you did. Next, you need to update the slope, intercept, and mu water values to those determined in step 3 (copy and paste values to avoid typos). The new values should be similar to the old ones. Finally, if you have not made any mistakes, then save the record.
$ run ut:uct_update_calibration UCT_UPDATE_CALIBRATION V2.5 IDX Calib/Rec. Description 1 1/42 60kVp, BH: 200 mg HA/ccm, Scaling 8192 2 2/43 60kVp, BH: 1200 mg HA/ccm, Scaling 4096 3 3/0 New Record Choose Calibration Record (IDX): [2]: 1 Valid Flag [1]: Scanner-ID [3309]: Energy [V] [59400]: Intensity [µA] [0]: Description [60kVp, BH: 200 mg HA/ccm, Scaling 8192]: Antiring Enable [0]: Beamhardening Enable [1]: Beamhardening Coeff file [MICROCT_COMMON:[DATABASE]UCT_BH_COEFF_60KV_0200HA_3309.TXT;5]: Beamhardening Checksum [0]: CCD_CORR: Read to mem: 500 bytes to correct 1 pixels (588 bytes allocated) Default unit type (1=µ, 2=mg, 3=HU, 4=Custom) [2]: µ Enable [1]: µ-scaling [8192]: Density Enable [1]: Density units [mg HA/ccm]: Density Slope [1402.549]: 1398.628 Density Intercept [-340.953]: -339.819 HU Enable [1]: µ of water [0.239]: 0.2382 CUSTOM Enable [0]: HW Filter Code [0]: HW Filter Description []: Save Record ? [Y]: Y End of program $
6. Save the above screen output in a file called CALIB_3309_YYYY-MM-DD_ENTERED.TXT. Send both text files to support@scanco.ch for them to archive.
Return to Contents or Return to Main Page
Update microCT QC1 calibration
[edit]Refer to QC1 Calibration Update for instructions for the VivaCT40 and uCT35.
Return to Contents or Return to Main Page
Update a scan with new calibration or BHC
[edit]If the QC1 range was out of range but it was not possible to update the system calibration before scanning, you can update the scan with the new density calibration (i.e., slope and intercept). It is also possible to change the beam hardening correction that is applied (e.g., from 200 mg HA/cm3 to 1200 mg HA/cm3).
| Type of Update | RSQ | ISQ | AIM |
|---|---|---|---|
| QC1 was out of range, need new slope and intercept
(e.g., after updating the system calibration) |
Yes | Yes | No, Create New |
| Change beam hardening correction type
(e.g., 200 mg HA/cm3 to 1200 mg HA/cm3) |
Yes | No, Reconstruct | No, Create New |
Use the UCT_EXT_HEADER_ADD_CALIB program to update an RSQ and, if appropriate, repeat for the ISQ.
- Use default values for all prompts except those commented after !.
$ mcr ut:uct_ext_header_add_calib UCT_EXT_HEADER_ADD_CALIB V 1.1 Raw-Data-File []: !give the name of the RSQ/ISQ with full path if not in that directory Reading Raw Data ... IDX Calib Description 1 1 45 kVp, 200mg HA wedge, 4096 scaling 2 2 55 kVp, 200mg HA wedge, 4096 scaling 3 3 70 kVp, 200mg HA wedge, 4096 scaling 4 4 General, non-bone-density-calibrated scan, scale 4096 5 5 45 kVp, BH: 1200 mg HA/ccm, Scaling 4096 6 6 55 kVp, BH: 1200 mg HA/ccm, Scaling 4096 7 7 70 kVp, BH: 1200 mg HA/ccm, Scaling 4096 Calibration Record No [0]: !specify the new calibration, e.g. 6 Calibration No. 6 Description 55 kVp, BH: 1200 mg HA/ccm, Scaling 4096 Scanner-ID 5019 Energy [V] 55000 Antiring Enable 0 Beamhardening Enable 1 Beamhardening Coeff file UCTD:UCT_BH_COEFF_55KV_1200HA_5019.TXT Default unit type (1=µ, 2=mg, 3=HU, 4=Custom) 2 Same type already found. Setting old to invalid SUCCESS: calib hext written updating header... SUCCESS: Header successfully updated. Calib record indicates that BH-Corr is usually applied. Info: There is a BH-Corr corr already in hext. Add another BH-Corr from file again? (Y/N) [N]: Y
Return to Contents or Return to Main Page
Update a scan with new QC1 calibration
[edit]Refer to Update Scan with new QC1 for instructions.
Return to Contents or Return to Main Page
Fix: un-centered QC1 Gobj
[edit]The contour for the QC1 scan is not centered on the on hydroxyapatite rod, which will result in erroneous low density values.
This can occur for a couple of reasons:
- The metal spindle has come loose on the phantom, in which case re-glue it and update the contours
- The slot on the phantom's spindle was not correctly aligned
- For the vivaCT 40, the sample bed was not pushed to the right before locking it in place
Return to Contents or Return to Main Page
Fix: rods in QC2 images
[edit]The QC2 scan has aluminum rods AND hydroxyapatite rods. This happens because the slot on the phantom's spindle was not correctly aligned and the phantom positioning is off slightly. Adjust the phantom and re-scan.
Return to Contents or Return to Main Page
Fix: the GOBJ is missing or corrupted ROI
[edit]If you find that the GOBJ for QC1 is missing or corrupted and doesn't apply the ROI correctly it's possible somebody accidentally created or edited one of the files. You can usually fix this by deleting the incorrect file and reverting back to the good copies.
The GOBJ files are found here (as user system):
cd DISK0:[MICROCT_COMMON.DATABASE]
To see the GOBJ files:
$ dir UCT_PHANTOM_KP_HA_3401*/col=1/date
Directory DISK0:[MICROCT_COMMON.DATABASE]
UCT_PHANTOM_KP_HA_3401_1.GOBJ;3
21-FEB-2019 09:16:42.41
UCT_PHANTOM_KP_HA_3401_2.GOBJ;3
21-FEB-2019 09:16:06.78
UCT_PHANTOM_KP_HA_3401_3.GOBJ;3
21-FEB-2019 09:15:30.00
UCT_PHANTOM_KP_HA_3401_4.GOBJ;3
21-FEB-2019 09:14:49.86
UCT_PHANTOM_KP_HA_3401_5.GOBJ;3
21-FEB-2019 09:14:00.50
There should not be any GOBJ files in the directory below, but as you can see there are (as user xtremect2):
$ dir IDISK1:[XTREMECT2.DATABASE]*.gobj/date
Directory IDISK1:[XTREMECT2.DATABASE]
UCT_PHANTOM_KP_HA_3401_5.GOBJ;2
14-APR-2025 15:10:27.12
UCT_PHANTOM_KP_HA_3401_5.GOBJ;1
14-APR-2025 13:34:51.54
So, we simply delete these GOBJ files and the QC1 should work fine:
$ del UCT_PHANTOM_KP_HA_3401_5.GOBJ;2 $ del UCT_PHANTOM_KP_HA_3401_5.GOBJ;1
Some explanation from Stephan Weiss:
The problem is that you have different control files in the two accounts. In the control files, there is a default evaluation set. This is just an index to an evaluation script that is written to the ISQ header. The QC1 index of xtremect2 is the same as the standard radius evaluation of microct2.
One option is to change the setup such that the default gobj of QC1 cannot be written anymore. In every account you need to add the following line to
microct_setup_site_specific.com:
$ DEFINE UCT_PHANTOM_KP_HA_GOBJ_CHECK - DISK0:[MICROCT_COMMON.DATABASE]UCT_PHANTOM_KP_HA_'SCANNER_ID'_5.GOBJ
Other options that would be more challenging to implement are:
1. Remove the default evaluation from the control files. If you do this,
then you have to select the correct evaluation script for every
evaluation. Currently this you have to do anyway if you measured with
the microct2 account and evaluate with the microct2 account.
2. Merge the evaluation scripts from both accounts and use only one evaluation script database. Here we would need to update the default evaluation in the control files as well. But then, you could evaluate with both accounts the same way.
Return to Contents or Return to Main Page
Scanning
[edit]Scanner User Manual
[edit]For XtremeCTs:
For microCTs:
Scanco's FAQ
[edit]Navigate to the manufacturer Scanco Medical FAQ.
- Username: users@scanco.ch
- Password: basser5dorf
Return to Contents or Return to Main Page
Scan
[edit]Scan SOP
[edit]Image Quality
[edit]- Refer to Image Quality: Resolution vs. Noise by Scanco Medical.
Return to Contents or Return to Main Page
Optimize Control File Settings
[edit]- Refer to Optimize Control File Settings with regards to resolution, contrast and scan time.
Return to Contents or Return to Main Page
Scan materials of different densities
[edit]- Refer to Scan materials of different densities.
Return to Contents or Return to Main Page
Optimize Scan for Soft and Adipose Tissue Separability
[edit]
Return to Contents or Return to Main Page
Measure multiple samples in one scan
[edit]This quite often happens when you want to scan 6 rat bones, for example, but using our six-gun sample holder you scan them in one go. But, you want to analyse them separately, so you have to import the ISQ multiple times as new MEASUREMENTS into each SAMPLE.
There are two options: manual and auto. Read this entire HowTo before proceeding. There is significant potential for mistakes!
$ @com:import_manual.com P1: Measurement Number to duplicate P2: New Sample Number from Database P3: New Start Letter of ISQ file P4: Optional: Operator Number P5: Optional: Controlfile Number
So:
$ @com:import_manual.com 1234 342 D
will copy the ISQ from measurement 1234, import it into the database to sample 342, give some feedback lines with 'old' and the new samplename, CHECK IT, and at the end it gives the feedback line on the terminal which you take with the mouse and drop to rename the data over to the new location.
IMPORTANT: BE VERY SURE NOT TO MIX UP MEASUREMENT AND SAMPLE NUMBER !!!
This distiction needs to be VERY clear in your mind! Of course, you can duplicate one scan and give it to the same samplenumber again (e.g. to evaluate different parts of the same sample, and each has its database entry).
Please build up some system so you see immediately that the right meas. goes to the right sample. E.g. all four bones in one scan have the same part in the name, distinct from other 4 bones. If there is any trace of a doubt later on that somebody MAY have messed up the samples in this duplication step, you'll most probably have to start from scratch again...
Of course, I'll have to make you aware that Scanco declines all responsibility - this program is NOT in the normal user-friendly, quite fool-proof Scanco controlbox, but it's up to you to use it carefully, and not on Friday night when you're sleepy and mistakenly mix up sample and meas. numbers...
The new startletter I built in so you always know which one was the 'original' measurement (which has an RSQ), and which are the duplicated ones.
Backup And the organization of how you know which duplicated scan is which part is completely up to you - as well as how you want to handle the backup - our software allows you to back-up each duplicated scan (but this might be an overkill, since it's the same ISQ always) so you may choose to delete the duplicated ISQ by hand in the session manager (only keep the 'original' ISQ), and only backup the .gobj, .aim and _seg.aim etc. (but then you will need to know not to get scared if you retrieve a scan, and the ISQ is missing...) (Or you just 'move to trash' the duplicated scans to nicely delete them with the backup program if you want to remove them completely (but you still have the 3D results in the evaluation database))
Autosubmit
$ import_autosubmit.com
Please use the manual one for a while. Then, if you feel comfortable, use the autosubmit one (which also does the last command automatically, the renaming of the isq to the new location.) Because it goes into a batch que, you can quickly submit all duplications, and do not have to wait for the whole file-copying like in the manual one.
One thing you should check there: $ show que sys$fast/full
This needs to be one single queue (/job_limit=1). In a clustered enviroment, this might be a '/generic=' que that then gives the jobs to multiple queues in the cluster. This is NOT good. If this is the case, please edit the autosubmit script, and replace sys$fast in the following line at the end by ONE of the generic fast queues, e.g. SC4240_FAST or whatever the name is (preferrable the one computer where also the data disk DK0 is sitting:
$! $ SUBMIT/NOPRINT/QUE=SYS$FAST/DELETE/NOTIFY/LOG=SYS$SCRATCH: 'COMMANDFILE' $!
(Reason: if multiple uct_imports would run at exactly totally the very same time, both jobs might get the same new measurement number... bad...)
I also suggest to add the following line to your login.com
$ dupl*icate :== @com:import_autosubmit.com
then you can just start it with
$ dupl 1234 342 D
And I also recommend to put into login.com:
$ check_dup :== search sys$scratch:import*.log """ name:""
(yes, with all these double-quotes)
Then use it to check the feedback that the right scans were given to the right samples.
Return to Contents or Return to Main Page
Scan FAQ
[edit]Unlock a locked controlfile
[edit]In November 2023, Stephan Weiss suggested you can use:
mcr ut:UCT_UPD_EVALSCR_MISC.EXE
and set locked to 0. For example, to change script #61:
$ mcr ut:UCT_UPD_EVALSCR_MISC.EXE
UCT_UPD_EVALSCR_MISC V1.0
V IDX escript/Rec. Description
1 1/1 XtremeCT Standard Patient Evaluation (RL,RR,TL,TR,CU)
2 1/7 XtremeCT Standard Patient Evaluation (RL,RR,TL,TR,CU)
* 3 1/9 XtremeCT Standard Patient Evaluation (RL,RR,TL,TR,CU)
4 2/2 QC1 Trabecular Morphometry
5 2/8 QC1 Trabecular Morphometry
6 2/384 QC1 Trabecular Morphometry
* 7 2/401 QC1 Trabecular Morphometry
8 3/3 QC2
9 3/6 QC2
10 3/385 QC2
* 11 3/402 QC2
* 12 4/4 3D Segmentation of VOI, 1 solid objectAIM
* 13 5/5 3D Seg. of 2 VOIs: solid dense in transparent low dens obj obj
<snip>
356 60/283 TEST - STEP2 SCSRV1_FAST
* 357 60/290 Can be reused, irrelevant content
358 61/284 TEST - STEP2 SCSRV1_FAST
* 359 61/291 Can be reused, irrelevant content
360 62/296 MCP Meta auto contour
<snip>
559 127/558 (ML) Knee Segmentation
* 560 127/559 (ML) Knee Segmentation
Choose evalscript Record (IDX): [560]: 359
Description [Can be reused, irrelevant content]:
Valid [1]:
Locked [1]:
Favourite [0]:
Category [32]:
Save Record ? [Y]: Y
Rewriting DB Idx 291
Record saved successfully
End of program
Also see the instructions about setting VALID and LOCKED in another part of the wiki under the heading "Valid and Locked Settings for an eval script"
But my old instructions are:
If you accidentally locked a controlfile, it is possible to unlock it so that it can again be modified.
Login as the calibration user (Xtremect: calibration; VivaCT40: calib5019; uCT35: calib2339), the password is the same as for the system user, Set priviledges to bypass.
$ spb
Set the controlfile database to the microct, or other, user where the controlfile is locked.
- The file is usually located on (a)disk1:[username.database] and may be accessible using the uctd logical.
- The database file contains the scanner ID (e.g., 3309 for the XtremeCT, note there's no SC before 3309).
$ def uct_controlfiles_database adisk1:[microct.database]uct_controlfiles_3309.dat $ run ut:uct_upd_controlfiles
Choose the controlfile.Use T and F to indicate true and false.
- YOU MUST SAY YES TO UPDATE CTRL-FILE! There is a bug so do this even if you make a mistake.
Return to Contents or Return to Main Page
Warning: Selected operator is not an operator CODE: 24
[edit]You must enter an operator name in the micro-CT control panel.
- You only need to enter the beginning part of your operator name (e.g., Bo for Bone Imaging Lab) or your operator number.
- You can also press "Edit..." and then press the "Find..." and press "OK" to show a list of all the operators that have been registered.
Return to Contents or Return to Main Page
Warning: Error assigning IO-channel for UCT_ACQ_LINE, device already allocated to another user CODE: 2112
[edit]Only one person can be given control of the scanner at any time. Most likely the scanning program is already open. Check the minimized icons on the desktop.
Return to Contents or Return to Main Page
Error: ROT (M1) end switch detected, Motor stopped CODE: 3031
[edit]We're not sure why motor errors occur occasionally. The solution is to exit the scanning program and turn off the scanner (the switch is on the side of the machine). Wait 30 seconds. Turn the scanner on again. Re-start the scanning program. Wait for the scanner to warm up (20 min).
Return to Contents or Return to Main Page
Error: Acquisition error, Buffer overrun CODE: 1005
[edit]This error occurs if the computer hooked up to the scanner is overloaded and does not accept the stream of CT data quickly enough. Check that no large calculations are running interactively (e.g., loading a large dataset into the 3D viewer while the scan is running). If you happen to be there at the very exact second when the buffer overrun happens, do the following:
$ show user/node/full !check how many users/processes there are $ monitor system/int=1 !check the process that is using the most cpu and page file quota
Advise lab personal of the problem. If nobody is around, put the output of the above commands into a text document, stop the queues for the computer, and repeat the scan.
$ stop/que/next sc5019_fast !for the vivaCT 40 $ stop/que/next sc5019_slow !for the vivaCT 40 $ stop/que/next sceva2_fast !for the µCT35 $ stop/que/next sceva2_slow !for the µCT35
When finished, restart the queues that you stopped by $ start/que queue_name .
Return to Contents or Return to Main Page
Error: Shutter fail safety test timeout CODE: 2101
[edit]This happens if the scanning program has accidentally be left on overnight and the shutter fail safe test cannot be performed. Ensure that uct_tomography is closed at the end of the day and the scanner computer is logged out at the end of the day to avoid this error.
Return to Contents or Return to Main Page
Error: Input error detected, Z protection detected CODE: 4001
[edit]This means the big plate that you can see through the gantry has moved or been touched, activating one of the Z protection switches. This can happen during positioning a patient for a tibia scan if the person's leg isn't pushed into the scanner straight. The cast can potentially touch the plates and cause this error.
In the rare case where this error occurs spontaneously during or at the end of a scan, or during a precalibration, one of the switches may have become activated due to the position of the Z plate. To determine the position(s) this error is triggered, do the following:
$ set host 0 Username: calibration Password: $ sdl $ spb $ run um:ccd_2d
The Scanco test programs will open. First click on the Reset Z button (upper left corner). Then move the Z slider all the way to the right and hit move. If the Z-protection error appears, record exactly which Z position triggers the error (should be a red number on the left hand side of the slider). When you are done with this test, hit Reset Z again, wait until the motor comes to a complete stop (max. 15 seconds), close the software and in the same terminal by $ logout .
Contact Scanco regarding this error and provide the details from running the ccd program. They will provide further instructions on how to proceed and fix the problem.
Return to Contents or Return to Main Page
Error: High resolution 30 µm scans and avoiding buffer overrun error
[edit]If you get an error of a Buffer Overrun when scanning at high resolution on the XtremeCT II, use this command prior to open the measurement software from the very same terminal:
$ DEFINE UCT_MEASUREMENT_SHARED_FRAMES 1 $ uct_measurement
This could be set permanently, but it may then also delay the patient scan saving.
Return to Contents or Return to Main Page
Fatal: CCD frame timeout, HOTLink reframing CODE: 1007
[edit]Take a screenshot of the error message and email Scanco immediately. Message indicates that X-ray tube is arcing. Try and warm up the X-ray tube again, and notify Scanco if there is any abnormal activity and whether the tube was able to warm up.
Return to Contents or Return to Main Page
Fatal: Invalid Scanner ID CODE: 24
[edit]You have logged in with the incorrect user name. End the session and login with the correct user name (vivaCT 40: vivact or invivo; µCT 35: microct or invitro).
Return to Contents or Return to Main Page
Fatal: Unable to create shared memory, global page table full CODE: 196
[edit]The temporary fix is to reboot the system. But before you restart, if you have system access, do the following and save the output to a text to send to Scanco.
$ set host 0
Username: system
Password:
$ search sys$system:agen$feedback.dat gblpages
$ write sys$output f$getsyi("contig_gblpages")
$ write sys$output f$getsyi("free_gblsects")
Reconstruction
[edit]Standard Reconstruction
[edit]Scans are automatically submitted for reconstruction, so manual submission is usually only necessary if there was a problem during reconstruction (e.g., a power failure).
- To reconstruct all slices from the RSQ, first delete or rename the old ISQ.
- To reconstruct a selection of slices, a valid ISQ must exist. There is an offset of 1 slice when designating slice selection.
General Usage for Interactive Reconstruction:
$ uct_reconstruction P1 P2 P3 P1: RSQ Filename P2: Slice number (A – all, start:finish) P3: Log file of batch job
General Usage for Non-interactive Reconstruction:
$ submit/noprint/que=sys$slow um:uct_reconstruction.com/params=(DISK2:[MICROCT.DATA.00000610.00002449]C000####.RSQ , a)
- Normally jobs are submitted to sys$slow queue instead of running them interactively.
Return to Contents or Return to Main Page
Reconstruct a selection of slices
[edit]Here are examples of how to reconstruct a single RSQ file: C0007655.RSQ, sample 4111 and measurement 9899.
To reconstruct slices 101 to 201 and submit the job to the sys$slow queue:
$ submit/noprint/que=sys$slow um:uct_reconstruction.com /log=sys$scratch:reco4111.log/para=(dk0:[microct.data.00004111.00009899]C0007655.rsq, 100:200, sys$scratch:reco4111.log)
- The command must be all on one line (or use hyphen), and it wants the 3 parameters: filename, slices, and log.file name
Return to Contents or Return to Main Page
Reconstruct all slices
[edit]To reconstruct all slices, use “a” for all slices and submit the job to the sys$slow queue:
$ delete C0007655.ISQ;* $ submit/noprint/que=sys$slow um:uct_reconstruction.com/log=sys$scratch:reco4111.log/para=(dk0:[microct.data.00004111.00009899]C0007655.rsq, a, sys$scratch:reco4111.log)
- The .log filename is up to you, as long as it's the same at both places.
- Give full pathname for RSQ file.
Return to Contents or Return to Main Page
Reconstruct multiple files
[edit]For multiple files, create a script and submit the job to the sys$slow queue. For example,
$ cd sys$scratch $ eve reco_all.com
Or open editor (command 'Edit'), put the following lines in the file and save it as .e.g sys$scratch:reco_all.com:
$ uct_reconstruction dk0:[microct.data.00004111.00009899]C0007655.rsq a $ uct_reconstruction dk0:[microct.data.00004111.00009900]C0007656.rsq a $ uct_reconstruction dk0:[microct.data.00004111.00009001]C0007657.rsq a $ exit
Save the script and exit the text editor, then submit the job (e.g. to sys$slow):
$ submit/noprint/que=sys$slow/log=sys$scratch:reco4111.log sys$scratch:reco_all.com
All the files will be reconstructed as a single job, with one log file.
Return to Contents or Return to Main Page
Batch reconstruction
[edit]The reconstruction software available for the XT2 & microCT systems supports the /batch syntax that replaces reco_all.com. You can split a manual reconstruction into several jobs using
$ uct_reconstruction DK0:[XTREMECT2.DATA.00001234.00005678]D0123456.RSQ a/batch=16
Return to Contents or Return to Main Page
Update to uct_reconstruction V6.2-5, March 2019
[edit]As of March 2019, we should only use uct_reconstruction v6.2-5 on xtremect2. For studies with baseline and follow-up scans overlapping this time, the old version (V6.2-2) can still be accessed using
$ uct_old_recon
Changing reconstruction versions can lead to small systematic differences in the result parameters of a trabecular bone analysis. The old version should only be accessed by those who absolutely need to use it. (Scanco recommends re-reconstructing all measurements of a study with version 6.2-5 instead).
Return to Contents or Return to Main Page
Rotated Reconstruction (about z-axis)
[edit]- Use the µCT Evaluation Program to measure the angle for the rotated reconstruction.
- To start the program type
$ uct_evaluationin a DEC terminal, or use the graph button. - Load your sample and select the angle measurement button.
- Drag the ends and the intersection of the green lines to measure the desired rotation angle.
- To start the program type
- Rotate and reconstruct
- Use
$ @com:reco_allto reconstruct all slices. - Use
$ @com:uct_reconstruction_angleto reconstruct selected slices from an RSQ.
- Use
- Use the µCT Evaluation Program to check the sample after the rotated reconstruction:
- General Usage:
$ @com:reco_all.com P1 P2 P3
P1: Angle in degrees
P2: Sample number
P3: Measurement number
$ @com:uct_reconstruction_angle.com P1 P2 P3 P4 P5
P1: RSQ Filename
P2: Slice number (A – all, start:finish)
P3: Log file of batch job
P4: Delete log file (true/false)
P5: Angle in degrees
- The angle of rotation uses the right-hand rule: a counterclockwise rotation is positive and a clockwise rotation is negative.
- The angle of rotation uses a single decimal place.
- By default the reconstruction jobs will be placed in the sceva3_slow queue.
- Both functions are executed from the measurement directory.
Return to Contents or Return to Main Page
Reconstruct all slices
[edit]The following examples are for a 19.1 degree counterclockwise rotation of sample 6876, measurement 15417, C0005086.RSQ.
$ @com:reco_all.com 19.1 6876 15417
- Delete the ISQ file from the measurement directory.
Reconstruct a selection of slices
[edit]- A valid ISQ must exist.
- There is an offset of 1 slice when designating slice selection.
To reconstruct slices 36 to 41:
$ @com:uct_reconstruction_angle.com DK0:MICROCT.DATA.00006876.00015417]C0005086.RSQ 35:40 sys$scratch:reco610.log true 19.1 $ @com:uct_reconstruction_angle.com DK0:MICROCT.DATA.00006876.00015417]C0005086.RSQ 35:40 "" "" 19.1
- "" is used as a null input for optional parameters.
Instead of submitting in the terminal and running interactively, submit it to the queue as follows
$ submit/noprint/que=sys$slow com:uct_reconstruction_angle.com/log=sys$scratch:TEST.LOG/para=(DK0:[XTREMECT2.DATA.00002816.00014743]D0012841.RSQ,A,sys$scratch:TEST.log,"",156.1)
Return to Contents or Return to Main Page
Other Reconstruction
[edit]Reconstruct at a new voxel size
[edit]See a script in:
DISK1:[XTREMECT2.EVAL]UPDATE_HEADER.COM
This script includes the following type of information:
$ r ut:updh_voxelsize.exe DK0:[XTREMECT2.DATA.00000010.00000050]D0000068.RSQ 122 82000 1706 $ r ut:updh_voxelsize.exe DK0:[XTREMECT2.DATA.00000011.00000054]D0000072.RSQ 122 82000 1706
This is what one would do in a terminal. The only requirement is that this updh_voxelsize.exe cannot be executed as the normal user.
Prior to that, one has to log as calibration, and do:
$ set proc/priv=bypass
Return to Contents or Return to Main Page
Manipulate RSQ
[edit]View RSQ projections and flat field
[edit]It can be very useful to examine the projections that are contained in the RSQ file, as well as to see the flat field correction frames.
In the session manager, double click the RSQ file and the program ximage will open. Or, type:
$ sh sym x X == "$UM:XIMAGE.EXE" $ x D0000018.RSQ
Then switch to xz view and go to the second slice (in this order). Then you should see a frame of the none attenuated beam (nothing in the beam, or Scanco calls it the I0 frame). If it is a multi stack measurement then there will be several copys of this frame in this image.
In an RSQ you have for each slice of the detector one dark current line and then the full intensity line followed form the radiographs taken under the different angles (sinogram). In the x direction is the detector line, in the y direction is the rotation angle (except dark and I0) and in the z direction is the z-direction of the scanner. If you switch the view to xz, then you can see the frames as acquired by the detector (or stacked frames all taken under the same rotation angle). Frame 1 is then the dark image and Frame 2 is the full intensity image.
Return to Contents or Return to Main Page
Convert RSQ to AIM
[edit]$ ipl ipl> rsq_to_aim in YP_IGFAMOTION_003_6.RSQ -pos [0 0 0] > -dim [-1 -1 -1] > -convert_to_pro [false] > true -sinogram_not_frames [true] > true -div_unsigned_by_2 [false] > true ipl> write -name [internal_name] > in -filename [default_file_name] > YP_IGFAMOTION_003_6_rsq.aim -compress_type [bin] > none -version_020 [true] >
Return to Contents or Return to Main Page
Convert RSQ to PSQ
[edit]First, in the terminal turn on the 'advanced questions' mode
$ define uct_reconstruction_calibration true
Second use the reconstruction EXE to convert RSQ to PSQ
$ run UCT_RECONSTRUCTION.EXE raw file: DISK3:[MICROCT.PROJECTS.YVES.LANDMARK.RAW]filename.RSQ Give slice number, or 'a' for all hit return a few times Write Projection [N]: -> say y and it writes the PSQ and continues with reco Say p if it shall just produce PSQ and NOT continue with reco!
Beam hardening correction can be turned off by doing
$ DEFINE UCT_RECONSTRUCTION_CALIBRATION TRUE $ define uct_disable_bh_correction true $ deass UCT_BEAMHARD_POWER $ deass UCT_BEAMHARD_factor
and then run uct_reconstruction
The RSQ contains the RAW projection data. The PSQ represents tilted parallel beam projections:
The rebinning process reduces the number of projections from 836 (1 bright field, 1 dark field and 834 projections spaced at 0.24 deg/proj, spanning 200.16 deg) to 750 (spanning 180 deg) with a resolution of 0.24 deg. In addition to the geometric changes, intensities are adjusted ln(I/I0) and beam hardening correction is applied. After converting a PSQ to AIM with IPL, an image can be reconstructed with Matlab's iradon(), note that only the central slice will be geometrically 'correct', but differences in other slices are small (Circumference of calibration phantom differs less than 1%). in the final reconstruction these effects are accounted for reducing the number of z-slices from 124 (acquired) to 110 in the reconstructed image.
Return to Contents or Return to Main Page
Measure RSQ motion artifact
[edit]Based on RSQ data, in-plane translation and rotation, and longitudinal translation can be determined.
The RSQ is first converted to a tilted parallel-beam sinogram. Motion is measured using the bonelab_measuremotion command in the Calgary extension of IPL installed on percy. Copy the motion scripts available in DISK3:[MICROCT.PROJECTS.YVES.SCRIPTS] to your COM directory. Here is how they work:
- RSQ_TO_PSQ.COM;1 - (optional) convert RSQ to PSQ, PSQ gets created in the same directory as RSQ. Usage:
$ @rsq_to_psq.com DK0:[BRUNO.DATA.00000162.00009479]C0008921.RSQ
- IPL_MEASUREMOTION.COM;2 - Takes a PSQ and measures motion using Calgary IPL on percy
$! example of how to submit a motion measurement $ SUBMIT/NOPRINT/QUE=SYS$FAST /LOG=SYS$SCRATCH: - DISK3:[MICROCT.PROJECTS.YVES.SCRIPTS]IPL_MEASUREMOTION.COM - /PARAM=(DISK3:[MICROCT.PROJECTS.DEVEL.RECO_TEST.RAW]PHANTOM_NOMOTION.PSQ) - /LOG=DISK3:[MICROCT.PROJECTS.YVES.SCRIPTS]MEASUREMOTION.LOG
Results are save in MEASUREMOTION.LOG and the following section contains all information:
/bonelab_measure_motion -input org Motion: Translation = 2.135364 Rotation = 0.024216 Index = 3.694660 Translation weight = 0.943156 Rotation weight = 69.403737 Z_motion = 2.274551 Use the line below with search. Translation,Rotation,Index,Trans_weight,Rot_weight,Z_motion 2.135364,0.024216,3.694660,0.943156,69.403737,2.274551 Use the line below for DB entry (Index*100). db_motion_index=369.466034
In-plane translation is Translation, in-plane rotation is Rotation and longitudinal translation is Z_motion. Index is the total in-plane motion as used in the IEEE ISBI 2009 paper by linear combination using the weights, not used any more, now we use in-plane translation only. db_motion_index is the motion index value multiplied by 100 and that could be written to the patient database. Multiplication by 100 is necessary since the motion field in the database is integer only.
For more background on the algorithm look at Pauchard Y., et al, Measuring patient motion in HR-pQCT, IEEE ISBI 2009, and Pauchard Y., et.al., Automated quantification of three-dimensional subject motion to monitor image quality in high-resolution peripheral quantitative computed tomography, Phys Med Biol. vol. 56, pp 6523-6543, 2011. IMPORTANT: The IPL implementation has not been validated against the Matlab implementation used in these publications. Motion Values can be different. Values can be automatically extracted as described below.
- RSQ_MEASUREMOTION.COM;10 - The full deal: creates PSQ and measures motion all in the same directory as the RSQ.
@DISK3:[MICROCT.PROJECTS.RESCAN.COM]RSQ_MEASUREMOTION.COM DISK3:[MICROCT.PROJECTS.RESCAN.RAW]M0003508.RSQ;1
Make sure to adjust the line:
$ SCRIPTFILE := DISK3:[MICROCT.PROJECTS.YVES.SCRIPTS]IPL_MEASUREMOTION.COM
to the location of your IPL_MEASUREMOTION.COM.
The results are stored in the same directory as the RSQ in <RSQname>MOTION.LOG and can be extracted into motion_all.txt by running the search command:
search/output=motion_all.txt/window(0,1)/match=OR *motion.log "Translation,","Patient Name "
Return to Contents or Return to Main Page
Update RSQ's Center Information
[edit]$ set host 0 username: calibration password: $ spb or $ set proc/priv=bypass $ run [.util]updh_center Raw-Data-File: enter location of raw data (with directory if necessary) Center X: [15430]: enter new center value (e.g. 15415) Press return for all other options.
Return to Contents or Return to Main Page
Determine RSQ's Centre Calibration Values
[edit]$ define uct_reconstruction_calibration true ! Note: do not mistype... or the calibration program will not run
In the SAME terminal:
$ uct_reconstruction dk0:[microct.data.00004026.00004576]c0001344.rsq Slice-Nr. [0...919] (Neg. to stop): 100 Center [207]: here enter a new number
Hit return a few more times to use default values for other options.
XtremeCT check these values, that they do not change: Maximal possible Scan-Distance (mm) = 125.9520 Cropped adjusted Scan-Distance (mm) = 125.9520 See that it does not change, e.g. drop to 124 mm or such...
Then do that again, $ uct_reconstruction ....rsq 100 (for the first time, for each file/scan).
Double click on ISQ. slide to slice 101 (!) (100+1, since terminal zero based) compare with image in e.g. slice 100 or 99 (disregard funny half image shift...)
Should already look nicer.
Then try out with e.g. center 230 or so, with e.g. slice 101 (thus slice 102 in Ximage). (now, only one run is necessary)
compare against image with center e.g. 200. continue at libitum until you find the best center, the crispest image.
Usually the centre is determined to within about 3 to 5 points (which is 0.3 to 0.5 pixels), so e.g. test 225 and 230, and maybe 228.
Write down your favourite.
If you cannot decide: let Andres know which ISQ slice was reco-ed with which center (in 'Ximage' slice numbers), and I can check - but since remote Ximage is SOOO slow, thanks for only pointing out a few options, I cannot check 20 settings...
Then continue with next diameter scan (the first time for each scan, reco twice again)
The different diameter centers should be a steady function, so all the new center values should be increasing as diameter decreases.
Return to Contents or Return to Main Page
Modify RSQ's BHC for in-air scans
[edit]This is necessary because the beam-hardening correction factor assumes scans were done in soft tissue. It is necessary to choose calibrations of 1200 or 700, instead of the default 200.
Currently, the XtremeCT has options for 200 (standard) or 1200 calibration (in air).
To do this, log in as users calibration and then:
$ set proc/priv=bypass ! as user calibration; modification of MICROCT user data $ run ut:UCT_EXT_HEADER_ADD_CALIB.EXE > Raw-Data-File []: DISK2:[MICROCT.DATA.00000401.00001495]C0001404.RSQ > ... > Add another BH-Corr from file again? (Y/N) [N]: ! Enter yes (UCTD:UCT_BH_COEFF_60KV_1200HA_3309.TXT)
Then, delete the old ISQ. It must be deleted or else the header information will not be changed. Finally, reconstruct the new ISQ and analyze...
Return to Contents or Return to Main Page
Manipulate ISQ
[edit]Read an ISQ header
[edit]You can either read using the standard tool
$ ctheader C0014141.ISQ $ sh sym ctheader CTHEADER == "$UT:CTHEADER.EXE"
Or, use the extended header tool to show the calibration data
$ run ut:uct_ext_header_display.exe
Return to Contents or Return to Main Page
Image Artifacts
[edit]Ring Artifact
[edit]- Refer to MicroCT Ring Correction.
Return to Contents or Return to Main Page
Partial Volume Effect
[edit]- Refer to Partial Volume Effect.
Return to Contents or Return to Main Page
Beam Hardening Correction (BHC)
[edit]Use the right BHC
[edit]- Refer to Use the right beam hardening correction.
Return to Contents or Return to Main Page
Understand Scanco BHC
[edit]If you see lines like 'CCD_CORR: Expand BH-corr to1536' etc. etc.:
then we do a polynomial correction:
$ dir uctd:*bh_coeff*.txt
and you see a file with the scanner ID.
--> $ type uctd:UCT_BH_COEFF_60KV_0200HA_3309.TXT --> ! Function 9 is Addpolynom Function: 9 A 0: 3 0.00000000 -0.38599902 0.30870225 -0.06162301 --> 0: for all pixels. 3 --> 3rd degree polynom, with factors: x^0 = 0 x^1 = -0.38... x^2 = 0.308... x^3 = -0.061...
This polynom is added to the PROJECTION value (not the raw counts).
the BH-corr is doing a 'linearization', e.g. see
http://iospress.metapress.com/content/twcxb9jfk8knhpq2/
for more info.
The values in the middle of the scan are amplified more - not just because of their position, but because the object is thicker there, thus the projection values are higher, thus the correction term is higher.
NOTE : Linearisation, as used by Scanco, will compensate 'soft-tissue' beam hardening (inside of water phantom appears LESS dense). Bone related beam hardening, e.g. soft tissue near skull appearing MORE dense, will NOT generally be compensated. See Kak and Slaney 'Principles of computerized tomogprahic imaging' and Joseph and Spital J Comp Assist Tomo 1978 vol 2 for more information.
Return to Contents or Return to Main Page
Evaluation
[edit]Analysis Topics
[edit]Cortical thickness analysis in standard evaluation
[edit]!!Note - with ipl v5.42 this should be changed to /dt_cortical_thickness
Use the IPL command /dt_cortex_obj_param to measure cortical thickness using direct methods.
When extracting the results from the database using uct_list, specify the UCT_3D_LIST_W_CTH.TXT template in directory DISK0:[MICROCT_COMMMON.UIL].
$ uct_list UCT_LIST.EXE Version V5.1 Template-File [UCT_3D_LIST_SHEET]: DISK0:[MICROCT_COMMON.UIL]UCT_3D_LIST_W_CTH.TXT
UCT_3D_LIST_W_CTH.TXT is now the default template as of March 2009.
Return to Contents or Return to Main Page
Cortical porosity and finite element analysis on XtremeCT
[edit]- This procedure is broken down into 3 separate components
- All Scripts mentioned be copied directly from DISK3:[MICROCT.PROJECTS.KYLE.SCRIPTS]
- Files should be copied from data to projects prior to running analysis (see bonelab procedures.doc on sodor)
1. Autocontour the image
2. Calculate and extract cortical measurements
3. Create FE files and run FE
Autocontour
[edit]- The main autocontour script is located in the ue: directory, this should NOT be modified!
- The procedure is executed using a "hijack" script HIJACK_AUTOCONTOUR.TXT, but the filename must be changed to .COM or found in the directory mentioned above.
- Files should already have a _SEG.AIM created and should be in the same directory as the raw .AIM file.
- You then create a SUBMIT.COM script as you would for other files. For example:
$ QQ = "SUBMIT/NOPRINT/QUE=SCEVAL_FAST/LOG=SYS$SCRATCH com:HIJACK_AUTOCONTOUR.COM" $ 'QQ' /PARA=DISK3:[MICROCT.PROJECTS.PROJECT_NAME.MODELS]FILENAME.AIM
- This command will then create various files for examination and further analysis. These include:
- FILENAME_COMBI.AIM - shows cortical, trabecular, and pores all in different colors
- FILENAME_COMBIPO.AIM - shows only the cortex with porosity as different color
- FILENAME_CRTXFILL.AIM - gives sold mask of cortex, porosity filled (can be used to calculate Ct.Th)
- FILENAME_CRTXPO.AIM - shows only the pores
- FILENAME_TRAB.GOBJ - gobj of trabecular region
- FILENAME_CRTX.GOBJ - gobj of cortical region
- FILENAME_AUTO2.GOBJ - gobj of whole bone region
- Further technical details and references can be found in the following publications:
- Buie, H., Campbell, G., Klinck, R., MacNeil, J., & Boyd, S. (2007). Automatic segmentation of cortical and trabecular compartments based on a dual threshold technique for in vivo micro-CT bone analysis. Bone, 41(4), 505-515.
- K.K. Nishiyama, Macdonald, H., Buie, H., Hanley, D., & Boyd, S. (2010). Postmenopausal Women With Osteopenia Have Higher Cortical Porosity and Thinner Cortices at the Distal Radius and Tibia Than Women With Normal aBMD: An In Vivo HR-pQCT Study. Journal of Bone and Mineral Research, 25(4), 882-890.
Evaluate Cortex
[edit]- This Step 2 method of doing the cortical analysis is no longer used now that we have the IPL_UPAT_CALGARY_EVAL_XT1.COM or XT2.COM version. The problem with this approach is that it is a Frankenstein of the standard analysis and the advanced analysis. The cortical bone assessment is correct, but the trabecular compartment from the standard analysis is not a perfect match. Instead, we should be using the GOBJs described in IPL_UPAT_CALGARY_EVAL_XT1.COM so that we have a perfect mix.
Nevertheless, we keep this information here for now for posterity.
- After the autocontour is computed we used to call IPL_EVAL_CORTEX.COM that will calculate the cortical parameters:
- Cortical porosity (%)
- Direct cortical thickness (mm)
- Cortical density (mg HA/ccm)
This WAS called as the following:
$ QQ = "SUBMIT/NOPRINT/QUE=SCEVAL_FAST/LOG=SYS$SCRATCH com:IPL_EVAL_CORTEX.COM"
$ 'QQ' /PARA=DISK3:[MICROCT.PROJECTS.PROJECT_NAME.MODELS]FILENAME.AIM -
/LOG=DISK3:[MICROCT.PROJECTS.PROJECT_NAME.LOG]FILENAME_EVAL_CRTX.LOG
- The results of this script are outputed into individual log files for each file being evaluated.
- To extract these results into one file use:
$ search/output=output_results_filename.txt *EVAL_CRTX.LOG "!% ov/tv","!> C.Th","!% mean_unit"
- A learn command in the eve editor can be used to extract the specific results desired:
- !% ov/tv is the amount of bone in the cortex (ie. 1- ov/tv = cortical porosity)
- !> C.Th is the direct cortical thickness in mm
- !% mean_unit is the cortical density in mg HA/ccm
Create and run FE models
[edit]- The most current common FE model to run is a homogeneous model where all elements have the same material properties and the cortex and trabecular regions are labeled separately in order to determine the percentage of load carried by each region.
- The other option is to create a model where the material properties are scaled based on the density values and scripts for this can be found in the COM directory.
- The script IPL_FEM_HOMOGEMOUS_LS.COM will use files created by the autocontour and appropriately label the cortex and trabecular regions as well as remove any disconnected pieces of bone.
$ QQ = "SUBMIT/NOPRINT/QUE=SCEVAL_FAST/LOG=SYS$SCRATCH com:IPL_FEM_HOMOGENOUS_LS.COM" $ 'QQ' /PARA=DISK3:[MICROCT.PROJECTS.PROJECT_NAME.MODELS]FILENAME.AIM
- Files will now be created with the suffix _HOM_LS.AIM and can be moved to Mighty-Mac or Mavis for FE analysis. You will require user accounts for these computers and can contact Eric or Steve. If using FTP be sure to transfer the files in binary mode (further documentation on this can be found in this Wiki)
- FEM tutorial main steps to submit the FE files with a detailed manual is recommended for first time users.
- This is now out of date, but is kept here because it still contains useful information about preparing AIM files and post-processing.
- For running the FE itself, please refer to the current manual at FAIM Finite Element Solver.
Return to Contents or Return to Main Page
Cortical midshaft analysis with moment of inertia calculation
[edit]This explains what happens when you type
$ midshaft ! or $ eval_midshaft
Draw a rough contour around your slices: open the Contouring Sub-window, double-click on the big image, and it automatically finds the best contour. Then click on 'Selection' 'Forwards', then 'Iterate Forwards'.
Then 'cancel' the contouring sub-window, and start the 3D evaluation. Make sure you have already set the correct threshold, sigma, support in file
DISK2:[MICROCT.EVAL]IPL_FIXED_BATCH_MIDSHAFT.COM
When you type
$ show queue
you should find a job called UCT_EVALUATION_MIDSHAFT and a SYS$SCRATCH:*_MIDSHAFT_*.LOG
The IPL_FIXED_BATCH_MIDSHAFT.COM by default does not calculate the direct measurement results because you must have many more than 20 slices for these to be valid. You can uncomment these parts of the file if you contoured the whole stack (i.e., stack thickness is >> than cortex thickness).
TILDE: Note that you will see lots of tildes (~) on the result sheets. This is to tell you that, if the measurements were trabecular bone, those values would only be approximate. But now for the cortex, they are actually correct! (see below for more explanation about this) I would now use the tildes to check the 'excel' table that the operator has taken the correct script for the trab. or cort. evaluations for the respective measurements!
So what's the advantage of all this? Now, also VOX-TV is correct! So VOX-TV is the whole area, VOX-BV the doughnut, so TV - BV is the marrow area! And still, TRI-Tb.Th is the cortical thickness (TRI-TV is NOT correct, because the .gobj feature was turned off).
I say 'area' above: depending on how many slices one individual scan has, VOX-BV (and VOX-TV) might be different for different scans, so you will HAVE to convert the volumes to area again:
volume equals area times height --> Bone Area = VOX-BV / height = BV / (dim.z * el_size_mm.z)
and same for Total area, of course :-)
POROSITY: If you want porosity of the bone itself draw two contours: one around, counter-clockwise, on on the inside, clock-wise (thus a 'negative', excluding contour). Now, TV will be just that ring area, BV will be the bone within that ring area, and BV/TV will be 1 - porosity, thus BV/TV 94% means 6% porosity.
METAPHYSIS: Application of this script to metaphysis scan (with trab. in middle):
$ midshaft
Draw one contour around the cortex, and in the same slices, a NEGATIVE contour on the inside (CW contour) to exclude the trabecular bone. You may potentially work with the BP (break-point) system to be able to morph the negative contours, even though there is already an 'outer' contour around the bone in every slice.
Start 3D eval, read out the data-base with $ uct_list.
NOTE: You CANNOT give the .gobj a special name such as c0001234_cortex.gobj if you are using the automatic evaluation button on UCT_EVALUATION. Only after the eval (or midshaft eval) has finished, you may copy it to a more meaningful name, but all of the evaluations are just taking the STANDARD gobj name!
Afterwards (after renaming or copying the _seg.aim to _cortex.aim, and .gobj to _cortex.gobj), you may want to start the very normal eval with normal (inner) contours to evaluate the trabecular compartement.
Remember: the values in our 3D result database then are OVERWRITTEN.
If you have a large study, I would recommend to run the $ midshaft for ALL
samples, $ uct_list to e.g. sys$scratch:mystudy_cortex.txt,
rename/copy gobj and seg for all, and THEN run the trabecular evaluation for all samples. $ uct_list and you have two nice complete excel sheets.
NOTE ON PLATE MODEL: More explanations of why the plate model is correct
Assume a ring (cortex).
Area = thickness * 'middle line'. 'middle line' = average of outer and inner circumference --> 'middle line' = 0.5 * 'bone surface' --> thickness = bone volume * 2 / bone surface.
And this is nothing else but the 'plate model' formula for Tb.Th!
NORMAL TRABECULAR EVALUATION? And why not just run the 'normal trabecular eval'? Because in the 'normal' TRI calculation, we are EXCLUDING all surfaces that are created artificially by a gobj line that cuts through a trabecula.
However, for the midshaft, this means the whole outer (or even inner, if also inner contour is there) is SUPPRESSED, because it is touching the gobj line. So this is where that midshaft script comes in: it turns off that suppression.
MORE EXPLANATIONS: Why the direct DT-Tb.Th* is NOT correct for a scan with just 12 slices.
If we fill the structure with spheres, those spheres should be bounded by the width of the cortex, not just by the fact that we only have 12 slices (and even more so, we are always doing 'aim box' suppression with the spheres) if a sphere touches the boundary of the aim box, it is suppressed!
So this is quite crucial for Tb.Sp and Tb.N. To get meaningful Tb.Sp, you would need a LOT of slices. Also, then, you cannot have the inner contour - otherwise the negative inner contour will delete the Tb.Sp. spheres.
If you have enough slices, you may opt to turn the /dt_object on again in the
midshaft script (second half). Then DT-Tb.Th* and TRI-Tb.Th just have a slightly different behaviour if there are little pores within the cortex:
TRI: the little pore just adds a little BS, thus the influence is not that big. DT: the little pore cuts the thickness sphere in half, thus at that location, the thickness is halved.
MEAN1 and MEAN2: The script is also calculating Mean1 and Mean2 now.
Mean1: 'apparent' density, average over whole TV Mean2: 'tissue' density: average over what was segmented as bone only.
These mean values will be in mg HA/ccm if you have the calibration option for bone density installed (and activated for those scans). Remember: the bone has to have some soft-tissue (or equivalent) on the inside, and preferably also on the outside then.
Return to Contents or Return to Main Page
Joint Thickness Measurements
[edit]- Sample script to search histogram files for results: Summarize Joint Th Measurements
Return to Contents or Return to Main Page
Scanco Joint Space Width (JSW) analysis
[edit]The scripts published in Stok et al. 2020, and released by Scanco, are available for XCT1 and XCT2.
On XCT2 they have been installed as Tasks #112 to #116.
Instructions to run this analysis are available here Media:ESD_Joint_Space_Width_v2.3.pdf.
The full citation for this work is:
Stok KS, Burghardt AJ, Boutroy S, Peters MPH, Manske SL, Stadelmann V, Vilayphiou N, van den Bergh JP, Geusens P, Li X, Marotte H, van Rietbergen B, Boyd SK, Barnabe C; SPECTRA Collaboration. Consensus approach for 3D joint space width of metacarpophalangeal joints of rheumatoid arthritis patients using high-resolution peripheral quantitative computed tomography. Quant Imaging Med Surg. 2020 Feb;10(2):314-325. doi: 10.21037/qims.2019.12.11. PMID: 32190559; PMCID: PMC7063288.
Return to Contents or Return to Main Page
UCT_EVALUATION
[edit]UCT_EVALUATION SOP
[edit]Start 3D evaluation from terminal for XtremeCT II
[edit]Logged into the terminal as "xtremect2" you can see the evaluation scripts in IDISK1:[XTREMECT2.EVAL]
The morphological evaluation: Control file #25. It basically runs auto contouring (#23) and then the morphological analysis.
UCT_EVALUATION_V6_XT2_DT61.COMIPLV6_EVAL_CORT.COMIPLV6_EVAL_TRAB.COMIPLV6_EVAL_TOTAL.COM
UCT_3D_LIST_CORT_XT2.TXTUCT_3D_LIST_TRAB_XT2.TXTUCT_3D_LIST_TOTAL_XT2.TXT
Contouring scripts:
IPLV6_AUTOK.COM: Creates automatically the standard GOBJ. Control file #22.IPL_AUTOK_CTTB.COM: Creates automatically the CORT, TRAB and PORE.GOBJ (previously CRTXPO). Control file #23.IPLV6_AUTOK_CTTB_CORR.COM: Creates automatically the CORT and PORE.GOBJ, after manual correction on the TRAB.GOBJ. Control file #24.
Laplace- Hamming scripts:
IPLV6_UPAT_EVAL_LH61_XT1DB.COMIPLV6_UPAT_EVAL_LH82_XT1DB.COM
Results will be generated in the IDISK2:[XTREMECT2.RESULTS] directory, in the same way as they are generated for the cortical analysis on XtremeCT I, i.e. using the uct database and appended text files.
Laplace Hamming evaluations will generate results in the upat_list database. The direct measurements will be stored in the uct_list database.
Return to Contents or Return to Main Page
Symbols for XtremeCT II vs XtremeCT I
[edit]microct account you get
"MICROCT_BIN" = "DISK1:[MICROCT.]" (LNM$PROCESS_TABLE)
= "DISK0:[MICROCT_COMMON.3309.]"
= "DISK0:[MICROCT_COMMON.]"
for xtremect2
"MICROCT_BIN" = "DISK1:[XTREMECT2.]" (LNM$PROCESS_TABLE)
= "DISK0:[MICROCT_COMMON.]"
So 3309 has its own directory where the software versions for the two scanners are different, e.g.
xtremect: DISK0:[MICROCT_COMMON.][MAIN]IPL_SCANCO_M.EXE microct: DISK0:[MICROCT_COMMON.3309.][MAIN]IPL_SCANCO_M.EXE
We have defined some symbols for the different ipl versions:
IPL IPLREG IPLFE IPL_BATCH IPLREG_BATCH IPLFE_BATCH
In the scripts you can directly use these symbols instead of ipl_scanco_prog (old style).
IPL and IPL_BATCH are different for the two scanners because the newest version is not officially released for XT1. IPL of the microct account (XT1) cannot read data of the xtremect2 account (XT2). The other way around it works.
IPLREG and IPLREG_BATCH point to $DISK1:[XTREMECT2.MAIN]IPL_SCANCO_REGIS_V107.EXE for both accounts.
Return to Contents or Return to Main Page
Stop the annoying beep
[edit]Typically a job ends and a beep is sounded in the user window. This can be annoying if somebody is running many jobs.
You cannot add a /nonotify via the advanced parameters in uct_evaluation script editing. However, you
could:
a) Create a copy of uct_evaluation_v6.com, e.g. uct_evaluation_v6_nonotify.com and change the line from
$ SUBMIT/NOPRINT/NOTIFY/QUE='EVAL_EQUEUE'/LOG='EVAL_LOGFILE2'/NAME='JOBNAME' -
to
$ SUBMIT/NOPRINT/QUE='EVAL_EQUEUE'/LOG='EVAL_LOGFILE2'/NAME='JOBNAME' -
or
b) Turn of the beep on the workstation you are sitting at:
Go to the session manager, Session -> Keyboard ... -> Bell Volume disable
Return to Contents or Return to Main Page
Start 3D evaluation from terminal for microCTs
[edit]
Warning:Do not change uct_evaulation_v4.com and ipl_fixed_batch_v4.com in .eval, but only work on your own file (i.e., eval_steve).
First, an explanation of how the normal evaluation runs by hitting the 'Start 3d' button.
$ scanco_submit_command ue:uct_evaluation_v4.com/para=(xxx,yyy,zzz,…)
There are 8 parameters:
- P1: number of print outs of our results sheet
- P2: the ISQ filename
- P3-5: start x (pos x), y, z
- P6-8: dim x, y, z
The parameters p3-p8 come from the white bounding box. The problem is that when you start from the terminal you do not have these. This problem can be overcome by using the isq_to_aim_gobjbox.exe and then give the relevant parameters. You can
$ run um: isq_to_aim_gobjbox.exe
to see what it's asking for.
By using gobjbox you do not need p3-p8. Therefore you can start the evaluation by giving:
$ scanco_submit_command ue:uct_evaluation_special_josh.com – /para=(1,dk0:[microct.data.0000275.0000245]c0000332.ISQ)
- You can make
uct_evaluation_special_josh.comsuch that there is no need for P1 (change p2 to p1 in the script, etc). - Alternatively to using the gobjbox you could use the normal isq_to_aim, but hard code the dim and pos.
- Then call whatever IPL files you want to call. Look into
fixed_batch_v4to see how we turn on the database always on the first line of every IPL part, and how we calculate parameters.
Return to Contents or Return to Main Page
Temporarily change evaluation for UCT_EVALUATION
[edit]In a terminal window, we need to redefine the logical that determines which
3D evaluation is associated with the UCT_EVALUATION tool.
For example, typing VOI runs the UCT_EVALUATION tool
by executing UE:UCT_EVALUATION_VOI.COM
Type
$ show logical UCT_EVALUATION
and then you can redefine this to point to another evaluation script.
$ define UCT_EVALUATION UE:UCT_EVALUATION_CUTOUT.COM
This is only redefined in the particular terminal you are using, and it will reset to its default in a new terminal. It will also not work if you try to submit the job to a queue. It only works interactively.
Return to Contents or Return to Main Page
Assign special evaluation to UCT_EVALUATION
[edit]Warning: This is for advanced users ONLY. Do not attempt this without contacting Steve!
This will show how to set up $ eval_kyle:
It is easy to set up multiple .COM files for the 3D evalulation tool, one such set-up is already prepared on your computer:
$ eval_special
will do something similar to $ voi where the normal contour program opens, but if you start the 3D eval, the special script um:uct_evaluation_special.com is called (associated with eval_special), which then in turn calls ipl_fixed_batch_special.com, where you can specify your own set of thresholds, etc.
So it is a daisy chain of files which we will need to follow to set up a special xxx_kyle.com script, and where ever we encounter _special.com, we copy and change it to _kyle.com.
So to set up $ eval_kyle you will need to do the following:
- 1. Edit
disk1:[microct]microct_setup_user.com(double-click on file), please be careful here, it's very important! (and I hope you have done your 'weekly full backup' regularly, so you could always retrieve a good version of login.com...)
- 2. Then, towards to bottom and duplicate the line
$ eval_special :== @com:eval_var.com um:uct_evaluation_special.com
and change duplicate to
$ eval_kyle :== @com:eval_var.com um:uct_evaluation_kyle.com
This will make this command eval_kyle available after you login freshly. Save and Exit.
- 3. Then go to
disk1:[microct.eval]and copy the fileuct_evaluation_special.comto the nameuct_evaluation_kyle.com('Commands', 'Copy ...', BUT CLICK ON THE THREE DOTS and give new output name.
If you do not see the eval_special: go to terminal, $ dir ue:*special*.com and take it from the microct_common directory)
- 4. Edit the
_kyle.comfile: at the top, changeipl_......_special.comto_kyle.com
- 5. Copy
ipl_fixed_batch_special.comtoipl_fixed_batch_kyle.com
- 6. Edit
ipl_fixed_batch_kyle.comto your liking. If you want$ eval_kyleto not perform the full evaluation, but only something akin tovoi, then, in the steps above, copyuct_eval_voi.comtouct_evaluation_kyle.com, andipl_voi.comtoipl_fixed_batch_kyle.com(thus you take thevoiscript as template for the_kylescript).
- 7. Then open a new terminal ('applications', 'decterm'),
$ eval_kyleshould work now!
Notes: When you start the 3D eval, then
$ que
will show you your batch job with your name on it now!
And now a few more explanations how the whole thing works: in all eval programs, hitting 'Start 3d' just submits the logical uct_evaluation, $ show log uct_evaluation shows you that by default, this points to ue:uct_evaluation_v4.com.
Those little voi and eval_steve scripts then just temporarily redefine this logical so that a different script is submitted when you 'start 3d eval'.
About the corelut eval: Then we start a whole different eval program: the .exe_corelut. So, if you set up a eval_steve_c (or whatever you want to call it): Produce a eval_var_c.com in the directory commands (maybe copy from microct_common to [microct.commands]), and there, on the last line, instead of starting
$ uct_evaluation
(the normal program), replace by
$ evalc
which starts the .exe_corelut - and because the eval_var.com has over-ridden the uct_evaluation logical just before, then you are starting different script upon starting 3d eval.
NB: we have a logical AND a symbol called uct_evalution. Sorry for confusion. Symbol uct_evaluation starts normal eval program, so this is what you replace by symbol evalc now).
Return to Contents or Return to Main Page
UCT_EVALUATION FAQ
[edit]Warning: Not all required GOBJ files found, Continue anyway?
[edit]This occurs when the chosen evaluation script is looking for a contour file, but can't find it.
- To see what contours the script is looking for go to "File" then "Save GOBJ As...". You can now see the list of required gobj files.
- For some scripts, it may not be necessary to supply a gobj and you can continue with the evaluation without it. For example, the "3D Segmentation of VOI, 1 solid object" applies the contour to isolate the region of interest, however, this may not be necessary if the object of interest can be extracted from thresholding.
Return to Contents or Return to Main Page
Warning: Attempt to access non-existent record CODE: 36
[edit]The scan is most likely still in the process of being reconstructed. Try to access the scan again in a few hours.
Return to Contents or Return to Main Page
Error: Insufficient logical unit numbers CODE: 1409716
[edit]Exit the evaluation program and restart it.
Return to Contents or Return to Main Page
Error: Process quota exceeded
[edit]When running UCT_EVALUATION from a dec terminal, an error when starting an evaluation may occur if there are to many dec terminals opened.
- The easy fix for this is to open the terminals from the applications menu in the session manager instead of using the dec command.
- Alternatively you can set up a new login script and add
/DETACHto the dec definition
$ DEC == "CREATE/TERMINAL=DECTERM/DETACH".
An example script can be found here @DISK5:[BONELAB.PROJECTS.BUIE]SETUP.COM.
Return to Contents or Return to Main Page
Error: Writing to UPAT database fails
[edit]Sometimes when performing a morphological evaluation we get an error when writing to the UPAT database. This is entirely preventable. The error may look like this snippet from the LOG file:
...snip...
Reading AIM file 6
DK0:[XTREMECT2.DATA.00002783.00016788]D0014390_TRAB_1N.AIM...
!> Reading AimVersion020
!> Image size after D1charCmp (run-length) uncompression will be:
!> Type of data Char 1 byte/voxel
!> Total memory size 82.7 Mbyte
Trabecular Analysis (5)
starting calculations
Scanner-ID: 3401
Updating old record 16788
getting new eval record...
New Eval record: 58416
getting new slice records...
TIME: 8-MAR-2024 10:41:00.63
ERROR:
Writing indexed record (upat slice)
MESSAGE: %FOR-W-INCKEYCHG, inconsistent key change or duplicate key!
STATUS: 2
CODE: 50
FACILITY: FORTRAN
--------------
UPAT_FILL_DB V2.0-1
Eval-Type: [5]: Group-Code: [0]: Evaluation Type 6 Cortical
Analysis
ISQ-File: [isqfile.ISQ]: Aim-File: [aimfile1.AIM]:
Ct.Mask-File: [aimfile7.AIM]: Ct-File: [aimfile8.AIM]:
...snip...
The problem is because when running several jobs at once on the cluster there could be parallel attempts to write to the database. The solution is to ensure that all jobs that write
to the database are run on the exact same queue. However, to leverage the cluster performance and running parallel jobs, we can split a typical morphological evaluation into two parts.
The first part is spread across all available queues, and the second part directs the final writing to database to a single queue (e.g., SCEVAL_FAST).
In UCT_EVALUATION or any HIJACKscripts, we need to replace:
$ PAR1 = "EVAL:UE:UCT_EVALUATION_V6.COM|UE:IPLV6_UPAT_REDO_E5E6_XT2.COM|UE:UCT_EVALUATION_V6_UPAT_FILL_E5E6.COM|UE:UCT_EVALUATION_V6_CREATE_TIF.COM|UE:UCT_EVALUATION_V6_UPAT_PRINT_E5E6_NM.COM|"
with
$ PAR1 = "EVAL:UE:UCT_EVALUATION_V6.COM|UE:IPLV6_UPAT_REDO_E5E6_XT2.COM|UE:STARTER_UPAT_POSTPROCESS_NM.COM|"
The script UE:STARTER_UPAT_POSTPROCESS.COM, or in this case the version that does no matching (UE:STARTER_UPAT_POSTPROCESS_NM.COM) replaces the following three scripts:
UE:UCT_EVALUATION_V6_UPAT_FILL_E5E6.COM UE:UCT_EVALUATION_V6_CREATE_TIF.COM UE:UCT_EVALUATION_V6_UPAT_PRINT_E5E6_NM.COM
We still can call UE:IPLV6_UPAT_REDO_E5E6_XT2.COM if we need to re-run the morphological analysis, but the other three scripts are specifically sent to SCEVAL_FAST to avoid any conflicts writing to the database.
If this doesn't fix the problem then also double-check that the sample/measurement number of the scan embedded in the ISQ is correct. There are occasions when that's been mistaken. See other FAQ entry about adjusting file header
Return to Contents or Return to Main Page
UCT_EVALUATION customization
[edit]When you start UCT_EVALUATION and select Scripts from the top menu, and then Modify, select a script. You can choose the radio button for Basic or Advanced. In the Basic you'll see something like this:
Project: UPAT_XT2 Eval-Script: UE:UCT_EVALUATION_V6.COM IPL-Script: UE:IPLV6_UPAT_E5E6_XT2.COM User-Script: UE:STARTER_UPAT_POSTPROCESS.COM
Make sure that IPL-Script always has a script named IPLV6_... and that User-Script always has names like EVAL_...
Switch into Advanced mode and you'll see all the variables explicitly set. For example, a typical P1 value is:
EVAL --> UE:UCT_EVALUATION_V6.COM|UE:IPLV6_UPAT_REDO_E5E6_XT2.COM|UE:STARTER_UPAT_POSTPROCESS.COM
If you select EVAL you will see the window at the bottom explain what each parameter is. For example for EVAL it says:
EVAL: evalfile | iplfile | userfile0 | userfile1 [| userfileN ...] (Nmax = 5)
So, that means Eval-Script is UE:UCT_EVALUATION_V6.COM, IPL-Script is UE:IPLV6_UPAT_REDO_E5E6_XT2.COM and User-Script is UE:STARTER_UPAT_POSTPROCESS.COM.
When you run an evaluation with this script it will create a file in the measurement directory called something like E0000684_EVAL_UPAT_XT2.COM, which will contain:
<--snip--> $ IPL_CALC2 :== $ IPL_CALC3 :== $ IPL_CALC4 :== $ IPL_CALC5 :== $ IPL_CALC6 :== $ IPL_CALC7 :== $! $! Defining entry point for IPL Loops: $! $ UCT_EVALUATION_CUSTOM_TARGET: $! $! $! Starting IPL $! $ @UE:IPLV6_UPAT_E5E6_XT2.COM $! $! User Procedure 0: $ SET NOON $ @UE:UCT_EVALUATION_V6.COM - "EVAL:UE:UCT_EVALUATION_V6.COM||UE:UCT_EVALUATION_V6_UPAT_FILL_E5E6.COM|UE:UCT_EVALUATION_V6_CREATE_TIF.COM|UE:UCT_EVALUATION_V6_UPAT_PRINT_E5E6.COM" - <--snip-->
The UCT_EVALUATION_V6.COM does the parsing of all variables passed by the GUI and then writes a script that is executed, beginning with all definitions of all the symbols. It then calls the IPL-script, which is written to the output file (command procedure to be executed as a batch job) as
write outfile "$ @UE:iplfile'"
Your User-Script(s) are then EXECUTED during the parsing, so they need to add (write) content to the script rather than do something. So these scripts need to WRITE the COMMANDS of what has to be done later, not contain the commands itself. For example, rather than
$ delete 'ipl_file'
It needs to be
$ write outfile "$ delete ipl_file'"
Return to Contents or Return to Main Page
Bug: UCT_EVALUATION v6 in customizing EVAL scripts
[edit]$ run um:uct_k_v6
The new evaluation tool v6 should be used in place of the older v5. Please see the Documents section of this wiki for a manual on its use.
Known bugs:
When you are producing your own EVAL scripts, and want to call your own ipl file or such:
The 'EVAL:' keyword in the scripts has the filenames of the uct_evaluation_v6.com, then the ipl_v6_xxxx.com, then additional filenames (such as the _prs.com to print and the 3dresults_append.com)
Now, if you are in BASIC mode in the modify window, and you change any of the 3 filename fields, the last of the additional filenames is 'dropped'... ooops...
So please go to Advanced mode and check the long 'EVAL:' keyword that all wished files are still in the list, otherwise add the last again (most of the time, that's the useful _3dresult_append.com script...)
Will correct that of course in the next version.
Return to Contents or Return to Main Page
Not work: Left mouse button
[edit]When the left mouse button doesn't work in the µCT evaluation program:
- Turn off caps lock.
- For remote sessions, turn of the Num Lock key (this will also allow you to use Ctrl-C and Ctrl-V to copy and paste contours).
Return to Contents or Return to Main Page
Not work: Remove and insert keys
[edit]The remove and insert buttons on the keyboard don't work in the µCT evaluation program:
- Turn off caps lock.
Return to Contents or Return to Main Page
Evaluation FAQ
[edit]Customize your evaluation script
[edit]The basic procedure is to create your customized evaluation script is:
- Clear the database of existing results
- Do your evaluation
- Extract the results
- Paste results into excel template.
You could repeat as necessary to evaluate a measurement multiple times and write out the results to a file.
- You must submit all jobs to a single queue!!!
1) Start ipl and clear the database of existing results.
$ IPL_BATCH /db_clear_eval -input "IPL_AIM ..
2) Insert your IPL evaluation.
3) Extract the results.
$@com:extract_results.com P1 P2
- P1 is the aim file (including path) and P2 is the result file (including path)
Example:
$@com:extract_results.com DISK5:[BONELAB.PROJECTS.BUIE]MYAIM.AIM DISK5:[BONELAB.PROJECTS.BUIE]MYRESULTS.TXT
- P2 should be the same for all samples in your project so that results are compiled into a single file.
4) Paste results into excel template.
- Refer to the Excel Extract Results Template.
- Open your results text file and copy and paste the contents into cell A2. There's no need to use paste special since the sheet is protected.
Return to Contents or Return to Main Page
Create your own IPL script
[edit]To make a script that would submit a job to the queue with the command as follows:
$ @um:ipl_eval_only.com 'aim_file' 'gobj_file' 'p1' 0
you need to create your own IPL file would be translated to the following command:
$ submit /noprint /que=sys$slow ue:IPL_VOI_JOSH_M.COM
- /log=sys$scratch:test.log /para=('aim_file','gobj_file','seg_file')
The IPL file would look something like this…
$ if p1 .EQS. "" $ THEN $ write sys$output "Give DK0:[xxx]C0001234_SEG.aim on the line." $ write sys$output "Or: " $ write sys$output "Type $ scanco_submit_command um:ipl_eval_autostart/para=(dk0:[xxx]c00123_seg.aim) " $ exit $ endif $ $ gobj_file = p1-F$PARSE(p1,,,"VERSION")-"_SEG.AIM" + ".GOBJ" $ aim_file = p1-F$PARSE(p1,,,"VERSION")-"_SEG.AIM" + ".AIM" $ $! $ @um:ipl_eval_only.com 'aim_file' 'gobj_file' 'p1' 0 $ exit
Some more handy IPL sequences are:
$ INPUT = F$SEARCH("UCT_MEASUREMENT_DATA:[*.*''P1']*.RSQ",1)
and then you just need to give meas. number as P1 (and maybe slice range as p2),
$ if p2 .eqs. "" then p2 := A
OR, some nice starts are:
$ IF P3 .EQS. "" $ THEN $ WRITE SYS$OUTPUT "P1: Measurement Number to duplicate" $ WRITE SYS$OUTPUT "P2: New Sample Number from Database" $ WRITE SYS$OUTPUT "P3: New Start Letter of ISQ file" $ WRITE SYS$OUTPUT "P4: Optional: Operator Number" $ WRITE SYS$OUTPUT "P5: Optional: Controlfile Number" $ EXIT $ ENDIF
where you say which parameters HAVE to be there (up to p3), and which ones are optional.
All together, the script may look like this:
$ IF P1 .EQS. ""
$ THEN
$ WRITE SYS$OUTPUT "P1: Measurement Number to reco"
$ WRITE SYS$OUTPUT "P2: Optional: Slice number N or Range M:N. Auto:All"
$ WRITE SYS$OUTPUT "P3: Optional: Queue. Auto: sys$slow"
$ EXIT
$ ENDIF
$ if p2 .eqs. "" then p2 := A
$ if p3 .eqs. "" then p3 := SYS$SLOW
$ slices = p2
$ quename = p3
$ INPUT = F$SEARCH("UCT_MEASUREMENT_DATA:[*.*''P1']*.RSQ",1)
$ INPUT = INPUT - F$PARSE(INPUT,,,"VERSION")
$ logfile = "sys$scratch:RECO_" + f$PARSE(input,,,"NAME") + ".LOG"
$ submit/noprint/queue='quename' uct_reconstruction_file -
/para=('input','slices','logfile')
$ exit
Note that uct_reconstruction_file is a logical that points to um:uct_reconstruction.com.
Logicals are preferred in scripts to make them more universal.
Return to Contents or Return to Main Page
Valid and Locked Settings for an eval script
[edit]Each evaluation when running UCT_EVALUATION can be made VALID and LOCKED.
VALID: The evaluation script shows up as an option to execute when runningUCT_EVALUATION. When you notice script numbers missing in the list, it is because they have hadVALID=0
LOCKED: The evaluation script can be used, but the user cannot make changes to the script settings inUCT_EVALUATION. This is to protect from somebody causing an error in the script settings that affect all users.
It is not possible to delete a script, and it is not possible to add a script at an arbitrary script number. So, any newly added script gets the next monotonically increased script number. This can lead to scripts that have similar purposes being spread throughout the list of scripts, which is annoying.
It is possible to organize the scripts, although it is a fair amount of work and easy to make a mistake. As a normal user (e.g., 'xtremect2') run the script. If you are a different user you may need to set the correct evalscript database first.
The most simple executable to run is
run ut:UCT_UPD_EVALSCR_MISC.EXE <...snip...> * 578 127/563 (ML) Knee Segmentation 579 128/569 NO PRINT - Patient Analysis 61µm, After manual corr. on GOBJ,NM 580 128/570 NO PRINT - Patient Analysis 61µm, After manual corr. on GOBJ,NM * 581 128/580 NO PRINT - Patient Analysis 61µm, After manual corr. on GOBJ,NM 582 129/572 XtremeCT II - Standard Radius/Tibia Patient Post-processing,NM 583 129/573 XtremeCT II - Standard Radius/Tibia Patient Post-processing,NM * 584 129/574 XtremeCT II - Standard Radius/Tibia Patient Post-processing,NM Choose evalscript Record (IDX): [584]: 337 Description [XtremeCT II - Standard Radius Patient Analysis 61µm]: Valid [1]: Locked [1]: Favourite [0]: Category [32]: Save Record ? [Y]:
A more comprehensive executable that allows the user to edit parameters in the script is:
run UT:UCT_UPDATE_EVALSCRIPT.EXE
<...snip...>
V IDX escript/Rec. Description
1 1/1 XtremeCT Standard Patient Evaluation (RL,RR,TL,TR,CU)
2 1/7 XtremeCT Standard Patient Evaluation (RL,RR,TL,TR,CU)
* 3 1/9 XtremeCT Standard Patient Evaluation (RL,RR,TL,TR,CU)
4 2/2 QC1 Trabecular Morphometry
5 2/8 QC1 Trabecular Morphometry
6 2/384 QC1 Trabecular Morphometry
* 7 2/401 QC1 Trabecular Morphometry
8 3/3 QC2
9 3/6 QC2
10 3/385 QC2
* 11 3/402 QC2
* 12 4/4 3D Segmentation of VOI, 1 solid objectAIM
* 13 5/5 3D Seg. of 2 VOIs: solid dense in transparent low dens obj obj
* 14 6/10 Bone Trab. Morphometry (3D Seg, 3D Calc, Print Sheet)et)eet)
* 15 7/11 Convert to DICOM
16 8/12 RESOLUTION, Standard Pat Eval, copy to UR, submit AutoCont
17 8/13 RESOLUTION, Standard Pat Eval, copy to UR, submit AutoCont
18 8/14 RESOLUTION, Standard Pat Eval, copy to UR, submit AutoCont
19 8/15 RESOLUTION, Standard Pat Eval, copy to UR, submit AutoCont
20 8/16 RESOLUTION, Standard Pat Eval, copy to UR, submit AutoCont
21 8/17 RESOLUTION, Mimic, Std Pat Eval, copy to UR, submit AutoCont
22 8/18 RESOLUTION, Standard Pat Eval, copy to UR, submit AutoCont
23 8/23 RESOLUTION, Mimic, Std Pat Eval, copy to UR, submit AutoCont
24 8/24 RESOLUTION, Mimic, Std Pat Eval, copy to UR, submit AutoCont
25 8/33 RESOLUTION, Mimic, Std Pat Eval, copy to UR, submit AutoCont
26 8/57 RESOLUTION, Mimic, Std Pat Eval, copy to UR, submit AutoCont
27 8/58 RESOLUTION, Mimic, Std Pat Eval, copy to UR, submit AutoCont
28 8/71 RESOLUTION, Mimic, Std Pat Eval, copy to UR, submit AutoCont
29 8/72 RESOLUTION, Mimic, Std Pat Eval, copy to UR, submit AutoCont
30 8/79 RESOLUTION, Mimic, Std Pat Eval, copy to UR, submit AutoCont
31 9/19 RESOLUTION, Standard Pat Eval, copy to UR, submit AutoCont
32 9/20 RESOLUTION, Standard Pat Eval, copy to UR, submit AutoCont
33 9/21 RESOLUTION, Standard Pat Eval, copy to UR, submit AutoCont
34 9/22 RESOLUTION, XCT2STD, Std Pat Eval, copy to UR, submit AutoCont
<snip>
572 127/559 (ML) Knee Segmentation
573 127/561 (ML) Knee Segmentation
* 574 127/563 (ML) Knee Segmentation
575 128/569 NO PRINT - Patient Analysis 61µm, After manual corr. on GOBJ,NM
* 576 128/570 NO PRINT - Patient Analysis 61µm, After manual corr. on GOBJ,NM
577 129/572 XtremeCT II - Standard Radius/Tibia Patient Post-processing,NM
578 129/573 XtremeCT II - Standard Radius/Tibia Patient Post-processing,NM
* 579 129/574 XtremeCT II - Standard Radius/Tibia Patient Post-processing,NM
580 130/0 New Record
Choose evalscript Record (IDX,*=Valid): [579]:
Press Enter many times until you are prompted with Save [Y]
The * indicates which scripts are active. You can see there are multiple versions of the same script in many cases. If you want to activate or deactivate a script you must use the IDX number (not the script number). For example, if you want to edit script 128, you select the active IDX, which is 576.
Copying script information from one IDX entry to another is a manual process you can do in UCT_EVALUATION. Be careful!
Return to Contents or Return to Main Page
Exporting evaluation script parameters to text
[edit]Nik at Scanco installed a program onto our system, but it is only to be used VERY carefully. Never use the import function, only the export function.
It's reading the evalscript database defined by the logical UCT_EVALSCRIPT_DATABASE. The file is usually located at UCTD:UCT_EVALSCRIPTS_*.DAT and is part of the weekly database backup.
$ run ut:uct_impexp_evalscripts
It will output an interactive session as following:
UCT_IMPEXP_EVALSCRIPTS V1.0 Export (0) or Import (1) [0]: ! 0 for export EXPORT File [SYS$SCRATCH:EVALSCRIPTS.TXT]: ! output file V No IDX/INDEX Description ! list of scripts 1 1/2489 3D Segmentation of VOI, 1 solid object 2 3/862 3D Segmentation of 3 VOIs, concatenation of all 3ionenation of 3 4/608 3D Segmentation of 4 VOIs, concatenation of all 4ionicatenati 4 5/2711 Bone Trab. Morphometry (3D Seg, 3D Calc, Print Sheet) .... 342 460/2945 XtremeCT II - Standard Radius Patient Evaluation 61µm 343 461/2946 XtremeCT II - Autocontour Largest bone (Radius or Tibia) 344 463/2965 NK frequency table, histogram 345 464/2968 Convert to DICOM Export evalscript Record (IDX): [1]: ! enter the number of the eval script to export
To export all scripts, just press Enter through the whole list. To stop, enter number 0. Afterwards check the output file SYS$SCRATCH:EVALSCRIPTS.TXT.
Please give it a try and let me know if you have any questions.
Interpretation of output
There will be records for each entry. Currently there are 76 entries:
!
! Script 23
!
594
34
NO PRINT - Patient Analysis 61µm, After manual corr. on GOBJ
1357462144
11358111
1513331376
12153769
1
0
0
!!! Installed on request only !!! �Starts the standard patient analysis (segmentation and evaluation), �after manual correction on _TRAB.GOBJ ; _CORT.GOBJ will be corrected accordingly.�Same script for Radius and Tibia analyses�Send postprocessing to SCSRV1_FAST. No results sent to printer.
0
0
0
0
0
0
0
10UE:UCT_EVALUATION_V6.COM|UE:IPLV6_UPAT_REDO_E5E6_XT2.COM|UE:STARTER_UPAT_POSTPROCESS_NOPRINT.COM
1?|?|+.ISQ|+.AIM|+_SEG.AIM|+_CORT_MASK.GOBJ|+_TRAB_MASK.GOBJ|+_CORT_MASK.AIM|+_TRAB_MASK.AIM|+_CORT_SEG.AIM|+_TRAB_SEG.AIM|+_PORE.AIM|+_TRAB_TH.AIM|+_TRAB_SP.AIM|+_TRAB_1N.AIM|+_CORT_TH.AIM|+_CORT_SP.AIM
26|+.GOBJ|0|+_CORT_MASK.GOBJ|0|+_TRAB_MASK.GOBJ
0
8UPAT_XT2|?|?|?|?|SYS$SCRATCH:|+.LOG|SYS$FAST
40.8|1|450|3000|2|0.8|1|320|3000|2
6AUTO_UPAT_SHEET|0|SYS$PRINT|PS,PDF|1024
0
0
0
0
0
0
0
538976288
538976288
2105376
0.0000000
5.0000000
0
0
3
0.0000000
0.0000000
0
0
3
0.0000000
0.0000000
0
0
3
0.0000000
0.0000000
!
!
The first number after the line ! Script 23, in this case 594 is the IDX number. The next number 34 is the position of the script in the list.
In the output file, each row is marked with a number. You have to be careful to not interpret the line incorrectly. The single-digit number that precedes the script value has a meaning:
26|+.GOBJ|0|+_CORT_MASK.GOBJ|0|+_TRAB_MASK.GOBJ
means type 2 with script info: 6|+.GOBJ|0|+_CORT_MASK.GOBJ|0|+_TRAB_MASK.GOBJ
40.8|1|450|3000|2|0.8|1|320|3000|2
means type 4 with script info: 0.8|1|450|3000|2|0.8|1|320|3000|2
Return to Contents or Return to Main Page
Run Scanco cut and match function (on Percy)
[edit]- At DATA DISK
Run$ upat_list
- mode 1, list mode.
- Select patients and site, etc.
- Select the appropriate template file, e.g.
UE:UPAT_TEMPL_CUTMATCH_AUTO_PATTB_CT.TXT - Output to a file, then run that file.
- At PROJECT DISK
If you have moved the files to the project directory and renamed them, you can generate a script from:
$ @UE:SEARCH_PROJECTS_CUTMATCH.COM -P1 = filename with device and directory -P2 = site (RR, RL, TR, TL) -P3 = output filename
For example, if we run:
$ @UE:SEARCH_PROJECTS_CUTMATCH.COM DISK3:[MICROCT.PROJECTS.GRACE]GRACE_01_00MTH_RR.AIM RR MYFILE.COM
The script will search DISK3:[MICROCT.PROJECTS.GRACE] for files in the form G*RR*.AIM with the same
length as GRACE_01_00MTH_RR, then check sample numbers to determine if the file is a follow-up scan.
- Upat_list is called to obtain position and dimension data for matching slices.
- The output file
DISK3:[MICROCT.PROJECTS.GRACE]MYFILE.COMis created to submit and run the cut and match.
Before running, open the file and add $ exit at the end.
$ @DISK3:[MICROCT.PROJECTS.GRACE]MYFILE.COM
For multiple files, do something like the following.
$ @UE:SEARCH_PROJECTS_CUTMATCH.COM DISK3:[MICROCT.PROJECTS.GRACE]GRACE_01_00MTH_RR.AIM RR MYFILE.COM $ @UE:SEARCH_PROJECTS_CUTMATCH.COM DISK3:[MICROCT.PROJECTS.GRACE]GRACE_02_00MTH_RR.AIM RR MYFILE.COM
Open MYFILE.COM and add $ exit at the end.
$ @MYFILE.COM
- The script assumes all follow-ups are provided.
- If follow-up scans are missing, it will be necessary to modify the output file so that the position and dimension data matches the files or update the
SEARCH_PROJECTS_CUTMATCH.COMscript.
Return to Contents or Return to Main Page
IPL FAQ
[edit]Submit a job to the queue
[edit]$ submit/noprint /que=sys$slow ipl_voi_josh_m.com /log=sys$scratch:test.log
Return to Contents or Return to Main Page
Rotate with turn3d / turn2d
[edit]The turn3d function can be used to perform a single rotation about any axis in 3d. The turnaxis_angle input is the angle between the x, y, and z axes and the line about which the rotation will be performed. The turnangle input is the amount to be rotated about the specified line. To use this function to perform three sequential rotations about the image's original x, y, and z axes requires compensation for the previous rotations.
To rotate an image from the axial view in the z plane to the sagittal view in the z plane:
$ipl /turn3d -input in -output out -turnaxis_angles 90 0 90 -turnangle 90 -img_interpol_option 0
No interpolation is necessary as this is "pure reformatting" (turning +-90 or 180 degrees around x,y or z axis)
For knee images, to put the femur above the tibia, you further add the step:
/turn2d -input out -output happyFemur -turnangle 270 -turnpoint_global_not_local true -turnpoint -1 -1 -img_interpol_option 0
Refer to turn3d.pdf for further instructions.
Return to Contents or Return to Main Page
Noise removal by component labeling
[edit]
Return to Contents or Return to Main Page
Create MSQ image and view
[edit]This is based on marching cubes. See IPL_UPAT_EVAL.COM for an example as per below:
/read seg C0000214_SEG.AIM /sup_divide ! careful of the order of inputs here -input seg -suppos_pixels_local -1 -1 -1 -supdim_numbers 1 2 1 -subdim_pixels -1 -1 -1 -testoff_pixels 0 0 0 /sub_pick -input seg -output segsub -subpos_numbers 0 1 0 /tri -input segsub -output tri -gobj_filename none -peel_iter 0 -ip_sigma 0.8 -ip_support 1 -ip_threshold 40 -nr_ave_iter 2 -size_image 512 512 -scale_image 0.800000 -edges false -nr_views 1 ! Important /msq_from_aim -aim_name tri -msq_filename C0000123_3D.MSQ
Then, use UCT_3D to view it. If you click on "animations" it will give you the option to read the MSQ file.
Return to Contents or Return to Main Page
db_scanco_activate associate evaluation database
[edit]When /db_scanco_activate is used in the IPL files, the correct association with the evaluation database is through the Index Patient and Index Measurement in the AIM header.
Index Patient 3095 Index Measurement 5962 !-------------------------------------------------------------------------------
Using IPL
$ ipl
$ read in xxx.aim
$ examine in log
$ db true {activates database}
$ dt_object {at end "writing results to database for measurement 1234"}
Return to Contents or Return to Main Page
dicom_to_aim bug in IPL v5.03
[edit]In IPL, use the /dicom_to_aim function. There is a bug in pre IPL v5.03 which requires that a small AIM be read in before doing the DCM conversion.
ipl> read in tmp.aim ipl> dicom_to_aim -aim_name [in] > -dicom_filename [default_file_name] > 4F65038B3986.DCM -multifile [false] > true ipl> write in MYFILE.AIM
Return to Contents or Return to Main Page
Understand "New" DT functions in IPL v5.42
[edit]This applies to:
/distance_map /dt_ow_thickness /dt_number /dt_thickness /dt_spacing /dt_cortical_thickness
XT1 (old dt) and XT2 (new dt) use 0.5 for assign_epsilon and 0.9 for ridge_epsilon.
µCT uses 1.8 for assign_epsilon and 0.9 for ridge_epsilon (old dt).
Therefore I recommend to take 0.9 and 1.8 also for the new dt functions for µCT/vivaCT measurements.
The suppress_boundary feature is new and works as follows:
0: The ridges and spheres are calculated on the full seg AIM, also outside the gobj. At the end the gobj is applied.
1: The ridges that are on the AIM boundary are not used for the calculation of the maximal spheres.
2: The ridges are calculated on the full seg aim but then the gobj is applied to the ridges. This means that at the end there are only spheres that have the center inside the structure (gobj). The maximal sphere filling algorithm still accounts for the structure outside the gobj, but only uses center points inside the gobj.
dt_thickness for example can be used in two different ways in a script:
1) cut out aim - apply threshold - apply gobj - dt_thickness This way the suppress_boundary options do influence the results because there are no ridges outside the gobj anyway.
2) cut out aim - apply threshold - dt_thickness (with corresponding gobj) This calculates the dt on the full aim first and applies then the gobj and suppress options.
If you examine for example trabecular bone only on a small area bounded by a gobj then the most accurate way to calculate the dt is to cut out a much larger area (still containing trabecular bone) and use way 2) above with suppress_boundary 0.
Return to Contents or Return to Main Page
Develop new IPL commands in C
[edit]
Return to Contents or Return to Main Page
Results
[edit]Extract Results
[edit]UPAT_LIST command
[edit]- Refer to Scanco specification document on using the Upat_print_list V2.0 on XCT2.
- Refer to Using upat_list Additional Notes.
upat_list (version 1.9 on XCT1) is identical to 2.0 except:
- there is no option for using group codes
- there is no option for using evaluation types
For all of the available parameters for generating results using upat_list command:
$ upat_list -h
Program: upat_print_list V1.9
Use the following modes to run upat_print_list:
upat_print_list -list for export to spreadsheet, default mode
upat_print_list -print for PostScript output
upat_print_list -show for text output
upat_print_list -advanced to access advanced options interactively
Standard Command-Line Arguments:
-b=<pat_nr> First patient, default = 1
-e=<pat_nr> Last patient
In list & show modes, default = last patient in database
In print mode, default = first patient
-s=<site_code> Site code
In list & show modes, RL RR R* TL TR T* CU *, default = *
In print mode, RL RR TL TR CU, default = RL
-mb=<date> Begin of measurement period, default = 1st measurement date
-me=<date> End of measurement period, default = current date
Dates must be given in VMS format, e.g. 01-JAN-2000
-f=<#_followups> Maximum number of follow-ups to match, default = 19
-t=<file_name> Name of template file
In list mode, default = UPAT_LIST_SHEET
In print mode, default = UPAT_EVAL_SHEETxx
In show mode, default = UPAT_SINGLE
-o=<file_name> Name of output file (in SYS$SCRATCH by default)
In list & print modes, stored in SYS$SCRATCH
In show mode, written to SYS$OUTPUT
-c=<number> Number of Print copies if in print mode. default = 1
-v=<level> Verbosity from 0 (silent) to 2 (verbose), default = 1
-h Print this help and exit
Advanced Command-Line Arguments:
-et=<eval_type> Type code of evaluation, default = 2
-eb=<date> Begin of evaluation period, default = 1st measurement date
-ee=<date> End of evaluation period, default = current date
-tb=<date> Begin of matching period, default = 1st measurement date
-te=<date> End of matching period, default = current date
Dates must be given in VMS format, e.g. 01-JAN-2000
-sk=<#_to_skip> Number of measurements to skip, default = 0
-m=<meas_list> Numbered List of measurements to take, e.g. 0,1,2,5,8
-nomatch Do not match follow up measurement, just take all slices
-sb Begin of Slice Range in % to be evaluated
-se End of Slice Range in % to be evaluated
-q Only take evaluations with quality better than (and including) this.
If positive number: all scans of better quality (incl. this) as well as all non-graded scans are taken.
If negative number: non-graded scans are NOT taken.
-qs Only take Structural evaluations with quality better than (and including) this.
Thus: between -qd and -q: only Density results are printed.
Parameter is disregarded if -qs >= -q.
-ut=<unit_type> 0->default unit, 1->linatt, 2->mg HA/ccm, 3->HU, default = 0
-cd=<density> Value of compact density to use, default = 1200.000000
If no command line arguments are specified, upat_print_list runs interactively.
Note that using "TB" and "TE", you can pull out exact measurements in the specified date range, while using "MB" and "ME", all you get is the latest measurement no matter what date range provided.
For results of all time points for a single site and sample # without matching to Baseline, use: I.e. the common region will be 100% for all measurements.
$ upat_list -nomatch
From these options, you can write out your own command (vs. using prompts) to give you the specifics you are looking for.
By specifying the CAMOS template of “UPAT_EVAL_CAMOS.PS”, you will get the “Camos” report style. For example:
$ upat_list -nomatch -b=1000 -e=1000 -s=TL -tb=01-MAY-2000 -te=01-AUG-2018 -t=DISK1:[MICROCT.COMMANDS]UPAT_EVAL_CAMOS.PS -c=0 -o=sys$scratch:upat_pat_1000_tl_camos.ps
Note that there are actually many kinds of report templates. These can be found via:
$ dir UU:*.PS
“SCUSA” is a short form for Scanco USA templates. I.e. templates that fit on an 8.5” X 11” page.
Return to Contents or Return to Main Page
Sometimes _UPAT_XT2_POST.PDF verses _UPAT_XT2.PDF
[edit]The _UPAT_XT2.PDFs are generated by the standard XTII evaluation scripts (not cluster version) that process the UPAT part on the same node as the IPL part. All the scripts that use
UE:UCT_EVALUATION_V6_UPAT_FILL_E5E6.COM
produce the above PDFs.
The _UPAT_XT2_POST.PDFs are generate by the cluster version of the XTII evaluation scripts that process the UPAT part on the same node for every evaluation and the IPL part on different nodes. All the scripts that use:
UE:STARTER_UPAT_POSTPROCESS.COM
produce the _UPAT_XT2_POST.PDFs.
You can change the name of the PDF in the UE:STARTER_UPAT_POSTPROCESS.COM if you want (and have permission!).
Return to Contents or Return to Main Page
Create XtremeCT II patient report manually
[edit]These are instructions on how to create a PDF report for XtremeCT II. However, before you dive into this, please try using script 118 (Standard Radius/Tibia Patient Post Processing) as it does exactly the steps below, but is automated and much easier. If that still doesn't work, then follow these instructions.
The basic concept is that a template PS file has the trabecular results (Eval_Type 5) and the cortical results (Eval_Type 6) combined into a single PS file. That PS file is then converted to PDF.
These instructions are based on the script UE:UCT_EVALUATION_V6_UPAT_PRINT_E5E6.COM
We use patient number 2870 and measurement number 15313 as an example. The picture number is D0013335 and this is a RL scan. The participant is CABHS_0001_RL_M00.
We assume a TIF image of the bone was already created. Check to see if it exists:
$ dir IDISK1:[XTREMECT2.DATA.UPAT_VIEWS]PAT00002870_MEAS00015315_3D_1.TIF
If it doesn't exist, you'll have to create it using the scripts defined in UE:UCT_EVALUATION_V6_CREATE_TIF.COM. See section below titled Create 3D image for XtremeCT II patient report manually.
We define this image as a logical:
$ DEFINE TIF_FILELOGICAL IDISK1:[XTREMECT2.DATA.UPAT_VIEWS]PAT00002870_MEAS00015315_3D_1.TIF
We define any of the possible template report sheets we might use. Rarely we'd use anything but the "baseline" version, but sometimes it might be helpful to have reports with follow-up.
$ DEFINE UPAT_EVAL_E5_SHEET_BASELINE UU:UPAT_EVAL_E5E6_BASELINE_DYNAMIC_LETTER.PS $ DEFINE UPAT_EVAL_E5_SHEET05 UU:UPAT_EVAL_E5E6_FUP05_DYNAMIC_LETTER.PS $ DEFINE UPAT_EVAL_E5_SHEET10 UU:UPAT_EVAL_E5E6_FUP10_DYNAMIC_LETTER.PS $ DEFINE UPAT_EVAL_E5_SHEET15 UU:UPAT_EVAL_E5E6_FUP15_DYNAMIC_LETTER.PS $ DEFINE UPAT_EVAL_E5_SHEET20 UU:UPAT_EVAL_E5E6_FUP20_DYNAMIC_LETTER.PS
Since we fill out the template first with E5 (trabecular) results, we want to ensure we can subsequently fill out the report with E6 (cortical) results. So, we need to avoid the place holders in the report from being overwritting by setting this logical:
$ DEF/USER PRS_KEEP_KEYWORDS TRUE
Now we run UPAT_LIST once for E5 and create a temporary output, then again for E6 for the final output:
$ UPAT_LIST Program: upat_print_list V2.0 Started: 1-JUN-2022 16:35:08.24 Mode (1 = list, 2 = print, 3 = show) [1]: 2 Mode: Print mode Patient # (1-2900) [1]: 2870 Site (found RL TR) [TR]: RL Evaluation type (1-6) [4]: 5 Group Code [0]: Maximum # of follow-ups (0-19) [19]: Template file [default]: Output filename [SYS$SCRATCH:UPAT_PAT_E5_2870_RL.PS]: SYS$SCRATCH:TEMP_D0013333_UPAT_XT2.PS # copies [1]: 0 $ UPAT_LIST Program: upat_print_list V2.0 Started: 1-JUN-2022 16:36:12.49 Mode (1 = list, 2 = print, 3 = show) [1]: 2 Mode: Print mode Patient # (1-2900) [1]: 2870 Site (found RL TR) [TR]: RL Evaluation type (1-6) [4]: 6 Group Code [0]: Maximum # of follow-ups (0-19) [19]: Template file [default]: SYS$SCRATCH:TEMP_D0013333_UPAT_XT2.PS Output filename [SYS$SCRATCH:UPAT_PAT_E6_2870_RL.PS]: SYS$SCRATCH:D0013333_UPAT_XT2.PS # copies [1]: 0
We convert the PS to a PDF and clean up temporary files.
$ @SCOM:PS_TO_PDF.COM DELETE SYS$SCRATCH:D0013333_UPAT_XT2.PS $ DELETE SYS$SCRATCH:TEMP_D0013333_UPAT_XT2.PS;*
Lastly, we rename the file appropriately
$ rename D0013333_UPAT_XT2.PDF CABHS_0001_RL_M00_UPAT_XT2.PDF
Return to Contents or Return to Main Page
Create 3D image for XtremeCT II patient report manually
[edit]Here we create the 3D image used in XtremeCT II patient reports manually. You'll need to set an appropriate preset for the visualization first (i.e. based on skeletal site):
$ SETUP_FILE = "UU:3D_PRESET_UPAT_RL_1.DAT" $ SETUP_FILE = "UU:3D_PRESET_UPAT_RR_1.DAT" $ SETUP_FILE = "UU:3D_PRESET_UPAT_TL_1.DAT" $ SETUP_FILE = "UU:3D_PRESET_UPAT_TR_1.DAT"
Then we define which segmented aim file to use:
$ EVAL_SEGAIM = "DISK2:[XTREMECT2.DATA.00002891.00015311]D0013333_SEG.AIM"
Now define the name of the output file using the standardized format that has patient and measurement number:
$ PRINT_FILE = "IDISK1:[XTREMECT2.DATA.UPAT_VIEWS]PAT00002870_MEAS00015315_3D_1.TIF"
Then run UCT_3D_BATCH (as opposed to UCT_3D which does not take the setup file in the command line):
$ UCT_3D_BATCH 'SETUP_FILE' 'EVAL_SEGAIM' 'PRINT_FILE'
Return to Contents or Return to Main Page
Extract followup data without slice matching
[edit]Use:
$ upat_list -advanced
- Choose 'disable slice matching:' -> y.
Return to Contents or Return to Main Page
Extract patient results on a slice-by-slice basis
[edit]There is an executable that was specially installed by Andres. Run it as user microct:
$ RUN ut:UPAT_EXPORT_MEASUREMENT.EXE
Choose from "Style: 0 = default, 1 = raw". Default gives standard patient parameters.
This gives you the .txt file in scratch containing the morphological parameters determined for each slice.
Return to Contents or Return to Main Page
UCT_LIST Extract results
[edit]Assuming you've used the SCANCO_SUBMIT_COMMAND to initialize your evaluations (either manually or through the uct_evaluation tool) then you can get all of your results stored into a text file that can be easily imported in Excel.
$ uct_list
The output text file will be stored in sys$scratch and you can ftp this to a PC so that it can be imported into excel and further analysis can be performed.
Importing into Excel requires setting a deliminator based on the space.
Customizing the uct_list output.
The default list template is set by the logical UCT_3D_LIST_SHEET which is normally
set to point to UU:UCT_3D_LIST.TXT. See the templates by
$ dir uu:*.txt
Almost all the available keywords are in UCT_3D_LIST.TXT enclosed
by \\ and //.
Only when you use the 'show directly on screen mode':
$ uct_list 1234
then you need to do this to override the default output:
$ def/user uct_3d_single_sheet my-template_file.txt $ uct_list 1234
Some example format files are:
UCT_3D_LIST.TXT UCT_3D_SINGLE.TXT UCT_3D_LIST_W_CRH.TXT UCT_3D_MEANS.TXT --> Use this to get the 5 mean values (i.e., calibration)
A summary of all the available keywords is available in UU:UCT_3D_SINGLE_SHEET.TXT
Name :\\UCTMEASFILENAME// Sample-Name :\\SAMPLENAME// Sample-Nr :\\SAMPLENUMBER// Meas-Nr :\\UCTMEASNR// Date of Birth :\\SAMPLEDOB// Sample-Remarks :\\SAMPLEREM// Meas-Remarks :\\UCTMEASREM// Meas-NrofSlices :\\UCTMEASNUMSLI// Direct: ------------------------------------------------------------------- TV : \\VOX_TV// BV : \\VOX_BV// BV/TV : \\VOX_BV_TV// Conn.Dens.: \\UCT_CONN// SMI : \\MC_SMI// Tb.N* : \\DT_N// Tb.Th* : \\DT_TH// Tb.Sp* : \\DT_SP// Tb.1/N.SD*: \\DT_N_SD// Tb.Th.SD* : \\DT_TH_SD// Tb.Sp.SD* : \\DT_SP_SD// Lin.Att.1 : \\UCT_MU0// +-\\UCT_MU0_SD// Lin.Att.2 : \\UCT_MU1// +-\\UCT_MU1_SD// Lin.Att.3 : \\UCT_MU2// +-\\UCT_MU2_SD// Lin.Att.4 : \\UCT_MU3// +-\\UCT_MU3_SD// Lin.Att.5 : \\UCT_MU4// +-\\UCT_MU4_SD// TRI (Plate Model): -------------------------------------------------------- TV : \\MC_TV// BV : \\MC_BV// BS : \\MC_BS// BV/TV : \\MC_BV_TV// BS/BV : \\MC_BS_BV// Tb.Th : \\MC_TH// Tb.Sp : \\MC_SP// Tb.N : \\MC_N// Anisotropy: -------------------------------------------------------------- |H1| : \\MC_H1// H1x: \\MC_H1X// H1y: \\MC_H1Y// H1z: \\MC_H1Z// |H2| : \\MC_H2// H2x: \\MC_H2X// H2y: \\MC_H2Y// H2z: \\MC_H2Z// |H3| : \\MC_H3// H3x: \\MC_H3X// H3y: \\MC_H3Y// H3z: \\MC_H3Z// DA : \\MC_DA// Dim X : \\VOX_DX// Dim Y : \\VOX_DY// Dim Z : \\VOX_DZ// Pos X : \\VOX_PX// Pos Y : \\VOX_PY// Pos Z : \\VOX_PZ// El-Siz X : \\VOX_ELSX// El-Siz Y : \\VOX_ELSY// El-Siz Z : \\VOX_ELSZ//
Return to Contents or Return to Main Page
Tabulate LOG results from 3D evaluations
[edit]Only use this if you have not used the standard uct_evaluation tool to generate your 3D evaluations (in which case see the HowTo related to the 3D database).
You can tabulate the LOG files:
$ search xxxx.log "ov "
Or whatever you want to search for can be stored in a text file
$ search/output=sys$scratch:ov.txt xxxx.log "ov "
To search more than one log file, and get the output into one single file:
$ fda/output=xxx.txt search *.log "ov "
The fda means 'file do all' and is a script made by Scanco to do one command (search) on a wildcard of files (*.log). Then put all the ov.txt, tv.txt, name.txt etc. files into excel. Josh has made a .com file that does a similar job as described above.
Return to Contents or Return to Main Page
Compile evaluation LOGs into one file
[edit]Call the UE:UCT_EVALUATION_V4_3D_RESULT.COM with the same construction
as $ eval_special. If you need help with this, see the HowTo on this
Wiki site (HowTo: Assign special 3D evaluation to the UCT_EVALUATION tool).
Edit UE:UCT_EVALUATION_V4_3D_RESULT.COM file to call a specific ipl
script as you wish.
When you run the evaluation, you will have three new files created:
- Two files in the measurement directory (on DK0!) (one with each eval 3D results in its own file, and one
APPENDED_ALL.TXTfile) - Then in sys$scratch, you will have one
SYS$SCRATCH:UCT_LIST_ALL_3D_RESULTS.LOGfile with ALL 3D evaluations of all measurements.
- Two files in the measurement directory (on DK0!) (one with each eval 3D results in its own file, and one
Note: You may need to edit the SCANCO_SUBMIT_COMMAND to specify a single queue (i.e., /que=sceval$fast)
Return to Contents or Return to Main Page
Database
[edit]Examine patient databases
[edit]This is for advanced users only!
There are two patient databases that get updated every time an evaluation is performed. Below is the name of the database, and the method used to check database values:
$ show logical UPAT_EVAL_DATABASE $ run disk1:[calibration.util]upat_export_measurement.exe ! as microct
$ show logical UPAT_SLICE_DATABASE $ set host 0 ! login as user calibration $ @disk1:[microct]login.com $ spb $ run DISK1:[CALIBRATION.UTIL]UPAT_GET_DB_INFO.EXE ! enter '1' to list records
In the slice database every evaluation is recorded, but only one is currently active at a time.
Return to Contents or Return to Main Page
Looking at a database file
[edit]WARNING: Advanced users only!
Databases are stored in a VMS specific binary format, so it's not possible to dump these files to text.
Nevertheless, some part of the files you can probably read if you open these in a text editor. If you for example type:
$ ed/int=decw UCTD:UCT_EVALSCRIPTS_CALGARY_XT2.DAT
you can actually see all the script names and parameters in the file. It is not easy readable but you can recognize it if you know the general parameters of a script.
Please make sure that you do not edit the script with the editor because this will make the file unusable.
Return to Contents or Return to Main Page
Manipulate scan sequence
[edit]Upat_list reports the baseline scan and then the percentage change of follow-up scans from the baseline scan. The order of scans in upat_list is determined from the measurement number (not the measurement date). In the case you need to manipulate the baseline and follow-up sequence, you will need to:
Warning: Use this with caution, and as little as possible!! even if the operation is reversible. Database manipulation is sensitive after all.
1. Log in as the "calibration" user (beware which calibration account to use for the different scanners).
How to proceed in the terminal:
$ SPB $ @DISK1:[MICROCT]LOGIN.COM or $ @DISK1:[XTREMECT2]LOGIN.COM !! don't miss that line, otherwise you would modify the CALIBRATION databases
2. Use the following command to modify the measurement number:
$ RUN DISK1:[CALIBRATION.UTIL]UCT_CORRECT_SAMPLE_FIRST.EXE !! To redefine the very first measurement in the sequence
- I do mean "First" measurement in the sequence, and not "baseline" measurement. You may have 2 baseline scans, one for radius and one for the tibia, but only one of them is the very "first in the sequence".
$ RUN DISK1:[CALIBRATION.UTIL]UCT_CORRECT_MEAS_PREV_NEXT.EXE !! To redefine the follow-up sequence beyond the first measure
- The PREV_NEXT utility is a bit tricky to use, as for each measurement you will have to define its "chronological" previous and its next. It is not related to any anatomical site: one might think for example of defining the Radius follow-up sequence for example. It is not the case. The PREV_NEXT sequence will alternate between different anatomical sites, that is how it should be.
Return to Contents or Return to Main Page
Add placeholders for missing follow-up scans
[edit]If there is NO scan at a certain time point in a series (i.e. patient did not show up), the program ut:upat_create_meas_placehoder.exe and upat_create_eval_placeholder can insert fake records, so the slice matching and timepoints/visits are still all in order.
The attached file describes how to create an manage placeholders in the case of missing follow-up visits in longitudinal studies. SOP Create Placeholders
Return to Contents or Return to Main Page
Disable a database measurement
[edit]It is not possible to delete an evaluation from the database, but it can be disabled.
NOTE: QC results are stored in the UCT database, and there is no tool to disable a UCT database result.
Log in as the normal user (e.g. XTREMECT2). Then in a terminal you may use this simple utility program:
$ RUN UT:UPAT_CORRECT_VALID_FLAG
See below a typical prompt to deactivate an entry:
UPAT_CORRECT_VALID_FLAG V2.0 Measurement No. (0 to stop): 1 Evaluation type [2]: 5 ! E5 for trabecular bone; enter 6 for E6 for cortical bone (run the command twice) Group code [0]: 0 Found evaluation 57 for patient 4: ID003 Value for valid flag (0=invalid, 1=valid) [1]: 0 Value for placeholder flag (0=write results, 1=placeholder) [0]: 0 Measurement No. (0 to stop): 0
You can always re-activate the entry, by switching the valid flag from 0 to 1.
Or, to make a scan invalid, you can also login as calibration user.
Point to microct user
$ @DISK1:[MICROCT]LOGIN.COM
Set priviledges to bypass.
$ SPB
Run Correction File
$ run DISK1:[CALIBRATION.UTIL]UPAT_CORRECT_VALID_FLAG.EXE
Return to Contents or Return to Main Page
Disable a uct_list database measurement
[edit]You cannot really disable data in the UCT_LIST output. What you can do using IPL is to clear the complete result entry for a given measurement, for example:
$ ipl /read -name in -filename default_file_name /db_scanco_activate -write true /db_clear_eval -input in
Then UCT_LIST might still report the "disabled" measurement, leaving only the few first meta-data columns non empty. The rest would be cleared.
I must bring your attention to the fact that this sequence is used a lot on XtremeCT I scripts, for the cortical porosity for example. This means that on XT-I, the UCT_LIST content is highly unstable, as it was used back then while UPAT_LIST was not able to handle those results. In the future, when new applications come they may delete/overwrite the UCT_LIST entry for a measurement. That is the rationale for using the TXT output in the RESULTS directory, that at least keeps track of past analyses. As long as you have a single application on XT-II going through UCT_LIST, calling results on demand with it is fine. Later it might come complicated.
Return to Contents or Return to Main Page
Troubleshoot UPAT database
[edit]If there is an error ('inconsistent key change or duplicate key!') in the log file during 'upat_filldb', this is likely caused by too many servers doing UPAT evaluations:
Basically, the UPAT database can not be accessed by 2 evaluation jobs "at the same time", and works on a "1st arrived 1st served" basis. It is actually one reason to have only 1 evaluation at a time running on a single workstation (the usual setup). In your case (and in mine as well), when you have several workstations clustered together, you can technically run several evaluation jobs at the same time which will eventually access the very same database. So what happens is that a 1st job executes the /upat_fill_db, and accesses the database for a short amount of time. During this time, any unfortunate evaluation job trying to access the database will end up in the exact same error as you reported, as their access to the database is restricted. Even though the time window is short, this kind of thing is unavoidable in setup such as ours, and when lots of evaluation are started at the same time. Here you have no other choice than restarting the evaluation job, in order to update the database (or ultimately you could write a small script just to run the /upat_fill_db command, but I do not think it makes sense).
Return to Contents or Return to Main Page
Redirect to a temporary database
[edit]We need to temporarily redefine the logicals UPAT_EVAL_DATABASE and UPAT_SLICE_DATABASE. Normally, the definition is
UPAT_EVAL_DATABASE = UCTD:UPAT_EVAL_CALGARY.DAT UPAT_SLICE_DATABASE = UCTD:UPAT_SLICE_CALGARY.DAT
Typically, we submit our jobs to the queue with an IPL script, so within the script we'll have to redefine the name of the database by adding lines such as
$ def UPAT_EVAL_DATABASE SYS$SCRATCH:TEMP_UPAT_EVAL_CALGARY.DAT $ def UPAT_SLICE_DATABASE SYS$SCRATCH:TEMP_UPAT_SLICE_CALGARY.DAT
so that the results from the IPL evaluation are redirected to this temporary database.
Then, we need to extract the results from the database. These results are provided on a slice by slice basis (at least with the UPAT data). As user microct in a terminal window, we will again need to redefine the database and then run the program that translates the results to a text file:
$ def UPAT_EVAL_DATABASE SYS$SCRATCH:TEMP_UPAT_EVAL_CALGARY.DAT $ def UPAT_SLICE_DATABASE SYS$SCRATCH:TEMP_UPAT_SLICE_CALGARY.DAT $ run disk1:[calibration.util]upat_export_measurement.exe ! give the measurement number and output file
Or extract the results from the temporary database with:
$ def UPAT_EVAL_DATABASE SYS$SCRATCH:TEMP_UPAT_EVAL_CALGARY.DAT $ def UPAT_SLICE_DATABASE SYS$SCRATCH:TEMP_UPAT_SLICE_CALGARY.DAT $ def UCT_MEASUREMENT_DATABASE SYS$SCRATCH:UCT_MEASUREMENTS_TORONTOXT.DAT ! only necessary if data came from another system $ def UCT_SAMPLE_DATABASE SYS$SCRATCH:UCT_SAMPLES_TORONTOXT.DAT ! only necessary if data came from another system $ upat_list ! choose option [3]show, give the patient number and output file, e.g. sys$scratch:myvalues.txt
For an example IPL script that redirects to a temporary database, see Percy:
DISK1:[MICROCT.COMMANDS]IPL_UPAT_EVAL_AIMINPUT.COM
Return to Contents or Return to Main Page
Import from a foreign database
[edit]IF MEASUREMENTS COME FROM A TOTALLY DIFFERENT DATABASE (such as Toronto's XCT):
You will need to redefine the logicals UCT_MEASUREMENT_DATABASE and UCT_SAMPLE_DATABASE
def UCT_MEASUREMENT_DATABASE SYS$SCRATCH:UCT_MEASUREMENTS_TORONTOXT.DAT def UCT_SAMPLE_DATABASE SYS$SCRATCH:UCT_SAMPLES_TORONTOXT.DAT
However, it is quite possible that you won't have a copy of the foreign MEASUREMENT and SAMPLE databases. If this is the case, then you must import the ISQ files into our own database. Then, by setting
$ define UCT_EVALUATION_DATABASE SYS$SCRATCH:TEMP_EVALUATIONS_CALGARY.DAT
you could redirect the results to a temporary database (but normally, if you already imported the data, why not use our own database now).
Return to Contents or Return to Main Page
Import ISQ
[edit]When you import, please note that the sample number AND measurement number are updated, so meas 10907 is now 10908.
Suppose you have a sample 3000, meas 10000, C0001234.isq, and want to import this into sample 3001, this is what I would do:
To make a copy of the scan (i.e., keep it in sample 3000 and make another copy in 3001)
$ cd *3000*10000 $ copy C0001234.isq D0001234.isq, also copy any other files you want imported (RSQ, GOBJs, etc) $ import UCT_IMPORT V1.2 --------------- ISQ-file []: D0001234.ISQ Sample number [0]: 3001 Change File Header name [Y]: Y Optional: Operator Measurement [0]: 1 (1 = bonelab) Site 20 Radius L Optional: Controlfile Nr. [0]: (change if desired) Execute Rename Command [Y]: Y
Return to Contents or Return to Main Page
Duplicate as new import to database
[edit]You will need to copy ISQ and GOBJ files to a new designated location. This is done when a screening study is completed to look for potential subjects and then a main longitudinal study is completed under a different study name.
1. Make a new patient/subject ID
2. Make a copy of the ISQ. For example:
$ copy DISK2:[microct.DATA.00002584.00008992]*.isq -
DISK2:[microct.DATA.00002696.00009345]*.isq
3. Import ISQ into new patient/subject ID number by typing:
$ import
4. Follow the prompts for the ISQ file names, changing of control file # etc.
5. Check the data directory to see if ISQ and GOBJ files have been copied properly
2. In uct_evaluation, open new .ISQ and copied .GOBJ and re-run the evaluation to create .AIM, _SEG.AIM, _CORTEX.AIM, _LHTH_DTH.AIM
3. Copy Scout Views so scanning program will load baseline scout view for followup scans
In DISK1:[MICROCT.DATA.SCOUTS], you'll see two series of scout views: one series with the PATIENT # followed by 020 or 021 or 038 or 039, the site code (radius or tibia, left or right respectively)
Copy the old patient scouts to the new patient #s
For example (using the same old and new #s as above):
$ copy DISK1:[MICROCT.DATA.SCOUTS]00002584021.SCV -
DISK1:[MICROCT.DATA.SCOUTS]00002696021.SCV
Return to Contents or Return to Main Page
Recover a disappeared due to import
[edit]If you need duplicate a measurement in both the original and new directories, but you forgot copying the measurement before importing as a new. The original measurement will be automatically removed from the original directory. This can be fixed! You will need to copy the measurement back and then fix the header information, as the header will no longer match the original directory.
1. Manually copy all of the associated files for the measurement from the new directory to the original directory:
$ copy DISK2:[xtremect2.data.00001234.00001234]*.*;* DISK2:[xtremect2.data.00004321.00004321] /log
2. Change the header information of the measurement files to those of the original directory. To do this, you will need special software. The use of this software is RESTRICTED. Users must seek special permission to use the software from Steve, Ying, or Anne BEFORE using. Once you have permission, the software can be found here: DISK1:[MICROCT.COMMANDS.FORBIDDEN].
3. Run the software:
$ run [software]
4. The software will ask for: a) the ISQ file b) the new sample # you would like to give it (i.e. the original directory sample #) c) the new measurement # you would like to give it (i.e. the original directory measurement #) c) the new sample name you would like to give it (i.e. the original Study ID)
You can view the header information for a file by using the command:
$ ctheader [ISQ file]
Return to Contents or Return to Main Page
Move to fix wrong Study_ID/Sample_No
[edit]If a person was scanned under the incorrect sample number, perform the following steps. For the example, let’s assume that patient Jane Smith should have been scanned with patient record #106. Unfortunately she has actually been scanned under patient record #104, which has been defined for John Doe.
- Prepare patient record. It is assumed patient record #106 for Jane Smith already exists. If this is not the case, one needs to create it. Create it like you normally would on the system prior to any scan.
- Perform the import process by typing
$ import. Provide the full pathname of the scan (e.g.,DK0:[MICROCT.DATA.00000104.00000218]C0001824.RSQ). All information in header of the RSQ and ISQ (if it exists) file will automatically be updated, and reset accordingly to the new patient record destination. Hence the information will now indicate patient "106 – Jane Smith" information and not “104 – John Doe” anymore. The measurement number will be changed, although the scan “C-number” will not. The original measurement number was 218 when it has been scanned. But during the import process the scan will be attributed a new measurement number, i.e. the very first one available in the database (here 221). The program will move not only the RSQ and ISQ file, but all files related to it as well (GOBJ, AIM, PDF, TXT…) which respect the C-number filename format. Other files will not be moved. - Invalidate the wrong evaluation. If the scan from Jane Smith has been evaluated before importing it to the proper patient directory, it is necessary to invalidate the evaluation for measurement #218 as it will mess with previous scans from John Doe. Run
$ RUN UT:UPAT_CORRECT_VALID_FLAG.EXE. You will need to run the program twice. Once to invalidate the trabecular results (Evaluation Type 5) and once to invalidate the cortical results (Evaluation Type 6). Make sure to invalidate the results for the appropriate Group Codes. - Evaluate the newly corrected data. The reimported measurement of Jane Smith (measurement #221) will need to be (re-)evaluated. If the contour had already been drawn under John Doe, there is no need to redraw it. Starting the evaluation task will be sufficient.
- Clean up. Now the scan files have been moved, the initial directory still stands there. Using the backup program it is possible to completely erase the initial folder 104/218. Just proceed as if you were to Move the scan to the Trash bin.
- Check the header. In the newly corrected ISQ or RSQ files run
$ ctheader C1234567.ISQand ensure the Patient Name, Sample Number, Measurement Number and Site are all as expected. Remember that site code 20 is for Radius Left, 21 for Radius Right, 38 Tibia Left, 39 Tibia Right. If the site code is incorrect you will need to fix it using another set of instructions.
Return to Contents or Return to Main Page
Move to fix wrong account used for scanning
[edit]Xtremect2 (on disk2) and xt2recalib (on disk6) accounts share the same databases. However, the definition of DK0 is account specific, ie. the scans are stored on different disks. So when scanning under Xtremect2 account instead of Xt2recalib account, to correct the wrong measurement location you will need to:
- Create the patient directory on disk6:[xtremect2.data], if needed;
- Create the same measurement directory on disk6:[xtremect2.data];
- Create a save set of the measurement folder on disk2:[xtremect2.data] with the isq, rsq, rad and scv files included;
- Unzip the save set in the measurement directory on disk6:[xtremect2.data];
- Delete the measurement directory on disk2:[xtremect2.data] using delete command in the terminal. Caution: Do NOT use the backup program.
Warning: This procedure is specific to this situation between Xtremect2 and Xt2recalib accounts, Microct and Xt1recalib accounts, and vice versa, but not applicable between any other accounts!
Return to Contents or Return to Main Page
Update database after RSQ/ISQ restoration
[edit]If you are restoring RSQ or ISQ files from tape (or other source) it might be preferable to do your analysis without resetting the database info.
The database is specific to the user. So, we have to modify the database for microct, and be careful not to modify the calibration (or other users) database. However, we still need to have permissions from calibration in order to do the modification.
When we restore an ISQ or RSQ to disk, the database needs to be updated to ensure it finds it. We have to change the database back to say it's on disk. To do this we need to log in as user calibration.
$ set host 0 login as calibXXXX where XXXX is the scanner id (5019 for VivaCT or 2339 for uCT35) or calib3309 or calib3401 (for the XtremeCT and XtremeCTII system, respectively). password from Steve $ @ADISK1:[BONELAB]microct_setup_XXXX.com ! XXXX=scanner id, sets the logicals to point to bonelab data for SB group or $ @ADISK1:[VIVACT]LOGIN.COM ! sets the logicals to point to microct data for BH group or $ @DISK1:[MICROCT]LOGIN.COM ! sets the logicals to point to microct data on the XtremeCT system or $ @IDISK1:[XTREMECT2]MICROCT_SETUP.COM ! sets the logicals to point to xtremect2 data on the XtremeCT2 system $ set proc/priv=bypass or $ spb $ run DISK1:[CALIBRATION.UTIL]UCT_CORRECT_DIR ! make sure to include the full path to the executable as shown here. $ run DISK1:[CALIBRATION.UTIL]UCT_CORRECT_MEAS_DIR.EXE ! on xtremect2 system, use this program
Note: Only change those items which have to be changed (e.g. just hit RETURN for RAW fields if you only want to change the IMA location. Also, when specifying the directories, use DK0, not DISK2.
$ run ut:UCT_CORRECT_DIR.EXE
Measurement Nr.: 1234 MeasNr. 1234 PatientNr: 268 RAW: RAW004 TP0:00001234_RAW IMA: IMA002 TP0:00001234_IMA
RAW-Label: [ RAW004 ] RAW-Dir : [ TP0:00001234_RAW ] IMA-Label: [ IMA002 ] DISK IMA-Dir : [ TP0:00001234_IMA ] DK0:[microct.data.00000456.00001234] Measurement Nr.: 0 End of program
The IMA-label does not matter on disk - but we have to write something to get rid of the IMA002, so 'DISK' makes sense.
Using the standard backup/archiving program, you can archive (MOVE TO) that IMA again to a tape, but use a DIFFERENT TAPE than where the first instance of this scan is on.
Background: Tapes just write file after file, without any directory structure or hierarchy, so the program will always find the first instance (the old dataset) if you try to read it again from that tape.
Note One other option is to change the permissions of UCT_CORRECT_DIR.EXE so that user microct can use it directly. To do this, log in as users calibration and then:
$ set proc/priv=bypass ! as user calibration $ set prot=g:re ut:uct_correct_dir.exe $ run disk1:[calibration.util]uct_correct_dir ! as user microct
Return to Contents or Return to Main Page
Other FAQ
[edit]View Sample info
[edit]$ mcr um:uct_info 1234
will show you sample-name and date-of-birth of sample-number 1234
$ mcr um:uct_info -m 1234
will give you some (stupid) info about meas 1234
Note: If you use this function all the time, put the following into microct_setup_user.com
$ uct_info :== $um:uct_info
and then the usage info will even be correct.
Return to Contents or Return to Main Page
List measurements for data and backup location
[edit]- To generate a list of measurements that are registered in the database, to determine where backups are stored, or if the data is still on disk:
$ write_info
- Ask you for a range of measurement numbers or sample names.
- Create a
sys$scratch:info.txtfile.
$ write_info
UCT_WRITE_INFO.EXE V1.2
-----------------------
Sample Index from [0]:
Sample Index to [0]: 1000000
Sample Name from [ ]: DRF
Sample Name to [ ]: DRF
Extended Info ? [T]: F
1383 DRF_001
1383 DRF_001
1385 DRF_002
1385 DRF_002
1383 DRF_001
1383 DRF_001
1383 DRF_001
Return to Contents or Return to Main Page
Anonymize patient name and DOB
[edit]Here is the link to Scanco's SOP to change a long list of patient's name and/or DOB to de-identify the data. As of 2025 it seems that the executable proposed to be used in the SOP is no longer available.
Instead, the DOB and Patient Name can be updated manually by running uct_sample to update patient information.
This does not affect the headers of past RSQ, ISQ or AIM files.
Return to Contents or Return to Main Page
Fix a wrong scan site code
[edit]This is done if accidentally scanned using the wrong control file. For example scan site RR is scanned mistakenly under RL, or TL scanned by mistake using the control file for TR ect.
To see our site codes, e.g. 20 = RL, 21 = RR etc using
$ show log *eval*
- Scenario 1
If the correction commands (uct_correct_meas_site and updh_site) are already in your account (which is the case for the xtremect2 and xt2recalib accounts on the XtremeCT cluster)
$ cd util $ dir *site*
and you see two programs (uct_correct_meas_site and updh_site). Set priviledge to bypass first
$ run ut:uct_correct_meas_site
and enter the meas. number to be corrected and then enter in the correct site code (20 = RL, 21 = RR, 38 = TL, 39 = TR).
- This modifies the database, so the correct site is displayed in the eval program.
- Enter meas. number 0 to exit program.
Then we must also correct the ISQ and RSQ files (has to be restored from tape if not on disk):
$ run ut:updh_site !'updh' = update header
- Enter the full (i.e. pathname included) ISQ or RSQ filename. For DISK6 data should use DISK6:[xtremect2.data....].
- Then enter the correct site number.
- Scenario 2
Normally the correction commands (uct_correct_meas_site and updh_site ect.) are only provided in a calibration account to prevent from misusage. We have to login as user calibration to make the change.
$ set host 0 $ username: [enter calibration account, e.g. calib3401]
Then we use the same steps in Scenario 1 to change the site code in both database and ISQ and RSQ files.
- Make sure to
logoutfrom user calibration afterwards.
Return to Contents or Return to Main Page
Fix a wrong sample, measurement or patient name
[edit]Sometimes the ISQ or RSQ might have incorrect information:
Patient Name : DRF_053 Patient Index : 2751 Measurement Index : 13990
You can modify the measurement index, etc, in the ISQ/RSQ header. As a regular user, use the utility:
$ run IDISK1:[CALIBRATION.UTIL]UPDH_SAMPLE_MEAS_NAME.EXE
NOTE: Running this program will not affect the database, only the file. If you want to move a measurement to another sample number, use the import function.
Return to Contents or Return to Main Page
Fix for results fail to print/list/show after evaluation
[edit]There are a number of reasons the results may not print:
Incorrect first measurement number
[edit]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
Return to Contents or Return to Main Page
Evaluation completed with results not written to database
[edit]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.
Return to Contents or Return to Main Page
Incorrect sequence of measurement numbers
[edit]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!
Return to Contents or Return to Main Page
Strategies for finding correct measurement numbers
[edit]If upat_list does not output anything I normally check if the database entry for the corresponding measurement is ok. In this case
$ uct_list 13918
This showed a wrong sample name and number.
Then you could do uct_list (and enter all default) of the complete database and search for the patient string CSI_0051.
Then you would figure out the possible measurement numbers:
13986,13987,13988,13989.
In this example, the only one missing was 13986.
This case example was difficult because the ISQ file was not in the standard directory. I figured out that the corresponding AIM file was
not generated by the current evaluation. So I check the procedure log of the aim file with aix -l. There you can see the original ISQ file
Original file dk0:[xtremect2.data.00002750.00013986]d0012143.isq;
Return to Contents or Return to Main Page
Data Management
[edit]Lab’s Data Responsibility
[edit]- Weekly
- Clean up sys$scratch directory and only keep last two week's data.
- Archive RSQ to corresponding tapes.
- RSQ from temporary tests and non-project (not a formally established project) will NOT be archived unless specifically notified to lab personal.
- Database backup to disks.
- Monthly
- Database backup to corresponding tapes.
- Archive QC RSQ to corresponding tapes.
- Delete QC IMA and only keep last month's data.
- 6-monthly
- System backup to corresponding tapes when prompted.
- Yearly
- Data Disk clean up when usage is over 90%.
- Temporary tests and non-project RSQ and IMA data will be deleted during check up.
- Project Disk clean up when usage is over 90%.
- Winston backups clean up.
- Whenever requested
- Projects backup to Winston server and restoration.
- Projects archive to HOG server and restoration.
Warning: STRONGLY URGE TO DO THE WEEKLY and MONHTLY BACKUP. Two users DID experience disk crashes before, and without the weekly backup, you may still have all scans on the data disk, but without the databases you cannot tell which scans belong the which sample.
- Refer to XtremeCT Micro-CT Management SOP or its Word format for references.
Return to Contents or Return to Main Page
HP Server and Disk Array
[edit]HP References
[edit]
Return to Contents or Return to Main Page
HP FAQ
[edit]Change disk description for $ disks
[edit]Login as the system user and change to the system commands directory.
$ cd scom $ eve show_disks.com
Return to Contents or Return to Main Page
Tape
[edit]
Warning: While the tape is running and writing to it, DO NOT LOG OUT, DO NOT INTERRUPT THE PROGRAM! This would make that tape unusable from this point on - you could still read from that tape up to this point, but could not add more scans to this tape.
Tape Label Convention
[edit]Tape labels are 6 characters in length. For the Bone Imaging Lab projects, the first three letters indicate if the tape is for raw (RAW) or image (IMA) data, and the last three digits are for the tape number.
RAW040 = RAW date, tape #040 IMA001 = IMAGE data, tape #001
Alternatively, the first two characters may be set to a PI's initials, the third character indicates if the tape is for raw (R) or image (I) data, and the last three digits are for the tape number.
SBR040 = Steve Boyd RAW, tape #040 SBI001 = Steve Boyd IMA, tape #001 BHR006 = Benedikt Hallgrimsson RAW, tape #006 BHI017 = Benedikt Hallgrimsson IMA, tape #017 FJR012 = Frank Jirik RAW, tape #012 FJI003 = Frank Jirik IMA, tape #003
CaMos raw data is backed up with the following naming:
CAMOS1 = CaMos RAW, tape #1
When a tape becomes full, start (initialize) a new tape, increasing the tape number by one so that each tape label is unique.
Return to Contents or Return to Main Page
Initialize a New Tape
[edit]Put a new tape into the tape drive, then press "Initialize", this will format (erase) everything on the tape. When prompted for a label for the tape, follow the Tape Label Convention. The tape can now be mounted for use.
Full Tape
[edit]A tape automatically ejects during a backup procedure if it becomes full.
- Remove the tape and write protect it (orange indicator will be displayed).
- Exit the disk-utility program.
- Hit
ctrl/cto interrupt the program if needed.
- Hit
- Start a new instance of the program.
- Initialize a New Tape.
- Backup any remaining files.
Return to Contents or Return to Main Page
Tape Drive Setup on XCT cluster
[edit]Both the old and new tape drives are connected to SC3309 (XCT1) and powered on. You do not need to power off one to use another.
New tape in new drive <--> microct, xtremect2, xt2recalib, calib3401, calib3309
- The 'new' Ultrium 3000 tape drive is for the new tapes and the default tape drive for all other accounts (microct, xtremect2, xt2recalib, calib3309, calib3401).
- Use the following command to use the old SDLT tape drive no matter which account on the command line:
$ uct_backup_sdlt
Old tape in old drive <--> xt1recalib
- The 'old' SDLT tape drive is for the old tapes. You have to log into the default xt1recalib account to recognize this tape drive.
- Restoring from old tapes in xt1recalib account will restore your data to DISK6:[MICROCT.DATA].
- By default, xt1recalib account can only see old tape drive, not the new tape drive.
- Use the following command to use the new tape drive no matter which account on the command line:
$ uct_backup_sas
- With either of the above commands, you must not "submit" the tape usage jobs to the queue (i.e., cannot run a batch backup from a script), but only run them interactively in the
software. Any job in the queue will use the default tape drive again.
Return to Contents or Return to Main Page
Extract from Tape
[edit]Scripts to Extract from Tape
[edit]Generally, all files on the tape can be extracted, or only specific files. To extract all files on a tape, for example, a tape received from a collaborator, insert the tape into the drive and do the following:
$ cd ur $ create/dir [.collaborator] $ create/dir [.collaborator.com] $ create/dir [.collaborator.log] $ create/dir [.collaborator.models] $ cd ur collaborator models $ backup/log tp0:*.sav []/by=parent ! be sure you are the user (i.e. 'microct' or 'xtremect2') that has permission $ backup/log tp0:*.sav DISK4:[BONELAB.PROJECTS.FRAMINGHAM.MODELS...]/by=parent ! The "..." keeps the directory structure. The /by=parent ensures owner of the files is same as parent directory
This will save all the files on the tape to the current directory. Alternatively, if you only want a certain file extracted from the tape, such as an RSQ file, do essentially the same as per above, except with a different final command:
$ backup/log tp0:*.sav/select=*.rsq []/by=parent
The /by=parent part of the command is a qualified for the file owner, and it makes the files that are copied the same owner as the parent directory (nothing to do with how directories are structured). The [...] generates sub-directories.
A custom script is required when extracting data from tape from another micro-CT system or to extract the data to a central location (e.g., a user's directory).
- The script is then submitted to the backup queue of the workstation the tape drive is connected to (i.e., SCEVA3_BACKUP)
- Some example scripts are provided below.
- Extract image data for three scans to a custom folder, maintaining the sample and measurement directory structure:
$ mount/foreign tp0 $ backup/log tp0:00001234_IMA.sav/select=[microct.data...] disk3:[microct.projects.buie...] $ backup/log tp0:00001245_IMA.sav/select=[microct.data...] disk3:[microct.projects.buie...] $ backup/log tp0:00001238_IMA.sav/select=[microct.data...] disk3:[microct.projects.buie...] $ dismount tp0
- Extract segmented AIM files for three scans to a custom folder without the original directory structure:
$ mount/foreign tp0 $ backup/log tp0:00001234_IMA.sav/select=[microct.data...]*seg.aim disk3:[microct.projects.buie] $ backup/log tp0:00001245_IMA.sav/select=[microct.data...]*seg.aim disk3:[microct.projects.buie] $ backup/log tp0:00001238_IMA.sav/select=[microct.data...]*seg.aim disk3:[microct.projects.buie] $ dismount tp0
- Extract segmented AIM files for all scans on tape to a custom folder:
$ mount/foreign tp0 $ backup/log tp0:*_IMA.sav/select=[microct.data...]*seg.aim disk3:[microct.projects.buie] $ dismount tp0
- Extract raw data for three scans to a custom folder, without the original directory structure:
$ mount/foreign tp0 $ backup/log tp0:00001234_IMA.sav/select=[microct.data...] disk3:[microct.projects.buie] $ backup/log tp0:00001245_IMA.sav/select=[microct.data...] disk3:[microct.projects.buie] $ backup/log tp0:00001238_IMA.sav/select=[microct.data...] disk3:[microct.projects.buie] $ dismount tp0
Return to Contents or Return to Main Page
Install Tape Drive
[edit]In order replace a faulty tape drive first shut down the workstation. Then exchange the tape drives and reboot the workstation (make sure the cable connecting the tape drive to the workstation is properly connected at both ends).
Once logged in using the regular account, enter the following commands to activate the new tape drive:
$ set ho 0
username: system, password: xxx
$ set def sys$startup $ mcr sysman io list_wwid
This then should list some info about the new tape drive; at the end should be listed its unique WWID
$ mcr sysman io replace_wwid $2$mga0 /WWID=...
Enter the WWID that was displayed after entering the previous command, providing the entire string. Something like this 02000008:5140-2EC0-1208-5F00
$ mcr sysman io auto/log $ @sys$startup:scanco_setup_devices $ logout
The new tape drive should then be operable.
Return to Contents or Return to Main Page
Mounting a Tape Using the SDLT 600
[edit]To mount a tape, specific to the SDLT 600 drive (the old one), you must use a variation of the uct_backup software on the workstation that sets the correct TP0 symbol. Insert the tape into the drive and then log into the SC3505 workstation (aka Toby) as user microct2. After this step, open a new terminal and enter the following:
$ uct_backup_sdlt
This will then start the archiving software and also assign the old tape drive to be the primary archiving device. If you don't want to use uct_backup you can mount the drive from the command line:
$ mount/foreign tp1
This should then mount whatever tape you have inserted in the SDLT 600 drive and you can extract the data. Don't forget to unmount when you're done (instructions for mounting, unmounting and extracting data are elsewhere).
This was successfully done in December 2025. Make sure to watch out for bad tapes, as these cannot be mounted.
Return to Contents or Return to Main Page
Tape FAQ
[edit]Error: Can't mount tape, Medium offline
[edit]This can happen if a tape is interrupted during use (e.g., due to a power failure or system restart while the tape drive is in operation).
- Use the manual eject button to remove the tape from the drive.
- Turn off the tape drive, the switch is on the back of the drive.
- Shutdown the whole micro-CT system.
- Turn on the tape drive.
- Startup the micro-CT system, starting with the server.
- Try to mount the same tape again.
If the above does not work then either the tape or the tape drive is damaged. To determine if it is the drive, take a brand new tape and try to initialize it. Do not use a tape with data on it in the drive unless you are certain the drive is okay.
Return to Contents or Return to Main Page
Error: positioning
[edit]This can have two reasons usually:
- The tape is just faulty. Try with a fresh tape.
- A previous tape write operation was interrupted (e.g., a user did an 'End Session', the power went out, or the eject button was pressed on the tape drive, which killed the backup program). In this case the drive did not write the very important 'End of Tape' marker, and now, the tape drive cannot find the current place where it can start adding new data.
- Solution: either take a fresh tape, or if there were only a few scans are on the 'bad' tape, 'Move to Hard Disk' of ALL the scans on that tape, check that the scans have been retrieved well, then initialize that tape again (which will erase everything on the tape!) and archive those scans again.
- IMPORTANT: never interrupt the tape drive while it is running!
Return to Contents or Return to Main Page
Error: parity
[edit]Either tape or the tape drive is faulty. Take a fresh tape (potentially from a new batch of tapes), and see if the error persists.
- If yes: have the tape drive repaired.
- Further things to check: for DLT and SDLT tape drives: is the terminator ('dead end') connected on the second SCSI port in the back of the tape drive.
Return to Contents or Return to Main Page
Fix: non-responsive tape drive
[edit]This can occur if the user ejects the tape with the little button (and not with the recommended "dismount" button in the uct_backup program). This can also occur if a tape is mounted immediately after one is dismounted. You get the same error for both cases, "medium offline".
- Check all that all cables are connected.
- Check that the number on the back of the drive says "5" (use +/- to adjust if necessary)
- Check that the top connector has a cable connecting to the computer and the bottom one has a terminator.
- Try turning the tape drive on and off again.
- Log in as user
system(you will need a password from Steve):
- Log in as user
$ mcr sysman io auto/sele=mk $ @sys$startup:scanco_setup_devices.com $ show device tp0
If it's online again, then great. If not, then the last resort is to reboot the entire system. If this doesn't work, then shut down the system (see user manual for proper steps) and eject the tape. You may need to turn the computer back on before it will eject. The tape drive should be turned on first (no tape), then the server, and any other computers. Check that the drive is online ($ show device mk). If it is, then test the drive by initializing, mounting and dismounting a brand new tape. If the drive is not online, do not insert any tapes or they will likely get stuck. Log in as system and re-try the command lines shown above.
NOTE: See "Fix a stubborn tape drive" elsewhere in this wiki.
Return to Contents or Return to Main Page
Fix: stubborn tape drive
[edit]If the drive cannot be mounted, or it is not visible with
$ show device tp0
then something went wrong. For example, the server computer was booted while the tape was turned off. It then does not load the driver.
You can 'force load' it - but this will disconnect the scanner for a moment, so only do it while no scan is running:
as user system, on sc3309:
$ mcr sysman io auto $ show dev tp0
and you should see it now (otherwise turn on the tape drive, and do again)
Then you'll also have to make it available to all users:
$ @sys$startup:scanco_setup_devices.com
NOTE: See "Fix a non-responsive tape drive" elsewhere in this wiki.
Return to Contents or Return to Main Page
SDLT320 Tape and Tape Drive FAQ
[edit]Please refer to SDLT320 Tape and Tape Drive FAQ for details.
Return to Contents or Return to Main Page
USB Drive
[edit]Use a USB drive
[edit]Connect USB to VMS system and format. Transfer files from the terminal after plugging in the USB device.
$ show device dna
Usually the device is dna1 or dna2
$ mount /over=id dna2 $ create/dir dna2:[microct] $ backup/log disk1:[microct]login.com dna2:[microct] $ dismount dna2
Transfer files back again
$ mount /over=id dna2 $ dir dna2:[microct] $ copy dna2:[microct]login.com disk1:[microct]
I'm not sure the difference between using copy and backup.
You can initialize a USB drive using uct_backup. Or you can do it from the command line:
$ set host 0 ! login as system $ init dna7: raw001/own=microct ! deletes anything on the drive $ mount dna7: raw001 $ create/dir dna7:[microct]/own=microct
Or in case the directory already exists:
$ set file dna7:[000000]microct.dir/own=microct $ dismount dna7:
For manual backup of files, you need to mount the filesystem (without the /foreign):
$ mount dna7: raw001 $ backup login.com dna7:[microct]/log $ dismount dna7:
Return to Contents or Return to Main Page
Trouble shooting a USB drive
[edit]Sometimes we have problems with USB devices. Check the status of the device to find if it has been allocated already and that there are no current jobs running that may have hung.
The device may look like this:
$ sh dev dna Device Device Error Volume Free Trans Mnt Name Status Count Label Space Count Cnt SC3418$DNA7: Online alloc 0
The Online alloc instead of Online suggests the device is already allocated. So we get a more full output:
$ sh dev dna/full
Disk SC3418$DNA7:, device type ST1500LM 003-9YH148 CC9F, is online, allocated,
file-oriented device, shareable, available to cluster, error logging is
enabled, device is busy.
Error count 0 Operations completed 1424772
Owner process "BATCH_357" Owner UIC [SYSTEM]
Owner process ID 0000A94A Dev Prot S:RWPL,O:RWPL,G:R,W:RW
Reference count 3 Default buffer size 512
Total size 1.36TB Sectors per track 1
Total cylinders 31536 Tracks per cylinder 1
This suggests that the owner is process BATCH_357. The 357 refers to the job that ran on the queue.
$ sh que/all
Printer queue HPLJET, idle, on SC3418::"IP_LPD/hpljet",
mounted form DCPS$DEFAULT (stock=DEFAULT)
Batch queue SYS$ADMIN, idle, on SC3418::
Entry Jobname Username Status
----- ------- -------- ------
752 RELAY_PUMP_10_MIN_ON
MICROCT Holding until 31-JAN-2025 02:00:00
Batch queue SYS$BACKUP, idle, on SC3418::
Batch queue SYS$BATCH, idle, on SC3418::
Batch queue SYS$FAST, idle, on SC3418::
Batch queue SYS$FE, idle, on SC3418::
Batch queue SYS$SLOW, idle, on SC3418::
But there are no jobs running. So let's try manually dismounting the device, but do so as user system:
$ dism/abort dna7: %SYSTEM-F-DEVNOTMOUNT, device is not mounted
Well, that didn't work, so let's see if there is a list of running processes, again as user system:
$ show user/full
OpenVMS User Processes at 30-JAN-2025 15:20:04.96
Total number of users = 2, number of processes = 3
Username Process Name PID Terminal
MICROCT BATCH_357 0000A94A (Batch)
MICROCT MICROCT 0000D2A3 FTA154:
SYSTEM SYSTEM 0000D2A4 RTA1: (SC3418::MICROCT)
Stop the process associated with running the USB device:
$ stop/id=0000A94A
$ sh user /full
OpenVMS User Processes at 30-JAN-2025 18:28:23.65
Total number of users = 2, number of processes = 3
Username Process Name PID Terminal
MICROCT BATCH_357 0000A94A (Batch)
MICROCT MICROCT 0000D2A6 FTA155:
SYSTEM SYSTEM 0000D2A7 RTA1: (SC3418::MICROCT)
Ok, did that still not work? Try unplugging the USB drive and waiting 30 seconds before plugging it back in. Perhaps that will force the job to end.
$ sh dev dna Device Device Error Volume Free Trans Mnt Name Status Count Label Space Count Cnt SC3418$DNA7: Online 0
That seems to have worked!
Return to Contents or Return to Main Page
USB Device Usage with Scanco Backup/Archive Software
[edit]For illustrated help on USB device usage on Itanium systems, please refer to Scanco_TD387_USB_Device_Usage.pdf
Initialize procedure
[edit]If an external USB device is to be used to archive measurement data, the USB device must be initialized by Open- VMS. The data will not be accessible from any other operating system.
- Attach the USB device to the front USB port of the Itanium rx2660. (note: Itanium rx2620 only supports USB1.1, which will have a very slow transfer rate)
- Open the Scanco backup/archive software.
- Select the correct USB device with the arrow buttons in the “USB Device” section.
- Use the “Initialize<” button in the “USB Device” section to initialize the USB device.
- Confirm the Warning message. Note: All data currently on the device will be erased!
- Enter a six-character label
The USB device will be initialized and mounted.
Return to Contents or Return to Main Page
Archive procedure
[edit]- Attach an OpenVMS formatted USB device to the front USB port of the Itanium. (note: Itanium rx2620 only supports USB1, which will have a very slow transfer rate)
- Open the Scanco backup/archive software.
- Select the correct USB device with the arrow buttons in the “USB Device” section.
- Use the “Mount” button in the “USB Device” section to mount the USB device.
The device label of the mounted USB device will be shown in the “USB Device” section.
- Select the measurement data to be archived.
- Select “Move To:” and “USB/VMS” and click “Start<” to archive the selected data to the USB device.
After the move procedure, the new current location of the measurement data will be shown next to the files path.
- “Dismount” the USB device when done with archiving.
Return to Contents or Return to Main Page
Manual file copy procedure
[edit]An OpenVMS formatted USB device can also be mounted and used for file storage using commands in a DECterm.
- Attach an OpenVMS formatted USB device to the front USB port of the Itanium. (note: Itanium rx2620 only supports USB1, which will have a very slow transfer rate)
- List available devices. The last shown device is usually the attached USB device; dna12 in this example.
$ show device dna
- Mount the USB device using the correct device name
$ mount /over=id dna12
- Create a root directory. Ignore any messages if the directory already exists.
$ create /dir dna12:[microct]
- Copy any wished files to the USB device
$ copy {source files} dna12:[microct] /log
- Dismount the USB device
$ dismount dna12
Return to Contents or Return to Main Page
Exporting Files / FAT file system
[edit]If an external USB device is to be used to export measurement data to a Windows or MAC OS, the USB device must be formatted as FAT file system.
- Attach the USB device to the front USB port of the Itanium. (note: Itanium rx2620 only supports USB1, which will have a very slow transfer rate)
- Open the Scanco backup/archive software.
- Do not “Initialize<” or “Mount” the USB device !
- Select the measurement data to be copied to the USB device, may be even sub-select the wished file type (TIF files in the example below).
- Select “Copy To:” and “USB/FAT” and click “Start<” to copy the selected data to the USB device.
Once the USB device is connected to Windows or MAC OS, it will show a ZIP file named like the copied measurement number. This ZIP file contains the same directory structure like the data disk on OpenVMS:
data\sample number\measurement number
In the lowest sub-directory are the copied files, as selected in the backup/archive software (TIF files in this example).
Return to Contents or Return to Main Page
Problems with connected USB devices
[edit]Sometimes USB configurations can be problematic, in which case log in as "system" on the server and run
$ dir/date SYS$SYSROOT:[SYSEXE]USB$UCM_DEVICES.DAT
to see whether a file was created recently. If one has, delete that file and reboot the server.
Return to Contents or Return to Main Page
CDROM
[edit]Mount a CDROM
[edit]Device could be dqa0 or dqb0. I'm not sure which works:
$ mount/foreign dqa0:
OR
$ mount/override=id dqa0:
Then
$ dismount dqa0:
Return to Contents or Return to Main Page
Saveset and Zip files
[edit]Installation
[edit]The standard ZIP and UNZIP tools on the VMS system cannot manage large file sizes. Therefore it is required to install a version that Mark Blanchard (February 2024) has compiled that specifically manages these large sizes.
Extract from ZIP30L.ZIP and UNZIP60L.ZIP the EXE files ZIP.EXE and UNZIP.EXE. Then as user "system" copy these into DISK0:[SYS0.SYSCOMMON.SYSEXE]. You need to ensure the permissions are set properly too:
$ set def disk0:[sys0.syscommon.sysexe] $ set prot=(s:rwed,o:rwed,g:re,w:re) telnet_client.exe
Previous versions of ZIP.EXE and UNZIP.EXE are stored in the same directory in case it is necessary to revert to an older version.
Saveset
[edit]Saveset Naming Convention
[edit]The Scanco backup program stores raw (RAW) and image (IMA) data as save sets (SAV).
- RAW save sets contain RSQ files and IMA savesets contain all other file types.
- The saveset filename is composed of the 8-digit measurement number plus "_RAW.SAV" for raw data and "_IMA.SAV" for image data.
- For example, the data for a scan with measurement number 1234 would be stored as:
00001234_RAW.SAV ? RSQ 00001234_IMA.SAV ? all other files, ISQ, AIM, GOBJ, TXT, SCV, etc.
Return to Contents or Return to Main Page
Create and Unpack Saveset
[edit]Savesets are OpenVMS backup files, similar to a zip. Use the backup command.
$ BACKUP/LOG disk3:[microct.projects.buie...] disk3:[microct.projects]buie2012.sav/sav
!Creates a saveset file of disk3:[microct.projects.buie].
!The ... after the folder indicates to include all subfolders and files.
$ BACKUP/LOG mysaveset.sav/sav disk3:[microct.projects.buie]
!Unpacks the whole saveset to disk3:[microct.projects.buie]
$ BACKUP/LOG mysaveset.sav/sav disk3:[microct.projects.buie...]
!The ... at the end of the output location indicates to unpack the saveset and maintain the original directory structure.
$ BACKUP/LOG mysaveset.sav/sav/select=*.aim disk3:[microct.projects.buie]
!The select flag is used to indicate extraction of only aim file types.
$ BACKUP/LOG mysaveset.sav/sav/select=[microct.data...] disk3:[microct.projects.buie]
!The select flag is used to indicate extraction of the folder data and all subfolders and files.
$ HELP BACKUP !More information on the backup command.
You may want to exclude some files:
$ set default DK0:[MICROCT.DATA] $ BACK/LOG [.00000031.00000600]/EXCL=(*_TRNSFR.COM,*.SAV,*.ZIP,ZI*,*.RSQ) DK0:[MICROCT.DATA.00000031.00000600]3418_00000031_00000600_IMA.SAV/SAV
Return to Contents or Return to Main Page
View Saveset Contents
[edit]To view contents of a saveset (SAV) on disk:
$ backup/list upat_print_list_nomatch.sav/sav
To view the savesets (SAV) on a tape:
$ mount/ov=id tp0: $ dir/date tp0:*.* $ dismount tp0:
To view contents of a saveset (SAV) on a tape:
$ mount/foreign tp0: $ backup/list tp0:*.* ! OR, backup/list tp0:*.SAV or $ backup/list=results.txt tp0:*.* ! save output in results.txt $ dismount tp0:
An idea to get the results of the backup/list into a text file: Run the procedure in a submitted script and save the resulting log file with all the output.
Return to Contents or Return to Main Page
Extract a single file from SaveSet
[edit]In a large SaveSet, sometimes we only want one file extracted, not the whole archive extracted. This can be done with
$ backup /log /select=myfile.txt mysaveset.sav /sav disk1:[microct.scratch]
or [] as destination will put the file in the current directory.
This can take a while as it looks through all the saveset. Once it logs that the file has been restored, you may interrupt with F6. Else it goes on looking through the rest of the saveset.
Return to Contents or Return to Main Page
Transfer Saveset from microCT to XtremeCT
[edit]You can create a SAV set of your project on the VivaCT and transfer it to the Xtreme system, or vice-versa. First, create the SAV set using the command:
For example:
$ BACKUP/LOG DISK3:[MICROCT.PROJECTS.SB.MYPROJECT...]*.*;* -
SYS$SCRATCH:MYPROJECT.SAV/SAV
This creates the MYPROJECT.SAV file in the scratch directory. Now zip the file:
$ cd sys$scratch $ zip "-V" MYPROJECT.ZIP MYPROJECT.SAV (NOTE: must use quotes and a capital V!!!!)
FTP the .ZIP file to SODOR ( in binary mode!!!), and then FTP it off onto your destination system (Viva or Xtreme). See the appropriate HowTo for FTP instructions. Once you've FTP'd it, unzip the file:
$ unzip MYPROJECT.ZIP
Finally, unpack the contents of the .SAV file:
$ BACKUP/LOG MYPROJECT.SAV/SAV DISK3:[MICROCT.PROJECTS.MYPROJECT] <--- or whatever destination directory
NOTE: transferring a .SAV directly from VMS to VMS should work, but not via any third operating system (like SODOR) - so zipping is always the safe way to make sure it works.
Return to Contents or Return to Main Page
Zip
[edit]Zip and Unzip files
[edit]Use the zip program to add files to a zip archive. Make sure you are using version 3 if you want to Zip files greater than 2GB (contact Scanco to install v3 if necessary).
$ ZIP myzip.zip myfile.txt;1 !Adds myfile.txt to myzip.zip. $ ZIP "-V" myzip.zip myfile.txt;1 !Adds myfile.txt;1 to myzip.zip. The "-V" maintains the OpenVMS version number. $ ZIP "-V" myzip.zip [.subdir...]*.*;* !Adds all files within subdir to myzip.zip, maintaining their version number. $ ZIP !Displays the help for the zip command.
Use the unzip program to unzip an archive.
$ UNZIP "-V" myzip.zip !Extracts myzip.zip, maintaining the OpenVMS structure. $ UNZIP !Displays the help for the unzip command.
Return to Contents or Return to Main Page
Transfer Zip between Scanco systems
[edit]Files must be zipped before transfer by e-mail or ftp because important attributes will be lost in the transfer otherwise.
To transfer files from system A to B, do the following.
On system A:
$ zip "-V" for_calgary.zip uctd:UCT_SAMPLES_TORONTOXT.DAT ! for each filename $ zip "-V" for_calgary.zip uctd:UCT_MEASUREMENTS_TORONTOXT.DAT
This will add both files to the same zip file.
Note: "-V" is very important, it must be capital V!
Transfer the file by e-mail, or by ftp.
On system B:
$ unzip -j for_calgary.zip ! to unzip on your end them (-j to 'junk' the original file path)
Return to Contents or Return to Main Page
Unpack Zip sent by Scanco
[edit]In the .zip file, you'll find a .sav file. Unzip the .zip just by saying
$ unzip xxxx.zip
Then:
$ backup/log xxxx.sav/sav disk3:[steve.devel.temp]
and it will unpack everything into disk3:[steve.devel.temp]
Or:
$ backup/list xxxx.sav/sav
and you see what's in the .sav.
Then:
$ backup/log xxx.sav/sav/sel=[andres.uct.ipl_for_cust...] disk3:[steve.devel.cipl...]
and it will create the same directory tree in steve.devel.cipl as it was when I
packed it into the .sav.
Return to Contents or Return to Main Page
Tips for making and unpacking SAVSETS
[edit]Separate all "input" files with comma, and no space in between (space separated parameters) :
$ backup/log D0014097.RAD,D0014097.SCV myfiles.sav/sav
You may want to consider to only take the newest/highest file version:
$ backup/log D0014097.RAD;,D0014097.SCV; myfiles.sav/sav
When unpacking a SAVSET, if you want the directory structure to be maintained, do something like this:
$ BACKUP/LOG ACKNEE_HUMAN_2020-02-18.SAV/SAV/SELECT=([BONELAB.PROJECTS.ACKNEE...]*.*) DISK4:[BONELAB.PROJECTS.ACKNEE...]
Extracting an archived SAVESET back onto the VMS system in location different from where it was originally located, for example putting it on DISK7:[XTREMECT2.EXTERNAL] instead of DISK4:[BONELAB.PROJECTS], do the following:
$ SET FILE/ATTR=(RFM=FIX,LRL=32256) UBC_HUMAN_2024-03-25.SAV $ BACKUP/LOG UBC_HUMAN_2024-03-25.SAV/SAV/SELECT=([BONELAB.PROJECTS.UBC...]*.*) DISK7:[XTREMECT2.EXTERNAL.UBC...]
Return to Contents or Return to Main Page
Backup and Archive
[edit]UI Procedures
[edit]µCT Disk-Utility
[edit]The µCT Disk-Utility Program is used to archive and restore scan data. To start the program type $ uct_backup in a DEC terminal, or use the disk button.
- The backup captures both the programs and databases.
- A little helper terminal comes up and gives feedback of every file backed up.
Two possible ways to use UCT_BACKUP:
- COPY TO -> this does not update the database.
- MOVE TO -> this updates the database.
Scenario 1:
1. Use UCT_BACKUP to 'move' the RSQ to 'tape' 2. Use UCT_BACKUP to 'move' the ISQ to 'garbage' 3. Use UCT_BACKUP to 'move' the remainder (AIM/GOBJ) to 'tape'
- At operation 3, the measurement directory will be deleted from the measurement disk.
- The directory will automatically be restored if you restore your data from tape.
Scenario 2:
1. Use UCT_BACKUP to 'move' the RSQ to 'tape' 2. Use UCT_BACKUP to 'move' the ISQ to 'garbage' 3. Move all the GOBJ/AIM/etc to a project directory. 4. Generate a .SAV file and put on the IMA tape.
- You will have to delete the measurement directories (using UCT_BACKUP if you like).
- The disadvantage of this scenario is that the image data cannot be restored using UCT_BACKUP.
Return to Contents or Return to Main Page
Raw Data Backup
[edit]- Ideally 1-2 week after scanning.
- RSQ files are backed up onto RAW tapes (see Tape Label Convention). Put the most recent RAW tape into the tape drive, then press "Mount".
- Show "Current (with RAW)", use the file filter (Measurement: ) to search for your files (e.g., CAMOS) and press enter or press "Update List".
- Select all the files to backup by highlighting them using the left mouse button and ctrl to select individual files or shift to select a range.
- Highlight RAW, choose "Move To" and "Tape". Press "Start...".
- When the backup is complete press "Dismount" to eject the tape.
- If the tape auto-ejected without pressing "Dismount" then the tape is full (see Full Tape).
- If you select multiple files, be sure they all need to be backed up, otherwise you will get an error.
Return to Contents or Return to Main Page
Image Data Backup
[edit]- Ideally 1-2 months after scanning, after contouring, onsite analysis and copied image data to project disk.
- Delete ISQ After Evaluation
- ISQ files are normally deleted after completing your evaluation since they are very large files and can be reconstructed from the RSQ file.
- Show "Current (on Disk)", type the beginning of your sample name (e.g., CAMOS) in the file filter and press enter or press "Update List".
- Select all the files for which you have completed the evaluation (there will be a + sign next to any scan that has been evaluated). #*Highlight IMA, choose "Move To" and "Trash".
After you choose the trash symbol, you will now be given the option to select specific file types, choose "Select" and "ISQ". Press "Start...".
- Only choose one file type to delete at a time. The wildcard (*) indicate all files other than "ISQ" and "AIM" files.
- Once you have deleted all of the different file types the directory itself needs to be deleted, which can be done by deleting "all file types"
- Backup IMAGE Data
- AIM, GOBJ and other evaluation files are backed up onto IMA tapes (see Tape Label Convention).
- Put the most recent IMA tape into the tape drive, then press "Mount".
- Show "Current (on Disk)", type in the beginning of your sample names (e.g., CAMOS) in the file filter and press enter or press "Update List".
- Select all the files to backup by highlighting them using the left mouse button and ctrl to select individual files or shift to select a range.
- Highlight IMA, choose "Move To" and "Tape". Press "Start...".
- When the backup is complete press "Dismount" to eject the tape.
- If the tape auto-ejected without pressing "Dismount" then the tape is full (see Full Tape).
Return to Contents or Return to Main Page
Use 'Script...' button
[edit]Usually, you will start the move/copy by clicking on 'Start...' button. The 'Script...' button is for advanced users.
- Use of the 'Script...' button will generate a script
sys$scratch:archive.com, that you may submit it in batch mode later (e.g. over night) by typing:$ scanco_submit_command sys$scratch:archive.com/after=23:59
- In a multi-computer cluster setup, you may want to specify the exact queue name of the computer that has the tape hooked up by giving e.g.
/que=sceval_fast. - Insert a tape, but do NOT mount the tape in the normal program. If necessary: if it's a new tape, initialize it as usual.
- The batch job will be started one minute before midnight in the example above.
$ show entrywill show you that it is holding until then. - See
$ help submit /afterand$ help dcl_tips date_time examplefor more help on this. - Sample script file (archive.com) restoring the RSQs of measurements 6452 and 6580:
$ MOUNT/FOREIGN TP0: $ UCT_BACKUP_BATCH ALL RAW COPY DISK ! Meas: SB_BUIE_EX_CTRL_PH_01 (6452) MEAS 6452 EXECUTE ! Meas: SB_BUIE_EX_CTRL_PH_01 (6580) MEAS 6580 EXECUTE EXIT $ DISMOUNT TP0: $ EXIT
Return to Contents or Return to Main Page
Database Backup
[edit]The database (DB) backup should be performed for each user on the system. It should not be performed as user 'calibration' or some derivative. In the case of the XtremeCT2 and XtremeCT cluster, both the 'microct' and 'xtremect2' user accounts must be used to backup their respective DB.
By performing the DB backup, the warning dialog that appears when logging into the system should go away.
Return to Contents or Return to Main Page
Operating System (OS) Backup
[edit]If the following error-message appears on the screen then you can click OK to continue your work.
MESSAGE: No recent OS Backup found!
Please perform OS backup (DISK0) in privileged account!
%RMS-W-FNF file not found.
CODE: 268534416
Facility RTL
This message means that no operating system (OS) backup has been performed within the last 6 months. Please perform an OS backup as soon as possible by following the steps below:
1. Make sure there are no scans in progress and that the que is halted from all activity.
2. Log in to the calibration account: Since we have two scanners on the same system, login as either "calib3401" or "calib3309", depending if you need to backup the XtremeCT2 or XtremeCT, respectively. For microCT clusters, (best to do this on SCEVA3) using the username calib5019 and the password (ask Steve for this).
3. Type in the DECterm window:
$ set proc/priv=bypass
Or Set priviledge to bypass by $ spb
$ r um:uct_b Or $ uct_backup
4. You will now see 2 additional buttons on the bottom left that is not seen when logged in as microct user. Push either the button "OS Backup to Disk DK0" or mount the specific OS backup tape and push the "OS Backup to Tape" button.
- A system backup to tape and to DK0 should both be performed.
5. Check the command line & queue to ensure that the backup is being carried out. If you submit the job as 'batch mode' the backup is submitted to SYS$BACKUP queue and allows you to close the backup program and 'end session' without interrupting a running backup. Check with 'show queue' to see the backup job on the queue.
6. Exit the Backup Program and log out of the calibration account.
After a successful OS backup the message above will not appear for the next six months.
Alternatively a system backup can be completed using the command line, without using the uct_backup program. The instructions from Scanco can be found here. The advantage to this method is that you will be able to name the specific backup save set.
Return to Contents or Return to Main Page
Using Scripts for Backup/Archive
[edit]Project Backup/Archive
[edit]- Refer to Project Backup SOP or its Word format for reference.
Backup Project
[edit]Regularly backup projects on a monthly basis using command $ @com:BACKUP_PROJECT.COM
- The script is submitted to the queue and upon completion the log is emailed to the user.
- a SAVset (an OpenVMS file type similar to a zip file), a project info file and a file list are created in DISK5:[BONELAB.PROJECTS.BACKUP] for the microCTs and DISK4:[BONELAB.PROJECTS.ARCHIVE.ARCHIVE] for the XtremeCTs.
- The saveset along with two TXT files created will be automatically SFTP to Winston:\\Backups\backup\
- After the transfer, the saveset file on disk are deleted, leaving only two TXT files on the project disk.
- Only keep the two most recent backups for each project, A or B version name appended on the project name:
- Backup version "_A" for odd months (Jan, Mar, May, Jul, Sep, Nov), e.g. YZHU_A_OTHER_2017-01-12.SAV
- Backup version "_B" for even months (Feb, Apr, Jun, Aug, Oct, Dec), e.g. YZHU_B_OTHER_2020-04-08.SAV
- The user MUST verify that the backup completed successfully.
- SAVsets greater than 250 GB cannot be transferred by automatic SFTP, use interactive/manual SFTP instead to transfer to Winston.
- If you are backing up a very large project, please check the server disk space before starting the backup.
$ @com:BACKUP_PROJECT.COM =========================================================== BACKUP PROJECT TOOL V1.2 (XtremeCT) P1:LOCATION DISK4:[BONELAB.PROJECTS.DUNCAN] P2:TYPE 1=MOUSE,2=RAT,3=HUMAN,4=OTHER P3:PROJECT CAMOS P4:PERSON Ying Zhu P5:DESCRIPTION A monthly backup P6:EMAIL me@ucalgary.ca P7:SFTP y,n P8:START y,n
Return to Contents or Return to Main Page
Restore Project
[edit]In the commands directory (com) is a BACKUP_RESTORE.COM script which will automatically generate a script to restore a user's project.
- The saveset file has to be moved to Winston:\\Backups\archive folder to be restored.
- The user will be asked if they wish to restore to the original location, or to a new location.
- The script is submitted to the queue and the log from the restore job is emailed to the user.
- The user MUST verify that the job completed successfully.
$ @COM:BACKUP_RESTORE.COM
Delete Project
[edit]In the commands directory (com) is a BACKUP_DELETE.COM script which will automatically generate a script to delete all the files and subdirectories of a specified path.
- The command script is opened so that the user can check the files to be removed to go ahead.
- You will need to manually delete the root project directory after it's empty.
$ @COM:BACKUP_DELETE.COM
Known Bugs in Project Tools
[edit]- Long file name won't work (28 letters work but not 32 letters).
- if the user specifies too long a file name, the Project Backup Scripts will fail with the following error:
RMS-E-CRE, ACP file create failed
SYSTEM-W-BADFILENAME, bad file name syntax
Return to Contents or Return to Main Page
Moving data disk directories
[edit]Sometimes when the data disk (DISK2) is getting too full measurement directories can be moved to a temporary location. We can move from DISK2 to another location:
BACKUP DISK2:[XTREMECT2.DATA.00002784...] DISK7:[XTREMECT2.DRF_STORE.00002784...]/LOG/VERIFY
and back again:
BACKUP DISK7:[XTREMECT2.DRF_STORE.00002784...] DISK2:[XTREMECT2.DATA.00002784...]/LOG/VERIFY
Check out the options for the BACKUP command for more options. One that might be useful is the /DELETE option, which deletes the files after verifying the move.
Sometimes the uct_backup tool loses information about where the data is stored after it's been moved back to DISK2. In this case you can reset the location as follows:
- Start
uct_backup - Navigate to the scan in question and you'll see the IMA section is blank
- While holding the
SHIFTkey click on the radio button for IMA - In the blank text box, type "DK0" and the rest of the path should automatically fill out
- Save the new path location information
- Start
Now you can run UCT_EVALUATION as you normally would. Do not use DEF UCT_DEFAULT_ISQ DISK2:[XTREMECT2.DATA.00002784.00012345]D0013456.ISQ because the evaluation will not complete properly because information about sample/measurement will not be available.
Return to Contents or Return to Main Page
Archive Project Saveset to Tape
[edit]Projects should be stored safely onto a backup tape once complete. Prior to archiving a project please create a directory in DISK4:[BONELAB.PROJECTS.COM] of the project name. Please copy over the com.dir so we can keep all of the scripts on the openVMS system
Summary
The following steps summarize the process:
- Archive the project directory to the tape (detailed instructions below).
- Change tape to "read only" to protect contents
- Check tape saveset to ensure proper backup
- Write name of tape on the project LOG sheet
- Copy project LOG sheet and bring to Bone Imaging Laboratory "completed" project book
- Bring copy of tape to the Bone Imaging Laboratory for safe keeping
- Delete the contents of the project from the disk
In the project, there should be the regular set of directories including DOC, COM, MODELS, LOG. Once the project is stored to tape, ensure that the log sheet for that project include a note stating which tape it was backed up to. Take a photocopy of the log sheet and add it to our Bone Imaging Laboratory project book for COMPLETED projects.
In the following example, a project titled BERN is backed up onto tape. Ideally, the name of the SAV file on tape is the same as the project (i.e., BERN). Note that SAV files must have names with no more than 13 characters (including the .SAV)!
The following example backs the BERN project/directory onto tape IMA001. For large projects and/or critical projects, it is advisable to dedicate an entire tape. The three dots (...) indicate that ALL subfolders of DK0:[MICROCT.PROJECTS.BERN] will be included.
$ mount/foreign tp0:
$ backup/log dk0:[microct.projects.bern...]*.*;* tp0:proj_bern.sav - ! writes a saveset to tape
/block=65534 /label=IMA001 -
/media_format=nocompaction ! NEVER use the /rewind option here
$ backup/log tp0:*.sav/select=*.isq DISK4:[BONELAB.PROJECTS.TBONE.ISQ_FROM_TAPE...]/by=parent ! extracts all ISQ files from the tape
$ dismount tp0:
$ dismount tp0: /nounload ! same as previous command, but does not eject the tape (i.e. if you want to read the tape once more)
Note that the /rewind option should never be used for backup as it instructs the tape drive to rewind after backup is complete causing a major risk of over writing.
Sometimes it might be handy to exclude certain files. For example, to exclude RSQ files: /excl=*.rsq
A good reference for backup commands and ideas are available in the UM:UCT_MOVE_FILES.COM script which is used by the UCT_BACKUP program. See also the help backup instructions:
$ help backup
To view the contents of a tape to ensure you've successfully stored your project use the following commands (further details in "HowTo: View save set (SAV) contents"):
To just view if the saveset is on tape (but not its contents):
$ mount/ov=id tp0: $ dir/date tp0:*.* $ dismount tp0:
Note: you can also save the saveset list in a text file using the /output qualifier.
To view the files within a saveset on tape, and save the results in a file called results.txt This .txt file can be found in IDISK1[XTREMECT2]:
$ mount/foreign tp0: $ backup/list=results.txt tp0:*.* $ dismount tp0:
To delete a set of directories, use the dl command.
$ cd ur BERN $ del *.*;* ! Deletes ALL files in a directory $ dl *.dir;* ! Will only delete empty directories (not nested directories)
Return to Contents or Return to Main Page
Extract Project Saveset from Tape
[edit]To restore a project, you have two choices:
- 1. Login as user
calibrationand then go to the projects directory. From there:
$ spb (bypass priv) $ backup/log tp0:proj_davison.sav/rewind [*...]
This puts all the files back in their original directory structure.
- 2. As user
microct
$ mount/foreign tp0:
$ backup/log tp0:proj_davison.sav/rewind/select=[microct.projects.davison...]
disk2:[microct.projects.davison...]
OR
$ backup/log tp0:*.*/rewind disk3:[microct.projects.vitamink.models]
Make sure to write the same path in the /select as the output (except for the actual disk2 portion). Alternatively, you could unpack it into a slightly different root directory (i.e., TMP) by changing the output path.
The three dots infers to use the same paths in the saveset as the file structure put onto disk.
Return to Contents or Return to Main Page
Scripts to Backup RAW and IMA
[edit]A script can be output from the backup tool to backup and restore data using the backup program.
- When restoring data using this method, choose the COPY to DISK option. The data will be restored to its original location on the data disk.
- You must manually submit the script to the backup queue.
- The command procedures are written to SYS$SCRATCH:ARCHIVE.COM.
- Here is the sample script for backing up RAW data:
$ MOUNT/FOREIGN TP0: $ UCT_BACKUP_BATCH ALL RAW MOVE TAPE ! Meas: ATHLETE_126 (10565) MEAS 10565 EXECUTE ! Meas: ATHLETE_126 (10566) MEAS 10566 EXECUTE ! Meas: ATHLETE_126 (10567) MEAS 10567 EXECUTE EXIT $ DISMOUNT TP0: $ EXIT
- Here is the sample script for backing up IMA data:
$ MOUNT/FOREIGN TP0: $ UCT_BACKUP_BATCH ALL IMA MOVE TAPE ! Meas: ATHLETE_126 (10565) MEAS 10565 EXECUTE ! Meas: ATHLETE_126 (10566) MEAS 10566 EXECUTE ! Meas: ATHLETE_126 (10567) MEAS 10567 EXECUTE EXIT $ DISMOUNT TP0: $ EXI
Return to Contents or Return to Main Page
Disk Usage information
[edit]Run the DISK_MOUNTIES.COM script and it will produce a file in the scratch directory called DISK_MOUNTIES_OUTPUT.TXT that contains a row entry for each directory on the disk. It'll include the size and number of RSQ, ISQ, etc, files. If running for the first time, it is suggested you run as follows to learn about the options:
$ @COM:DISK_MOUNTIES.COM HELP
Probably using the default SF is what you will need. It can be run like this:
$ @COM:DISK_MOUNTIES.COM
At the end of the script it calls SUMMARIZE_DISK_MOUNTIES.COM that will take the resulting DISK_MOUNTIES_OUTPUT.TXT and provide a summary outcome. It seems that this script is not working because it uses a specific ICALC function that is only available on Alpha stations (which we no longer use). To date (January, 2022) there is no solution to this problem.
You can find the output file (not the summarized version) here:
$ eve sys$scratch:DISK_MOUNTIES_OUTPUT_SUMMARY.TXT
The template file for summarizing the disk mounties results: BoneLab_Data_Disc_Usage.xlsx
To look at the RSQs in the database
$ dir/siz dk0:[microct.data...]*.rsq
the three dots means all subdirectories.
Other useful commands:
$ ctheader xxxxxx.isq
or
$ ctheader xxxxxx.rsq
shows you header.
$ fda command file-wildcard
does a 'file do all' of the command on all the given wildcard filenames.
$ pipe xxxx | search sys$pipe "patient"
is the pipe command in VMS.
So all three combined:
$ pipe fda ctheader dk0:[microct.data...]*.rsq | search sys$pipe "patient name"
or any other field you want to search for!
If you have a more complex program to run (e.g. with an argument), use the double quotes as follows:
pipe fda "aix -l" *.AIM | search sys$pipe "Patient Name"
Other ideas:
$ write_info
gives you a file sys$scratch:info.txt with info in it (leave defaults to get all samples ever scanned, otherwise 'zoom' in on some samples.)
Check out the search command:
$ help search
and /match=and
or /match=or
Return to Contents or Return to Main Page
Disk Backup
[edit]In the commands directory (com) is a BACKUPDISK script which will automatically generate scripts to backup all the directories on the projects disk.
- As the backup requires significant amounts of space, please check the server disk space before starting the backup.
- Each directory is saved as a separate save set (an OpenVMS file type similar to a zip file) on Winston://Bonelab/Backup/.
$ @COM:BACKUPDISK
- Refer to Disk Backup SOP or its Word format for reference.
Return to Contents or Return to Main Page
Process, Printer and System
[edit]Processes and Jobs
[edit]Manage jobs in the queue
[edit]Use the DELETE/ENTRY and SET ENTRY commands to manage a batch job.
$ SH QUE !Get process info
$ SH QUE /all/by_job_status=executing !Get all executing process info
$ SHOW ENTRY 1131 /full !Get full process info of entry 1131
$ SE 1311 !Get full process info of entry 1131
$ DELETE /ENTRY=251 !Deletes batch job number 251.
$ SET ENTRY 251/PRIORITY=50 !Changes the priority of batch job number 251.
!Default priority is 100 for all jobs, max is 200.
$ SET ENTRY 251/REQUEUE=SCEVAL_FAST !Moves to queue sceval_fast.
!The job cannot be executing to do this, has to be in pending status.
$ SET ENTRY 251/AFTER=TOMORROW !Holds entry 251 until the following day (midnight).
$ HELP SET ENTRY !More information on the SET ENTRY command.
Return to Contents or Return to Main Page
Control processors # on multi-processor machines
[edit]For example, on the itanium there are two processors. By default, only one takes reconstruction jobs. The other is left for so that evaluations can take place without competing for the CPU.
But if a bottleneck is the reconstruction, it can be switched as user system:
$ set que sceva2_slow/job=2
so that it will do two reconstruction jobs simultaneously.
Return to Contents or Return to Main Page
Create a new queue
[edit]This may be useful to separate jobs for a project. The following will create a queue called BUIE$FAST, which will submit jobs to SCEVAL_FAST and SC3309_FAST.
$ initialize/queue/GENERIC=(SCEVAL_FAST,SC3309_FAST)/OWNER=[SYSTEM] - /PROTECTION=(S:M,O:D,G:R,W:S)/BATCH/START BUIE$FAST
Return to Contents or Return to Main Page
Clear out all entries in a queue
[edit]First create a dummy queue, then merge (i.e., move) all the entries from the queue to be cleared into it, then delete the dummy queue.
Example: Clear out the printer queue.
$ stop/reset printer1 $ initialize/que dummy $ assign/merge dummy printer1 $ delete/que dummy
Example: Clear out a batch queue, e.g., sys$fast.
$ initialize/que/batch dummy $ assign/merge dummy sys$fast $ delete/que dummy
Return to Contents or Return to Main Page
Stop and restart queues
[edit]There are three methods. First the nice method.
1. As for the printer queue, a normal user can stop and start other queues.
$ stop/que/reset sceval_slow $ start sceval_slow
This kills the current process running. If you want to let the current process complete before stopping the queue, use:
$ stop/que/next sceval_slow
2. Use the web browser Mozilla.
- Open mozilla
- 'batch queues'
- Resize the window so it occupies the right half of the screen
- Click on 'delete job' once with the MIDDLE mouse button, this will open a new window on the right half of the screen. Ensure the two windows do not overlap, if they do resize the window which contains the batch queues list. Once window locations are correct MIDDLE click on the rest of the jobs which you wish to delete (click on 'Delete Job' in the batch queue list). The reason for locating the widows is because each successive click on 'Delete Job' will open a new window and you don't want it to cover the batch queues list.
- Then Exit from mozilla, this will delete all the open windows, it may take a bit if you are deleting lots.
3. Now the harsh method.
Warning: Extreme caution! Explicit permission for this change or similar changes must be obtained from Dr. Steven Boyd.
Completely remove the queue and re-generate, as user system
$ stop/queue/reset sc3309_slow $ delete/queue sc3309_slow
Then you must restart the queue. To learn how to do this refer to:
$ eve sys$startup:dcps_hpljet_ip.com
Return to Contents or Return to Main Page
Kill many jobs on a queue
[edit]Sometimes somebody can submit a recursive job that when executing can resubmit the job. It results in an endless loop and backs up the whole system with jobs. It is hard to delete the jobs one at a time if there are millions of jobs. So the solution is to create a temporary queue, merge the jobs that need to be killed onto that queue, then delete the temporary queue.
In this example, we had >1000000 jobs on sys$fast so first I stopped all the queues:
stop/queue/next SCEVA1_FAST stop/queue/next SCEVA2_FAST stop/queue/next SCEVAL_FAST stop/queue/next SCSRV1_FAST stop/queue/next SCSRV2_FAST stop/queue/next SCSRV3_FAST
Then I created the temporary queue, merged, then deleted:
initialize/queue/OWNER=[SYSTEM] /PROTECTION=(S:M,O:D,G:R,W:S)/BATCH/START JUNKQ assign/merge JUNKQ sys$fast stop/queue/next JUNKQ delete/queue JUNKQ
Then restart the stopped queues:
start SCEVA1_FAST start SCEVA2_FAST start SCEVAL_FAST start SCSRV1_FAST start SCSRV2_FAST start SCSRV3_FAST
Return to Contents or Return to Main Page
Kill hunging processes
[edit]Sometimes jobs need to be stopped manually, such as when FTP or TCPIP is hung. This is done as follows:
Checked processes with
$ show sys
where the FTP jobs are running. Doing it as system with these commands would show all the FTP jobs on all nodes:
$ mcr sysman SYSMAN> set env /cluster SYSMAN> do pipe sh sys|sear sys$pipe ftpc
It showed that they all were running on SCEVA1 only. So I logged in there and using the IDs given at the list from above's command:
$ stop/id=29804056 ...
Return to Contents or Return to Main Page
Check CPU usage and kill a process
[edit]Determine what process is using all the CPU (e.g., SYMBIONT, a print process) using the monitor command, then use the show system command to determin the Pid, which can be used to stop the process.
The print (SYMBIONT) process is known to consume excessive CPU when the clocks are advanced for daylight savings on the alpha systems.
$ monitor process/topcpu
$ show system
OpenVMS V7.3-2 on node SCEVAL 6-APR-2009 12:42:22.82 Uptime 124 23:16:08
Pid Process Name State Pri I/O CPU Page flts Pages
20C00081 SWAPPER HIB 16 0 0 01:07:05.63 0 0
20C00087 CLUSTER_SERVER HIB 14 2218 0 00:00:00.54 63 77
20C00088 CONFIGURE HIB 10 23 0 00:00:00.02 54 20
20C00089 LANACP HIBO 13 -- swapped out -- 32
20C0008B FASTPATH_SERVER HIB 10 9 0 00:00:00.01 79 94
20C0008C IPCACP HIB 10 10 0 00:00:00.02 37 28
$ show process/all/id=Pid
$ set host 0
user: system
password:
$ stop/id=Pid
- Process Name = BATCH_122 means entry 122 in the queue
Return to Contents or Return to Main Page
Relay for pump
[edit]In Houston we installed a relay that allows us to remotely turn on and off the power to the gantry. There are scripts in the COM directory called RELAY_PUMP_....
Install the special TELNET_CLIENT.EXE as user system into DISK0:[SYS0.SYSCOMMON.SYSEXE] so that it is accessible and then set the permissions:
$ set def disk0:[sys0.syscommon.sysexe] $ set prot=(s:rwed,o:rwed,g:re,w:re) telnet_client.exe
You need to set a logical (can be set permanently in LOGIN.COM):
$ DEFINE TELNET_SERVER_LINE "TCPIP$DEVICE:172.16.1.2:9500"
Then you can turn the gantry on or off with
$ mcr telnet_client -on $ mcr telnet_client -off
And you can check the current status of the gantry by pinging it:
$ TCPIP PING 192.168.34.18
The output for when the gantry is on looks like this:
$ TCPIP PING 192.168.34.18 PING 192.168.34.18 (192.168.34.18): 56 data bytes 64 bytes from 192.168.34.18: icmp_seq=0 ttl=255 time=1 ms 64 bytes from 192.168.34.18: icmp_seq=1 ttl=255 time=0 ms 64 bytes from 192.168.34.18: icmp_seq=2 ttl=255 time=0 ms 64 bytes from 192.168.34.18: icmp_seq=3 ttl=255 time=0 ms ----192.168.34.18 PING Statistics---- 4 packets transmitted, 4 packets received, 0% packet loss round-trip (ms) min/avg/max = 0/0/1 ms
And when it is off it looks like this:
$ TCPIP PING 192.168.34.18 PING 192.168.34.18 (192.168.34.18): 56 data bytes ping: sendto: network is down ping: wrote 192.168.34.18 64 chars, ret=-1 ping: sendto: network is down ping: wrote 192.168.34.18 64 chars, ret=-1 ping: sendto: network is down ping: wrote 192.168.34.18 64 chars, ret=-1 ping: sendto: network is down ping: wrote 192.168.34.18 64 chars, ret=-1 ----192.168.34.18 PING Statistics---- 4 packets transmitted, 0 packets received, 100% packet loss %SYSTEM-F-TIMEOUT, device timeout
There is a script called RELAY_PUMP_10_MIN_ON.COM that self-submits and automatically turns on and off the gantry on Sunday at 2am.
Printer
[edit]Set up TCPIP printer queue on a VMS workstation
[edit]$ stop/que/res hpljet $ tcpip set nohost hpljet $ tcpip set host "hpljet" /address= xxx.xxx.xxx.xxx $ start hpljet
Note that many HP printers will not work with OpenVMS. Checking for compatibility is important.
Return to Contents or Return to Main Page
Stop and restart the printer queue
[edit]How to fix the printer queue when hung, not working or giving an error. A full printer queue can seriously affect system performance. Be sure that the queue is cleaned up from time to time.
$ show queue
to first find out the real name of your printer queue.
- Replace "hpljet" and "...dcps_hpljet..." by your own queue (i.e., PRINTER1 for XtremeCT) name below.
- First approach, as normal user
microct:
$ stop/queue/reset hpljet $ start/queue hpljet
If you need to release a job
$ set entry/release 123
Return to Contents or Return to Main Page
System
[edit]Monitor System
[edit]Monitor system usage
[edit]$ monitor/interval=1 processes/topcpu $ monitor/interval=1 system $ show error $ show system $ @SCOM:SHOW_DISKS.COM (or simply $ DISKS)
The command show error may indicate errors. One or two errors is OK.
To see what processes are running (specific to the machine, not cluster wide).
$ show device disk2/file $ show user /full
Return to Contents or Return to Main Page
Check status of OpenVMS system
[edit]If when rebooting a VMS system there is a failure, sometimes a message can be repeated many times. The way to stop this repeating message is to press ctrl-C or ctrl-P to get to the >>> prompt.
Then show some of the device information, either specifically
>>> show device py* >>> show device dy*
or in general
>>> show device
which might show more than needed. The output of
>>> show bootdef_dev
can also be useful.
Once settings are all good, you can reboot the system with
>>> init >>> set bootbios pyb0 >>> boot
Return to Contents or Return to Main Page
Check disk status
[edit]Login as the system user on the workstation connected to the disk array that you want to check.
$ run sys$system:msa$util.exe MSA> set controller
Show the raid volumes (e.g., to check if it failed or is recovering).
MSA> show unit
Locate disks associated with a raid volume (e.g., unit0).
MSA> locate unit0
Accept a failed unit (e.g., unit0) - only for itanium workstations, which use a newer version of OpenVMS.
MSA> accept unit0
Show disk information.
MSA> show disks
Get information on MSA utility functions.
MSA> help
Exit the MSA utility.
MSA> exit
Return to Contents or Return to Main Page
Check status of disk array
[edit]To look at the disks in an MSA30 tower: There are several options to check the status of the disks. One is, if it is installed, to use the command-line utility
$ mcr msa$util
as "system". Enter
MSA> set controller MSA> show unit MSA> show disks MSA> exit
Another is to start the WBEM web interface, which shows the status of the hardware graphically.
It is possible to fix a disk array that hasn't booted by doing the following:
At the login prompt, type 'shutdown'. This will get you to the >>> prompt.
There should be a RAID card, for example on Percy, named pya0. Try:
>>> show device >>> set auto_action halt >>> init >>> run bios pya0 >>> set auto_action restart >>> boot
Return to Contents or Return to Main Page
Check disks status in enclosure
[edit]Periodically connect to http://10.148.64.254/ (user name: manage, password same as system password) and check if there are any errors or warnings, like failed disks. You can easily see which disk has failed in the graphical view of "Physical" -> "Enclosure X"
Consider not all web browsers allow connection to this rather old web server. Firefox and Mozilla on the workstations do work fine.
Return to Contents or Return to Main Page
Recover System
[edit]Consistently needs warm-up scanner - Shutter-failsave-Job
[edit]If the scanner is consistently needing to warm-up on consecutive days, and was not powered off, this is likely due to the Shutter-failsave-Job disappearing from the 3309-Batch queue (for XT1). The job must be re-submitted.
The executing file is located in the CALIB3309 ($ um:submit_shutter_test.com) and the command to submit the job is:
$ submit/after="tomorrow"/noprint/que=uct_measurement_queue um:submit_shutter_test.com
You can check the status by typing:
$ show que *3309_batch*/all
This job tends to disappear now and then, perhaps because of an abrupt shutdown of the workstation or maybe when stop/pause/re-start the queue. Contact Scanco if this does not resolve.
Return to Contents or Return to Main Page
Disk not mounted/unavailable, directory not found, volume not enabled
[edit]Disk is not mounted or is unavailable. Error opening ...., directory not found, volume is not software enabled.
%DIRECT-E-OPENIN, error opening DISK4:[MICROCT.PROJECTS]*.*;* as input -RMS-E-DNF, directory not found -SYSTEM-F-VOLINV, volume is not software enabled
This can happen if communication is broken between workstations, causing the disk mount to time out. Check if this is by showing the devices, then dismount and remount the disk.
$ show dev Device Device Error Volume Free Trans Mnt Name Status Count Label Space Count Cnt SC3309$DKA100: Online 0 SC3309$DKD0: Mounted 0 ALPHASYS 3.18GB 642 2 SC3309$DKD1: Mounted 0 AUSER_01 42.84GB 4 2 SC3309$DKD2: Mounted 0 ADATA_01 173.00GB 4 2 SC3309$DKD3: Mounted 0 ADATA_02A 215.80GB 1 2 SC3309$DKD4: Mounted 0 ADATA_02B 215.85GB 1 2 SC3309$DKD5: Mounted 0 ADATA_02C 215.81GB 1 2 SC3309$DQA0: Online 0 SC3309$DQA1: Offline 1 SC3309$DQB0: Offline 1 SC3309$DQB1: Offline 1 SCEVAL$DKA0: Online 0 SCEVAL$DKA1500: Mounted 0 (remote mount) 1 SCEVAL$DKC0: MntVerifyTimeout 0 ADATA_03A 541.62GB 1 2 SCEVAL$DKC1: MntVerifyTimeout 0 ADATA_03B 541.38GB 1 2 SCEVAL$DKC2: MntVerifyTimeout 0 ADATA_03C 541.60GB 1 2 SCEVAL$DQA0: Online 0 $ set host 0 system $ dismount SCEVAL$DKC0: $ mount/cluster SCEVAL$DKC0: ADATA_03A %MOUNT-I-MOUNTED, ADATA_03A mounted on _SCEVAL$DKC0: $ mount/cluster SCEVAL$DKC1: ADATA_03B %MOUNT-I-MOUNTED, ADATA_03B mounted on _SCEVAL$DKC1: $ mount/cluster SCEVAL$DKC2: ADATA_03C %MOUNT-I-MOUNTED, ADATA_03C mounted on _SCEVAL$DKC2: $
If this does not restore the disk, then shutdown the computer. At the blue screen...
>>> init
Wait for blue screen to return.
>>> run bios pya0
Press F2 at the prompt to accept potential data loss.
Wait for blue screen to return.
>>>
Press power button to turn off.
Press power button to turn on.
Return to Contents or Return to Main Page
Kill hanging program
[edit]If a program is hunging, it may not be necessary to shut down the system and restart. For example, if the uct_evaluation
program is hung, do the following
$ show dev/full microct_scsi $ stop/id=<Owner process ID> (Replace the <> with the actual ID) for example: $ stop/id=2280091C
Return to Contents or Return to Main Page
Reset the display/GUI
[edit]These commands will terminate the current login session and may restore a frozen or messed up screen. You will need to remotely access the problem workstation either from another micro-ct workstation or using a personal computer.
Use the set host command to connect to the problem workstation (e.g., thomas) using the node name (e.g., sc3309) or the IP address (e.g., thomas.kin.ucalgary.ca).
$ set host sc3309 login: system password:
Issue the reset display command.
$ @sys$startup:decw$startup restart
At the prompt, type "y".
Return to Contents or Return to Main Page
Restart screen server
[edit]If the monitor fails to show the login prompt and displays a blank gray screen...telnet to the computer from another computer (e.g. a PC or so) and login as user system. Run the restart command:
$set host gordon.ucalgary.ca. [or other computer name] $username: system $password: [system password] $@sys$startup:decw$startup restart
confirm (answer "yes" at the prompt) and logout.
$y $logout
This will kill all programs on your screen, but it will leave all batch jobs running, so if you do a BATCH measurement, this will survive! (but interactive scan will be killed).
If you are restarting a monitor connected to a KVM box, unplug and re-plug in the box.
This command also helps when the mouse/keyboard freezes.
Return to Contents or Return to Main Page
Restart Alpha stations
[edit]
Warning: Do not do this unless absolutely necessary.
For shutdown
At the login screen, type "shutdown"/no password and hit enter. Then, you can turn the computer off at the prompt.
Then, you may turn the disk array off (unplug it as there is no power switch).
After you move the computer, power on the disk array and then the computer.
Return to Contents or Return to Main Page
Slow/non-responsive computer
[edit]This is usually caused by people logging in via SSH multiple times. The solution involves resetting the SSH/TCPIP daemon.
- If you are local at the computer:
You will need to log in as user system. ONLY EXPERIENCED USERS SHOULD EVER LOG IN AS SYSTEM!
The system will be extremely slow (it will take 5 minutes just to get a log in prompt). This is expected.
$ set host 0 ! user name 'system' and password $ $ @sys$startup:tcpip$ssh_shutdown ! shutdown SSH $ $ set host 0 ! user name 'system' and password $ $ @sys$startup:tcpip$ssh_startup ! restart SSH
Alternatively, you can reboot the system to reset the SSH. This is not an appropriate solution and it is solving the problem by hitting it with a jack hammer. Sometimes it is the only choice though.
- If you are remotely logged in:
You will have to log in as user system and run a script called STOP_START_TCPIP.COM.
This works essentially the same as for the above method, except that since it would be impossible to restart SSH remotely once it is shut down, two separate scripts are called and submitted on SCEVAL_FAST (make sure the queue isn't clogged) separated by a 1 minute delay. The first script called is STOP_TCPIP.COM and the second is START_TCPIP.COM.
To execute this process, you must log in as system, go to the SYS$SCRATCH directory, and interactively execute the script:
$ @STOP_START_TCPIP.COM
Return to Contents or Return to Main Page
Shutdown a workstation locally
[edit]These instructions were provided by Pascal in May 2026:
- end the session - enter 'shutdown' as username and hit enter key for a few times (no password needed) - the screen eventually turns black/blank - just give it another minute or so, then press and hold the power button until the workstation turns off - remove both power cords for a few minutes
- reconnect power cords - wait for at least 30 seconds - press and release again the power button; the workstation will then turn on with a slight delay
The workstation should then be back online after a few minutes.
Shutdown a workstation remotely
[edit]If a workstation becomes unresponsive, it may be possible to shut it down remotely from another workstation or personal computer, which is preferable over doing a hard power off. These instructions were provided by Mark Blanchard.
1. Remote shutdown from another micro-ct workstation. MAY NOT WORK FOR CLUSTER SERVER
Login as the system user.
$ set host 0 user: system password:
Start the system manager.
$ mcr sysman
Set the environment to the workstation to be shutdown (e.g., thomas) using its node name (e.g., sc3309).
SYSMAN>< set env/node=sc3309
Issue the shutdown command. Add a time delay, e.g., 5 min, if you want to give users time to disconnect and the automatic reboot flag if you want to restart.
SYSMAN> shutdown node /min=5 /automatic_reboot
- You need to remain logged into the session running the shutdown until the other node has been shutdown completely!!!
2. Remote shutdown from a personal computer.
Begin a remote session to the workstation and login as the system user.
Create a detached terminal.
$ create/terminal/detach
On the PC, port 6000 needs to be accessible to the micro-ct workstation and in the X-server's configuration (e.g., in file X0.hosts for Xming).
Issue the shutdown command.
$ shutdown
Return to Contents or Return to Main Page
Slow computers - Change RAID battery for Itanium computers
[edit]If computers become sluggish, particularly when saving data after a scan, have Scanco check the batteries in the RAID drive. The batteries in SCEVA3 were changed 2014-11-10. There are two batteries. Order the HP brand (should look like the ones in the image).
- Instructions to open the Itanium work station and access the PCI card: Change PCI card.
- Instructions to change the batteries after accessing the PCI card: Change batteries.
Return to Contents or Return to Main Page
Frozen computer - "bootstrap failure" on boot up
[edit]The micro-CT computer is frozen or there is a "bootstrap failure" on boot up, This happens to the client computers (those connected to the scanners) when there is interruption in the network. The only option is to restart the computer.
Shutdown via iLO
[edit]Connecting the to the iLO of SCEVAL is quite simple. The IP to be used within Putty is 10.148.64.233. If you are on a Mac, find a linux workstation (i.e., Winston) to connect as the security is too old for Mac to connect these days.
Once the connection has been opened, click into the terminal and press the enter key unit you get asked for a username:
Username (case sensitive): Administrator password: ---
At the main menu, enter 'co' in order to switch to the console (CTRL+B always gets you back one menu layer if needed).
Then hit the enter key again and provide username and password for the OpenVMS user 'system'.
You then are connected to the workstation as system user and can shut it down properly (assuming there are no jobs running anymore on that node):
$ shutdown
The progess of the shut down procedure will then be shown in the terminal.
The following line will then indicate that the shutdown procedure has been completed:
P00>>
To turn it off remotely (it does not automatically turn off after a shutdown), just press CTRL+B until you are back at the MP Main Menu.
The enter 'cm'. To turn off the workstation, just enter the following command then:
CM> pc -nc -off
Turning back on the workstation works pretty much the same (with a slightly different command):
CM> pc -nc -on
Crash of XtremeCT II workstation computer
[edit]For a non-responsive monitor and/or a mouse and/or a keyboard of the XtremeCT II workstation (sometimes caused by a lost of connection to server, or an internet outage):
- 1. The first thing to do is to check system logs for any indication of the cause of the issue, if you have the "Administrator" user privilege.
- 2. The next thing to do is to soft-reboot by remote-login and using command line to reboot the workstation, if you have the "system" user privilege.
- 3. If no success, try hard-reboot by pressing the power button as indicated below.
- 4. If no success, try hard-reboot by unplugging both power cords as indicated below.
- 5. If still no success, contact Scanco immediately.
- 6. The last thing to do is to record the issue and any possible reasons.
1. Checking system logs:
- 1) Remotely log into the iLO (the management console of the workstation) using SSH as user "Administrator" with the system password.
Both user/pw are case sensitive. For XtremeCT II workstation (James) it is SSH to 10.148.64.231. For others, consult the network diagram.
A trick: This connection only succeeds through a MAC or PC (via putty) direct login, not through an OpenVMS or Scanco system.
$ ssh -l Administrator 10.148.64.231
- 2) Then you get to a MP> prompt here:
MP MAIN MENU:
CO: Console
VFP: Virtual Front Panel
CM: Command Menu
CL: Console Log
SL: Show Event Logs
HE: Main Help Menu
X: Exit Connection
[sc3401-mp]</> hpiLO->
- 3) Type in 'SL' to show event logs, then you could choose 'E' for system event:
[sc3401-mp]</> hpiLO-> SL
Event Log Viewer Menu:
Log Name Entries % Full Latest Timestamped Entry
-------------------------------------------------------------------------------
E - System Event 1661 58 % 13 Sep 2018 11:17:43
F - Forward Progress 20000 100 % 13 Sep 2018 11:17:43
I - iLO Event 500 100 % 18 Sep 2018 07:46:42
C - Clear SEL and FPL
L - Live Events
Enter menu item or [Ctrl-B] to Quit: E
Log Name Entries % Full Latest Timestamped Entry
-------------------------------------------------------------------------------
E - System Event 1661 58 % 13 Sep 2018 11:17:43
Event Log Navigation Help:
+ View next block (forward in time, e.g. from 3 to 4)
- View previous block (backward in time, e.g. from 3 to 2)
<CR> Continue to the next or previous block
D Dump the entire log
F First entry
L Last entry
J Jump to entry number
H View mode configuration - Hex
K View mode configuration - Keyword
T View mode configuration - Text
A Alert Level Filter options
U Alert Level Unfiltered
? Display this Help menu
Q Quit and return to the Event Log Viewer Menu
Ctrl-B Exit command, and return to the MP Main Menu
- 4) From here you can use - and + to go through the log history back and forth. Not all logs do make a lot of sense though, as they are mainly meant for HPE engineers.
- 5) When finished, use CTRL + b to get back to the main MP> prompt.
- 6) Use MP> co to get to the console, where you see at what stage the booting process is, in case it does not boot properly.
- 7) When finished, use CTRL + b to get back to the main MP> prompt.
- 8) Use MP> x to end the connection.
2. Soft-reboot by remote login:
If a workstation becomes unresponsive, it may be possible to shut it down remotely from another workstation or personal computer, which is preferable over doing a hard-reboot. These instructions were provided by Mark Blanchard.
- 2.A) Remote shutdown from another micro-ct workstation. MAY NOT WORK FOR CLUSTER SERVER
Login as the system user.
$ set host 0 user: system password:
Start the system manager.
$ mcr sysman
Set the environment to the workstation to be shutdown (e.g., thomas) using its node name (e.g., sc3309).
SYSMAN>< set env/node=sc3309
Issue the shutdown command. Add a time delay, e.g., 5 min, if you want to give users time to disconnect and the automatic reboot flag if you want to restart.
SYSMAN> shutdown node /min=5 /automatic_reboot
You need to remain logged into the session running the shutdown until the other node has been shutdown completely!!!
- 2.B) Remote shutdown from a personal computer.
Begin a remote session to the workstation and login as the system user.
Create a detached terminal.
$ create/terminal/detach
On the PC, port 6000 needs to be accessible to the micro-ct workstation and in the X-server's configuration (e.g., in file X0.hosts for Xming).
Issue the shutdown command.
$ shutdown
3. Hard-reboot by power button:
- 1) Hold the power button until it turns yellow.
- 2) Wait a minutes or two, then press the power button only once and shortly. You will not see anything for a while. Pressing the power button again during this time will turn off the workstation again !
- 3) After about 10~15 min, the workstation would boot up properly.
4. Hard-reboot by unplugging both power cords:
- 1) Hard-reboot by unplugging both the power cords. This will reset the console and controllers.
- 2) Wait for 5~10 minutes, then press the power button only once and shortly. You will not see anything for a while. Pressing the power button again during this time will turn off the workstation again !
- 3) After about 10~15 min, the workstation would boot up properly.
Return to Contents or Return to Main Page
Crash of XtremeCT II workstation at Johnson Space Center
[edit]Take a look at the log files by connecting to the iLO. Since we don't have an ethernet connection to the iLO at JSC, but we are able to log in on the LAN, we can log in as per normal and then connect:
$ ssh "Administrator@192.68.196.57"
Use the system password to connect.
hpiLO> sl
e
t
a 3
d
This then should create a dump in text form of all entries in the system log with an alarm level 3 (critical) and higher. Copy from the terminal and share with Scanco (e.g., Pascal).
Return to Contents or Return to Main Page
Remote Access
[edit]For Scanco support
[edit]Send a terminal to a remote computer
[edit]To send a terminal from XCT clusters to Scanco for maintenance, you need to know the ip address for the terminal location. Such as For Mark Blanchard:
$ set display/create/transport=tcpip/node=bruettisellen.scanco.ch $ create/terminal/detach
or
$ set display/create/transport=tcpip/node=80.242.194.194 $ create/terminal/detach
Last updated April 17, 2024.
The cursor will disappear for a minute or so, and reappear with the $ prompt indicating sent already.
Return to Contents or Return to Main Page
Access VMS filesystem
[edit]Access XtremeCT VMS filesystem on a Mac
[edit]In finder, select Go --> Connect to Server
This opens up a window that allows you to enter a server address. Enter the following information:
smb://136.159.130.28
Click connect. If the internet connection is working, you will then be prompted to enter in login info:
USERNAME: xtremect PASSWORD: uct
Select the volumes you want to mount.
Return to Contents or Return to Main Page
View XtremeCT VMS filesystem from a Windows PC
[edit]The HP program that allows the VMS file system to be viewed by a PC is called Pathworks (on the VMS system). The following information is needed to connect to the VMS system:
USERNAME: xtremect PASSWORD: uct WORKGROUP: microct
Then, in Windows explorer, while connected in the same network as the VMS station (i.e., .130) enter the following IP address for Thomas (SC3309):
\\136.159.130.28\
Alternatively, map the drive.
Right click on my computer and choose map network drive. Folder: \\136.159.130.28\UCT_DATA1 or \\136.159.130.28\UCT_DATA2 User name: xtremect@microct Password: uct
Return to Contents or Return to Main Page
View VivaCT40/uCT35 VMS filesystem from a Windows PC
[edit]The HP program that allows the VMS file system to be viewed by a PC is called Pathworks (on the VMS system). The following information is needed to connect to the VMS system:
USERNAME: vct_40 PASSWORD: uct WORKGROUP: microct
Then, in Windows explorer, while connected in the same network as the VMS station enter the following IP address for SCEVAL:
\\136.159.74.140\
Alternatively, map the drive.
Right click on my computer and choose map network drive. Folder: \\136.159.74.140\SB_DATA or \\136.159.74.140\SB_PROJ or \\136.159.74.140\BH_DATA or \\136.159.74.140\BH_PROJ User name: vct_40@microct Password: uct
Return to Contents or Return to Main Page
Map a Network Drive to the VMS filesystem from Windows
[edit]To do this you must be on the same network as the OpenVMS system. For main campus and the XtremeCT, you will map the drive to Thomas (136.159.130.28), the workstation connected to the scanner.
Right click on My Computer and choose Map Network Drive...
Folder: \\136.159.130.28\uct_data1 !FOR THE PROJECTS DISK
and/or
\\136.159.130.28\uct_data2 !FOR THE DATA DISK
User name: microct\xtremect
Password: uct
Note: You must use the numerical IP address and not the host name (i.e. thomas.kin.ucalgary.ca).
Return to Contents or Return to Main Page
Setup remote access FAQ
[edit]Access data remotely
[edit]Refer to Scanco tutorial on accessing your data remotely for
- A quick refresher course on accessing files
- Web browser
- File sharing
- File transfer protocol (FTP)
- Network file system NFS
- Running Scanco programs remotely
Return to Contents or Return to Main Page
Use Hummingbird Exceed for remote access
[edit]- Screen definition
- Server visual = PseudoColor
- Window mode = multiple
- Keyboard input
- Primary = decemus
- Alternate = us
- EVE commands
- select = "end"
- cut = "delete"
- paste = "insert"
- move forward a word = CTRL + right_arrow
- move to start of document = CTRL + up_arrow
- move to end of document = CTRL + down_arrow
Return to Contents or Return to Main Page
Use XWin32 for remote access
[edit]Run XWin32. Run Putty and connect to sceval.ucalgary.ca. Use the terminal normally to run programs, which should open with XWin32.
Additional terminal windows can be opened with $ dec
If you try to connect from somewhere other than the university, you will probably get the following error when trying to open a window:
Xlib: connection to "sceval.ucalgary.ca:10.0" refused by server Xlib: Can not connect to a host on a restricted network X Toolkit Error: Cannot Open Display %DWT-F-DWTABORT, xtoolkit fatal error
Type the following at the command prompt to direct the display:
$ set display/create/transport=tcpip/node=Your_IP_Address/server=0
You can find your IP address from: http://www.ip-adress.com/
If you're running XWin32 from off campus and behind a router, forward ports 6000 - 6010 TCP and 177 UDP to your computer.
Return to Contents or Return to Main Page
Set up Putty with gold-key access
[edit]Refer PuTTY and Xming to download putty.
Set 'keyboard' to Vt400, and 'initial state of numeric keyapad' to 'Application', and now the 'NumLock' key is the gold key (like PF1), and the editor can repeat stuff.
Then
$ set term/vt100
to enable the editor in the terminal.
And duplication of a line is:
- (which would be PF4) to erase a line, then twice "numlock, then -" (gold-PF4 is 'restore line')
Return to Contents or Return to Main Page
SSH tricks
[edit]RSA and DSA Authentication
[edit]The main advantage of setting up RSA authentication is that you will no longer have to type your password each time you access a host with ssh. There are some technical reasons why RSA and DSA access is more secure than password access.
These instructions work on both Linux and OS-X.
- Create your public/private key pair on your local computer
- At the command prompt type: ssh-keygen -t rsa
- You will be asked to create a passphrase.
- This will create the files .ssh/id_rsa and .ssh/id_rsa.pub . Once you have these files, you never have to repeat this step.
- Copy your public key contents into the .ssh/authorized_keys2 file on the remote server
- You can email yourself the file .ssh/id_rsa.pub from the local computer.
- You could do this: ssh username@remoteserver.com 'cat >> ~/.ssh/authorized_keys2' < /Users/Youruser/.ssh/id_rsa.pub
- You can also use the ssh-copy-id utility: ssh-copy-id -i <path to public key> <destination>, e.g. ssh-copy-id -i ~/.ssh/id_rsa.pub fem@thegnu.ucalgary.ca
NOTES ABOUT KEYS Remember, the "authorized_keys" file is a concatenation of public (id_rsa.pub) keys, and the "id_rsa" is the private key. Every user on every computer should only have ONE "id_rsa" file, but can have multiple "id_rsa.pub" files concatenated into their "authorized_keys" file.
SSH Agent
[edit]SSH-Agent is a tool to store your passphrase so you don't have type it every time.
On OS-X, it is integrated into the system Keychain - you will be asked once if it should remember your passphrase, and after that you don't have to worry about it.
Most Linux systems also have ssh-agent configured to start with every session. You may however have to do this once:
ssh-add ~/.ssh/id_rsa
If you find that after following the above steps to create a public-private key pair and add the public key to the destination machine, you still cannot connect or are prompted for the password, likely you need to use the above command to add your private key to your local ssh-agent.
SSH Tunneling
[edit]This is an alternative to VPN through kinesiology. It may come in handy if for some reason VPN is not working.
If you're outside the university system and want to access, for example, svn on mike.kin, which is normally blocked by the university firewall, you can do that with ssh tunneling. Here is an example:
ssh eric@mighty-mac.kin.ucalgary.ca -L 2000:mike.kin.ucalgary.ca:443 -N
Here is what is going on:
- I want to access port 443 (which is https) on mike.kin.ucalgary.ca.
- I have an account on mighty-mac, so I'm using that server to create an ssh tunnel inside the university firewall. I could use any machine I had an account on inside the university system, even mike.kin.ucalgary.ca, the one I'm trying to get to (in fact, that would be best, but for purposes of demonstration I'm using a different machine).
- I'm mapping the local port 2000 to port 443 on mike. Anything I send to localhost:2000 will by sent by ssh or the ssh tunnel to mighty-mac, which will then send it on to port 443 on mike.
- 2000 is a random 4-digit port number. If by some fluke you happen to choose one that is in use, ssh will complain and you will have to try another port number.
Now I can fire up my browser and point it to
https://localhost:200/trac/
And what I get is the trac site on mike.
If I want to get the code, I can do this:
svn checkout https://localhost:2000/svn/numerics88/trunk trunk_tunnel
("trunk_tunnel" is just the directory name where it will end up. It can be named anything, but this will remind me that it only works when the tunnel is up.)
Return to Contents or Return to Main Page
Physical connections
[edit]Connect to VMS station with a serial port cable
[edit]To do this, you will need to connect from a PC using a PC-to-PC (NULL modem) serial cable, 9600 baud. Install PuTTY and connect with the 'serial' option. You will need to know the COM port that is used by the PC to connect the serial cable. You can do this by checking on the PC the [Hardware][Device] settings.
Typical login is "Admin" and password is usually same as the 'system' password.
Return to Contents or Return to Main Page
Export VMS display to SUN or LINUX terminal
[edit]# - temple $ - sceval # xhost +temple.ucalgary.ca # ssh -X microct@sceval.ucalgary.ca $ set display /create /transport=tcpip /node=temple.ucalgary.ca
NOTE: Do not use xhost+. Always specific exactly which computer is being
allowed X access.
Return to Contents or Return to Main Page
Data Export
[edit]Often collaborators or users may need to access their image data using other tools. The challenge is that the format for RSQ, ISQ and AIM files are proprietary. However, we have some options that can be useful. Most frequently people want the raw image data, and that is most efficiently offered as an AIM file. The ISQ file often includes extra space around the image of interest and results in very large files. Cutting an AIM file from the ISQ is much more efficient and provides the data of interest while minimizing disk space.
An AIM file is typically stored as 'short' or 'char'. The 'short' is the raw image data and the 'char' is segmented data. An AIM containing 'short' data is not compressed, so it is easier to read by third-party tools. The AIM containing 'char' is stored as a compressed file (run-length-encoded) by default, and is not as easy to read by third-party software. The exception is using the built-in AIM reader that made available through the publicly available Bonelab git repository (https://github.com/Bonelab/Bonelab). You can force a 'char' file to not be stored as a compressed file using IPL. The following example shows how to read in a compressed file and save it as uncompressed:
ipl> read in VITD_SUB.AIM /read -name in -filename VITD_SUB.AIM !> Reading AimVersion020 !> Image size after D1charCmp (run-length) uncompression will be: !> Type of data Char 1 byte/voxel !> Total memory size 410.2 Kbyte !% /read completed: CPU: 00:00.01 ELAP: 00:00.01 ipl> write in VITD_SUB.AIM -compress_type [bin] > none -version_020 [true] > /write_v020 -name in -filename VITD_SUB.AIM -compress_type none -version_020 true !> Writing AimVersion020 requested... approved. !> Total size on disk: 425.0 Kbyte !% /write_v020 completed: CPU: 00:00.00 ELAP: 00:00.04
Note that the file size of the uncompressed file is larger than the compressed file, as you would expect:
Uncompressed: VITD_SUB.AIM 425KB Compressed: VITD_SUB.AIM 70KB
DICOM
[edit]To convert aim files to DICOM using IPL interactively, first use /read to read in the AIM file, then /todicom_from_aim to convert them to a DICOM format, then exit. The DICOM files will be saved in the same directory as the original AIM file.
/read -name [in] > -filename [default_file_name] > SAMPLE_1.AIM
/todicom_from_aim -aim_name [in] > -dicom_filename [default_file_name] > SAMPLE_1.dcm -multifiles [true] > -global_slicename [false] >
Next ftp the DICOM series to your local computer using either the command line or FileZilla, making sure to transfer them in a Binary format. Before opening it on your local computer make sure to scrub the file extensions if you have no already done so in the file transfer. Open the .dcm files using an image reader for example ITKSnap or HOROS.
Return to Contents or Return to Main Page
ImageJ
[edit]There is a plugin to read AIM ISQ RSQ files. ImageJ (https://imagej.nih.gov/ij/) is good for Viewing, Converting, and Custom Analyses on Scanco images after installing the following plugin and importing AIM, ISQ, and RSQ files.
- AIM Reader v1.02, reads uncompressed (short) AIM files v020, sets scale and calibration
- ISQ Reader v1.01, reads ISQ files, sets scale
- RSQ Reader v1.01, reads RSQ files, sets scale
You can obtain the ImageJ_Plugins_SCANCO_Files.zip from BoydDrive:\\04 - Resources\04 - Software\ImageJ_Plugin. Feel free to share this with others.
Return to Contents or Return to Main Page
BoneJ
[edit]This is a useful tool used by many to read in images and perform image processing. We don't use it much in the Bone Imaging Lab, but it's important to others. It can be downloaded here: https://bonej.org
To read in a sample file, say MYFILE.AIM, you would need to ensure that the file is not compressed. Running aix is a quick way to check if it's compressed. The BinCmp means that the data is compressed, but other types such as short or char are OK. This file is an example of something that cannot be read by BoneJ until you convert it to being uncompressed using IPL first:
!------------------------------------------------------------------------------- !> Volume myfile.aim !> AIM Version 1.6 !> !> dim 100 100 100 !> off 0 0 0 !> pos 0 0 0 !> element size in mm 1.0000 1.0000 1.0000 !> phys dim in mm 100.0000 100.0000 100.0000 !> !> Type of data BinCmp 1 byte/voxel !> Total memory size 976.6 Kbyte !-------------------------------------------------------------------------------
Here is an example of a file that can be read by BoneJ:
!------------------------------------------------------------------------------- !> Volume myfile.aim !> AIM Version 1.6 !> !> dim 50 50 168 !> off 0 0 0 !> pos 1427 850 0 !> element size in mm 0.0607 0.0607 0.0607 !> phys dim in mm 3.0350 3.0350 10.1970 !> !> Type of data Char 1 byte/voxel !> Total memory size 410.2 Kbyte !-------------------------------------------------------------------------------
In addition to providing the AIM file, you need to create a text file that shows the person information about the file. Do that using aix as follows on VMS:
$ fda/output= MYFILE.TXT aix MYFILE.AIM
This will store the following information in MYFILE.TXT:
!% Image Data starts at byte offset 15202 !> Reading AimVersion020 !------------------------------------------------------------------------------- !> Volume myfile.aim !> AIM Version 1.6 !> !> dim 50 50 168 !> off 0 0 0 !> pos 1427 850 0 !> element size in mm 0.0607 0.0607 0.0607 !> phys dim in mm 3.0350 3.0350 10.1970 !> !> Type of data Char 1 byte/voxel !> Total memory size 410.2 Kbyte !-------------------------------------------------------------------------------
Now save that information in a text file called MYFILE.TXT and provide it along with the original AIM file MYFILE.AIM to the person.
In BoneJ, select File -> Import -> Raw and using the information in MYFILE.TXT select the parameters for the input. Done!
Return to Contents or Return to Main Page
Bonelab Git Repository
[edit]You can download the repository from here: https://github.com/Bonelab/Bonelab
- Read the README.md file and follow instructions to install it (MacOS, Windows, Linux).
- Once installed, look at some examples in the
Bonelab > bonelab > clidirectory on how you could write your own python script to manipulate AIM files. For example, the python scriptaix.pyis an example that reads an AIM file.
Return to Contents or Return to Main Page
Dose
[edit]Dose Calculations
[edit]XtremeCT II radiation dose
[edit]In late 2023, Laura Cerbone visited the lab and did a series of X-ray dose calculations with equipment provided by Errol Stewart at AHS. She wrote a full report titled REPORT Dose assessment on the XtremeCT II (9Jan2024).pdf
For the knee protocol we have 936 mAs (for the 6 stacks), meaning 156 mAs for a single 168 slices stack. For the tibia protocol we have 71 mAs. Rescaling the DLP or the CTDI we measured for the tibia we would have:
DLP(knee) = (156/71)*1.04 = 2.28 mGy CTDI(knee) = (156/71)*10.2 = 22.40 mGy
As for the k factors, there is no k-factor for the knee in that table, but Laura found a paper (“Estimates of Effective Dose for CT Scans of the Lower Extremities”, DOI: 10.1148/radiol.14132903) where they computed the k-factor for lower extremities for a spiral CT. The kV and the current used for this study are slightly different (e.g., we have a cone beam CT, not a spiral). Nevertheless, using their k-factor to convert the DLP(tibia) to the effective dose we got 2µSv (lower but of the same magnitude as the one declared by Scanco). In principle, one could use the factor they found in this paper (0.0004 mSv/(mGy*cm)) for the knee, which would yield an effective dose of around 10 uSv (for a scan length of 10.2 mm, otherwise 60 uSv for the whole knee exam).
The effective dose is computed by multiplying the DLP by the k-factor or, equivalently, multiplying the CTDI_vol (equivalent to weighted for us because we have a cone beam CT) by the scan length and the k-factor. In our case we have
TIBIA:
ED = DLP * k-factor = CTDI_vol * scan length * k-factor = 10.16 mGy * 1.02 cm * 0.0002 mSv mGy^-1 cm^-1 = 2.07 x 10^-3 mSv = 2.07 microSv
KNEE:
ED = DLP * k-factor = CTDI_vol * scan length * k-factor = 22.4 mGy * 6.12 cm * 0.0004 mSv mGy^-1 cm^-1 = 0.0548 mSv = 54.8 microSv
Now, this calculation is not precise and it relies on factors that were computed for a different type of exam. In addition, we don’t know how they compute the effective dose at Scanco.
Stefan Hämmerle wrote on January 16, 2024:
We go with the ICRP Publication 103 where to my knowledge the definition of effective dose comes. There you have different weighting factors for different organs and you have to take into account if an organ is only partly irradiated. For e.g. total skin surface and bone surface and so on we use some estimation from other ICRP Publications and can estimate with that the fraction of these organs we irradiate with the primary beam. Additionally we add something for the stray radiation and for the scout view. With that we end up to something below 3µSv, which we rounded up to below 5µSv to be on the safe side.
Return to Contents or Return to Main Page
XtremeCT radiation dose
[edit]Some notes about radiation dose to help decide acceptable scanning protocols. These comments are based on scanning an adult (not children having significant red marrow at the scan region).
- The annual dose limit for the hand for an occupational user is 500 mSv (as per the ICRP), and with the x-ray energy of our XtremeCT that translates to 500 mGy local dose per year. For non-occupational subjects, the limit is generally 10x lower (i.e., our volunteers should not have more than 50 mGy local dose per year).
- Our scanner delivers a local dose of about 5.3 mGy per scan. However, if we have adjacent scans, there is some overlap due to the penumbra of the x-ray beam which results in about double the local dose (a conservative guess would be 10 mGy) for a ~1mm overlap region. Averaging over the whole scanned regions (overlap and non-overlap regions) we can say that the average delivered local dose is about 7-8 mGy. The local dose is not additive. If we're very conservative, and we take 10 mGy as the local dose, then we could theoretically scan a person 5 times before exceeding the 50 mGy limit based on a tenth of the occupational limit (500 mGy).
Return to Contents or Return to Main Page
vivaCT CTDI dose
[edit]Dose calculation
[edit]Assuming the following settings on the vivaCT for "high mode", we will calculate the CTDI dose.
2000 projections (360 degrees) 0.109 mA 200 ms IT
I calculate the time current value as:
0.109 mA * (0.200 + 0.012) S * 2000 proj= 46.22 mAs
The 0.012 is the integration time between projections.
Taking the proportion of the 68 mAs at 55 kV resulting in 720 mGy (see the document on example dose calculation on this Wiki site), we have:
46.22 / 68 * 720 = 490 mGy
Since CTDI in air is approximately two times the weighted CTDI, and since our setup is more like in air, we get:
2 * 490 = 980 mGy per scan.
It's always a good idea to look at the time-current product in the control file to get an approximate estimate.
Return to Contents or Return to Main Page
Dose chart and example
[edit]- Refer to VivaCT CTDI Dose Calculation Example.
We have measured the following CT dose indices (CTDI).
- CTDIw: Weighted CTDI (chart below)
- CTDIair: CTDI in air (2 times CTDIw - calculate from chart below).
The detector was placed in the center of a 35 mm PMMA cylinder which was placed in the center of rotation.
70kV 300ms 85uA Field of view 38.9mm 1000 Proj./180°: CTDI = 260 mGy 55kV 300ms 109uA Field of view 38.9mm 1000 Proj./180°: CTDI = 220 mGy 45kV 300ms 133uA Field of view 38.9mm 1000 Proj./180°: CTDI = 190 mGy 70kV 300ms 85uA Field of view 30.7mm 1000 Proj./180°: CTDI = 420 mGy 55kV 300ms 109uA Field of view 30.7mm 1000 Proj./180°: CTDI = 350 mGy 45kV 300ms 133uA Field of view 30.7mm 1000 Proj./180°: CTDI = 305 mGy 70kV 300ms 85uA Field of view 21.5mm 1000 Proj./180°: CTDI = 850 mGy 55kV 300ms 109uA Field of view 21.5mm 1000 Proj./180°: CTDI = 720 mGy 45kV 300ms 133uA Field of view 21.5mm 1000 Proj./180°: CTDI = 620 mGy
high res = 1000 Proj./180° medium = 500 Proj./180° standard = 250 Proj./180°
The CTDI scales linear with the integration time (s), with the current (uA) and number of projections. If you have different settings there, it is easy to calculate the CTDI.
CTDI Definition:
Integral from +50mm to -50mm of D(z)/NxT
- where D(z) is the dose profile along a line z which is perpendicular to the tomographic plane
- N is the number of tomographic sections produced in a single rotation
- T is the nominal tomographic section thickness
Example: How to estimate how much radiation would be incurred by a mouse scanned at 25 um resolution (medium resolution -- MR) at 55 kVp, 109 uA, 150 ms IT, for about 30 minutes?
If you take your settings you can calculate the CTDI. First thing you have to be aware is that the CTDI is something like the local dose but it takes the cone beam geometry and the not perfect collimation of the x-ray beam into account (The CTDI value is always higher than a local dose measurement with for example TLDs). It does not matter how many stacks you are scanning. The dose you have at one point which is within the volume you are scanning gets the same local dose if you are performing a 1 stack or a 4 stack measurement.
With the 55kVp/109uA HR with 300ms we have a value at the 30.7 mm position of 350 mGy. Because you have MR we can divide the values by a factor of 2; and because you have 150ms instead of 300ms there is an other factor of 2. You would get 87.5 mGy for the position 30.7 mm. Because of the cone beam the dose has a quadratic dependency to the diameter of the field of view. (30.7 mm/25 mm)2 = 1.5. The CTDI value for your settings is in the order of 87.5 mGy * 1.5 = 132 mGy.
Note that for in vivo measurements, we should multiply the result by a factor of two since we are doing the measurement in AIR, not WATER. The charts above are assuming the CTDI done in water.
Return to Contents or Return to Main Page
Optimize Scan for Low Dose
[edit]- Refer to Optimize Scan Protocols for Low Dose.


