Mbirn: MBIRN XNAT MGH Details
PGP Data Modeling Working Page
Sequence of Models
- Structure
Start from WashU's OASIS model
Structural analysis flow: DICOM off the scanner, DICOM tar-ball to CMA, extract structural-relavent scans, average together multiple structural runs, positionally normalize orientation, bias field correction, assign to segmenter, segmentation (creates outline dataset and summary volumetric metadata
- Structural DICOM tarball listing:
1 localizer ok 512 512 3 1 69268619 2 gresuccflipAAS ok 128 128 128 1 69268634 3 gresuccflipAAS ok 128 128 128 1 69267510 4 tflmghautoSTD ok 256 256 128 1 69266377 5 tflmghautoSTD ok 256 256 128 1 69265244 6 tflmghautoSTD ok 256 256 128 1 69261078 7 FLASH30dgmultiechoauto ok 256 256 128 8 69259945 8 FLASH5dgmultiechoauto ok 256 256 128 8 69244955 9 FLASH3dgmultiechoauto ok 256 256 128 8 69229965 10 gresuccflipHE ok 128 128 128 1 69211942 11 gresuccflipHE ok 128 128 128 1 69210809 12 gresuccBCBODYCOIL ok 128 128 128 1 69209676 13 gresuccBCBODYCOIL ok 128 128 128 1 69208543
Summary: In this case, scans 3, 4 & 5 are for CMA anatomic segmentation. These get assigned a CMA PID (patient identification number), and these are logged to the cma database, cmadb. CMA creates new scans for 1) motoion-corrected-averageing of these three scans (command = xxx, output = new scan and motion parameters), 2) positional normalization (command = norm, output = new scan, transformation parameters), and 3) biasfield correction (command = autoseg2, output = new scan, field correction parameters and intensity 'guesses' for anatomic structures'.
Details
- Create subject in cma_db
Enter Command (a_,m_,l_,la,ld,f_,s_,d_,np,nx,p,pc,D,q,?) --> Lp 3352 List Patients: pid name dob gender study 3352 PGP_ABY83 ONDCP (diagnostic= 1 printing=off) Enter Command (a_,m_,l_,la,ld,f_,s_,d_,np,nx,p,pc,D,q,?) -->
- Identify structural runs (from dicom listing shown above)
- Create raw structural scan runs in cma_db (scns 1, 2 and 3 below)
Enter Command (a_,m_,l_,la,ld,f_,s_,d_,np,nx,p,pc,D,q,?) --> ls 3352 List Scans: pid scn num_im orient param stype loc_perf date on_dsk arch pos_nrm done assign o_on_dsk o_arch 3352 1 128 SAG T13D DCM CMA 28-MAY-04 Y N N N N N N 3352 2 128 SAG T13D DCM CMA 28-MAY-04 Y N N N N N N 3352 3 128 SAG T13D DCM CMA 28-MAY-04 Y N N N N N N 3352 4 140 COR AVG-MC IMG CMA 25-AUG-04 Y N N N N N N 3352 5 158 COR T13DPN IMG CMA 20-SEP-04 Y N 4 N JCO N 3352 6 158 COR BIASFX IMG CMA 20-SEP-04 Y N 5 N N N N
- motion correct - average the structural runs
> mri_motion_correct PID.mnc ./data/69266377 ./data/69265244 ./data/69261078
A screen capture of this process follows:
[cerebellum:structurals] (nmr-std-env) mri_motion_correct test.mnc ./data/3354275316 ./data/8881484223 ./data/2444689976 /space/lyon/1/home/inverse/freesurfer_alpha/bin/Linux/mri_convert checking for mincresample...found checking for mincaverage...found checking for minctracc...found checking size of ./data/3354275316... done checking size of ./data/8881484223... done checking size of ./data/2444689976... done converting ./data/3354275316 to minc (volume 0)... done converting ./data/8881484223 to minc (volume 1)... done registering this volume (1) to volume 0... done reslicing registered volume... done removing unsliced minc data and transform file...done converting ./data/2444689976 to minc (volume 2)... done registering this volume (2) to volume 0... done reslicing registered volume... done removing unsliced minc data and transform file...done averaging volumes...done creating output volume...done cleaning up...
New ASSESSOR proposed: oas:MGHRegAvgScns (stands for register and average scans)
- Create avg-mc entry in cma_db (scan 4 in listing above)
- Create CMA info file target location
> mkdir /Data/PID/SN > mkdir /Data/PID/SN/otl
- Convert minc output of motion correct to CMA file (.img images, .info file)
> mri_convert PID.mnc /Data/PID/SN/info.gdf -gis /Image/ONDCP/PID_SN -oid -1 0 0 -ojd 0 0 -1 -okd 0 1 0 -odt short -ois 1.0 -ojs 1.0 -oks 1.5 -oic 256 -ojc 256 -okc 140
- Run nmv to check result, if recentering is necessary, rerun mri_convert using -oc controls
- CMA manager updates study spreadsheet, assigns segmenter, monitors the study,etc.
- Positional Normalization
> norm User enters in GUI: PID, SN AC, PC, MSP selects reslice orientation, accepts the 1.5 slice thickness default
norm inserts the following into the 'Native' scan info file:
NORMALIZATION_ORIGIN 126.25 76.0 136.0 NORMALIZATION_ANGLES -0.018516 0.073926 0.0 ... START GDF HEADER ROW_NUM 3 COL_NUM 4 TYPE ascii table COLUMN_DATA_TYPES {35s,double,double,double} REFERENCE_FRAME nat_coord END GDF HEADER START POINTS AC_POINT 126.500000 85.000000 135.000000 PC_POINT 126.000000 67.000000 137.000000 MID_SAGITTAL_POINT 126.000000 67.000000 70.000000 END POINTS
This information includes the RAS index of the anterior commissure (AC), posterior commissure (PC) and a point on the mid-sagittal plant (at the level of the posterior commissure) (MSP). The norm procedure rotates and translates the scan to a standard location and orientation. The 'rotation' is listed as NORMALIZATION_ANGLES and prodived in radians for rotations about the x, y and z axes, respectively. The RAS of the 'origin' of the rotation (midpoint of the AC - PC linesegment) is provided in NORMALIZATION_ORIGIN; this is tanslated to the center of the output data matrix.
The following information is added to the info file of the newly created 'normalized' scan:
NORMALIZATION_ORIGIN 126.25 76.0 136.0 NORMALIZATION_ANGLES -0.018516 0.073926 0.0 . START POINTS AC_POINT 128.000005 88.026196 127.999994 PC_POINT 127.999995 69.973804 128.000006 MID_SAGITTAL_POINT 127.999995 73.272825 61.183001 END POINTS
This is similar to what is added to the 'native' scan, except that the coordinates of the AC, PC and MSP are in the 'normalized' space.
New ASSESSOR proposed: oas:MGHPosNorm
- cma_db auto updated for normed scan (scan 5 above).
- Set brain extents (crop)
> cardviews PID SN user manually sets and check extens select crop data, save settings button
This updates the 'normalized' info file (in the POINTS section) with:
MIN_CROP 56.000000 18.000000 56.000000 MAX_CROP 198.000000 135.000000 197.000000
These RAS values indicate the MINimum and MAXimum indicies for the coordinates, respectively. Only this sub-portion of the datafile must be loaded in order to include the entire brain in the dataset.
- Run bias-field correction and intensity guesses
> autoseg2 PID SN
This command automatically finds next available scan number from CMADB and creates entry (see scan 6 above), and enters a 'pile' of stuff into info file. Also creates file naut_variables.gdf in /Data/PID/SN
Sample entries to new scan info file:
VERSION $Id: naut_rm_init_inhomo.c,v 1.11 1999/09/30 19:00:09 andy Exp $ (c) Copyright 1999 Neuromorphometrics PARAMETER_RI_threeDG_mult_fact_DEFAULT 1000.0 PARAMETER_RI_threeDG_diam_DEFAULT 40.0 PARAMETER_RI_bias_field_vox_size_DEFAULT 30.0 PARAMETER_RI_bias_histo_sig_dig_DEFAULT 1000.0 PARAMETER_RI_rm_bias_frac_DEFAULT 1.0 VERSION $Id: naut_global_context.c,v 1.9 2000/04/05 13:43:23 andy Exp $ (c) Copyright 1999 Neuromorphometrics PARAMETER_GC1_set_smooth_using_cumu_DEFAULT 1 PARAMETER_GC1_RIR_loval_frac_DEFAULT 0.1 PARAMETER_GC1_RIR_hival_frac_DEFAULT 0.9 PARAMETER_GC1_aarea_frac_DEFAULT 0.0333333333333 PARAMETER_GC1_acceptable_residual_DEFAULT 0.08 PARAMETER_GC1_smoo_DEFAULT 0.05 PARAMETER_GC1_mult_factor_DEFAULT 10000.0 PARAMETER_GC1_edge_thresh_frac_DEFAULT 0.5 PARAMETER_GC1_zero_bg_thresh_DEFAULT 0.00 PARAMETER_GC1_brain_thresh_frac_DEFAULT 0.85 PARAMETER_GC2_aarea_frac_DEFAULT 0.01 PARAMETER_GC2_acceptable_residual_DEFAULT 0.08 PARAMETER_GC2_smoo_DEFAULT 0.05 PARAMETER_GC2_mult_factor_DEFAULT 10000.0 VERSION $Id: naut_GC3.c,v 1.10 2001/07/26 21:19:20 andy Exp $ (c) Copyright 1999 Neuromorphometrics PARAMETER_GC3_set_smooth_using_cumu_DEFAULT 1 PARAMETER_GC3_RIR_loval_frac_DEFAULT 0.1 PARAMETER_GC3_RIR_hival_frac_DEFAULT 0.9 PARAMETER_GC3_aarea_frac_DEFAULT 0.01 PARAMETER_GC3_acceptable_residual_DEFAULT 0.08 PARAMETER_GC3_smoo_DEFAULT 0.03 PARAMETER_GC3_mult_factor_DEFAULT 10000.00 PARAMETER_GC3_peak_conf_sdevs_DEFAULT 2.00 PARAMETER_GC3_peak_loc_factor_DEFAULT 1.00 PARAMETER_GC3_width_factor_DEFAULT 3.00 PARAMETER_GC3_minusG_factor_DEFAULT 0.50 PARAMETER_GC3_peak_aprox_factor_DEFAULT 0.95
Sample naut_variables.gdf file:
GDF FILE VERSION3 START MAIN HEADER ONUM 120 END MAIN HEADER START GDF HEADER ROW_NUM 0 COL_NUM 1 TYPE char NAUTILOS_BLOCK Parameters pid 3352 scn 5 Tal_acpc 23.2 Tal_wdth 137.0 Tal_actop 74.0 X_AC 128.000005 Y_AC 88.026196 Z_AC 127.999994 X_PC 127.999995 Y_PC 69.973804 Z_PC 128.000006 X_MID_SAG 127.999995 Y_MID_SAG 73.272825 Z_MID_SAG 61.183001 X_MIN_CROP 56.0 Y_MIN_CROP 18.0 Z_MIN_CROP 56.0 X_MAX_CROP 198.0 Y_MAX_CROP 135.0 Z_MAX_CROP 197.0 VERSION $Id: naut_rm_init_inhomo.c,v 1.11 1999/09/30 19:00:09 andy Exp $ (c) Copyright 1999 Neuromorphometrics PARAMETER_RI_threeDG_mult_fact_DEFAULT 1000.0 PARAMETER_RI_threeDG_diam_DEFAULT 40.0 PARAMETER_RI_bias_field_vox_size_DEFAULT 30.0 PARAMETER_RI_bias_histo_sig_dig_DEFAULT 1000.0 PARAMETER_RI_rm_bias_frac_DEFAULT 1.0 GC_MIN_INTEN 0.0 GC_B_PEAK 33.635502 GC_B_SDEV 19.69475 GC_B_HEIGHT 62407.0 GC_CSF_PEAK 76.5 GC_CSF_SDEV 0.5 GC_CSF_HEIGHT 567.0 GC_CP_PEAK 110.791489 GC_CP_SDEV 0.46798 GC_CP_HEIGHT 2270.0 GC_G_PEAK 211.441177 GC_G_SDEV 41.835285 GC_G_HEIGHT 1170.0 GC_W_PEAK 396.368805 GC_W_SDEV 22.731707 GC_W_HEIGHT 2270.0 GC_MAX_INTEN 956.0 GC_B_CSF_THRESH 73.0 GC_CSF_W_THRESH 236.0 GC_CSF_G_THRESH 128.0 GC_EXT_THRESH 111.0 GC_G_W_THRESH 328.0 GC_W_NB_THRESH 956.0 NAUT_CODE_VERSION GC1 $Id: naut_global_context.c,v 1.9 2000/04/05 13:43:23 andy Exp $ (c) Copyright 1999 Neuromorphometrics NAUT_CODE_VERSION GC2 $Id: naut_global_context.c,v 1.9 2000/04/05 13:43:23 andy Exp $ (c) Copyright 1999 Neuromorphometrics PARAMETER_GC2_aarea_frac_DEFAULT 0.01 PARAMETER_GC2_acceptable_residual_DEFAULT 0.08 PARAMETER_GC2_smoo_DEFAULT 0.05 PARAMETER_GC2_mult_factor_DEFAULT 10000.0 NAUT_CODE_VERSION GC3 $Id: naut_GC3.c,v 1.10 2001/07/26 21:19:20 andy Exp $ (c) Copyright 1999 Neuromorphometrics PARAMETER_GC3_set_smooth_using_cumu_DEFAULT 1 PARAMETER_GC3_RIR_loval_frac_DEFAULT 0.1 PARAMETER_GC3_RIR_hival_frac_DEFAULT 0.9 PARAMETER_GC3_aarea_frac_DEFAULT 0.01 PARAMETER_GC3_acceptable_residual_DEFAULT 0.08 PARAMETER_GC3_smoo_DEFAULT 0.03 PARAMETER_GC3_mult_factor_DEFAULT 10000.00 PARAMETER_GC3_peak_conf_sdevs_DEFAULT 2.00 PARAMETER_GC3_peak_loc_factor_DEFAULT 1.00 PARAMETER_GC3_width_factor_DEFAULT 3.00 PARAMETER_GC3_minusG_factor_DEFAULT 0.50 PARAMETER_GC3_peak_aprox_factor_DEFAULT 0.95 END GDF HEADER
New ASSESSOR proposed: oas:MGHBiasFx
- Segmenter performs the segmentation
> cardviews PID SN segmenter enter prefix: jdh (for outline files)
- Initial segmentation file check
> xvol User enters PID, SN, prfx
to check volumes are reasonable size, errors (bad extraction, missing labels)
- Second segmentation file check
> check_otls xvol/vol/otl_list
checks for same size structures (slice-by-slice) (double labelers) regions excluded from exterior, etc.)
- Final data 'conditioning' and check
> extract_I PID SN jdh fst lst
This catches errors, right/left labeling problems, etc.)
- Final volume generation
> xvol User enters PID, SN, prfx
Example metadata for the volumetric result of the segmentation analysis of this resultant scan follows:
TOTALS: /Data/3352/6/otl/jkcI*.otl, slices 20 to 131 pix dim(x,y,sl)= 0.500000 0.500000 1.500000 mm
Right Cerebral Exterior total volume = 503.082 cm3 Left Cerebral Exterior total volume = 504.948 cm3 Right Cerebral White Matter total volume = 199.677 cm3 Left Cerebral White Matter total volume = 201.125 cm3 Right Cerebral Cortex total volume = 271.826 cm3 Left Cerebral Cortex total volume = 272.218 cm3 Right Lateral Ventricle total volume = 5.092 cm3 Left Lateral Ventricle total volume = 5.544 cm3 Right Inf Lat Vent total volume = 0.216 cm3 Left Inf Lat Vent total volume = 0.153 cm3 Right Cerebellum Exterior total volume = 67.454 cm3 Left Cerebellum Exterior total volume = 67.377 cm3 Right Cerebellum White Matter total volume = 12.637 cm3 Left Cerebellum White Matter total volume = 13.007 cm3 Right Cerebellum Cortex total volume = 54.827 cm3 Left Cerebellum Cortex total volume = 54.378 cm3 Right Thalamus Proper total volume = 5.884 cm3 Left Thalamus Proper total volume = 5.714 cm3 Right Caudate total volume = 4.153 cm3 Left Caudate total volume = 4.288 cm3 Right Putamen total volume = 4.635 cm3 Left Putamen total volume = 4.691 cm3 Right Pallidum total volume = 1.449 cm3 Left Pallidum total volume = 1.376 cm3 3rd Ventricle total volume = 2.535 cm3 4th Ventricle total volume = 1.375 cm3 Optic Chiasm total volume = 0.307 cm3 Brain Stem total volume = 18.643 cm3 Right Hippocampus total volume = 3.453 cm3 Left Hippocampus total volume = 3.110 cm3 Right Amygdala total volume = 1.580 cm3 Left Amygdala total volume = 1.564 cm3 Right Accumbens area total volume = 0.404 cm3 Left Accumbens area total volume = 0.461 cm3 Right VentralDC total volume = 4.712 cm3 Left VentralDC total volume = 4.588 cm3 Right vessel total volume = 0.037 cm3 Left vessel total volume = 0.159 cm3
New ASSESSOR proposed: oas:MGHcmaGSegmentation
Structural Data Model Summary: So, to first approximation, for the PGP structural analysis, we need to get XDAT to track the subjects, the raw volumetric scans, the derived scans, the derived segmentation, and the volumetric results metadata. The majority of this mateches the OASIS schema, and we will next make this explicit.
- Function
Start from fBIRN XML Schema
- Behavioral