code
stringlengths
3
6.57k
quad.getName()
quad.getLength()
if(quad.hasParam("radIn")
quad.hasParam("radOut")
quad.getParam("radIn")
quad.getParam("radOut")
if(name == "LI_DTL1:DTQ01")
PMQ_Trace3D_Function(length_param,radIn,radOut,cutoff_level)
if(quad.hasParam("aperture")
quad.getParam("aperture")
EngeFunction(length_param,acceptance_diameter_param,cutoff_level)
quad.getName()
orbitFinalize(msg)
SecretOauth(object)
dumps(self, data)
Serializer(secret_key=settings.SECRET_KEY, expires_in=3600)
s.dumps(data)
result.decode()
loads(self, data)
Serializer(secret_key=settings.SECRET_KEY, expires_in=3600)
s.loads(data)
apply_phys_seg(img, out_fname)
sitk.ReadImage(img)
sitk.GetArrayFromImage(img_itk)
sitk.GetImageFromArray(img_npy)
out.CopyInformation(img_itk)
sitk.WriteImage(out, out_fname)
os.path.join(Phys_Seg.__path__[0], "config.py")
SPGR (for now)
int (for device id)
maybe_download_parameters(sequence=sequence, physics_flag=True if physics_params else False)
get_params_fname(sequence=sequence, physics_flag=True if physics_params else False)
net.cpu()
net.cuda(device)
torch.nn.DataParallel(net, device_ids=[device, int(1-device)
net.to(f'cuda:{net.device_ids[0]}')
torch.nn.DataParallel(net)
isinstance(mri_fnames, (list, tuple)
isinstance(output_fnames, (list, tuple)
torch.load(params_file, map_location=lambda storage, loc: storage)
zip(mri_fnames, output_fnames)
not (os.path.isfile(out_fname)
print("File:", in_fname)
print("preprocessing...")
read_file(in_fname)
print("\nERROR\nCould not read file", in_fname, "\n")
print(e)
eval(physics_params)
print(physics_params)
physics_preprocessing(np.array(physics_params)
image_preprocessing(patient_data=data)
print("prediction (CNN id)
net.load_state_dict(params['model_state_dict'])
net.eval()
print("exporting segmentation...")
save_segmentation_nifti(seg, aff, out_fname)
apply_phys_seg(in_fname, out_fname)
bytearray("\x89LZO\x00\r\n\x1a\n")
_parse_header(lzo_file)
lzo_file.tell()
Exception("File object must be at offset 0")
lzo_file.read(9)
Exception("Invalid lzo file")
lzo_file.read(2)
lzo_file.read(2)
lzo_file.read(2)
lzo_file.read(1)
lzo_file.read(1)
struct.unpack(">I", lzo_file.read(4)
enumerate(_COMPRESSION_CHECKSUMS)
if (flag & flags)
enumerate(_DECOMPRESSION_CHECKSUMS)
if (flag & flags)
lzo_file.read(4)
lzo_file.read(4)
lzo_file.read(4)
ord(lzo_file.read(1)
str(lzo_file.read(filename_length)
lzo_file.read(4)
if (flags & 0x00000040)
struct.unpack(">I", lzo_file.read(4)
lzo_file.read(size)
lzo_file.read(4)
get_lzo_blocks(lzo_file)
_parse_header(lzo_file)
struct.unpack(">I", lzo_file.read(4)
struct.unpack(">I", lzo_file.read(4)
lzo_file.tell()
lzo_file.seek(next_block)
index_lzo_string(string)
StringIO()
index_lzo_file(StringIO(string)
index.getvalue()
index_lzo_file(lzo_file, index_file)
get_lzo_blocks(lzo_file)
index_file.write(struct.pack(">Q", block_offset)
truncate_arg_value(value, max_len=1024)
isinstance(value, bytes)
len(value)
add_span_arg_tags(span, endpoint_name, args, args_names, args_traced)