To begin, obtain written consent from the patient for acquiring the DICOM data. After obtaining the images, transfer the data to the designated working directory in the computer. Then, identify the data directory with the highest number of scanning layers and the thinnest layer thickness to optimize the accuracy based on the file information.
Generally, the more DICOM scan files, the thinner is the scan layer thickness. Using the DICOM info function and DICOM files as the function parameters in the MATLAB environment, obtain the slice thickness and pixel-spacing parameters, which are essential for setting the 3D volume display rate. Next, using the function dicominfo, read the location data of each image by giving info.
sliceLocation as input into the MATLAB workspace. Implement the SliceLocation function to store the location array for a variable and create a plot of the location array. Use the data tips button at the top right of the graphical user interface, or GUI, and add a data tip to the plot on the point representing the maximum location value of the normal sequence.
Using the VolumeResort function, sort all the images and then extract the images from one to the maximum location value. Store the volumes of the valid images with the sorted index, which will help to trace back the important nodules. Move the crosshair to the horizontal axis to browse all the images in the coronal axis.
Note that the crosshair is in the same spatial coordinates and moving it on one axis will change the location of the images in the other two axes. Use the VolumeInspect function to display the axial, coronal, and sagittal views of the constructed volume. In the VolumeInspect function, use the default intensity window for the lung in the GUI.
Hold the left mouse button to adjust the filter performance and drag it on the axis. Direct data preparation and volume calculation results in lung images appearing in the axial, coronal, and sagittal planes.