Answers.Body: <p>I've worked on the BRATS dataset and I can verify that this is pretty much standard process. Besides throwing the totally blank images, I also throw away the images in the beginning and ending of the sequence that show the tip of the scull and the base of the neck.</p>
  
  <p>Generally when dealing with MRIs,
  I do this with a script (think of is as a preprocessing step) I run on each image that counts the amount of pixels that have a positive intensity (I actually add a small value to this to account for noise). Let's say for images with values 0-255 I count the amount of pixels with an intensity of over 10-15, let's call this <span class="math-container">$x$</span>. After that I set a threshold (empirically), let's call it <span class="math-container">$t$</span> and discard images with <span class="math-container">$x &lt; t$</span>. </p>
  
  <p>Specifically for BRATS, because you have the labels, you can see which of these have the desired classes and discard most of the rest. If you try to train a network on the dataset as is you face an <strong>enormous</strong> imbalance ratio. I've had trouble training networks due to this and the most success I got was when I threw away most of the irrelevant images.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-25T22:37:03.600Z
Answers.LastActivityDate: 2019-08-25T22:37:03.600Z
Answers.UserDisplayName: Djib2011
Answers.Body: <p>As an expert in image analysis I don't think this would be a problem. I have never worked with MRI images from the particular dataset you described but I found that the format of the file containing the images is NIfTI.
  NIfTI files can be imported in Matlab(niftiread function), ImageJ and Python (NiBabel-Nipy). Thus you should be able to write a script to import the images from the file, select which images you want to keep, and save the output I'm the same format as the input (NIfTI).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-25T14:51:30.073Z
Answers.LastActivityDate: 2019-08-27T16:59:53.447Z
Answers.LastEditDate: 2019-08-27T16:59:53.447Z
Answers.UserDisplayName: Dr. H. Lecter
Body: <p>I started working on the application of deep learning in medical imaging recently. While dealing with MRI images in the BraTS dataset, I observe that first and last few frames are always completely empty (black). I want to ask those who are already working in the field, is there a way to remove them in a procedural manner before training and add them correctly after the training as a postprocessing step (to comply with the ground truth segmentations' shape)? Has anyone tried that?
  I could not find any results on Google. So asking here.</p>
  
  <p>Edit: I think I did not make my point clear enough. I meant to say first and last few frames of <em>each</em> MRI scan are empty. How to deal with those is what I intended to ask.</p>
  
Tags: <deep-learning><computer-vision><autoencoders>
Title: Dealing with empty frames in MRI images
UserDisplayName: Suyog Jadhav
ThreadText: # Dealing with empty frames in MRI images
  
  (Asked by: username_0 on 2019-08-25)
  
  I started working on the application of deep learning in medical imaging recently. While dealing with MRI images in the BraTS dataset, I observe that first and last few frames are always completely empty (black). I want to ask those who are already working in the field, is there a way to remove them in a procedural manner before training and add them correctly after the training as a postprocessing step (to comply with the ground truth segmentations' shape)? Has anyone tried that?
  I could not find any results on Google. So asking here.
  
  Edit: I think I did not make my point clear enough. I meant to say first and last few frames of *each* MRI scan are empty. How to deal with those is what I intended to ask.
  
  **Tags:** deep-learning, computer-vision, autoencoders
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-08-25. Score: 1 | Accepted answer
  
  I've worked on the BRATS dataset and I can verify that this is pretty much standard process. Besides throwing the totally blank images, I also throw away the images in the beginning and ending of the sequence that show the tip of the scull and the base of the neck.
  
  Generally when dealing with MRIs,
  I do this with a script (think of is as a preprocessing step) I run on each image that counts the amount of pixels that have a positive intensity (I actually add a small value to this to account for noise). Let's say for images with values 0-255 I count the amount of pixels with an intensity of over 10-15, let's call this $x$. After that I set a threshold (empirically), let's call it $t$ and discard images with $x < t$.
  
  Specifically for BRATS, because you have the labels, you can see which of these have the desired classes and discard most of the rest. If you try to train a network on the dataset as is you face an **enormous** imbalance ratio. I've had trouble training networks due to this and the most success I got was when I threw away most of the irrelevant images.
  
  
  ---
  
  ### Answer by username_2 on 2019-08-25. Score: 0
  
  As an expert in image analysis I don't think this would be a problem. I have never worked with MRI images from the particular dataset you described but I found that the format of the file containing the images is NIfTI.
  NIfTI files can be imported in Matlab(niftiread function), ImageJ and Python (NiBabel-Nipy). Thus you should be able to write a script to import the images from the file, select which images you want to keep, and save the output I'm the same format as the input (NIfTI).
  
  
  ---
  
  