Conversation
Codecov Report
@@ Coverage Diff @@
## master #366 +/- ##
==========================================
- Coverage 28.81% 28.71% -0.10%
==========================================
Files 60 60
Lines 8521 8612 +91
==========================================
+ Hits 2455 2473 +18
- Misses 6066 6139 +73
Continue to review full report at Codecov.
|
mvdoc
left a comment
There was a problem hiding this comment.
added comments on some minor issues that would be nice to be fixed before merging
cortex/dataset/viewRGB.py
Outdated
| """ | ||
| Set of known colors | ||
| """ | ||
| RoseRed = (237, 35, 96) |
cortex/dataset/viewRGB.py
Outdated
| shared_vmax=None, **kwargs): | ||
| if isinstance(channel1, VolumeData): | ||
| if not isinstance(channel2, VolumeData) or channel1.subject != channel2.subject: | ||
| raise TypeError("Invalid data for channel2 channel") |
There was a problem hiding this comment.
"Invalid error for channel2 without the last channel?
cortex/dataset/viewRGB.py
Outdated
| if not isinstance(channel2, VolumeData) or channel1.subject != channel2.subject: | ||
| raise TypeError("Invalid data for channel2 channel") | ||
| if not isinstance(channel3, VolumeData) or channel1.subject != channel3.subject: | ||
| raise TypeError("Invalid data for channel3 channel") |
cortex/quickflat/view.py
Outdated
|
|
||
| def make_svg(fname, braindata, with_labels=False, with_curvature=True, layers=['rois'], | ||
| height=1024, **kwargs): | ||
| height=1024, overlay_file = None, **kwargs): |
cortex/utils.py
Outdated
| axs[0,j].plot(*pts[::100, :2].T, marker = 'r.') | ||
| axs[0,j].axis('equal') | ||
| axs[1,j].plot(*pts_new[::100, :2].T, marker='.', color='b') | ||
| axs[1,j].plot(*pts_new[::100, :2].T, marker = 'b.') |
cortex/dataset/viewRGB.py
Outdated
| red : ndarray or Volume | ||
| Array or Volume that represents the red component of the color for each | ||
| channel1 : ndarray or Volume | ||
| Array or Volume that represents the red component of the color for each |
There was a problem hiding this comment.
this docstring also needs to be fixed (red/green/blue component)
|
it looks like some changes to VolumeRGB are not backward compatible, because a test fails |
|
OOH right. I had written the color mapping function to assume a 1D array of voxel values, so it couldn't handle 3D or 4D volumes. Will fix that soon. |
|
cool, thanks! |
Added things to
VolumeRGBto allow data channels to be mapped to custom base colors instead of just red, green, and blue. Also added an option to have all three data channels to use the samevminandvmax. Backwards compatible as the default behavior is to bypass all the new features and map data channels directly to RGB.Also added a
Colorsclass to keep track of colors to use.Specify custom colors:
volume = cortex.VolumeRGB(visual, progression, integration, subject, transform, channel1color = cortex.Colors.RoseRed, channel2color = cortex.Colors.LimeGreen, channel3color = cortex.Colors.DodgerBlue)Force shared ranges:
volume = cortex.VolumeRGB(visual, progression, integration, subject, transform, shared_range = True)Also have a minor thing to specify an overlays file in
quickflat.make_svg