mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 10:34:29 +08:00
Replace default colormap option with turbo for single-channel output (#1568)
replace default colormap option with turbo for single-channel output Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
This commit is contained in:
parent
403ab26f0c
commit
382ed853f2
@ -71,9 +71,6 @@ const initialState = {
|
||||
};
|
||||
|
||||
function setData(newState, state, path, data) {
|
||||
if (path === 'colormap_options') {
|
||||
newState.colormap_choice = 'default'; // eslint-disable-line no-param-reassign
|
||||
}
|
||||
if (path.length === 1) {
|
||||
newState[path[0]] = data; // eslint-disable-line no-param-reassign
|
||||
} else {
|
||||
|
||||
@ -753,10 +753,12 @@ class ViewerState:
|
||||
if self.output_type_changed or self.prev_colormap_type is None:
|
||||
self.prev_colormap_type = ColormapTypes.DEFAULT
|
||||
colormap_options = []
|
||||
self.vis["renderingState/colormap_options"].write(list(ColormapTypes))
|
||||
if outputs[reformatted_output].shape[-1] == 3:
|
||||
colormap_options = [ColormapTypes.DEFAULT]
|
||||
if outputs[reformatted_output].shape[-1] == 1 and outputs[reformatted_output].dtype == torch.float:
|
||||
colormap_options = list(ColormapTypes)
|
||||
self.prev_colormap_type = ColormapTypes.TURBO
|
||||
colormap_options = list(ColormapTypes)[1:]
|
||||
self.output_type_changed = False
|
||||
self.vis["renderingState/colormap_choice"].write(self.prev_colormap_type)
|
||||
self.vis["renderingState/colormap_options"].write(colormap_options)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user