1- # Copyright 2021 MONAI Consortium
1+ # Copyright 2021-2002 MONAI Consortium
22# Licensed under the Apache License, Version 2.0 (the "License");
33# you may not use this file except in compliance with the License.
44# You may obtain a copy of the License at
@@ -70,8 +70,8 @@ def __init__(
7070
7171 Args:
7272 roi_size (Union[Sequence[int], int]): The tensor size used in inference.
73- pre_transforms (Compose): MONAI Compose oject used for pre-transforms.
74- post_transforms (Compose): MONAI Compose oject used for post-transforms.
73+ pre_transforms (Compose): MONAI Compose object used for pre-transforms.
74+ post_transforms (Compose): MONAI Compose object used for post-transforms.
7575 overlap (float): The overlap used in sliding window inference.
7676 """
7777
@@ -132,7 +132,7 @@ def overlap(self, val: float):
132132 def _convert_dicom_metadata_datatype (self , metadata : Dict ):
133133 """Converts metadata in pydicom types to the corresponding native types.
134134
135- It is knwon that some values of the metadata are of the pydicom types, for images converted
135+ It is known that some values of the metadata are of the pydicom types, for images converted
136136 from DICOM series. Need to use this function to convert the types with best effort and for
137137 the few knowns metadata attributes, until the following issue is addressed:
138138 https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/185
@@ -264,7 +264,7 @@ def post_process(self, pre_transforms: Compose, out_dir: str = "./infer_out") ->
264264 raise NotImplementedError (f"Subclass { self .__class__ .__name__ } must implement this method." )
265265
266266 def predict (self , data : Any , * args , ** kwargs ) -> Union [Image , Any ]:
267- """Prdicts results using the models(s) with input tensors.
267+ """Predicts results using the models(s) with input tensors.
268268
269269 This method must be overridden by a derived class.
270270
@@ -310,7 +310,7 @@ def get_data(self, input_image):
310310 A single image is loaded with a single set of metadata as of now.
311311
312312 The App SDK Image asnumpy() function is expected to return a numpy array of index order `DHW`.
313- This is because in the DICOM serie to volume operator pydicom Dataset pixel_array is used to
313+ This is because in the DICOM series to volume operator pydicom Dataset pixel_array is used to
314314 to get per instance pixel numpy array, with index order of `HW`. When all instances are stacked,
315315 along the first axis, the Image numpy array's index order is `DHW`. ITK array_view_from_image
316316 and SimpleITK GetArrayViewFromImage also returns a numpy array with the index order of `DHW`.
@@ -332,7 +332,7 @@ def get_data(self, input_image):
332332 if not isinstance (i , Image ):
333333 raise TypeError ("Only object of Image type is supported." )
334334
335- # The Image asnumpy() retruns NumPy array similar to ITK array_view_from_image
335+ # The Image asnumpy() returns NumPy array similar to ITK array_view_from_image
336336 # The array then needs to be transposed, as does in MONAI ITKReader, to align
337337 # with the output from Nibabel reader loading NIfTI files.
338338 data = i .asnumpy ().T
0 commit comments