Questions tagged [medical-imaging]

Use this tag to ask question about processing/converting/creating/analyzing image instance in-memory/persistence-storage related to medical domain. This include DICOM images/pixel-data as well. Additional tag [tag:dicom] is only needed if question relates to DICOM Specifications. If question can stand without it, avoid using [tag:dicom] tag. This tag is agnostic to programming language or toolkit.

250 questions
1
vote
1 answer

Converting hand radiograph DICOM to PNG returns white/bright image

I am converting hand X-rays in DICOM format to PNG format. The code below does this: import os import cv2 import pydicom import numpy as np from PIL import Image inputdir = "P:/BoneDataset/DICOM-File/0-RefinedDICOM/" outdir =…
Bathtub
  • 91
  • 8
1
vote
1 answer

How to get the long & short axis OR get length of mask at a point orthogonal to the feret diameter?

I'm trying to measure a polygon mask's longest diameter (feret diameter) while also getting the length of the orthogonal line from the center of the feret diameter. Diagram of what I'm trying to do can be found here:…
1
vote
1 answer

How can Nifti files be restructured so that they can be fitted in a CNN?

Most of my Nifti files have different xyZ dimensions. How can I arrange them so that they have the same dimensionality and then be able to train them in a CNN?
NUI
  • 23
  • 4
1
vote
1 answer

How to understand the dimensionality of 3D MRI or Nifti images?

I see that 3D images in the shape of XYZ, where X is the height of the image, Y the breadth, and Z the depth. Depth indicates the number of 2D images that make this single 3D MRI images. Right? Is my understanding correct or is there something that…
1
vote
1 answer

MONAI Transform stuck converting 4D NIfTI volumes for 3D multichannel network

I am building off of MONAI's 3D segmentation tutorial to work with 4D NIfTI data, where the fourth dimension represents the channels to be inputted for the proposed 3D network. I have adapted the tutorial to better segment with MONAI's…
1
vote
1 answer

K-Means Binary Clustering in OpenCV to Extract Mask

I try to use cv2.kmeans to segment the left auricle DICOM image as mask. I use the following code to do the k-means binary clustering in OpenCV. import numpy as np import cv2 import os from matplotlib import pyplot as plt img =…
1
vote
0 answers

Training a deep learning network for MRI reconstruction but loss and SSIM values go to NaN after a few iterations

I'm currently working on a project to train a deep learning network to denoise MRI reconstructions in Pytorch but I'm running into issues in the training process where my loss and SSIM becomes NaN after a few iterations. From what I've gathered so…
2fly2try
  • 135
  • 1
  • 9
1
vote
1 answer

3D Image co-registration between multiple subjects

When preforming image co-registration of multiple subjects, how should we select the reference image? Can a randomly selected image form one dataset could be the reference image for an image from the other dataset? If we do that, should all the…
Dushi Fdz
  • 161
  • 3
  • 22
1
vote
1 answer

Is k-folds cross validation a smarter idea than using a validation set instead?

I have a somewhat large (~2000) set of medical images I plan to use to train a CV model (using efficentnet architecture) in my workplace. In preparation for this, I was reading up on some good practices for training medical images. I have split the…
1
vote
1 answer

How can I one hot encode nii.gz files stored in two different folders?

I have read all those images, which I am going to use for binary classification, and stored them in two different NumPy arrays. Now, I need to one hot encode these images, and then feed it to a Neural network. I don't understand how I can one hot…
1
vote
0 answers

What is the best algorithm to differentiate these kidney pictures?

I work on medical images of kidneys scans. My goal would be to differentiate normal ones from pathologic ones (binary problem). Normal images have regular bilateral kidney contours, whereas abnormal cases can be patchy with foci of decreased…
1
vote
1 answer

Training a u-net for multi-landmark heatmap regression producing the same heatmap for each channel

I’m training a U-Net (model below) to predict 4 heatmaps (gaussian centered around a keypoint, one in each channel). Each channel is for some reason outputting the same result, an example is given of a test image where the blue is ground truth for…
solace
  • 11
  • 1
1
vote
0 answers

Tensorflow add feature in image classification

I have a dataset with COVID died/lived X-Ray images and some features. I create the input layer with ImageDataGenerator.flow_from_directory after I have parsed a CSV file which includes all file names. CSV has many other useful columns, except the…
nasos
  • 51
  • 1
  • 6
1
vote
2 answers

Getting "Images Do Not Occupy Same Physical Space" Error When Trying to Multiply two .nii Files in Convert3d/ITK

I have to mask a .nii MRI image for an internship I'm doing. The method I'm using involves multiplying the proton density weighted version of the image (captured during the inversion pulse) by the original mp2rage image. In order to do this I'm…
JG98
  • 43
  • 5
1
vote
0 answers

Stacking multiple Dicom series for a same patient

I have a a sereies of Dicom images for each patient and I would like to stack them and save them as one Volumetric Dicom image, Any idea of how to do that? from glob import glob import dcmstack import dicom src_paths = glob('...../*.dcm') my_stack…
1 2
3
16 17