Editing
Scanco Administration
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Manipulate RSQ== ===View RSQ projections and flat field=== 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. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Convert RSQ to AIM=== <pre> $ 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] > </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Convert RSQ to PSQ=== First, in the terminal turn on the 'advanced questions' mode <pre> $ define uct_reconstruction_calibration true </pre> Second use the reconstruction EXE to convert RSQ to PSQ <pre> $ 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! </pre> Beam hardening correction can be turned off by doing <pre> $ DEFINE UCT_RECONSTRUCTION_CALIBRATION TRUE $ define uct_disable_bh_correction true $ deass UCT_BEAMHARD_POWER $ deass UCT_BEAMHARD_factor </pre> and then run <code>uct_reconstruction</code> The RSQ contains the RAW projection data. The PSQ represents tilted parallel beam projections: [[Image:CB-Rebinned.gif]] 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. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Measure RSQ motion artifact=== 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 <code>DISK3:[MICROCT.PROJECTS.YVES.SCRIPTS]</code> 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: <code>$ @rsq_to_psq.com DK0:[BRUNO.DATA.00000162.00009479]C0008921.RSQ</code> * IPL_MEASUREMOTION.COM;2 - Takes a PSQ and measures motion using Calgary IPL on percy <pre> $! 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 </pre> Results are save in <code>MEASUREMOTION.LOG</code> and the following section contains all information: <pre> /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 </pre> 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. <code> @DISK3:[MICROCT.PROJECTS.RESCAN.COM]RSQ_MEASUREMOTION.COM DISK3:[MICROCT.PROJECTS.RESCAN.RAW]M0003508.RSQ;1 </code> Make sure to adjust the line: <code>$ SCRIPTFILE := DISK3:[MICROCT.PROJECTS.YVES.SCRIPTS]IPL_MEASUREMOTION.COM</code> to the location of your <code>IPL_MEASUREMOTION.COM</code>. 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: <pre>search/output=motion_all.txt/window(0,1)/match=OR *motion.log "Translation,","Patient Name "</pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Update RSQ's Center Information=== <pre> $ 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. </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Determine RSQ's Centre Calibration Values=== <pre> $ define uct_reconstruction_calibration true ! Note: do not mistype... or the calibration program will not run </pre> In the SAME terminal: <pre>$ uct_reconstruction dk0:[microct.data.00004026.00004576]c0001344.rsq Slice-Nr. [0...919] (Neg. to stop): 100 Center [207]: here enter a new number </pre> Hit return a few more times to use default values for other options. <pre> 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... </pre> 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) <pre> compare against image with center e.g. 200. continue at libitum until you find the best center, the crispest image. </pre> 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. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Modify RSQ's BHC for in-air scans=== 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 <code>calibration</code> and then: <pre> $ 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) </pre> Then, <b>delete</b> the old ISQ. It must be deleted or else the header information will not be changed. Finally, reconstruct the new ISQ and analyze... [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']]
Summary:
Please note that all contributions to bone.wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BoneWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
associated-pages
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Documents
Recent changes
Help
Tools
What links here
Related changes
Page information