Can we modify the transfer syntax UID tag of a DICOM image? - dicom

While importing MRI image sets in Varian Eclipse Planning System,
Error occured: Objects conversion unsupported 'Transfer Syntax UID' (0002,0010) 'JPEG Lossless Hier 14

Eclipse (and other Aria apps) will not import compressed DICOM. Changing the tag alone, isn't enough. You need to decompress the image before importing. This can be done with GDCM.
http://gdcm.sourceforge.net/html/gdcmconv.html
gdcmconv --raw compressed.dcm uncompressed.dcm

Related

How to get metadata of all media in QMediaPlaylist?

I'm working on a Ubuntu qt project which implements a media player. Since QMediaObject::metaData can just get current media's metadata, i want to know if there is a way to get metadata of all songs which I added in QMediaPlaylist to add to a table. Any help is appreciated.
Qt Multimedia only supports querying the current songs's metadata. One possibility is to load all songs one at the time, query the metadata when the status is QMediaPlayer::LoadedMedia (connect to mediaStatusChanged() signal) and isMetaDataAvailable() returns true, and then close the media and move to the next one.
If you want to have metadata of all audiofiles beforehand you need to use some other library or framework which scans through the media files and creates a "metadata database" for you which you then utilize when showing the list of all songs.
One possible solution is to write a Python script which uses Mutagen module for retrieving the metadata. It supports ASF, FLAC, MP4, Monkey’s Audio, MP3, Musepack, Ogg Opus, Ogg FLAC, Ogg Speex, Ogg Theora, Ogg Vorbis, True Audio, WavPack, OptimFROG, and AIFF audio files. All versions of ID3v2 are supported, and all standard ID3v2.4 frames are parsed.
You can google for help to write the script, e.g. How do I access these ID3 values using Python and Mutagen
, Accessing mp3 Meta-Data with Python
When you add a new song to a playlist you either load the song through QMediaPlayer to query its metadata or launch a script which queries the metadata and adds to the "metadata database".

Using Veeva Vault, how do I connect to a Related Shared Resource?

I'm using Veeva Vault for a project, and I'm unable to get the Related Shared Resource option to work. I'm basically uploading an HTML5 page, and I want to link to a global css file.
This is the Help Guide - http://vaulthelp2.vod309.com/wordpress/applications/promotional-materials-edition/using-clm-integration/
In Veeva, I have a binder presenation, which houses all of my key messages. The key message structure looks like this:
myfilename.zip
myfilename
myfilename.html
myfilename-full.jpg
myfilename-thumb.jpg
assets
css
img
js
I used the Veeva CRM App to get them to display on the iPad. This works fine. I can see my presentation and all of the slides (key messages).
I created a shared folder that looks like this:
[shared]
mysharedname.zip
mysharedname
mysharedname-full.jpg
mysharedname-thumb.jpg
css
img
js
The shared folder is created by Veeva (according to this - https://crmhelp.veeva.com/doc/Content/Print-only_topics/CLM%20Content%20Creation%20Guide.pdf - pg. 70). In Veeva, I added the files as a slide using these options:
Name
Type (Slide)
Country
CLM Properties (Yes)
Product
Renditions
The link to the shared folder in my HTML5 file looks like this:
<link rel="stylesheet" href="../shared/css/main.css">
Once uploaded, I went to the myfilename slide, and checked the Related Shared Resource option, and selected the mysharedname slide. I performed a Force Full Refresh, and synced. The class I set in the mysharedname/css file does not display.
I've tried variations with folder names, added the shared file to the Binder, changed the path of the link to ../shared/mysharedname/css/main.css, etc. with no success.
I've used test.salesforce.com in the past to upload key messages and set shared files. However, I'm unfamiliar with how that's accomplished using Veeva Vault. I'm certain I'm either naming the files incorrectly, or not entering the key message correctly.
Any assistance is appreciated.
Thanks.
It turns out there were two issues. For some unknown reason, the file didn't post properly. Tech support couldn't determine the reason, but suggesting creating a new shared file - which worked!
Also, in posting the new shared file, I noticed the Distribution Package (zip file) keep "disappearing" in the upload process. So, I just re-attached it (in Veeva Vault - INFORMATION > Renditions).
Oh, and the shared file should be outside of the binder.
To link a shared resource in veeva vault please follow the rules for example
./shared/css/base.css
Shared zip structure should be
shared.zip css
base.css
shared_folder_structure
and you need to add the shared resource to the main file perimeter
parameter

Set Program to use LIBXML_PARSEHUGE

I am using the commandline app xmlsec to encrypt and decrypt files. I got an XML File with a node at 40 MB of size.
I already found out i need to set
LIBXML_PARSEHUGE
to parse nodes bigger than 10 MB
Does anyone know how to enable this?
I searched the source code of xmlsec for the Parser init, but couldn't find a way to integrate the option
Do i have to set this inside the source and recompile it? When so, do i have to recompile libxml or xmlsec?
Ok, so i found the solution and post it here just in case anyone needs this sometime
In
src/Parser.c
xmlDocPtr xmlSecParseFile(const char *filename){}
Contains this
/* enable parsing of XML documents with large text nodes */
xmlCtxtUseOptions (ctxt, XML_PARSE_HUGE);
Orinigally, the second line is commented out. You have to uncomment it and recompile the tool
You can also activate the parameter via the simplexml_load_string function itself:
simplexml_load_string($xmlString,'SimpleXMLElement', LIBXML_PARSEHUGE);

Use SQLite with biicode

So far I have been able to succesfully use boost, cereal and gtest using biicode but I am having troubles with sqlite. I am trying to use it doing the following:
#include <sqlite3.h>
So I edited my biicode.conf to include those lines, including the alising for the header:
[requirements]
sqlite/sqlite:9
[includes]
sqlite.h: sqlite/sqlite/sqlite3/sqlite3.h
But when I try to call bii cpp:build it does the following
WARN: Removing unused reference to "sqlite/sqlite: 9" from myuser/test "requirements"
Then I ended up with the expected:
database_impl.cpp:(.text+0x516): undefined reference to `sqlite3_exec'
Surprisingly, the compilation succedd even though sqlite3.h is obviously not included but that's maybe because the call to sqlite is from a template function.
I have looked at the example but CMakeList.txt does not seem to add any additional includes directories. For example for boost I had to add:
SET(Boost_USE_STATIC_LIBS OFF)
bii_find_boost(COMPONENTS chrono system filesystem log thread REQUIRED)
target_include_directories(${BII_BLOCK_TARGET} INTERFACE ${Boost_INCLUDE_DIRS})
target_link_libraries(${BII_BLOCK_TARGET} INTERFACE ${Boost_LIBRARIES})
But the two examples I found here and here don't seem to add anything to the includes directories, not even a link folder. I suppose sqlite has to be compiled with your sources so how do I make biicode add those files to my projects automatically ?
There're several problems. You just wrote in [includes] section sqlite.h instead of sqlite3.h and you should only write the prefix, sqlite/sqlite/sqlite3, later instead of the full dependency name.
Then, you can solve it so:
[requirements]
sqlite/sqlite: 9
[includes]
sqlite3.h: sqlite/sqlite/sqlite3
Or, you could try the SQLite version uploaded into fenix user:
[requirements]
fenix/sqlite: 0
[includes]
sqlite3.h: fenix/sqlite
Don't worry about a "WARN" message that says biicode is ignoring sqlite3.c file because it's harcoded into the block CMakeLists.txt to catch this file ;)
Note: you should write your external #includes's with double quotes instead of <>, because the last ones are referred to system headers and biicode could be using some system deps and you don't realize it.

Detail procedure to generate a har file from a given url via command line tool

Could anybody advise how to generate a har file from given a url via command line in linux? Detail tools used and guidelines are much appreciated.
Thanks
You can use phantomjs for this work.
phantomjs examples/netsniff.js "some_url" > out.har
or take a look at the BrowserMob Proxy
I have worked with PhantomJS to produce HAR files but they are not really reliable as opposed to the HAR files generated by actual browsers like Chrome, Firefox. Using selenium and BrowsermobProxy, you can generate HAR files directly from browsers with a python script such as this:
from browsermobproxy import Server
from selenium import webdriver
import json
server = Server("path/to/browsermob-proxy")
server.start()
proxy = server.create_proxy()
profile = webdriver.FirefoxProfile()
profile.set_proxy(self.proxy.selenium_proxy())
driver = webdriver.Firefox(firefox_profile=profile)
proxy.new_har("http://stackoverflow.com", options={'captureHeaders': True})
driver.get("http://stackoverflow.com")
result = json.dumps(proxy.har, ensure_ascii=False)
print result
proxy.stop()
driver.quit()
If you are looking for a command line tool that headlessly generates HAR and performance data with Chrome and Firefox, have a look at Speedprofile.
Phantomjs' har files are an abbreviated list of assets. In other words, when you visit a web page with Chrome or another browser, files load over a period of a few seconds.
But phantomjs takes an instantaneous snapshot of that website, before all the assets have had time to load.
It also excludes data and image files (because they're not part of the har spec)
You can work around this by modifying the netsniff.js example file.
I've forked that project and made those modifications at the link below. Please note that I've set the timer to wait 20 seconds before generating the har. I've also added a bit of error handling to ignore js errors. The error handling bit was added to deal with phantomjs creating invalid har files if it encountered an error. (I also commented out the function that excludes data/image files)
So this may not be exactly what you want. But it's a starting point for you or anyone else looking to use phantomjs.
After these changes, I went from consistently getting four asset files to about 25.
https://github.com/associatedpress/phantomjs/blob/netsniff-timer/examples/netsniff.js

Resources