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
4
votes
1 answer

Medical Image Segmentation if the entire ground truth is black

I am new to deep learning. I am working on a CT-scan medical images. I want to use UNet architecture to predict the image segmentation. I have successfully implemented the UNet, however, my prediction is completely black. I think it is because there…
4
votes
3 answers

How to find the padding size of an image?

I have a dicom image but the image is padded. I have code to remove the padding from the image so that only the scan is left but I have to open the image using ImageJ and manually find min and max values for the x and y axis for where the image…
rzaratx
  • 756
  • 3
  • 9
  • 29
4
votes
3 answers

Resize a DICOM image in python

I am trying to resize DICOM images of different dimensions into a common dimension size for training my neural network. I thought that cv2 could solve my problem. But I am getting a 'datatype not understood error' in my jupyter notebook I am trying…
4
votes
1 answer

Transform DICOM Image to a list of XYZ coordinates and their values - Python

Here is what I am trying to accomplish in Python (please keep in mind that I'm relatively new to Python): Convert a DICOM image into a list of xyz coordinates along with their respective pixel values and export the list to a .csv file. Regenerate…
Masrawy
  • 41
  • 1
  • 3
3
votes
1 answer

How to calculate added path length (APL) image segmentation metric?

Background I'm trying to calculate the added path length (APL) metric used in segmantic segmentation for radiotherapy treatment planning. The metric originated in this paper but I can't find any explanation on how to calculate it, just the following…
clarkbab
  • 31
  • 5
3
votes
1 answer

Select area (square) with specific measure from an image using skimage python

I'm trying to extract 3 areas from the image (lungs image) these areas are indicated in the soft tissues, each area will be a square of specific height and width e.g. 10mm for width and height, as shown in the image below, as seen in the image also…
3
votes
2 answers

How can I reduce the number of channels in an MRI (.nii format) image?

I have been trying to feed a dataset of brain MRI images (IXI dataset) to a ConvNet, however, some of the images have 140 channels some others 150 channels. How can I make all the images have the same number of channels so that I won't run into…
3
votes
2 answers

Image data in mha brain tumor file

I have an MHA file and when I write from medpy.io import load image_data, image_header = load("HG/0001/VSD.Brain.XX.O.MR_Flair/VSD.Brain.XX.O.MR_Flair.684.mha") print(image_data.shape) I get a tuple (160, 216, 176). What do these dimensions…
AMRO
  • 51
  • 1
  • 6
3
votes
2 answers

How to calculate a Voxel size?

Provided following information from a DICOM header, how can I calculate the third value of voxel size? I assume the first two values are 0.515625 and 0.515625. BitsAllocated: "16" BitsStored: "12" Columns: 512 HighBit: "11" ImageOrientation:…
3
votes
0 answers

DICOM files not recognized by Keras ImageDataGenerator in Tensorflow 2.3.1

I am trying to read DICOM (.dcm) files which are located in the folder: /rsna-pneumonia-detection-challenge/stage_2_train_images/ The files are readable and can be displayed using pidicom library. However, when I use Keras ImageDataGenerator to read…
3
votes
1 answer

python read and convert raw 3d image file

I am working with ct scans medical images in raw format. It is basically a 3d matrix of voxels (512*512*nb of slices). I'd like to extract each slice of the file into separate files. import numpy as np import matplotlib.pyplot as plt # reading the…
Gerome Pistre
  • 457
  • 6
  • 15
2
votes
2 answers

How to Fix Slight Mismatch Between Dimensions of CNN Output Data and the Target?

I am trying to create a version of the UNet CNN which will take in a certain type of MRI image volume as the source and use corresponding MRI image volume as the target. After quite a bit of trial and error I am still getting a small mismatch…
2
votes
0 answers

"Smart" Bit depth (bits per pixel) reduction in medical images

I want to train a CNN using mammography (greyscale) DICOM images that have a 14-bit color range per pixel. To train the CNN I want to reduce the images to 8-bit. I tried to do that by simply calculating: scaled_img = (img_arr / 2**14) *…
2
votes
1 answer

What is the best contrast for abdominal CT scans?

I need to preprocess some abdominal CT scans in order to segment the spleen. What contrast function do you usually use for soft tissues in abdominal CT scans? I am working in Python and I tried histogram equalization, contrast stretching, but I am…
2
votes
1 answer

Conversion not working properly using dicom2nifti

I have a series of dicom files (.dcm) for each patient that I want to convert to nii.gz files, but nothing happens (even error info) with the following conversion... import dicom2nifti dicom2nifti.settings.set_gdcmconv_path('C:/Program Files/GDCM…
Linminxiang
  • 325
  • 2
  • 14
1
2 3
16 17