⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avw_img_read_4d.html

📁 mri_toolbox是一个工具用来MRI. 来自于SourceForge, 我上传这个软件,希望能结识对医疗软件感兴趣的兄弟.
💻 HTML
📖 第 1 页 / 共 4 页
字号:
0511     0512 <span class="keyword">end</span>0513 0514 t=toc; fprintf(<span class="string">'...done (%5.2f sec).\n\n'</span>,t);0515 0516 <span class="keyword">return</span>0517 0518 0519 0520 0521 <span class="comment">% This function attempts to read the orientation of the</span>0522 <span class="comment">% Analyze file according to the hdr.hist.orient field of the</span>0523 <span class="comment">% header.  Unfortunately, this field is optional and not</span>0524 <span class="comment">% all programs will set it correctly, so there is no guarantee,</span>0525 <span class="comment">% that the data loaded will be correctly oriented.  If necessary,</span>0526 <span class="comment">% experiment with the 'orient' option to read the .img</span>0527 <span class="comment">% data into the 3D matrix of avw.img as preferred.</span>0528 <span class="comment">%</span>0529 0530 <span class="comment">% (Conventions gathered from e-mail with support@AnalyzeDirect.com)</span>0531 <span class="comment">%</span>0532 <span class="comment">% 0  transverse unflipped</span>0533 <span class="comment">%       X direction first,  progressing from patient right to left,</span>0534 <span class="comment">%       Y direction second, progressing from patient posterior to anterior,</span>0535 <span class="comment">%       Z direction third,  progressing from patient inferior to superior.</span>0536 <span class="comment">% 1  coronal unflipped</span>0537 <span class="comment">%       X direction first,  progressing from patient right to left,</span>0538 <span class="comment">%       Z direction second, progressing from patient inferior to superior,</span>0539 <span class="comment">%       Y direction third,  progressing from patient posterior to anterior.</span>0540 <span class="comment">% 2  sagittal unflipped</span>0541 <span class="comment">%       Y direction first,  progressing from patient posterior to anterior,</span>0542 <span class="comment">%       Z direction second, progressing from patient inferior to superior,</span>0543 <span class="comment">%       X direction third,  progressing from patient right to left.</span>0544 <span class="comment">% 3  transverse flipped</span>0545 <span class="comment">%       X direction first,  progressing from patient right to left,</span>0546 <span class="comment">%       Y direction second, progressing from patient anterior to posterior,</span>0547 <span class="comment">%       Z direction third,  progressing from patient inferior to superior.</span>0548 <span class="comment">% 4  coronal flipped</span>0549 <span class="comment">%       X direction first,  progressing from patient right to left,</span>0550 <span class="comment">%       Z direction second, progressing from patient superior to inferior,</span>0551 <span class="comment">%       Y direction third,  progressing from patient posterior to anterior.</span>0552 <span class="comment">% 5  sagittal flipped</span>0553 <span class="comment">%       Y direction first,  progressing from patient posterior to anterior,</span>0554 <span class="comment">%       Z direction second, progressing from patient superior to inferior,</span>0555 <span class="comment">%       X direction third,  progressing from patient right to left.</span>0556 0557 0558 <span class="comment">%----------------------------------------------------------------------------</span>0559 <span class="comment">% From ANALYZE documentation...</span>0560 <span class="comment">%</span>0561 <span class="comment">% The ANALYZE coordinate system has an origin in the lower left</span>0562 <span class="comment">% corner. That is, with the subject lying supine, the coordinate</span>0563 <span class="comment">% origin is on the right side of the body (x), at the back (y),</span>0564 <span class="comment">% and at the feet (z). This means that:</span>0565 <span class="comment">%</span>0566 <span class="comment">% +X increases from right (R) to left (L)</span>0567 <span class="comment">% +Y increases from the back (posterior,P) to the front (anterior, A)</span>0568 <span class="comment">% +Z increases from the feet (inferior,I) to the head (superior, S)</span>0569 <span class="comment">%</span>0570 <span class="comment">% The LAS orientation is the radiological convention, where patient</span>0571 <span class="comment">% left is on the image right.  The alternative neurological</span>0572 <span class="comment">% convention is RAS (also Talairach convention).</span>0573 <span class="comment">%</span>0574 <span class="comment">% A major advantage of the Analzye origin convention is that the</span>0575 <span class="comment">% coordinate origin of each orthogonal orientation (transverse,</span>0576 <span class="comment">% coronal, and sagittal) lies in the lower left corner of the</span>0577 <span class="comment">% slice as it is displayed.</span>0578 <span class="comment">%</span>0579 <span class="comment">% Orthogonal slices are numbered from one to the number of slices</span>0580 <span class="comment">% in that orientation. For example, a volume (x, y, z) dimensioned</span>0581 <span class="comment">% 128, 256, 48 has:</span>0582 <span class="comment">%</span>0583 <span class="comment">%   128 sagittal   slices numbered 1 through 128 (X)</span>0584 <span class="comment">%   256 coronal    slices numbered 1 through 256 (Y)</span>0585 <span class="comment">%    48 transverse slices numbered 1 through  48 (Z)</span>0586 <span class="comment">%</span>0587 <span class="comment">% Pixel coordinates are made with reference to the slice numbers from</span>0588 <span class="comment">% which the pixels come. Thus, the first pixel in the volume is</span>0589 <span class="comment">% referenced p(1,1,1) and not at p(0,0,0).</span>0590 <span class="comment">%</span>0591 <span class="comment">% Transverse slices are in the XY plane (also known as axial slices).</span>0592 <span class="comment">% Sagittal slices are in the ZY plane.</span>0593 <span class="comment">% Coronal slices are in the ZX plane.</span>0594 <span class="comment">%</span>0595 <span class="comment">%----------------------------------------------------------------------------</span>0596 0597 0598 <span class="comment">%----------------------------------------------------------------------------</span>0599 <span class="comment">% E-mail from support@AnalyzeDirect.com</span>0600 <span class="comment">%</span>0601 <span class="comment">% The 'orient' field in the data_history structure specifies the primary</span>0602 <span class="comment">% orientation of the data as it is stored in the file on disk.  This usually</span>0603 <span class="comment">% corresponds to the orientation in the plane of acquisition, given that this</span>0604 <span class="comment">% would correspond to the order in which the data is written to disk by the</span>0605 <span class="comment">% scanner or other software application.  As you know, this field will contain</span>0606 <span class="comment">% the values:</span>0607 <span class="comment">%</span>0608 <span class="comment">% orient = 0 transverse unflipped</span>0609 <span class="comment">% 1 coronal unflipped</span>0610 <span class="comment">% 2 sagittal unflipped</span>0611 <span class="comment">% 3 transverse flipped</span>0612 <span class="comment">% 4 coronal flipped</span>0613 <span class="comment">% 5 sagittal flipped</span>0614 <span class="comment">%</span>0615 <span class="comment">% It would be vary rare that you would ever encounter any old Analyze 7.5</span>0616 <span class="comment">% files that contain values of 'orient' which indicate that the data has been</span>0617 <span class="comment">% 'flipped'.  The 'flipped flag' values were really only used internal to</span>0618 <span class="comment">% Analyze to precondition data for fast display in the Movie module, where the</span>0619 <span class="comment">% images were actually flipped vertically in order to accommodate the raster</span>0620 <span class="comment">% paint order on older graphics devices.  The only cases you will encounter</span>0621 <span class="comment">% will have values of 0, 1, or 2.</span>0622 <span class="comment">%</span>0623 <span class="comment">% As mentioned, the 'orient' flag only specifies the primary orientation of</span>0624 <span class="comment">% data as stored in the disk file itself.  It has nothing to do with the</span>0625 <span class="comment">% representation of the data in the 3D Analyze coordinate system, which always</span>0626 <span class="comment">% has a fixed representation to the data.  The meaning of the 'orient' values</span>0627 <span class="comment">% should be interpreted as follows:</span>0628 <span class="comment">%</span>0629 <span class="comment">% orient = 0:  The primary orientation of the data on disk is in the</span>0630 <span class="comment">% transverse plane relative to the object scanned.  Most commonly, the fastest</span>0631 <span class="comment">% moving index through the voxels that are part of this transverse image would</span>0632 <span class="comment">% span the right-left extent of the structure imaged, with the next fastest</span>0633 <span class="comment">% moving index spanning the posterior-anterior extent of the structure.  This</span>0634 <span class="comment">% 'orient' flag would indicate to Analyze that this data should be placed in</span>0635 <span class="comment">% the X-Y plane of the 3D Analyze Coordinate System, with the Z dimension</span>0636 <span class="comment">% being the slice direction.</span>0637 <span class="comment">%</span>0638 <span class="comment">% orient = 1:  The primary orientation of the data on disk is in the coronal</span>0639 <span class="comment">% plane relative to the object scanned.  Most commonly, the fastest moving</span>0640 <span class="comment">% index through the voxels that are part of this coronal image would span the</span>0641 <span class="comment">% right-left extent of the structure imaged, with the next fastest moving</span>0642 <span class="comment">% index spanning the inferior-superior extent of the structure.  This 'orient'</span>0643 <span class="comment">% flag would indicate to Analyze that this data should be placed in the X-Z</span>0644 <span class="comment">% plane of the 3D Analyze Coordinate System, with the Y dimension being the</span>0645 <span class="comment">% slice direction.</span>0646 <span class="comment">%</span>0647 <span class="comment">% orient = 2:  The primary orientation of the data on disk is in the sagittal</span>0648 <span class="comment">% plane relative to the object scanned.  Most commonly, the fastest moving</span>0649 <span class="comment">% index through the voxels that are part of this sagittal image would span the</span>0650 <span class="comment">% posterior-anterior extent of the structure imaged, with the next fastest</span>0651 <span class="comment">% moving index spanning the inferior-superior extent of the structure.  This</span>0652 <span class="comment">% 'orient' flag would indicate to Analyze that this data should be placed in</span>0653 <span class="comment">% the Y-Z plane of the 3D Analyze Coordinate System, with the X dimension</span>0654 <span class="comment">% being the slice direction.</span>0655 <span class="comment">%</span>0656 <span class="comment">% Orient values 3-5 have the second index reversed in order, essentially</span>0657 <span class="comment">% 'flipping' the images relative to what would most likely become the vertical</span>0658 <span class="comment">% axis of the displayed image.</span>0659 <span class="comment">%</span>0660 <span class="comment">% Hopefully you understand the difference between the indication this 'orient'</span>0661 <span class="comment">% flag has relative to data stored on disk and the full 3D Analyze Coordinate</span>0662 <span class="comment">% System for data that is managed as a volume image.  As mentioned previously,</span>0663 <span class="comment">% the orientation of patient anatomy in the 3D Analyze Coordinate System has a</span>0664 <span class="comment">% fixed orientation relative to each of the orthogonal axes.  This orientation</span>0665 <span class="comment">% is completely described in the information that is attached, but the basics</span>0666 <span class="comment">% are:</span>0667 <span class="comment">%</span>0668 <span class="comment">% Left-handed coordinate system</span>0669 <span class="comment">%</span>0670 <span class="comment">% X-Y plane is Transverse</span>0671 <span class="comment">% X-Z plane is Coronal</span>0672 <span class="comment">% Y-Z plane is Sagittal</span>0673 <span class="comment">%</span>0674 <span class="comment">% X axis runs from patient right (low X) to patient left (high X)</span>0675 <span class="comment">% Y axis runs from posterior (low Y) to anterior (high Y)</span>0676 <span class="comment">% Z axis runs from inferior (low Z) to superior (high Z)</span>0677 <span class="comment">%</span>0678 <span class="comment">%----------------------------------------------------------------------------</span>0679 0680 0681 0682 <span class="comment">%----------------------------------------------------------------------------</span>0683 <span class="comment">% SPM2 NOTES from spm2 webpage: One thing to watch out for is the image</span>0684 <span class="comment">% orientation. The proper Analyze format uses a left-handed co-ordinate</span>0685 <span class="comment">% system, whereas Talairach uses a right-handed one. In SPM99, images were</span>0686 <span class="comment">% flipped at the spatial normalisation stage (from one co-ordinate system</span>0687 <span class="comment">% to the other). In SPM2b, a different approach is used, so that either a</span>0688 <span class="comment">% left- or right-handed co-ordinate system is used throughout. The SPM2b</span>0689 <span class="comment">% program is told about the handedness that the images are stored with by</span>0690 <span class="comment">% the spm_flip_analyze_images.m function and the defaults.analyze.flip</span>0691 <span class="comment">% parameter that is specified in the spm_defaults.m file. These files are</span>0692 <span class="comment">% intended to be customised for each site. If you previously used SPM99</span>0693 <span class="comment">% and your images were flipped during spatial normalisation, then set</span>0694 <span class="comment">% defaults.analyze.flip=1. If no flipping took place, then set</span>0695 <span class="comment">% defaults.analyze.flip=0. Check that when using the Display facility</span>0696 <span class="comment">% (possibly after specifying some rigid-body rotations) that:</span>0697 <span class="comment">%</span>0698 <span class="comment">% The top-left image is coronal with the top (superior) of the head displayed</span>0699 <span class="comment">% at the top and the left shown on the left. This is as if the subject is viewed</span>0700 <span class="comment">% from behind.</span>0701 <span class="comment">%</span>0702 <span class="comment">% The bottom-left image is axial with the front (anterior) of the head at the</span>0703 <span class="comment">% top and the left shown on the left. This is as if the subject is viewed from above.</span>0704 <span class="comment">%</span>0705 <span class="comment">% The top-right image is sagittal with the front (anterior) of the head at the</span>0706 <span class="comment">% left and the top of the head shown at the top. This is as if the subject is</span>0707 <span class="comment">% viewed from the left.</span>0708 <span class="comment">%----------------------------------------------------------------------------</span></pre></div><hr><address>Generated on Fri 21-May-2004 12:38:21 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -