Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mylin/1617 support spatial profile line polyline #1812

Merged
merged 55 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
783cf25
match pam's protobuf
acdo2002 Mar 2, 2022
1c1a16c
set width to SpatialProfileWidgetStore.ts
acdo2002 Mar 2, 2022
f691937
remove the block line region in dropdown Region
acdo2002 Mar 3, 2022
45a0441
feed xMax and x value to plotData
acdo2002 Mar 3, 2022
d80a78b
remove case RegionsType.CLOSED & case RegionsType.CLOSED_AND_POINT in…
acdo2002 Mar 8, 2022
17ed73e
add LineRegionSampleWidth in SpatialProfileWidgetStore.ts
acdo2002 Mar 8, 2022
233efa4
plot line region & without x wcs coordinate
acdo2002 Mar 8, 2022
aa855c4
add computation tab
acdo2002 Mar 8, 2022
aac083d
Merge branch 'dev' into mylin/1617-support_spatial_profile_line_polyline
acdo2002 Mar 8, 2022
8b6befb
remove import CARTA
acdo2002 Mar 8, 2022
51115b8
add width
acdo2002 Mar 8, 2022
e094b1e
define bp3-input scss
acdo2002 Mar 8, 2022
fc58d54
attach the line region plotdata
acdo2002 Mar 8, 2022
fd58d8e
Match Pam's protobuf
acdo2002 Mar 21, 2022
ce5db2c
Merge branch 'dev' into mylin/1617-support_spatial_profile_line_polyline
acdo2002 Mar 21, 2022
e9c55b0
Merge branch 'dev' into mylin/1617-support_spatial_profile_line_polyline
Mar 24, 2022
7a0490a
refactory SpatialProfileWidgetStore.ts
acdo2002 Mar 25, 2022
36d1a59
add Region.Type POLYLINE
acdo2002 Mar 25, 2022
dc1d514
reformat
acdo2002 Mar 25, 2022
6073306
resolve merge conflict in RegionSelectorComponent.tsx
acdo2002 Mar 28, 2022
040a821
Merge branch 'dev' into mylin/1617-support_spatial_profile_line_polyline
acdo2002 Mar 31, 2022
7b0972f
remove xMin and modify x
acdo2002 Apr 6, 2022
c22bafe
fix the xMin and xMax for line/polyline region
Apr 10, 2022
eecb639
fix polyline show top Axis
acdo2002 Apr 11, 2022
fad2811
Merge branch 'dev' into mylin/1617-support_spatial_profile_line_polyline
acdo2002 Apr 11, 2022
a6fd45b
Merge branch 'dev' into mylin/1617-support_spatial_profile_line_polyline
acdo2002 Apr 11, 2022
5366bd6
Merge branch 'dev' into mylin/1617-support_spatial_profile_line_polyline
Apr 14, 2022
d11c3b5
fixed bp3-input width in SpatialProfilerSettingsPanelComponent.scss
Apr 14, 2022
ac86c0e
add opacity condition to cursorX marker
acdo2002 Apr 15, 2022
aedf9c1
npm run reformat
acdo2002 Apr 15, 2022
4505783
change coordinateString if the region is line/polyline
acdo2002 Apr 15, 2022
6c84c35
modify bp3-input width in SpatialProfilerSettingsPanelComponent.scss
acdo2002 Apr 15, 2022
6bf534f
revise width to 88
acdo2002 Apr 15, 2022
d9f0953
removed x/y coordinate for line regions
TienHao Apr 21, 2022
0acb262
set xlabel when line and polyline
acdo2002 Apr 22, 2022
70b09e6
update protobuf
acdo2002 Apr 22, 2022
c2e394a
npm run reformat
acdo2002 Apr 22, 2022
2a52d33
Merge branch 'dev' into mylin/1617-support_spatial_profile_line_polyline
acdo2002 Apr 22, 2022
a9f0705
modified effectiveRegionId of active region
TienHao Apr 22, 2022
2efc005
set x-label name
Apr 25, 2022
7f38594
set the xrange for line/polyline regions
Apr 25, 2022
7b46a79
reformat
Apr 25, 2022
2e96776
Fixed Cursor Info Image unit
Apr 26, 2022
72b9f6a
fixed smoothing profile of line and polyline regions
TienHao Apr 26, 2022
ee261b1
fixed line region delete bug, and modified region data of line/polyli…
TienHao Apr 26, 2022
273b951
code refactoring
TienHao Apr 28, 2022
716d1d4
added help content, fixed bugs
TienHao Apr 29, 2022
1714f02
Merge branch 'dev' into mylin/1617-support_spatial_profile_line_polyline
TienHao Apr 29, 2022
c9ddfb8
removed wcs data in cursor info of line/polyline regions, and fixed l…
TienHao Apr 29, 2022
bde1481
fixed minor issue
May 6, 2022
a9a37f9
npm run reformat for RegionStore.ts
May 6, 2022
5a66ac9
update protobuf
May 6, 2022
a423bdb
Match to Pam's protobuf
May 6, 2022
810f5bb
update Pam's line profile protobuf
May 9, 2022
0e080e0
updated protobuf commit
veggiesaurus May 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const SPATIAL_PROFILER_SETTINGS_COMPUTATION_HELP_CONTENT = (
<div>
<h3>Computation</h3>
</div>
);
1 change: 1 addition & 0 deletions src/components/HelpDrawer/HelpContent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export * from "./RenderConfigSettingsHelpContent";
export * from "./SpatialProfilerHelpContent";
export * from "./SpatialProfilerSettingsStylingHelpContent";
export * from "./SpatialProfilerSettingsSmoothingHelpContent";
export * from "./SpatialProfilerSettingsComputationHelpContent";
export * from "./SpectralProfilerHelpContent";
export * from "./SpectralProfilerSettingsConversionHelpContent";
export * from "./SpectralProfilerSettingsStylingHelpContent";
Expand Down
2 changes: 2 additions & 0 deletions src/components/HelpDrawer/HelpDrawerComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
SPATIAL_PROFILER_HELP_CONTENT,
SPATIAL_PROFILER_SETTINGS_SMOOTHING_HELP_CONTENT,
SPATIAL_PROFILER_SETTINGS_STYLING_HELP_CONTENT,
SPATIAL_PROFILER_SETTINGS_COMPUTATION_HELP_CONTENT,
SPECTRAL_LINE_QUERY_HELP_CONTENT,
SPECTRAL_PROFILER_HELP_CONTENT,
SPECTRAL_PROFILER_SETTINGS_CONVERSION_HELP_CONTENT,
Expand Down Expand Up @@ -74,6 +75,7 @@ const HELP_CONTENT_MAP = new Map<HelpType, JSX.Element>([
[HelpType.SPATIAL_PROFILER, SPATIAL_PROFILER_HELP_CONTENT],
[HelpType.SPATIAL_PROFILER_SETTINGS_STYLING, SPATIAL_PROFILER_SETTINGS_STYLING_HELP_CONTENT],
[HelpType.SPATIAL_PROFILER_SETTINGS_SMOOTHING, SPATIAL_PROFILER_SETTINGS_SMOOTHING_HELP_CONTENT],
[HelpType.SPATIAL_PROFILER_SETTINGS_COMPUTATION, SPATIAL_PROFILER_SETTINGS_COMPUTATION_HELP_CONTENT],
[HelpType.SPECTRAL_PROFILER, SPECTRAL_PROFILER_HELP_CONTENT],
[HelpType.SPECTRAL_PROFILER_SETTINGS_CONVERSION, SPECTRAL_PROFILER_SETTINGS_CONVERSION_HELP_CONTENT],
[HelpType.SPECTRAL_PROFILER_SETTINGS_STYLING, SPECTRAL_PROFILER_SETTINGS_STYLING_HELP_CONTENT],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {RegionWidgetStore, RegionsType, RegionId, ACTIVE_FILE_ID} from "stores/w
import "./RegionSelectorComponent.scss";

@observer
export class RegionSelectorComponent extends React.Component<{widgetStore: RegionWidgetStore; disableClosedRegion?: boolean; onFrameChanged?: (newFrame: FrameStore) => void}> {
export class RegionSelectorComponent extends React.Component<{widgetStore: RegionWidgetStore; onFrameChanged?: (newFrame: FrameStore) => void}> {
private handleFrameChanged = (changeEvent: React.ChangeEvent<HTMLSelectElement>) => {
const appStore = AppStore.Instance;
const widgetStore = this.props.widgetStore;
Expand Down Expand Up @@ -62,13 +62,16 @@ export class RegionSelectorComponent extends React.Component<{widgetStore: Regio
case RegionsType.CLOSED_AND_POINT:
fiteredRegions = regions.filter(r => !r.isTemporary && (r.isClosedRegion || r.regionType === CARTA.RegionType.POINT));
break;
case RegionsType.POINT_AND_LINES:
fiteredRegions = regions.filter(r => !r.isTemporary && (r.regionType === CARTA.RegionType.POINT || r.regionType === CARTA.RegionType.LINE || r.regionType === CARTA.RegionType.POLYLINE));
break;
default:
fiteredRegions = regions;
}

regionOptions = regionOptions.concat(
fiteredRegions.map(r => {
return {value: r.regionId, label: r.nameString, disabled: this.props.disableClosedRegion ? r.isClosedRegion : false};
return {value: r.regionId, label: r.nameString};
})
);

Expand Down
113 changes: 85 additions & 28 deletions src/components/SpatialProfiler/SpatialProfilerComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,26 @@ export class SpatialProfilerComponent extends React.Component<WidgetProps> {
} else {
let xMin: number;
let xMax: number;

if (this.widgetStore.isAutoScaledX) {
xMin = this.autoScaleHorizontalMin;
xMax = this.autoScaleHorizontalMax;
if (this.lineAxis) {
if (this.widgetStore.isAutoScaledX) {
xMin = this.autoScaleHorizontalMin;
xMax = this.autoScaleHorizontalMax;
} else {
xMin = clamp(this.widgetStore.minX, this.lineAxis.min, this.lineAxis.max);
xMax = clamp(this.widgetStore.maxX, this.lineAxis.min, this.lineAxis.max);
}
} else {
xMin = clamp(this.widgetStore.minX, 0, this.frame.frameInfo.fileInfoExtended.width);
xMax = clamp(this.widgetStore.maxX, 0, this.widgetStore.isXProfile ? this.frame.frameInfo.fileInfoExtended.width : this.frame.frameInfo.fileInfoExtended.height);
if (this.widgetStore.isAutoScaledX) {
xMin = this.autoScaleHorizontalMin;
xMax = this.autoScaleHorizontalMax;
} else {
xMin = clamp(this.widgetStore.minX, 0, this.frame.frameInfo.fileInfoExtended.width);
xMax = clamp(this.widgetStore.maxX, 0, this.widgetStore.isXProfile ? this.frame.frameInfo.fileInfoExtended.width : this.frame.frameInfo.fileInfoExtended.height);
}
xMin = Math.floor(xMin);
xMax = Math.floor(xMax);
}

xMin = Math.floor(xMin);
xMax = Math.floor(xMax);
let yMin = Number.MAX_VALUE;
let yMax = -Number.MAX_VALUE;
let yMean;
Expand All @@ -110,7 +119,38 @@ export class SpatialProfilerComponent extends React.Component<WidgetProps> {
let smoothingValues: Array<{x: number; y: number}>;
let N: number;

if (coordinateData.mip > 1 || coordinateData.start > 0 || coordinateData.end < xMax) {
if (this.lineAxis) {
N = coordinateData.values.length;
values = new Array(N);
let xArray: number[] = new Array(N);
const numPixels = this.width;
const decimationFactor = Math.round(N / numPixels);
let startIndex: number;
let endIndex: number;
for (let i = 0; i < N; i++) {
const y = coordinateData.values[i];
const x = this.widgetStore.effectiveRegion?.regionType === CARTA.RegionType.LINE ? (i - coordinateData.lineAxis.crpix) * coordinateData.lineAxis.cdelt : i * coordinateData.lineAxis.cdelt;
if (x >= xMin && x <= xMax && isFinite(y)) {
yMin = Math.min(yMin, y);
yMax = Math.max(yMax, y);
yCount++;
ySum += y;
ySum2 += y * y;
if (startIndex === undefined) {
startIndex = i;
}
endIndex = i;
}
xArray[i] = x;
if (decimationFactor <= 1) {
values[i] = {x, y};
}
}
if (decimationFactor > 1) {
values = this.widgetStore.smoothingStore.getDecimatedPoint2DArray(xArray, coordinateData.values, decimationFactor, startIndex, endIndex);
}
smoothingValues = this.widgetStore.smoothingStore.getSmoothingPoint2DArray(xArray, coordinateData.values);
} else if (coordinateData.mip > 1 || coordinateData.start > 0 || coordinateData.end < xMax) {
N = coordinateData.values.length;
values = new Array(N);
for (let i = 0; i < N; i++) {
Expand Down Expand Up @@ -182,20 +222,31 @@ export class SpatialProfilerComponent extends React.Component<WidgetProps> {
yMin -= range * VERTICAL_RANGE_PADDING;
yMax += range * VERTICAL_RANGE_PADDING;
}

return {values: values, smoothingValues, xMin, xMax, yMin, yMax, yMean, yRms};
}
}

@computed get exportHeader(): string[] {
const appStore = AppStore.Instance;
const headerString: string[] = [];
headerString.push(`region (pixel): Point[${toFixed(appStore.activeFrame.cursorInfo.posImageSpace.x)}, ${toFixed(appStore.activeFrame.cursorInfo.posImageSpace.y)}]`);
if (appStore.activeFrame.cursorInfo.infoWCS) {
headerString.push(`region (world): Point[${appStore.activeFrame.cursorInfo.infoWCS.x}, ${appStore.activeFrame.cursorInfo.infoWCS.y}]`);
if (this.widgetStore.effectiveRegion) {
headerString.push(...this.widgetStore.effectiveFrame.getRegionProperties(this.widgetStore.effectiveRegionId));
}
return headerString;
}

// displaying offset/distance in the x axis for line and polyline regions
@computed get lineAxis(): {label: string; min: number; max: number; unit: string} {
const coordinateData = this.profileStore?.getProfile(this.widgetStore.fullCoordinate);
if (coordinateData?.lineAxis && this.widgetStore.isLineOrPolyline) {
const lineAxis = coordinateData.lineAxis;
const min = lineAxis.axisType === CARTA.ProfileAxisType.Offset ? (0 - lineAxis.crpix) * lineAxis.cdelt : 0;
const max = lineAxis.axisType === CARTA.ProfileAxisType.Offset ? (coordinateData.end - lineAxis.crpix) * lineAxis.cdelt : coordinateData.end * lineAxis.cdelt;
return {label: lineAxis.axisType === CARTA.ProfileAxisType.Offset ? "Offset" : "Distance", min, max, unit: lineAxis.unit};
}
return null;
}

constructor(props: WidgetProps) {
super(props);
makeObservable(this);
Expand All @@ -218,9 +269,9 @@ export class SpatialProfilerComponent extends React.Component<WidgetProps> {
const coordinate = this.widgetStore.coordinate;
const currentData = this.plotData;
if (appStore && coordinate) {
const coordinateString = `${coordinate.toUpperCase()} Profile`;
const coordinateString = this.widgetStore.isLineOrPolyline ? "" : coordinate.toUpperCase();
const regionString = this.widgetStore.effectiveRegionId === RegionId.CURSOR ? "Cursor" : `Region #${this.widgetStore.effectiveRegionId}`;
appStore.widgetsStore.setWidgetTitle(this.props.id, `${coordinateString}: ${regionString}`);
appStore.widgetsStore.setWidgetTitle(this.props.id, `${coordinateString} Profile: ${regionString}`);
}
if (currentData) {
this.widgetStore.initXYBoundaries(currentData.xMin, currentData.xMax, currentData.yMin, currentData.yMax);
Expand All @@ -235,7 +286,9 @@ export class SpatialProfilerComponent extends React.Component<WidgetProps> {
if (!this.frame || !this.width) {
return null;
}
if (this.widgetStore.isXProfile) {
if (this.lineAxis) {
this.setAutoScaleBounds(this.lineAxis.min, this.lineAxis.max);
} else if (this.widgetStore.isXProfile) {
this.setAutoScaleBounds(clamp(this.frame.requiredFrameView.xMin, 0, this.frame.frameInfo.fileInfoExtended.width), clamp(this.frame.requiredFrameView.xMax, 0, this.frame.frameInfo.fileInfoExtended.width));
} else {
this.setAutoScaleBounds(clamp(this.frame.requiredFrameView.yMin, 0, this.frame.frameInfo.fileInfoExtended.height), clamp(this.frame.requiredFrameView.yMax, 0, this.frame.frameInfo.fileInfoExtended.height));
Expand Down Expand Up @@ -350,10 +403,10 @@ export class SpatialProfilerComponent extends React.Component<WidgetProps> {
if (nearest?.point) {
const pixelPoint = isXCoordinate ? {x: nearest.point.x, y: this.profileStore.y} : {x: this.profileStore.x, y: nearest.point.x};
const cursorInfo = this.frame.getCursorInfo(pixelPoint);
const wcsLabel = cursorInfo?.infoWCS ? `WCS: ${isXCoordinate ? cursorInfo.infoWCS.x : cursorInfo.infoWCS.y}, ` : "";
const imageLabel = `Image: ${nearest.point.x} px, `;
const wcsLabel = cursorInfo?.infoWCS && !this.lineAxis ? `WCS: ${isXCoordinate ? cursorInfo.infoWCS.x : cursorInfo.infoWCS.y}, ` : "";
const xLabel = this.lineAxis ? `${this.lineAxis.label}: ${formattedExponential(nearest.point.x, 5)} ${this.lineAxis.unit ?? ""}, ` : `Image: ${nearest.point.x} px, `;
const valueLabel = `${nearest.point.y !== undefined ? formattedExponential(nearest.point.y, 5) : ""}`;
profilerInfo.push("Cursor: (" + wcsLabel + imageLabel + valueLabel + ")");
profilerInfo.push("Cursor: (" + wcsLabel + xLabel + valueLabel + ")");
}
} else if (this.widgetStore.effectiveRegion?.regionType === CARTA.RegionType.POINT) {
// get value directly from point region
Expand Down Expand Up @@ -384,10 +437,11 @@ export class SpatialProfilerComponent extends React.Component<WidgetProps> {
}

const isXProfile = widgetStore.isXProfile;
const xLabel = this.lineAxis ? `${this.lineAxis.label} (${this.lineAxis.unit ?? ""})` : `${isXProfile ? "X" : "Y"} coordinate`;
const imageName = appStore.activeFrame ? appStore.activeFrame.filename : undefined;
const plotName = `${isXProfile ? "X" : "Y"} profile`;
const plotName = `${this.lineAxis ? "" : isXProfile ? "X " : "Y "}profile`;
let linePlotProps: LinePlotComponentProps = {
xLabel: `${isXProfile ? "X" : "Y"} coordinate`,
xLabel: xLabel,
yLabel: "Value",
darkMode: appStore.darkTheme,
imageName: imageName,
Expand Down Expand Up @@ -422,11 +476,13 @@ export class SpatialProfilerComponent extends React.Component<WidgetProps> {
linePlotProps.yLabel = `Value (${unit})`;
}

if (this.frame.validWcs && widgetStore.wcsAxisVisible) {
linePlotProps.showTopAxis = true;
linePlotProps.topAxisTickFormatter = this.formatProfileAst;
} else {
linePlotProps.showTopAxis = false;
if (!this.widgetStore.isLineOrPolyline) {
if (this.frame.validWcs && widgetStore.wcsAxisVisible) {
linePlotProps.showTopAxis = true;
linePlotProps.topAxisTickFormatter = this.formatProfileAst;
} else {
linePlotProps.showTopAxis = false;
}
}

const currentPlotData = this.plotData;
Expand Down Expand Up @@ -489,7 +545,8 @@ export class SpatialProfilerComponent extends React.Component<WidgetProps> {
value: cursorX.image,
id: "marker-image-cursor",
draggable: false,
horizontal: false
horizontal: false,
opacity: this.widgetStore.isLineOrPolyline ? 0.1 : 1
}
];
linePlotProps.markers.push({
Expand Down Expand Up @@ -534,7 +591,7 @@ export class SpatialProfilerComponent extends React.Component<WidgetProps> {
<div className={"spatial-profiler-widget"}>
<div className="profile-container">
<div className="profile-toolbar">
<RegionSelectorComponent widgetStore={widgetStore} disableClosedRegion={true} />
<RegionSelectorComponent widgetStore={widgetStore} />
{widgetStore.effectiveFrame?.hasStokes && (
<FormGroup label={"Polarization"} inline={true}>
<HTMLSelect value={widgetStore.selectedStokes} options={widgetStore.stokesOptions} onChange={ev => widgetStore.setSelectedStokes(ev.currentTarget.value)} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
&:first-of-type {
margin-left: 0px;
}
.bp3-input {
width: 88px;
}
}

.bp3-form-group .bp3-label {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from "react";
import {computed, autorun} from "mobx";
import {observer} from "mobx-react";
import {Tabs, Tab} from "@blueprintjs/core";
import {LinePlotSettingsPanelComponentProps, LinePlotSettingsPanelComponent, SmoothingSettingsComponent} from "components/Shared";
import {Tabs, Tab, FormGroup} from "@blueprintjs/core";
import {LinePlotSettingsPanelComponentProps, LinePlotSettingsPanelComponent, SmoothingSettingsComponent, SafeNumericInput} from "components/Shared";
import {RegionId, SpatialProfileWidgetStore} from "stores/widgets";
import {WidgetProps, DefaultWidgetConfig, HelpType, WidgetsStore, AppStore} from "stores";
import {parseNumber} from "utilities";
Expand All @@ -13,7 +13,8 @@ const KEYCODE_ENTER = 13;

export enum SpatialProfilerSettingsTabs {
STYLING,
SMOOTHING
SMOOTHING,
COMPUTATION
}

@observer
Expand All @@ -30,7 +31,7 @@ export class SpatialProfilerSettingsPanelComponent extends React.Component<Widge
isCloseable: true,
parentId: "spatial-profiler",
parentType: "spatial-profiler",
helpType: [HelpType.SPATIAL_PROFILER_SETTINGS_STYLING, HelpType.SPATIAL_PROFILER_SETTINGS_SMOOTHING]
helpType: [HelpType.SPATIAL_PROFILER_SETTINGS_STYLING, HelpType.SPATIAL_PROFILER_SETTINGS_SMOOTHING, HelpType.SPATIAL_PROFILER_SETTINGS_COMPUTATION]
};
}

Expand All @@ -54,12 +55,12 @@ export class SpatialProfilerSettingsPanelComponent extends React.Component<Widge
if (this.widgetStore) {
const coordinate = this.widgetStore.coordinate;
if (appStore && coordinate) {
const coordinateString = `${coordinate.toUpperCase()} Profile`;
const coordinateString = this.widgetStore.isLineOrPolyline ? "" : coordinate.toUpperCase();
const regionString = this.widgetStore.effectiveRegionId === RegionId.CURSOR ? "Cursor" : `Region #${this.widgetStore.effectiveRegionId}`;
appStore.widgetsStore.setWidgetTitle(this.props.floatingSettingsId, `${coordinateString} Settings: ${regionString}`);
appStore.widgetsStore.setWidgetTitle(this.props.floatingSettingsId, `${coordinateString} Spatial Profile Settings: ${regionString}`);
}
} else {
appStore.widgetsStore.setWidgetTitle(this.props.floatingSettingsId, `X Profile Settings: Cursor`);
appStore.widgetsStore.setWidgetTitle(this.props.floatingSettingsId, `X Spatial Profile Settings: Cursor`);
}
});
}
Expand Down Expand Up @@ -191,6 +192,15 @@ export class SpatialProfilerSettingsPanelComponent extends React.Component<Widge
<Tabs id="spatialSettingTabs" selectedTabId={widgetStore.settingsTabId} onChange={this.handleSelectedTabChanged}>
<Tab id={SpatialProfilerSettingsTabs.STYLING} title="Styling" panel={<LinePlotSettingsPanelComponent {...lineSettingsProps} />} />
<Tab id={SpatialProfilerSettingsTabs.SMOOTHING} title="Smoothing" panel={<SmoothingSettingsComponent smoothingStore={widgetStore.smoothingStore} />} />
<Tab
id={SpatialProfilerSettingsTabs.COMPUTATION}
title="Computation"
panel={
<FormGroup label={"Width"} inline={true}>
<SafeNumericInput min={1} max={10} stepSize={1} value={this.widgetStore.lineRegionSampleWidth} onValueChange={value => this.widgetStore.setLineRegionSampleWidth(value)} />
</FormGroup>
}
/>
</Tabs>
</div>
);
Expand Down
Loading