teleren/devto huggingface dataset:
Mastering DICOM - #3 Setup Modality Worklist SCP
Tags: dicom
Published: 2023-01-27 03:13:22

---
title: Mastering DICOM - #3 Setup Modality Worklist SCP
published: true
date: 2022-07-31 12:49:29 UTC
tags: dicom
canonical_url: http://avilpage.com/2022/07/dicom-modality-worklist-scp.html
---

#### Introduction

In the earlier article, we have learnt how to setup DICOM for digging deeper into DICOM protocol. In this article, let us learn how to setup a modality worklist(WML) SCP. Modalities can send C-FIND queries to this SCP and retrieve worklist information

#### Using Orthanc Worklist Plugin

Orthanc server has worklist plugin<sup id="fnref:owp"><a href="http://avilpage.com/2022/07/dicom-modality-worklist-scp.html#fn:owp">1</a></sup> which will serve worklist files that are stored in a particular directory. Let us download sample worklist files from Orthanc repository and keep in "WorklistDatabase" directory.

Generate default configuration by running the following command.

```
$ ./Orthanc --config=config.json

```

In the orthanc configuration file, enable worklist plugin, specify the worklist database directory so that Orthanc can locate relevant worklist files, add required modalities and restart the server.

```
  "Plugins" : [
    "libModalityWorklists.dylib"
  ],

  "Worklists" : {
    "Enable": true,
    "Database": "./WorklistsDatabase",
    "FilterIssuerAet": false,
    "LimitAnswers": 0
  },

  "DicomModalities" : {
      "PYNETDICOM" : ["PYNETDICOM", "127.0.0.1", 4243],
      "FINDSCU" : ["FINDSCU", "127.0.0.1", 4244]
  }

```

Once the plugin is enabled, we can use findscu to send C-FIND query.

```
$ findscu -W -k "ScheduledProcedureStepSequence" 127.0.0.1 4242

```

This will retrieve all worklist files from the server.

#### Using wlmscpfs

`dcmtk` <sup id="fnref:dcmtk"><a href="http://avilpage.com/2022/07/dicom-modality-worklist-scp.html#fn:dcmtk">2</a></sup> is a collection of utilities for DICOM standard. It has `wlmscpfs` application which implements basic Service Class Provider(SCP). We can start the service by running the following command.

```
wlmscpfs --debug --data-files-path WorklistsDatabase 4242

```

Once the service is started modalities can send C-FIND query to this service.

#### Conclusion

We have seen how to setup MWL SCP using Orthanc & wmlscpfs. Now that we have PACS & WML SCP up and running, in the next article lets see how to dig deeper in to the dicom standard.

* * *

1. [https://book.orthanc-server.com/plugins/worklists-plugin.html](https://book.orthanc-server.com/plugins/worklists-plugin.html) [↩](http://avilpage.com/2022/07/dicom-modality-worklist-scp.html#fnref:owp "Jump back to footnote 1 in the text")

2. [https://github.com/DCMTK/dcmtk](https://github.com/DCMTK/dcmtk) [↩](http://avilpage.com/2022/07/dicom-modality-worklist-scp.html#fnref:dcmtk "Jump back to footnote 2 in the text")
Most Used Git Commands
Tags: git, github, webdev, programming
Published: 2022-07-31 12:48:59

## What is Git ?
Git is one of the most popular Version Control Systems. It is a crucial part of daily programming.
In this article you will find the most used commands that every developer should know.

## Git Clone
GIT CLONE :For downloading an existing project

`git clone <https://name-of-repository-link>`

## Git Branch
Give the ability to work in parallel on the same project.

- **git branch** <branch-name>: New branch
- **git push -u <remote> <branch-name>** : Push the modification into the branch
- **git branch -list** : List all the branches
- **git branch -d <branch-name>** : Delete the branch
- **git checkout** : Switch to new branch (create it if doesn't exist)
- **git status** : Give the necessary informations about the current branch.

## Git add / commit / push / pull / revert

- **git add <file>** : Include changes to the next commit
- **git commit -m "commit-message"**: Used to save modification under a commit with generated id.
- **git push <remote> <branch-name>** : Used to send the updated or the new branch to the remote branch.
- **git pull <remote> **: Used to update from the remote repository
- **git revert <commit-id>** : Used to undo the modification related to specific commit.

## Git merge
git merge :Used to merge the current branch with the
parent branch, with these steps :

1. **git checkout <current-name>** : go to a specific branch.
2. **git fetch** : Update the specific branch
3. **git merge <branch-name>** : Merging

**Tips** :the best place to get more details about
Git is documentation on the official website.
It is advised to work with Git via the Git bash
terminal . Every command mentioned up can
be used with many tags.
How to add jQuery DataTables to NuxtJS 2
Tags: javascript, typescript, nuxt, datatables
Published: 2022-07-31 12:44:00

Hello everyone... this is first my article in [dev.to](https://dev.to/)
Today i'm share to you about How to add jQuery DataTables to NuxtJS 2. and here I use the css framework from [bootstrap](https://getbootstrap.com/docs/5.1/getting-started/introduction/) with version 5.1.x

I assume that you guys have installed [NuxtJS](https://nuxtjs.org/docs/get-started/installation). So now straight to the point.

---

1. Install jQuery and DataTables
    If you use other than bootstrap, you can use something else like bulma etc. [For example](https://datatables.net/download/)

    ```bash
    npm install jquery datatables.net-bs5
    ```
    or
    ```bash
    yarn add jquery datatables.net-bs5
    ```

2. Install types for jQuery and DataTables

    ```bash
    npm install @types/jquery @types/datatables.net --dev
    ```
    or
    ```bash
    yarn add @types/jquery @types/datatables.net --dev
    ```

3. Add types to tsconfig.json

    ```json
    "types": [
      ...
      "@types/jquery",
      "@types/datatables.net"
      ...
    ]
    ```

4. Create a JavaScript with name **scripts.js** in **assets/js/scripts.js** then add the code below

    ```javascript
    import 'bootstrap'
    import 'datatables.net-bs5'
    ```

5. Open file **nuxt.config.js**
		In the first line add the code below
    ```javascript
    import { ProvidePlugin } from 'webpack'
    ```
    Scroll down then we will find the Plugins. then add the code below
    ```javascript
    // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
    plugins: [
    ...
    {
      src: '~/assets/js/scripts.js',
      mode: 'client'
    }
    ...
    ],
    ```
    Scroll down then we will find the Build Configuration. then add the code below

    ```javascript
    // Build Configuration: https://go.nuxtjs.dev/config-build
    build: {
    ...
    plugins: [
      new ProvidePlugin({
        $: 'jquery',
        jQuery: 'jquery'
      })
    ]
    ...
    }
    ```
    
6. Let's create a new file in the pages folder. I'll name it datatables.vue
	  then add the code below and save it in the html script tag
	```typescript
	export  default  Vue.extend({
		name: 'DataTablesPage',
		mounted () {
			$('#datatables').DataTable()
		}
		...
	})
	```
7. Now, run this
	```bash
	npm run dev
	```
	or
	```bash
	yarn dev
	```
Now, you can see the result.
Like this

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzyc16qfztmw55cz31k1.png)

or, you can also add a language. For example using Indonesian. For a list of languages ​​you can see [here](https://datatables.net/plug-ins/i18n/#Translations).

```javascript
$('#datatables').DataTable({
   language: {
     url: 'https://cdn.datatables.net/plug-ins/1.12.1/i18n/id.json'
   }
})
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5pa82qyfqujxwpz75khq.png)

For source code: https://github.com/febryars33/nuxtjs-datatables-example
Third post going live
Published: 2022-07-31 12:11:15

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Question how to link Svelte app and Dot Net Core SignalR notification tool
Tags: svelte, signalr, notification, dotnetcore
Published: 2022-07-31 12:09:26

Hello guys, how are you... I have a question that I hope to answer from you. Has anyone ever linked the asp.net core SignalR life notification tool in Visual Studio.net with the Svelte application? I wish if anyone of you knew how to link the two projects (Svelte + Dot Net Core SignalR) Or does he have a link that explain this topic to provide me ... thank you to all of you.
Sunday's Security Update
Published: 2022-07-31 12:06:36

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
C# Constants Management
Tags: csharp, bestpractices, dotnet
Published: 2022-07-31 11:59:00

Hi devs!
I'm a 22 yo dev and some days ago I looked out for the best practices to store and manage constants in a project. I found a guy on StackOverflow that said that you must create a static class with static methods that return the constant value, in that way you have all the constants inside one file and if you ever have to make a change you can easily find the constant... but I was thinking "If I want to be able to switch to debug constants or release constants without writing too much checks inside my code and have a strong consistency, how can I make it based on this 'best practice'?" so I wrote this, it works but i wanted to know from more expert dotnet and C# devs if it is a good way to do that or not:

```
public abstract class ConstantsBase 
{
    public static ConstantsBase Instance {get; set;}
    protected ConstantsBase() {}

    public abstract string GetSomeValue();
}

public class ConstantsA : ConstantsBase
{
    public override string GetSomeValue()
    {
        return "SomeValue";
    }
}

public class ConstantsB : ConstantsBase
{
    public override string GetSomeValue()
    {
        return "SomeOtherValue";
    }
}

public class Program 
{
    public static void Main()
    {
        #if DEBUG
        ConstantsBase.Instance = new ConstantsA();
        #elif RELEASE
        ConstantsBase.Instance = new ConstantsB();
        #endif
        
        Console.WriteLine(ConstantsBase.Instance.GetSomeValue());
    }
}
```

I designed it as a singleton so it can be called from anywhere inside the program without being instantiated.
Embed privacy: Free 2-click-privacy plugin for YouTube and Twitter
Tags: wordpress, gdpr, gutenberg
Published: 2022-07-31 11:52:00

[Epiphyt](https://github.com/epiphyt) offers a very helpful and free WordPress plugin for blocking YouTube and Twitter embeds called [Embed Privacy](https://de.wordpress.org/plugins/embed-privacy/). The plugin shows an information screen instead of directly connecting to YouTube or Twitters server, visitors then can load the video manually:
 
![Screenshot blocked video with option to load if and info about YouTube privacy terms](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0esfhbhkysz2bl3a41ih.png)

And the best part: It also works in Gutenberg editor!
 
Plugin page: https://de.wordpress.org/plugins/embed-privacy/
Source: https://github.com/epiphyt/embed-privacy

Thanks very much to the devs for providing this as free and open source, really important for GDPR-compliance and for the broader WP community!

PS: If you are looking for a privacy / GDPR test tool, check out https://webbkoll.dataskydd.net/en.
What happens when a pod gets deleted
Published: 2022-07-31 11:06:14

## 1 State change and preparation

The pod is set to Terminating. And it will be isolated from end points

## 2 Run a preStop Hook

preStopHook will be executed. It is special command or http request sent to containers in the pod.

## 3 SIGTERM signal is sent to the pod

Kubernetes sends SIGTERM signal to all the containers in the pod. This lets them know that they are going to be terminated. SIGTERM can be handled, or ignored.

## 4 Kuberntes waits for the grace period

```yaml
apiVersion: v1
kind: pod
metadata:
  name: app-pod
spec:
  containers:
  - name: app-container
    image: busybox
  terminationGracePeriodSeconds: 60
```

## 5 Kubernetes sends SIGKILL command

If the containers are still running it sends SIGKILL command. Kubernetes cleanup all the objects related to the terminated pod.\
[Short tips]! Variable declaration in Unity3D
Tags: csharp, gamedev, unity3d, programming
Published: 2022-07-31 11:02:22

Here is a short tip for Unity3D developers in variable declaration. Sometimes, we declare a new variable and face a error. The error says, ".... hides inherited member .....". As like the picture below...

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ujuopvv72c2f16vr9jw2.png)


To get rid of this, simply add a _new_ keyword before datatype.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z08jlm0tivdhdpsykvaz.png)

Now it's okay. Happy Coding!
How to check aws use all at once (to see hidden services)
Published: 2022-07-31 11:02:00

It is hard to know which service is consuming more or which service we forgot to turn off.

### Billing by Services (Across all regions)

Go to [https://console.aws.amazon.com/billing/home#/bills](console.aws.amazon.com/billing/home#/bills) to see:

![Bill details by service](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cyebr1w3dne0yjz064i6.png)
How to fix Gmail login in your application?
Published: 2022-07-31 10:56:00

Google has announced that some accounts will no longer be able to use Less Secure Apps feature, starting May 30th, 2022.

Your application will contain an error similar to this:
> Uncaught Exception: Cannot connect to Gmail: Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Invalid credentials (Failure) in /home/secret/public_html/mailer/smtp.php:208

# What are Less Secure Apps in Gmail?
With *Less Secure Apps* feature, you can use your main Google username and password to sign in to your Gmail account on software and devices.

# Fix using an App Password
To use an app password, you must first [turn on two-factor authentication for your Google account](https://support.google.com/accounts/answer/185839).

![security-2fac.png](https://cdn.devdojo.com/images/july2022/security-2fac.png)

After that, in your Google account's security settings, you can set an [app-specific password](https://myaccount.google.com/u/0/apppasswords) for SMTP.

![app-passwords.png](https://cdn.devdojo.com/images/july2022/app-passwords.png)

Then type the name of the application that will help you identify this password.

![app-passwords2.png](https://cdn.devdojo.com/images/july2022/app-passwords2.png)

Your password will be generated after clicking the Generate button.

![app-passwords3.png](https://cdn.devdojo.com/images/july2022/app-passwords3.png)

And that's it, now just use this new password to log in.
React-Cocktail-recipes
Published: 2022-07-31 10:41:42


![Cocktail](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1vxz8m6plmhjj7j4sb5i.jpg)

This app is called Cocktail Bazaar. The app allows you to search for cocktails by inputting whatever ingredient you wish. The cocktails are then listed on the page which you can then hover on the cocktail image  to view the recipe details 

I fetched my cocktail data from “The Cocktail DB API”  The fetch request occurs when the user searches a cocktail on the search bar.

![Fetch api](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fc73w0mj9kbin366q15d.png)

The data fetched from the API was the cocktail image,name,recipe,glass and category.

![fetched data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lejyd6trfnzb476bplse.png)
CSS animations - fade in/out text
Tags: css, webdev, html
Published: 2022-07-31 10:37:00

Have you ever wanted to make a fade in animation of any element in your website? For instance something like this:


![Fade in animation in CSS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdlhq53y8ijsf7kht2ly.gif)

If yes, you are in the right place. It's very easy and to make this animation on your website put these lines in your style sheet:

```
.ct-animate-fadein {
   animation: fadeInAnimation ease 2.5s;
   animation-iteration-count: 1;
   animation-fill-mode: both;
   }

@keyframes fadeInAnimation
{
   0%
   { 
   opacity: 0;
   }
  
   100% 
   {
   opacity: 1;
   }
}
```

## Maybe you want to fade out?
The same you can do when you want to make a fade out animation. Just reverse the opacity in keyframes:

```
@keyframes fadeOutAnimation
{
   0%
   { 
   opacity: 1;
   }
  
   100% 
   {
   opacity: 0;
   }
}
```

------

*It would be great if you will comment or follow me on social media*:

[![Chris Texe Twitter](https://madlon.eu/wp-content/uploads/sites/21/TwitterTexeButton.webp)](https://twitter.com/TexeChris)

[![Chris Texe LinkedIn](https://madlon.eu/wp-content/uploads/sites/21/LinkedInTexeButton.webp)](https://www.linkedin.com/in/texe/)

Also you can visit my websites:

- [Linux blog](https://varlock.net)
- [Web Agency website](https://madlon.eu)
What size should a cover image of a post be?
Tags: discuss
Published: 2022-07-31 10:23:43

What size should a cover image of my dev.to post be? When I hover over the add cover image button, I am advised to use 1000:42 ratio image for best results. As illustrated in the image:

![Create post screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ms75db9xk0l1pgjx5rrj.png)
When I resize my image to be **1000px width** and **42px height**, I get undesired results. When **I don't resize**, the **main areas** of my image **shift out of focal view**.
Am I converting the ratios incorrectly?
If yes, then what is the right way?
how a mid level front end web developer resume looks like???
Tags: discuss, javascript, react, webdev
Published: 2022-07-31 09:56:00

When I just started my career I did a lot of research to prepare a great resume for my self, used  canava for designing it and added all my personal projects which I made for learning , to show case what I know, and I have got a placement in a organization as a front end web developer where I mostly works on react.js, right now I am confuse that now I how I need to update my resume, is it still good to add that personal learning projects in the resume or what kind of content I can add in my resume to showcase my expertise???
Are cheaters back in Season 21 of Axie Infinity?
Published: 2022-07-31 09:27:10

Are cheaters back in Season 21 of Axie Infinity?

Various reports and videos show that cheats are being used in Axie Infinity; indicating that the game is once again open to hacks and other forms of exploits.

https://www.youtube.com/watch?v=BNwkBlYQS_c

Popular versions of Axie cheats include:

Standard Love Potion (SLP) Generator - https://nftgamingcheats.com/slpgenerator/
 Reveal opponent card cheat - https://nftgamingcheats.com/axie-ininity-reveal-card-hack-download/ 
Auto Bot/Farming Script - https://nftgamingcheats.com/axie-infinity-auto-battle-bot/

These cheats appear available for download. A summary of these cheats can be found at NFT Gaming Cheats’ Website, which features the latest in free downloads of tested hacks and cheats for NFT games. https://nftgamingcheats.com/
Go Course: Select
Tags: go, tutorial, beginners
Published: 2022-07-31 09:26:54


In this tutorial, we will learn about the `select` statement in Go.

The `select` statement blocks the code and waits for multiple channel operations simultaneously.

A `select` blocks until one of its cases can run, then it executes that case. It chooses one at random if multiple are ready.

```go
package main

import (
	"fmt"
	"time"
)

func main() {
	one := make(chan string)
	two := make(chan string)

	go func() {
		time.Sleep(time.Second * 2)
		one <- "One"
	}()

	go func() {
		time.Sleep(time.Second * 1)
		two <- "Two"
	}()

	select {
	case result := <-one:
		fmt.Println("Received:", result)
	case result := <-two:
		fmt.Println("Received:", result)
	}

	close(one)
	close(two)
}
```

Similar to `switch` , `select` also has a default case that runs if no other case is ready. This will help us send or receive without blocking.

```go
func main() {
	one := make(chan string)
	two := make(chan string)

	for x := 0; x < 10; x++ {
		go func() {
			time.Sleep(time.Second * 2)
			one <- "One"
		}()

		go func() {
			time.Sleep(time.Second * 1)
			two <- "Two"
		}()
	}

	for x := 0; x < 10; x++ {
		select {
		case result := <-one:
			fmt.Println("Received:", result)
		case result := <-two:
			fmt.Println("Received:", result)
		default:
			fmt.Println("Default...")
			time.Sleep(200 * time.Millisecond)
		}
	}

	close(one)
	close(two)
}
```

It's also important to know that an empty `select {}` blocks forever.

```go
func main() {
	...
	select {}

	close(one)
	close(two)
}
```

---

_This article is part of my open source [Go Course](https://www.karanpratapsingh.com/courses/go) available on Github._

{% github karanpratapsingh/go-course %}
Cookies Notifications In Tailwind CSS
Tags: tailwindcss, css, html, webdev
Published: 2022-07-31 09:09:27

We used tailwind CSS flex classes and background colour classes in this cookies notification component. Also, we used buttons to allow and refuse cookies buttons.

Here we also used font awesome close icon for close notification components. This is fully responsive for mobile and tablet views.

Make it yours now by using it, downloading it, and please share it. we will design more elements for you.

[Source Code](https://w3hubs.com/cookies-notifications-in-tailwind-css/)