Replies: 3 comments 1 reply
-
Will also be discussed at https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/276371 |
Beta Was this translation helpful? Give feedback.
-
I think this would be very cool. It could be a new method Have you also seen the new P.S.: good luck with the challenge! I think it's tougher than it looks. |
Beta Was this translation helpful? Give feedback.
-
@fepegar does this look right? I don't know MRI's well enough to know if it is a synchronized animations I not going for most efficient code, but I am going for synchronized MRI accuracy. for x in range(<depth of volume>):
subject.plot(indices= (x,x,x), output_path=filename, show=False) visualization.py if indices is None:
indices = np.array(data.shape) // 2
i, j, k = indices
slice_x = rotate(data[i, :, :], radiological=radiological)
slice_y = rotate(data[:, j, :], radiological=radiological)
slice_z = rotate(data[:, :, k], radiological=radiological) Then used |
Beta Was this translation helpful? Give feedback.
-
Idea:
It would be neat to have a transform_video_subject() function. Similar to plot_subject(), where I can provide a torchio.Subject, but instead of just plotting/displaying the middle slice it generates every slice and creates a video transfor as show in https://torchio.readthedocs.io/auto_examples/plot_video.html#sphx-glr-download-auto-examples-plot-video-py.
Background:
My current code to generate a dataset looks like this:
I then iterate thru the dataset, plot, and save the subjects:
Full Kaggle notebook available at: https://www.kaggle.com/ohbewise/s4p1-collage
This creates awesome synchronized plots of the middle slice like this:
Today I am going to be working in
matplotlib.pyplot
to save every slice of the subject and create 12 synchronized side-by-side plot videos similar to this video of one image:video.mp4
I feel it would be beneficial for others so I am creating a new discussion here.
Other
In my use case I will be also removing all plot titles, subtitles, and x/y scaling - smashing all 12 images together by cropping out the extra pixels, so they can be used in 2D machine learning.
Beta Was this translation helpful? Give feedback.
All reactions