This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename TPixelType> | |
void AutoplanExporterDicom::doExport(mitk::Image* image, AutoplanExporter::ExportParams& exportParams, std::vector<boost::filesystem::path>& exportedFolders, const DoExportParams& params) | |
{ | |
std::vector<itk::MetaDataDictionary*> dicomMetaDataDictionaryArray = params.originalImage->GetMetaDataDictionaryArray(); | |
std::vector<itk::MetaDataDictionary*>* workDictionaryArray = &dicomMetaDataDictionaryArray; | |
std::unique_ptr<DicomAnonimizer> anonimizer = nullptr; | |
if (exportParams.m_Anonimize) { | |
anonimizer.reset(new DicomAnonimizer(dicomMetaDataDictionaryArray)); | |
workDictionaryArray = &anonimizer->getAnonimizedDictionaries(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def grad_cam(input_model, model_x, orig_x, category_index, layer_name, class_names): | |
output = input_model.output | |
final_layer = Lambda(lambda x: target_category_loss(x, category_index, len(class_names))) | |
output = final_layer(output) | |
model = Model(inputs=input_model.input, outputs=output) | |
loss = K.sum(model.layers[-1].output) | |
conv_output = model.get_layer(layer_name).output | |
grads = normalize(K.gradients(loss, conv_output)[0]) | |
gradient_function = K.function([model.layers[0].input, K.learning_phase()], [conv_output, grads]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if file.filename.endswith('.jpg') or file.filename.endswith('.png'): | |
is_dicom = False | |
img = cv2.imdecode(np.fromstring(file.read(), np.uint8), 1) | |
else: | |
is_dicom = True | |
df = dicom.dcmread(file) # .pixel_array | |
slope = float(df.RescaleSlope) | |
intercept = float(df.RescaleIntercept) | |
df_data = intercept + df.pixel_array * slope / 20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
home λ haskell-updater root⋆cloyster ~/ ∅ | |
Running haskell-updater-1.3.1 using GHC 8.6.5 | |
* Executable: /usr/bin/ghc | |
* Library directory: /usr/lib64/ghc-8.6.5 | |
* Package manager (PM): portage | |
* Mode: OnlyInvalid | |
Searching for packages installed with a different version of GHC. | |
No old packages found! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[32;01m * [39;49;00mPackage: gnome-base/gnome-shell-3.33.3-r1 | |
[32;01m * [39;49;00mRepository: gnome-next | |
[32;01m * [39;49;00mMaintainer: [email protected] | |
[32;01m * [39;49;00mUSE: abi_x86_64 amd64 bluetooth browser-extension elibc_glibc ibus kernel_linux networkmanager python_single_target_python3_7 python_targets_python3_7 systemd userland_GNU | |
[32;01m * [39;49;00mFEATURES: ccache preserve-libs sandbox userpriv usersandbox | |
>>> Unpacking source... | |
>>> Unpacking gnome-shell-3.33.3.tar.xz to /var/tmp/portage/gnome-base/gnome-shell-3.33.3-r1/work | |
>>> Source unpacked in /var/tmp/portage/gnome-base/gnome-shell-3.33.3-r1/work | |
>>> Preparing source in /var/tmp/portage/gnome-base/gnome-shell-3.33.3-r1/work/gnome-shell-3.33.3 ... | |
[32;01m*[0m Applying patches from /var/tmp/portage/gnome-base/gnome-shell-3.33.3-r1/files/ ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model: "sequential" | |
_________________________________________________________________ | |
Layer (type) Output Shape Param # | |
================================================================= | |
conv2d (Conv2D) (None, 510, 510, 32) 896 | |
_________________________________________________________________ | |
conv2d_1 (Conv2D) (None, 508, 508, 32) 9248 | |
_________________________________________________________________ | |
conv2d_2 (Conv2D) (None, 506, 506, 32) 9248 | |
_________________________________________________________________ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/usr/lib64/python3.7/site-packages/flask/app.py", line 2309, in __call__ | |
return self.wsgi_app(environ, start_response) | |
File "/usr/lib64/python3.7/site-packages/flask/app.py", line 2295, in wsgi_app | |
response = self.handle_exception(e) | |
File "/usr/lib64/python3.7/site-packages/flask_restful/__init__.py", line 269, in error_router | |
return original_handler(e) | |
File "/usr/lib64/python3.7/site-packages/flask/app.py", line 1741, in handle_exception | |
reraise(exc_type, exc_value, tb) | |
File "/usr/lib64/python3.7/site-packages/flask/_compat.py", line 35, in reraise |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conky.config = { | |
own_window = true, | |
own_window_transparent = true, | |
own_window_type = 'window', | |
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', | |
own_window_argb_visual = true, | |
own_window_argb_value = 0, | |
out_to_console = false, | |
use_xft = true, | |
font = 'Cantarell:size=11', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct SChannel<'s> { | |
pub channel: Channel<'s>, | |
} | |
impl<'i> ::std::ops::Deref for SChannel<'i> { | |
type Target = Channel<'i>; | |
fn deref(&self) -> &Channel<'i> { &self.channel } | |
} | |
pub struct Sess<'s> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements | |
--> src/commands/owner.rs:15:48 | |
| | |
15 | let sess = ssh_session.ref_rent(|iref| iref); | |
| ^^^^ | |
| | |
note: first, the lifetime cannot outlive the anonymous lifetime #3 defined on the body at 15:41... | |
--> src/commands/owner.rs:15:41 | |
| | |
15 | let sess = ssh_session.ref_rent(|iref| iref); |
NewerOlder