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

feat(3d from 4d): 3D image generation from 4D #502

Merged
merged 21 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5ea4376
Initialized example and function files, added function to dynamicVolu…
NeilMacPhee Mar 20, 2023
03deb9e
added SUM, AVERAGE, and SUBTRACT operations
NeilMacPhee Mar 20, 2023
c29f61a
fix for getDataInTime, uses forEach to only use the specified frames
NeilMacPhee Mar 20, 2023
dd37de4
added drop down menu to select operations to perform on data
NeilMacPhee Mar 20, 2023
4ef18b9
generateImageFromTime now outputs array of indexs for mask inputs
NeilMacPhee Mar 21, 2023
f333108
latest changes
NeilMacPhee Mar 22, 2023
99c1ef6
refactored operations for performance, added viewport for rendering g…
NeilMacPhee Mar 23, 2023
bc28e96
WIP updated work
NeilMacPhee Mar 24, 2023
46e4ba7
fix
sedghi Mar 24, 2023
06d9b08
Cleaned up code, refactored average operation, initialized clear imag…
NeilMacPhee Mar 27, 2023
f45873a
added update for texture and image data so user can now switch betwee…
NeilMacPhee Mar 27, 2023
9f7f02d
Added documentation, renamed files, improved parameters, cleaned up code
NeilMacPhee Mar 27, 2023
c853c45
changed time frames loaded
NeilMacPhee Mar 28, 2023
1cdbdac
User can now enter in which time frames to use for operation
NeilMacPhee Mar 28, 2023
5c8174a
cleaning up code
NeilMacPhee Mar 28, 2023
4625cd0
fixed spelling error
NeilMacPhee Mar 28, 2023
06a5dc8
editing description
NeilMacPhee Mar 28, 2023
181cd18
added Enums type, addressed comments on PR
NeilMacPhee Mar 28, 2023
4a8d642
yarn update api
NeilMacPhee Mar 28, 2023
f05cb8f
yarn build
NeilMacPhee Mar 28, 2023
bcc4aab
added zoom, pan and stack scroll tools, time frames now separated by …
NeilMacPhee Mar 28, 2023
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
13 changes: 12 additions & 1 deletion common/reviews/api/core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,16 @@ interface CustomEvent_2<T = any> extends Event {
// @public (undocumented)
const deepMerge: (target?: {}, source?: {}, optionsArgument?: any) => any;

// @public (undocumented)
enum DynamicOperatorType {
// (undocumented)
AVERAGE = "AVERAGE",
// (undocumented)
SUBTRACT = "SUBTRACT",
// (undocumented)
SUM = "SUM"
}

// @public (undocumented)
type ElementDisabledEvent = CustomEvent_2<ElementDisabledEventDetail>;

Expand Down Expand Up @@ -546,7 +556,8 @@ declare namespace Enums {
SharedArrayBufferModes,
GeometryType,
ContourType,
VOILUTFunctionType
VOILUTFunctionType,
DynamicOperatorType
}
}
export { Enums }
Expand Down
7 changes: 7 additions & 0 deletions common/reviews/api/streaming-image-volume-loader.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,13 @@ interface CustomEvent_2<T = any> extends Event {
): void;
}

// @public
enum DynamicOperatorType {
AVERAGE = 'AVERAGE',
SUBTRACT = 'SUBTRACT',
SUM = 'SUM',
}

// @public
type ElementDisabledEvent = CustomEvent_2<ElementDisabledEventDetail>;

Expand Down
6 changes: 5 additions & 1 deletion common/reviews/api/tools.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,8 @@ function drawTextBox(svgDrawingHelper: SVGDrawingHelper, annotationUID: string,

declare namespace dynamicVolume {
export {
getDataInTime
getDataInTime,
generateImageFromTimeData
}
}

Expand Down Expand Up @@ -1978,6 +1979,9 @@ class FrameOfReferenceSpecificAnnotationManager implements IAnnotationManager {
readonly uid: string;
}

// @public (undocumented)
function generateImageFromTimeData(dynamicVolume: Types_2.IDynamicImageVolume, operation: string, frameNumbers?: number[]): Float32Array;

// @public (undocumented)
function getActiveSegmentationRepresentation(toolGroupId: string): ToolGroupSpecificRepresentation;

Expand Down
14 changes: 14 additions & 0 deletions packages/core/src/enums/DynamicOperatorType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* DynamicOperatorType enum for cornerstone-render which defines the operator to use for generateImageFromTimeData.
* It can be either SUM, AVERAGE or SUBTRACT.
*/
enum DynamicOperatorType {
/** For summing the time frames. */
SUM = 'SUM',
/** For averaging the time frames. */
AVERAGE = 'AVERAGE',
/** For subtracting two time frames */
SUBTRACT = 'SUBTRACT',
}

export default DynamicOperatorType;
2 changes: 2 additions & 0 deletions packages/core/src/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import SharedArrayBufferModes from './SharedArrayBufferModes';
import GeometryType from './GeometryType';
import ContourType from './ContourType';
import VOILUTFunctionType from './VOILUTFunctionType';
import DynamicOperatorType from './DynamicOperatorType';

export {
Events,
Expand All @@ -20,4 +21,5 @@ export {
GeometryType,
ContourType,
VOILUTFunctionType,
DynamicOperatorType,
};
Loading