MIR.utils.other_utils

Miscellaneous utility helpers for MIR.

Functions

SLANT_label_reassign(label_map)

Reassign SLANT label IDs to contiguous indices.

create_zip(zip_filename, source_dir)

Creates a zip file from a directory.

load_partial_weights(model, checkpoint_path)

Load weights from a checkpoint into a model, skipping unmatched layers.

pkload(fname)

Load a pickled object from disk.

process_label()

savepkl(data, path)

Save an object to a pickle file.

write2csv(line, name)

zoom_img(img, pixel_dims[, order])

Resize a 3D image to match target pixel dimensions.

Classes

CenterCropPad3D(*args, **kwargs)

Crop or pad a 3‑D medical image tensor so the spatial size becomes exactly target_size = (X, Y, Z).