diff --git a/src/views/dataset/MultiSourceConfiguration.vue b/src/views/dataset/MultiSourceConfiguration.vue index ace35ee4..402ee36b 100644 --- a/src/views/dataset/MultiSourceConfiguration.vue +++ b/src/views/dataset/MultiSourceConfiguration.vue @@ -7,7 +7,7 @@ 1; + get isMultiBandRGBFile(): boolean { + return this.isRGBFile && this.rgbBandCount > 1; } // Call join on the array, cutting out elements or the first word if too long and adding hyphens @@ -739,7 +739,7 @@ export default class MultiSourceConfiguration extends Vue { } // Handle RGB expansion - if (this.isRGBFile && this.rgbBandCount > 1 && this.splitRGBBands) { + if (this.isMultiBandRGBFile && this.splitRGBBands) { // Assuming 3 bands (R,G,B), adjust as needed if dynamic const bandSuffixes = [" - Red", " - Green", " - Blue"]; const expandedChannels: string[] = []; @@ -768,7 +768,7 @@ export default class MultiSourceConfiguration extends Vue { const item = this.girderItems[itemIdx]; const nFrames = this.tilesMetadata[itemIdx].frames?.length || 1; for (let frameIdx = 0; frameIdx < nFrames; ++frameIdx) { - if (this.isRGBFile && this.rgbBandCount > 1 && this.splitRGBBands) { + if (this.isMultiBandRGBFile && this.splitRGBBands) { // For RGB files, create separate sources for each band for (let bandIdx = 0; bandIdx < this.rgbBandCount; bandIdx++) { compositingSources.push({ @@ -926,7 +926,7 @@ export default class MultiSourceConfiguration extends Vue { } const nFrames = this.tilesMetadata[itemIdx].frames?.length || 1; for (let frameIdx = 0; frameIdx < nFrames; ++frameIdx) { - if (this.isRGBFile && this.rgbBandCount > 1 && this.splitRGBBands) { + if (this.isMultiBandRGBFile && this.splitRGBBands) { // For RGB files, create separate sources for each band for (let bandIdx = 0; bandIdx < this.rgbBandCount; bandIdx++) { basicSources.push({ @@ -972,7 +972,7 @@ export default class MultiSourceConfiguration extends Vue { channels, sources, uniformSources: true, - singleBand: this.isRGBFile && this.rgbBandCount > 1, + singleBand: this.isMultiBandRGBFile, }), transcode: this.transcode, eventCallback, @@ -1004,7 +1004,7 @@ export default class MultiSourceConfiguration extends Vue { } get isRGBAssignmentValid(): boolean { - if (this.isRGBFile && this.rgbBandCount > 1 && this.splitRGBBands) { + if (this.isMultiBandRGBFile && this.splitRGBBands) { return this.assignments.C === null; } return true;