nrrdinfo
설명
예제
NRRD 형식의 파일에서 메타데이터를 읽어 들입니다. 파일은 RIRE(Retrospective Image Registration Evaluation) 데이터 세트의 3차원 CT와 MRI 스캔을 포함하는, NRRD 파일 형식으로 변환된 데이터 세트의 일부입니다. 원래 데이터 세트는 Michael Fitzpatrick 박사가 제공했습니다. 자세한 내용은 RIRE Project 홈페이지를 참조하십시오. 전체 데이터 세트의 크기는 약 35MB입니다. MathWorks® 웹사이트에서 데이터 세트를 다운로드한 다음 폴더의 압축을 풉니다.
zipFile = matlab.internal.examples.downloadSupportFile("medical", ... "MedicalRegistrationNRRDdata.zip"); filepath = fileparts(zipFile); unzip(zipFile,filepath)
읽어 들일 NRRD 파일의 이름을 지정합니다.
filename = fullfile(filepath,"supportfilesNRRD","Patient007CT.nrrd");
filename에서 메타데이터를 읽어 들입니다.
info = nrrdinfo(filename);
ImageSize 메타데이터 필드에는 해당 영상 볼륨 크기(단위: 픽셀)가 포함되어 있습니다.
info.ImageSize
ans = 1×3
512 512 28
PixelDimensions 메타데이터 필드에는 각 차원에서의 복셀 크기가 밀리미터 같은 실제 단위로 포함되어 있습니다.
info.PixelDimensions
ans = 1×3
0.6536 0.6536 4.0000
SpatialMapping 메타데이터 필드에는 볼륨에 대한 내재적 좌표계와 환자 좌표계 간의 변환을 정의하는 affinetform3d 객체가 포함되어 있습니다.
info.SpatialMapping
ans =
affinetform3d with properties:
Dimensionality: 3
A: [4×4 double]
RawAttributes 메타데이터 필드에는 NRRD 헤더 정보에서 추출된 원시 메타데이터가 포함되어 있습니다.
info.RawAttributes
ans = struct with fields:
dimension: '3'
sizes: '512 512 28 '
type: 'float'
encoding: 'raw'
endian: 'little'
spacedimension: '3'
spaceorigin: '(1.653595, 1.653595, 5.000000)'
spacedirections: '(0.653595,0.000000,0.000000) (0.000000,0.653595,0.000000) (0.000000,0.000000,4.000000)'
입력 인수
NRRD 파일 이름으로, string형 스칼라 또는 문자형 벡터로 지정됩니다. 이 파일에는 유효한 NRRD 파일 헤더가 들어 있어야 합니다. nrrdinfo 함수는 헤더와 영상 데이터가 포함된 NRRD 파일(.nrrd)과 분리된 헤더 파일(.nhdr)을 지원합니다. filename을 이 파일의 절대 경로나 현재 디렉터리에서의 상대 경로 또는 MATLAB® 경로에 있는 특정 디렉터리에서의 상대 경로로 지정하십시오.
데이터형: char | string
출력 인수
NRRD 메타데이터로, 구조체로 반환됩니다.
버전 내역
R2022b에 개발됨
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)