-
-
Notifications
You must be signed in to change notification settings - Fork 382
Medical image processing in the IPython Notebook #529
Conversation
Overall - great stuff!
|
Looking at the content now, but a comment, the origins of Lenna might be a bit inappropriate: |
Rather than having the users download the png file, you could load it directly from a URL see |
The time you spend plotting and making the plot is a bit too long, consider cutting out some of the plotting things so that you can get to the analysis earlier. |
I'd prefer some other image as well. |
If we want to use portraits of women, we should use portraits of leaders, not models. We need a color image that contains objects of a few different colors (and can do better than Lena in this regard). A portrait of Toni Morrison with colorful flowers would be very good: Here are some (probably public domain) photographs of government scientists that might serve: |
I believe this image: |
I've tried editing the notebook to replace Lena with Sally Ride, the results are here: https://github.com/wltrimbl/bc/commits/replacemodel Some notes along the way: The use of two different sources of the test image in different formats--one from wikipedia (in lenaPNG) and one from scipy.misc (in lenaSciPy)--is confusing. I think the lesson would flow better if there were a single source of the test image. lenaSciPy is grayscale, and you only use it for showing off colormaps. I have tried defining graySally early on, and used it for the black-and-white graphs. There was a manual histogram parameter that needed to be changed. An explicit format conversion back to uint8 was useful as well. The conversion from three channels to monochrome was done twice, and was done twice deliberately. Unfortunately the first definition of redSally and the second definition of redSally differ by a transpose. I renamed the temporary variables (redSallyT) to prevent redSally from having different dimensions at different parts of the program. The brightness histogram of Sally is multimodal. The text still alludes to Lena, and there is no reason not to mention her as the placeholder image for EE textbooks for the last quarter of the 20th century. |
Comments apart from choice of model: In the first imshow, it appears as if the colormap (and the color bar) are ignored because the image is RGB. This is somewhat confusing. "dot matrix of data." The meaning of this phrase is not completely transparent to me. Perhaps "two- or three- dimensional matrix of pixel values?" Facts about the digital encoding of images, particularly color images, are not in the numbered list at the top, but are in the lesson. "As medical images may be optical or non-optical..." I think you need text here about the character of color, monochrome, and false-color images instead of text describing the machinery that might produce the images. The histogram is important--it looks like it would be useful to present before thresholding, near "Image Data Manipulation". The label # Generate a mask by simple thresholding. is duplicated. Labels that make the code blocks easier to recognize (and tell apart) might be helpful. The purpose of the ROI (on a portrait) is not manifestly clear. "Suppose we are trying to build a model of the background separate from our model of the model/astronaut..." perhaps? |
I searched Research Data Australia (where I work; ANDS) for example images:
Data is 210Mb, in nd2 format, with link provided to imaging software: The ND2 files are produced in Nikon NIS Elements 3.22.11 and viewable as 'movies' in NIS Elements. http://www.nikoninstruments.com/en_GB/Products/Software/NIS-Elements-Viewer. |
Tip to finding data in Research Data Australia: (RDA is a metadata data description discovery service);
|
Updated content to include previous suggestions. Moved away from using Lena to Sally Ride. |
Medical image processing in the IPython Notebook
I have added the ipynb I have developed for helping to teach people the basics of image analysis and quantification in medical imaging.