Skip to content

Commit

Permalink
Fix merge error.
Browse files Browse the repository at this point in the history
Signed-off-by: Yu0610 <[email protected]>
  • Loading branch information
Yu0610 committed Apr 11, 2024
1 parent 25386de commit 6082a8f
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions monai/transforms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,17 +726,11 @@ def map_and_generate_sampling_centers(
if indices_ is None:
if label is None:
raise ValueError("label must not be None.")


<< << << < HEAD
indices_ = map_classes_to_indices(
label, num_classes, image, image_threshold, max_samples_per_class
)
== == == =
indices_ = map_classes_to_indices(label, num_classes, image, image_threshold, max_samples_per_class)
>>>>>> > f1ffdfa6147a3800a499684cc89332078050e09e
_shape = None
if label is not None:
indices_ = map_classes_to_indices(
label, num_classes, image, image_threshold, max_samples_per_class
)
_shape = None
if label is not None:
_shape = label.peek_pending_shape() if isinstance(label, monai.data.MetaTensor) else label.shape[1:]
elif image is not None:
_shape = image.peek_pending_shape() if isinstance(image, monai.data.MetaTensor) else image.shape[1:]
Expand All @@ -745,15 +739,7 @@ def map_and_generate_sampling_centers(
centers = generate_label_classes_crop_centers(
spatial_size, num_samples, _shape, indices_, ratios, rand_state, allow_smaller, warn
)
<< <<<< < HEAD
return (centers)
<< <<<< < HEAD

== == ===
>>>>>> > ece38a6d(Update utils.py)
== == ===
return ensure_tuple(centers)
>>>>>> > f1ffdfa6147a3800a499684cc89332078050e09e
return ensure_tuple(centers)


def create_grid(
Expand Down

0 comments on commit 6082a8f

Please sign in to comment.