Coder Social home page Coder Social logo

siemensraw's Introduction

Siemens MRI Raw Data Tools

A couple of simple tools to create a (somewhat) unique signature of *.dat files and DICOM files from siemens MRI systems

To install:

go get github.com/hansenms/siemensraw/...

To get a signature from a datfile:

datsignature <DATFILENAME>

To get a signature from a DICOM:

dicomsignature <DICOMFILE>

If signatures from DICOM and *.dat file match, there is a pretty good chance that the images were generated from the *.dat file.

The package also provides a tool for extracting any buffer from Siemens *.dat files:

datbuffer -b Phoenix <DATFILENAME>

Finally there are some tools for creating a filesystem based database for raw data files:

addfile -b <BASEPATH TO BE REMOVED> -d <DESTINATION FOLDER> <DATFILENAME>

To add an entire folder with lots of *.dat files to the database:

find <FOLDER TO SEARCH> -name "*.dat" -exec addfile -b /mnt/cnmc/ -d <DATABASE PATH> {} \;

To subsequently locate a particular *.dat file based on signature:

findraw -d <DATABASE PATH> <SIGNATURE>

The output is in json format and you can use a tool like jq to extract info from the output:

findraw -d <DATABASE PATH> <SIGNATURE> | jq .

LITwheel install (windows)

cd C:\Go\src\
git clone https://github.com/rajramasawmy/siemensraw.git
cd siemensraw\litwheel
set GOBIN=C:\Go\src\siemensraw\litwheel
set GOPATH=C:\Go\src\siemensraw\litwheel
go install main
rename main.exe litwheel.exe

On scanner

litwheel -hashlog=<hashlog.txt> -key=<user_ssh_key> -user=<user_name_for_server> -address=<server_ip_address>:<storage_location>

To run for "N" steps (and future, verbose mode):

litwheel -hashlog=<hashlog.txt> -key=<user_ssh_key> -user=<user_name_for_server> -address=<server_ip_address>:<storage_location> -debug=<N>

Example bat script for logging errors and operation

(litwheel -hashlog=<hashlog.txt> -key=<user_ssh_key> -user=<user_name_for_server> -address=<server_ip_address>:<storage_location>  || ssh -i <user_ssh_key> <user_name_for_server>@<server_ip_address> "mail -s 'LITwheel FAIL!' person1@mail, person2@mail, person3@mail") | tee logfile.txt
scp -i <user_ssh_key> logfile.txt <user_name_for_server>@<server_ip_address>:<location>
ssh -i <user_ssh_key> <user_name_for_server>@<server_ip_address> "cat <location>/logfile.txt | mail -s 'LITwheel log' person1@mail, person2@mail, person3@mail"
scp -i <user_ssh_key> raidtool.txt <user_name_for_server>@<server_ip_address>:<location>
ssh -i <user_ssh_key> <user_name_for_server>@<server_ip_address> "sh send_raidlog.sh"

send_raidlog.sh Extra fudge script because of some permission errors (using docker)..

docker exec -i <myContainer> bash <<EOF

  cd /opt/data/<wherever you sent the raidtool.txt>

  chmod 777 raidtool.txt 
  
  exit

EOF

cat <docker mount dir>/raidtool.txt | mail -s 'RAID report' person1@mail, person2@mail, person3@mail

siemensraw's People

Contributors

jessewu789 avatar rajramasawmy avatar xueh2 avatar hansenms avatar

Forkers

jessewu789

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.