Welcome to the Medical Image Processing Tools repository! This repository provides a collection of tools for processing medical images, specifically DICOM and PNG files, as well as various utility functions.
- π¦
DICOM
- π
Statistics
- π
CSV
- π
DataFrames
- π
Dates
- πΌ
Images
π Reads a DICOM file.
- Input:
- π
path_to_file
: Path to the DICOM file.
- π
- Output:
- π DICOM data.
- π SID.
- π V_P.
- πΌ Image.
π get_num_of_patches(img::Matrix{Float32}, lbl::Matrix{Float32}, mask::Matrix{Float32}; thd = 0.35, patch_size = 256)
π Gets the number of patches needed for an image.
- Input:
- πΌ
img
: The image. - π―
lbl
: The ROI. - π
mask
: Binary mask representing the breast area.
- πΌ
- Optional Input:
- π
thd
: Threshold of percentage of the white area. Default = 0.35. - π
patch_size
: Size of each patch. Default = 256.
- π
- Output:
- π« Number of without-BAC patches.
- β Number of with-BAC patches.
πΎ Saves data to a local CSV file.
- Input:
- π
column_names_
: Column names. - π
data
: 2D array of data. - π
csv_name
: Name of the CSV file.
- π
π° Gets the last edit time of a file.
- Input:
- π
file_path
: Path to the file.
- π
- Output:
- π
Last edit time in
Dates
format.
- π
Last edit time in
π Recursively looks for all files in folders and subfolders based on file extension.
- Input:
- π
root_dir
: Root directory. - π
file_ext
: Extension of a file to search for (e.g., ".dcm").
- π
- Output:
- π List of found paths.
π Recursively looks for the target file by name.
- Input:
- π
root_dir
: Root directory. - π
file_name
: Name of the target file.
- π
- Output:
- π Path to the target file (or an empty string if not found).
π Looks for a target element in an array (binary search). The input array should be sorted.
- Input:
- π
SIDs
: List containing the target. - π―
target
: The target element.
- π
- Output:
- π’ Index of the target in the SID list (-1 if not found).
π Zooms pixel values of an image to the range [0, 1].
- Input:
- πΌ
img
: Input image.
- πΌ
- Output:
- πΌ Zoomed image.
π Copies a file to a new path.
- Input:
- π
old_path
: Old path of the file. - π
new_path
: New path for the file.
- π
π Deletes everything inside a directory.
- Input:
- π
directory
: Directory to be cleaned.
- π
π Normalizes an image, making the mean of all pixel values 0 and the standard deviation 1.
- Input:
- πΌ
img
: Input image.
- πΌ
- Output:
- πΌ Normalized image.
π Reads a PNG file.
- Input:
- π
path_to_file
: Path to the PNG file.
- π
- Output:
- πΌ Image in
Matrix{Float32}
format.
- πΌ Image in
π Finds the breast area and creates a mask.
- Input:
- πΌ
raw_img
: The raw image inMatrix{Float32}
format.
- πΌ
- Output:
- π Binary mask in
Matrix{Float32}
format.
- π Binary mask in