-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(adapters): Update the build a little to allow debugging into type…
…script (#439) * fix: Update the build a little to allow debugging into typescript * fix: Minor change to make the comparison fully case insensitive
- Loading branch information
1 parent
34562bf
commit 05e6419
Showing
4 changed files
with
38 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/adapters/src/adapters/Cornerstone3D/isValidCornerstoneTrackingIdentifier.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import CORNERSTONE_3D_TAG from "./cornerstone3DTag"; | ||
|
||
export default function isValidCornerstoneTrackingIdentifier( | ||
trackingIdentifier: string | ||
): boolean { | ||
if (!trackingIdentifier.includes(":")) { | ||
return false; | ||
} | ||
|
||
const [cornerstone3DTag, toolType] = trackingIdentifier.split(":"); | ||
|
||
if (cornerstone3DTag !== CORNERSTONE_3D_TAG) { | ||
return false; | ||
} | ||
|
||
// The following is needed since the new cornerstone3D has changed | ||
// case names such as EllipticalRoi to EllipticalROI | ||
return toolType.toLowerCase() === this.toolType.toLowerCase(); | ||
} |