Syntax
[X,tags]=VMuidicom([filename])
Input Parameter
filename : | | optional filename |
Output Parameter
X : | | voxel model of dicom stack |
tags : | | empty, if no dicom file |
Copyright 2012-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, VMuidicom
, is designed to read DICOM files and return a voxel model of the DICOM stack along with any associated tags. It is part of the SolidGeometry library and was introduced by Tim Lueth.
Input Parameters
- filename: An optional parameter specifying the name of the DICOM file to be read. If not provided, a dialog will open to select a file.
Output Results
- X: The voxel model of the DICOM stack.
- tags: Metadata associated with the DICOM file. It will be empty if no DICOM file is read.
Algorithm Steps
- Initialize
pathname
to the current directory ('.').
- Check if any input arguments are provided:
- If
nargin >= 1
, set filename
to the first argument.
- If no arguments are provided (
nargin == 0
), open a file dialog to select a DICOM file:
- Use
uigetfile
to get filename
and pathname
.
- If a valid
pathname
is obtained:
- Change the current directory to
pathname
.
- Attempt to read DICOM file information using
dicominfo
:
- If successful, store the information in
tags
.
- If unsuccessful, set
tags
and X
to empty and return.
- Read the DICOM image data using
dicomread
and store it in X
.
- If no output arguments are specified (
nargout == 0
):
- Display the image using
imshow
with transposed data X'
.
- Set the color limits to auto using
clim('auto')
.
- Enable axis display and set axis limits to the size of
X
.
- Label the axes as 'x' and 'y'.
Algorithm explaination created using ChatGPT on 2025-08-19 01:22. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21