struct-calculate

1.3.4-1 • Public • Published

structCalculate


结构外扩/内缩/交并集运算

Usage

// struct1/struct2 数据结构与 后端structure接口的data一致
const structsList = [struct1,struct2]
const params = {
  base: [
    // struct1的外扩/内缩/交并集参数
    { structureId: "2832f297-da0a-458f-8e04-1c218bd4e789", expand_left: 0, expand_right: 0, expand_front: 0, expand_back: 0, up_slice: 0, down_slice: 0, symmetry: true, op: "union" },
    // struct2的外扩/内缩/交并集参数
    { structureId: "1ef401ca-51e9-44f4-8b36-e8d233a923d6", expand_left: 0, expand_right: 0, expand_front: 0, expand_back: 0, up_slice: 0, down_slice: 0, symmetry: true, op: "difference" }
  ],
  // (0020,0032) Image Position (Patient)
  origin: [-249.51171875, -439.01171875, 153],
  // (0028,0030) Pixel Spacing + (0018,0050) Slice Thickness
  spacing: [0.9765625, 0.9765625, 3],
  // (0020,0037) Image Orientation (Patient)
  direct: [1, 0, 0, 0, 1, 0],
  // (0020,0010)Columns + (0028,0010 )Rows + 图片张数
  size: [512, 512, 101]
}

// output 数据结构与 struct1.data.contour_data一致
const output = structCalculate(structsList, params)

Readme

Keywords

none

Package Sidebar

Install

npm i struct-calculate

Weekly Downloads

4

Version

1.3.4-1

License

ISC

Unpacked Size

4.99 MB

Total Files

18

Last publish

Collaborators

  • niuma00