MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / gen_fixed_cube

Function gen_fixed_cube

tests/transforms/test_label_to_contour.py:106–116  ·  view source on GitHub ↗
(array_type)

Source from the content-addressed store, hash-verified

104
105
106def gen_fixed_cube(array_type):
107 scale, core_start, core_end = 8, 1, 7
108 cube = np.zeros((scale, scale, scale))
109 cube[core_start:core_end, core_start:core_end, core_start:core_end] = torch.ones(
110 core_end - core_start, core_end - core_start, core_end - core_start
111 )
112 cube = cube[None]
113
114 batch_size, channels = 10, 6
115 cube = np.tile(cube, (batch_size, channels, 1, 1, 1))
116 return array_type(cube), array_type(expected_output_for_cube)
117
118
119def gen_fixed_img(array_type):

Callers 1

test_contourMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…