MCPcopy Index your code

hub / github.com/Project-MONAI/MONAI / functions

Functions7,906 in github.com/Project-MONAI/MONAI

↓ 10 callersFunctionversion_geq
Returns True if version `lhs` is later or equal to `rhs`. Args: lhs: version name to compare with `rhs`, return True if later or equ
monai/utils/module.py:566
↓ 9 callersMethod__init__
Discard positive and negative points according to discard probability Args: keys: The ``keys`` parameter will be used to
monai/apps/deepedit/transforms.py:38
↓ 9 callersMethod__init__
(self, stats_name: str, report_format: dict)
monai/auto3dseg/analyzer.py:70
↓ 9 callersMethod__init__
( self, splitter: Splitter | None = None, merger_cls: type[Merger] | str = AvgMerger,
monai/inferers/inferer.py:130
↓ 9 callersMethod_cmp
(self, filename, ch_shape, reader_1, reader_2, outname, ext)
tests/transforms/test_load_imaged.py:97
↓ 9 callersMethodaggregate
r""" Aggregates the output of `_compute_tensor`. Args: reduction: define mode of reduction to the metrics, will only appl
monai/metrics/surface_dice.py:113
↓ 9 callersFunctioncheck_hash
Verify hash signature of specified file. Args: filepath: path of source file to verify hash value. val: expected hash value
monai/apps/utils.py:157
↓ 9 callersFunctionclip
`np.clip` with equivalent implementation for torch.
monai/transforms/utils_pytorch_numpy_unification.py:94
↓ 9 callersFunctionconvert_box_mode
This function converts the boxes in src_mode to the dst_mode. Args: boxes: source bounding boxes, Nx4 or Nx6 torch tensor or ndarray
monai/data/box_utils.py:546
↓ 9 callersFunctionconvert_to_cupy
Utility to convert the input data to a cupy array. If passing a dictionary, list or tuple, recursively check every item and convert it to cup
monai/utils/type_conversion.py:241
↓ 9 callersFunctiondata_from_keys
(keys, h, w)
tests/transforms/compose/test_compose.py:31
↓ 9 callersFunctionflatten
(data)
tests/metrics/test_compute_regression_metrics.py:25
↓ 9 callersMethodflatten
Return a Composition with a flattened list of transforms. Nested ``Compose`` objects that share the same ``map_items`` setting as the
monai/transforms/compose.py:342
↓ 9 callersMethodget_all_case_stats
Get all case stats. Caller of the DataAnalyser class. The function initiates multiple GPU or CPU processes of the internal _get_all_c
monai/apps/auto3dseg/data_analyzer.py:174
↓ 9 callersFunctionget_arange_img
Returns an image as a numpy array (complete with channel as dim 0) with contents that iterate like an arange.
tests/test_utils.py:434
↓ 9 callersMethodget_data
Extract data array and metadata from loaded image and return them. This function returns two objects, first is numpy array of image d
monai/data/image_reader.py:1308
↓ 9 callersMethodget_default_applied_operations
Get the default applied operations. Returns: default applied operations.
monai/data/meta_obj.py:150
↓ 9 callersMethodget_num_modules
(self, mod: type[torch.nn.Module] | None = None)
tests/networks/utils/test_replace_module.py:41
↓ 9 callersMethodget_results
Get a fresh results dictionary containing fresh tuples of ProfileResult objects.
monai/utils/profiling.py:302
↓ 9 callersFunctionimport_bundle_algo_history
import the history of the bundleAlgo objects as a list of algo dicts. each algo_dict has keys name (folder name), algo (bundleAlgo), is_train
monai/apps/auto3dseg/utils.py:23
↓ 9 callersFunctionissequenceiterable
Determine if the object is an iterable sequence and is not a string.
monai/utils/misc.py:145
↓ 9 callersFunctionload
Load model weights or TorchScript module of a bundle. Args: name: bundle name. If `None` and `url` is `None`, it must be provided in
monai/bundle/scripts.py:628
↓ 9 callersFunctionload_decathlon_datalist
Load image/label paths of decathlon challenge from JSON file JSON file should follow the format of the Medical Segmentation Decathlon datalis
monai/data/decathlon_datalist.py:87
↓ 9 callersMethodnormalize_id
Normalize the id string to consistently use `cls.sep`. Args: id: id string to be normalized.
monai/bundle/reference_resolver.py:206
↓ 9 callersFunctionorientation_ras_lps
Convert the ``affine`` between the `RAS` and `LPS` orientation by flipping the first two spatial dimensions. Args: affine: a 2D
monai/data/utils.py:1485
↓ 9 callersFunctionplot_2d_or_3d_image
Plot 2D or 3D image on the TensorBoard, 3D image will be converted to GIF image. Note: Plot 3D or 2D image(with more than 3 channels) as
monai/visualize/img2tensorboard.py:146
↓ 9 callersMethodread
Read image data from specified file or files, it can read a list of data files and stack them together as multi-channel data in `get_
monai/data/image_reader.py:1267
↓ 9 callersMethodregister
Register image reader to load image file and metadata. Args: reader: reader instance to be registered with this loader.
monai/transforms/io/array.py:225
↓ 9 callersFunctionsame_padding
Return the padding value needed to ensure a convolution using the given kernel size produces an output of the same shape as the input for a s
monai/networks/layers/convutils.py:22
↓ 9 callersMethodsample
Args: input_noise: random noise, of the same shape as the desired latent representation. autoencoder_model: first sta
monai/inferers/inferer.py:1834
↓ 8 callersMethod__call__
Args: img: data to be transformed, assuming `img` is channel-first and padding doesn't apply to the channel dim. to_p
monai/transforms/croppad/array.py:132
↓ 8 callersMethod__init__
(self, in_channels, out_channels, visual_output=False)
monai/networks/nets/daf3d.py:486
↓ 8 callersFunction_basename
get the last part of the path (removing the trailing slash if it exists)
monai/apps/utils.py:84
↓ 8 callersMethod_make_layer
( self, block: type[SEBottleneck | SEResNetBottleneck | SEResNeXtBottleneck], planes:
monai/networks/nets/senet.py:214
↓ 8 callersMethod_set_threshold
(self, threshold, mode)
monai/transforms/intensity/array.py:2729
↓ 8 callersFunctionaround
(val, interval=3)
tests/apps/pathology/test_lesion_froc.py:39
↓ 8 callersFunctioncheck_boundaries
Check boundaries for Signal transforms
monai/transforms/utils.py:2191
↓ 8 callersMethodcheck_meta
(self, a: MetaTensor, b: MetaTensor)
tests/data/meta_tensor/test_meta_tensor.py:69
↓ 8 callersMethodclose
Close the pandas `TextFileReader` iterable objects. If the input src is file path, TextFileReader was created internally, need to clo
monai/data/iterable_dataset.py:252
↓ 8 callersFunctionflatten
(data)
tests/handlers/test_handler_regression_metrics_dist.py:27
↓ 8 callersFunctionflatten
(data)
tests/handlers/test_handler_regression_metrics.py:26
↓ 8 callersMethodforward
Args: input: the shape should be BNH[WD]. target: the shape should be BNH[WD].
monai/losses/dice.py:561
↓ 8 callersMethodforward
Args: input: the shape should be BNHW[D]. target: the shape should be BNHW[D].
monai/losses/perceptual.py:196
↓ 8 callersFunctionget_config_from_root
Read the project setup.cfg file to determine Versioneer config.
versioneer.py:338
↓ 8 callersFunctionget_conv_layer
( spatial_dims: int, in_channels: int, out_channels: int, kernel_size: int = 3, stride: int = 1, bias: boo
monai/networks/blocks/segresnet_block.py:22
↓ 8 callersFunctionget_inplanes
()
monai/networks/nets/resnet.py:63
↓ 8 callersFunctionget_root
Get the project root directory. We require that all commands are run from the project root, i.e. the directory that contains setup.py, setup.
versioneer.py:298
↓ 8 callersFunctionget_seed
()
monai/utils/misc.py:335
↓ 8 callersFunctionget_testing_algo_template_path
a local folder to the testing algorithm template or a url to the compressed template file. Default to None, which effectively uses bundle_gen
tests/test_utils.py:100
↓ 8 callersFunctionhas_option
Return a boolean indicating whether the given callable `obj` has the `keywords` in its signature.
monai/utils/misc.py:588
↓ 8 callersMethodis_expression
Check whether the config is an executable expression string. Currently, a string starts with ``"$"`` character is interpreted as an e
monai/bundle/config_item.py:387
↓ 8 callersFunctionis_scalar
(val: Any)
monai/utils/misc.py:310
↓ 8 callersFunctionis_supported_format
Verify whether the specified file or files format match supported suffixes. If supported suffixes is None, skip the verification and return T
monai/data/utils.py:1112
↓ 8 callersFunctionmake_shape_cases
( models, spatial_dims, batches, pretrained, in_channels=3, num_classes=1000, norm
tests/networks/nets/test_efficientnet.py:89
↓ 8 callersMethodmodel
(self)
monai/visualize/gradient_based.py:79
↓ 8 callersFunctionpad_nd
Pad `img` for a given an amount of padding in each dimension. `torch.nn.functional.pad` is used unless the mode or kwargs are not available
monai/transforms/croppad/functional.py:73
↓ 8 callersMethodread_meta
Read the metadata from specified JSON or YAML file. The metadata as a dictionary will be stored at ``self.config["_meta_"]``.
monai/bundle/config_parser.py:500
↓ 8 callersMethodreset
Reset the dataset items with specified `func`. Args: data: if not None, execute `func` on it, default to `self.src`.
monai/data/dataset.py:148
↓ 8 callersMethodsample
Args: input_noise: random noise, of the same shape as the desired sample. diffusion_model: model to sample from.
monai/inferers/inferer.py:1473
↓ 8 callersMethodset
Set config by ``id``. Args: config: config to set at location ``id``. id: id to specify the expected positio
monai/bundle/config_parser.py:412
↓ 8 callersMethodset_device
(self, device)
monai/data/wsi_reader.py:129
↓ 8 callersMethodset_timesteps
Sets the discrete timesteps used for the diffusion chain. Supporting function to be run before inference. Args: num_infe
monai/networks/schedulers/pndm.py:119
↓ 8 callersMethodstart
Start the background thread to replace training items for every epoch.
monai/data/dataset.py:1139
↓ 8 callersFunctiontrunc_normal_
Tensor initialization with truncated normal distribution. Based on: https://github.com/rwightman/pytorch-image-models Args: tensor
monai/networks/layers/weight_init.py:47
↓ 8 callersFunctionupdate_kwargs
Update the `args` dictionary with the input `kwargs`. For dict data, recursively update the content based on the keys. Example::
monai/bundle/scripts.py:74
↓ 7 callersMethod__init__
( self, spatial_dims: int, in_channels: int, out_channels: int, init_f
monai/networks/nets/densenet.py:174
↓ 7 callersMethod__init__
(self, spatial_dims: int, psp_block_num: int, in_ch: int, upsample_mode: str = "transpose")
monai/networks/nets/ahnet.py:252
↓ 7 callersMethod__init__
( self, input_dim: int, hidden_dim: int, output_dim: int, num_layers: int, sigmoid_output: bool = Fals
monai/networks/nets/vista3d.py:930
↓ 7 callersMethod__init__
(self, reduction: MetricReduction | str = MetricReduction.MEAN, get_not_nans: bool = False)
monai/metrics/regression.py:109
↓ 7 callersMethod__init__
( self, spatial_dims: int, in_channels: int, num_channels: Sequence[int],
monai/apps/generation/maisi/networks/autoencoderkl_maisi.py:536
↓ 7 callersMethod__init__
( self, keys: KeysCollection, others: str = NuclickKeys.OTHERS, mask_value: st
monai/apps/nuclick/transforms.py:145
↓ 7 callersMethod__init__
( self, keys: KeysCollection, mask_key: str | None = "mask", markers_key: str
monai/apps/pathology/transforms/post/dictionary.py:102
↓ 7 callersFunction_add_path_with_parent
Add a path and its parent directory to the list if the path is a valid directory.
monai/auto3dseg/utils.py:320
↓ 7 callersFunction_effective_rank_score
Dimensional collapse score via SVD effective rank. Uses the entropy-based effective rank from Roy & Vetterli (2007): ``eff_rank = sum(sv) / m
monai/metrics/embedding_collapse.py:272
↓ 7 callersFunction_examine_monai_version
Examine if the package version is compatible with the MONAI version in the metadata.
monai/bundle/scripts.py:311
↓ 7 callersFunction_get_val
Search for the item with `key` in `config_dict`. Returns: the first occurrence of `key` in a breadth first search.
monai/apps/mmars/mmars.py:301
↓ 7 callersFunction_log_input_summary
(tag: str, args: dict)
monai/bundle/scripts.py:122
↓ 7 callersFunction_make_same_padder
Helper for initializing ConstantPadNd with SAME padding similar to Tensorflow. Uses output of _get_same_padding_conv_nd() to get the padding
monai/networks/nets/efficientnet.py:850
↓ 7 callersFunction_pop_args
Pop args from the `src` dictionary based on specified keys in `args` and (key, default value) pairs in `kwargs`.
monai/bundle/scripts.py:114
↓ 7 callersFunction_resnet
( arch: str, block: type[ResNetBlock | ResNetBottleneck], layers: list[int], block_inplanes: l
monai/networks/nets/resnet.py:481
↓ 7 callersFunction_stack_images
(image_list: list, meta_dict: dict, to_cupy: bool = False)
monai/data/image_reader.py:153
↓ 7 callersMethodadd_item
Add a ``ConfigItem`` to the resolver. Args: item: a ``ConfigItem``.
monai/bundle/reference_resolver.py:76
↓ 7 callersMethodadd_noise
Add noise to the original samples. Args: original_samples: original samples noise: noise to add to samples
monai/networks/schedulers/scheduler.py:172
↓ 7 callersFunctionalgo_to_json
Export the Algo object to a JSON file (pickle-free serialization). Args: algo: Algo-like object (typically BundleAlgo or subclass).
monai/auto3dseg/utils.py:328
↓ 7 callersMethodattach
Register a set of Ignite Event-Handlers to a specified Ignite engine. Args: engine: Ignite Engine, it can be a trainer,
monai/handlers/stats_handler.py:129
↓ 7 callersFunctioncheck_non_lazy_pending_ops
Check whether the input array has pending operations, raise an error or warn when it has. Args: input_array: input array to be check
monai/transforms/utils.py:361
↓ 7 callersFunctioncompute_shape_offset
Given input and output affine, compute appropriate shapes in the output space based on the input array's shape. This function also return
monai/data/utils.py:850
↓ 7 callersFunctionconcat_val_to_np
Get the nested value in a list of dictionary that shares the same structure. Args: data_list: a list of dictionary {key1: {key2: np.n
monai/auto3dseg/utils.py:148
↓ 7 callersMethodfilter
(self, *_args)
monai/utils/dist.py:200
↓ 7 callersMethodforward
Args: pred: the shape should be BCH(WD) Raises: ValueError: When ``self.reduction`` is not one of ["mean", "
monai/losses/deform.py:74
↓ 7 callersMethodforward
Args: pred: Predicted dense displacement field (DDF) with shape BCH[WD], where C is the number of
monai/losses/deform.py:159
↓ 7 callersFunctionget_acti_layer
(act: tuple[str, dict] | str, nchan: int = 0)
monai/networks/nets/vnet.py:24
↓ 7 callersMethodget_data
(im_shape, input_type)
tests/transforms/test_rand_gibbs_noised.py:45
↓ 7 callersMethodget_output_path
Returns the algo output paths to find the algo scripts and configs.
monai/apps/auto3dseg/bundle_gen.py:366
↓ 7 callersFunctionget_valid_patch_size
Given an image of dimensions `image_size`, return a patch size tuple taking the dimension from `patch_size` if this is not 0/None. Otherwise,
monai/data/utils.py:341
↓ 7 callersMethodget_value
(self)
tests/handlers/test_handler_parameter_scheduler.py:31
↓ 7 callersFunctionget_versions
Get the project version from whatever source is available. Returns dict with two keys: 'version' and 'full'.
versioneer.py:1686
↓ 7 callersMethodinitialize
Initialize routine to parse configuration files and extract main components such as trainer, evaluator, and filters. Args:
monai/fl/client/monai_algo.py:411
↓ 7 callersMethodis_instantiable
Check whether this config represents a `class` or `function` that is to be instantiated. Args: config: input config cont
monai/bundle/config_item.py:226
↓ 7 callersFunctionload_net_with_metadata
Load the module object from the given Torchscript filename or stream, and convert the stored JSON metadata back to a dict object. This will p
monai/data/torchscript_utils.py:103
← previousnext →201–300 of 7,906, ranked by callers