Skip to content

Commit 9c9f8c8

Browse files
authored
Merge pull request #412 from pixlise/development
Release 4.45.0
2 parents a9f8ae0 + c68556c commit 9c9f8c8

66 files changed

Lines changed: 7901 additions & 574 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
## 4.44.0 (Latest)
1+
## 4.45.0 (Latest)
2+
3+
### Features
4+
- Expression Picker now remembers your last opened section
5+
- ROI Picker now remembers your last selected sections
6+
- MIST ROIs can now include a per-PMC confidence value column that affects ROI opacity on context image
7+
- **Custom ROI Colors** Adds support for custom ROI colors via a color picker. Preset colors should still be preferred where possible.
8+
- Expression language (in Lua only) now has 2 new functions: `readCache` and `writeCache` to allow reuse of calculated data between other expressions. Also added new constants: `instrument`, `scanId`, `quantId`, `maxSpectrumChannel` and `elevAngle`. Running expressions is also about 10% faster due to not recomputing the results of `spectrum()` calls when the same channels are requested.
9+
- Removed Back to V3 button
10+
11+
## 4.44.0 (2024-09-27)
212

313
### Bug Fixes
414
- Fixes spectrum export exporting detector A values for detector B
@@ -12,7 +22,6 @@
1222
- Fixes bug with sharing workspaces that include expression groups
1323
- Allows longer RGB Mix names to be saved
1424

15-
1625
## 4.42.0 (2024-09-18)
1726

1827
### Bug Fixes

client/angular.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@
248248
"./node_modules"
249249
]
250250
},
251-
"scripts": []
251+
"scripts": [],
252+
"karmaConfig": "karma.conf.js"
252253
}
253254
},
254255
"lint": {

client/karma.conf.js

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
timeoutInterval: 29999
22+
},
23+
clearContext: false // leave Jasmine Spec Runner output visible in browser
24+
},
25+
jasmineHtmlReporter: {
26+
suppressAll: true // removes the duplicated traces
27+
},
28+
coverageReporter: {
29+
dir: require('path').join(__dirname, './coverage/pixlise'),
30+
subdir: '.',
31+
reporters: [
32+
{ type: 'html' },
33+
{ type: 'text-summary' }
34+
]
35+
},
36+
reporters: ['progress', 'kjhtml'],
37+
browsers: ['Chrome'],
38+
restartOnFileChange: true,
39+
files: [
40+
{
41+
pattern: "src/app/expression-language/test-data/**/*.bin",
42+
watched: false,
43+
served: true,
44+
included: false,
45+
},
46+
{
47+
pattern: "src/app/expression-language/test-data/**/*.lua",
48+
watched: false,
49+
served: true,
50+
included: false,
51+
},
52+
{
53+
pattern: "src/app/expression-language/test-data/**/*.json",
54+
watched: false,
55+
served: true,
56+
included: false,
57+
},
58+
{
59+
pattern: "src/app/expression-language/test-data/input-data/*.csv",
60+
watched: false,
61+
served: true,
62+
included: false,
63+
},
64+
],
65+
});
66+
};

client/package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"marked": "^4.3.0",
4343
"mathjs": "^11.8.2",
4444
"monaco-editor": "^0.44.0",
45+
"ngx-color-picker": "^17.0.0",
4546
"ngx-dropzone": "^3.1.0",
4647
"ngx-markdown": "^16.0.0",
4748
"papaparse": "^5.4.1",
@@ -93,4 +94,4 @@
9394
"http": false,
9495
"https": false
9596
}
96-
}
97+
}

client/src/app/components/toolbar/toolbar.component.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,13 @@
2828
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2929
POSSIBILITY OF SUCH DAMAGE.
3030
-->
31-
<ng-template #v3ConfirmDialog>
32-
<feedback-dialog></feedback-dialog>
33-
</ng-template>
3431

3532
<ng-template #changeLogDialog>
3633
<div class="change-log-container">
3734
<h1>
3835
Change Log (Updated {{ uiVersionLastCommitDate * 1000 | date: "mediumDate" }})
3936
<action-button (onClick)="closeChangeLogDialog()" action="close" color="rgb(var(--clr-gray-30))"></action-button>
4037
</h1>
41-
<div class="v3-container">
42-
<span class="title">NOTE: PIXLISE v3 will be retired at the end of September 2024!</span>
43-
<push-button class="back-to-v3" [customDialog]="v3ConfirmDialog" buttonStyle="v3Button">Back to v3</push-button>
44-
</div>
4538
<div class="change-log">
4639
<markdown lineHighlight [lineOffset]="5" src="/assets/CHANGELOG.md"> </markdown>
4740
</div>
@@ -154,7 +147,6 @@ <h1>
154147
<!-- <span>Updated {{ uiVersionLastCommitDate * 1000 | date: "mediumDate" }}</span> -->
155148
<span>{{ uiVersion }}</span>
156149
</push-button>
157-
<!-- <push-button class="back-to-v3" [customDialog]="v3ConfirmDialog" buttonStyle="v3Button">Back to v3</push-button> -->
158150
<icon-button
159151
title="Notifications"
160152
(click)="onNotificationsMenu()"

client/src/app/components/toolbar/toolbar.component.scss

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,6 @@
138138
}
139139
}
140140
}
141-
142-
.back-to-v3 {
143-
white-space: pre;
144-
}
145141
}
146142
}
147143
}
@@ -247,25 +243,6 @@ user-icon {
247243
}
248244
}
249245

250-
.v3-container {
251-
display: flex;
252-
align-items: center;
253-
254-
padding-left: 16px;
255-
256-
border-top: 1px solid rgb(68, 76, 80);
257-
padding-top: 8px;
258-
259-
margin-right: -16px;
260-
padding-right: 16px;
261-
262-
color: rgb(var(--clr-gray-30));
263-
264-
.back-to-v3 {
265-
margin-left: auto;
266-
}
267-
}
268-
269246
.change-log {
270247
height: 400px;
271248
width: 600px;

client/src/app/components/toolbar/toolbar.component.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -708,25 +708,6 @@ export class ToolbarComponent implements OnInit, OnDestroy {
708708
return "https://discuss." + EnvConfigurationInitService.appConfig.appDomain;
709709
}
710710

711-
private closeIssueDialog(): void {
712-
if (this.submitIssueDialog && this.submitIssueDialog instanceof PushButtonComponent) {
713-
(this.submitIssueDialog as PushButtonComponent).closeDialog();
714-
}
715-
}
716-
717-
onSubmitIssue(leftPage: boolean): void {
718-
let strippedIssue = this.userIssue.trim();
719-
if (strippedIssue.length > 0) {
720-
this._snackService.openSuccess("Thanks for the feedback!");
721-
this.userIssue = "";
722-
SentryHelper.logMsg(false, "User Feedback (Back to V3): \n" + strippedIssue);
723-
} else if (leftPage) {
724-
SentryHelper.logMsg(false, "User Feedback (Back to V3): No feedback given");
725-
}
726-
727-
this.closeIssueDialog();
728-
}
729-
730711
closeChangeLogDialog(): void {
731712
if (this.changeLogBtn && this.changeLogBtn instanceof PushButtonComponent) {
732713
(this.changeLogBtn as PushButtonComponent).closeDialog();

client/src/app/expression-language/data-sources.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ import { PMCDataValues } from "src/app/expression-language/data-values";
3131

3232
// Query data sources (interfaces)
3333
export interface QuantifiedDataQuerierSource {
34+
getQuantId(): string;
35+
getScanId(): string;
36+
getInstrument(): string;
37+
getElevAngle(): number;
3438
getQuantifiedDataForDetector(detectorId: string, dataLabel: string): Promise<PMCDataValues>;
3539
getElementList(): Promise<string[]>;
3640
getPMCList(): Promise<number[]>;
@@ -44,6 +48,7 @@ export interface PseudoIntensityDataQuerierSource {
4448
}
4549

4650
export interface SpectrumDataQuerierSource {
51+
getMaxSpectrumChannel(): number;
4752
getSpectrumRangeMapData(channelStart: number, channelEnd: number, detectorExpr: string): Promise<PMCDataValues>;
4853
// If sumOrMax==true, returns sum of differences between A and B otherwise max difference seen between A and B
4954
getSpectrumDifferences(channelStart: number, channelEnd: number, sumOrMax: boolean): Promise<PMCDataValues>;

client/src/app/expression-language/data-values.ts

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ export class PMCDataValues {
123123
return result;
124124
}
125125

126+
static makeWithValuesMinMax(values: PMCDataValue[], range: MinMax, isBinary: boolean) {
127+
const result = new PMCDataValues();
128+
result._valueRange = range;
129+
result.values = values;
130+
result.isBinary = isBinary;
131+
return result;
132+
}
133+
126134
static filterToCommonPMCsOnly(values: (PMCDataValues | null | undefined)[]): (PMCDataValues | null)[] {
127135
const result: (PMCDataValues | null)[] = [];
128136
if (values.length === 0) {
@@ -159,6 +167,17 @@ export class PMCDataValues {
159167
});
160168
}
161169

170+
addValue(v: PMCDataValue) {
171+
if (!v.isUndefined) {
172+
this._valueRange.expand(v.value);
173+
}
174+
this.values.push(v);
175+
176+
if (v.value != 0 && v.value != 1) {
177+
this.isBinary = false;
178+
}
179+
}
180+
162181
private setValues(values: PMCDataValue[]) {
163182
if (values && values.length) {
164183
this.values = values;
@@ -249,16 +268,16 @@ export class PMCDataValues {
249268
// For example, Math.sin taking in map value as arg
250269
// Executes this for each value in map
251270
public mathFunc(theMathFunc: (num: number) => number): PMCDataValues {
252-
//let result = new PMCDataValues();
253-
const result: PMCDataValue[] = [];
271+
const result = new PMCDataValues();
272+
result.isBinary = true; // pre-set for detection in addValue
254273

255274
for (let c = 0; c < this.values.length; c++) {
256275
let towrite = theMathFunc(this.values[c].value);
257276
if (this.values[c].isUndefined) {
258277
towrite = 0;
259278
}
260279

261-
result./*values.*/ push(new PMCDataValue(this.values[c].pmc, towrite, this.values[c].isUndefined));
280+
result.addValue(new PMCDataValue(this.values[c].pmc, towrite, this.values[c].isUndefined));
262281
}
263282

264283
/* This was failing for some trig functions... seemed like min vs max were backwards?!
@@ -270,7 +289,7 @@ export class PMCDataValues {
270289
271290
return result;
272291
*/
273-
return PMCDataValues.makeWithValues(result);
292+
return result;
274293
}
275294

276295
public operationWithScalar(operation: QuantOp, scalar: number, scalarIsLeft: boolean): PMCDataValues {

0 commit comments

Comments
 (0)