web stats
BasicDicomObject to XML with Mirth Utils - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-21-2014, 07:00 AM
gkittlaus gkittlaus is offline
OBX.3 Kenobi
 
Join Date: Jan 2012
Posts: 104
gkittlaus is on a distinguished road
Default BasicDicomObject to XML with Mirth Utils

Hi,

I try to serialize my DICOM object to a XML file.
I can either provide a BasicDicomObject or a ByteArray of the DICOM file.

Anyhow, when I try to use the DICOMSerializer() of Mirth, it is expecting a String.

But a string out of what? A reference to an actual file? a ByteArray.toString()?
I want to avoid writing anything in the filesystem so I am dealing mostly with bytearrays and Input- and OutputStreams.

any help is appriciated!!!

thank you very much

EDIT:
I also tried to use DICOMUtil.getDICOMMessage() but I have not the data from the type "message" to do that.
I created a new messageObject and set the RawData to my ByteArrayOutputStream.toString(). Now I try to do DICOMUtil.getDICOMMessage(message) but it ends in an error telling me my data is undefined. Do I have to set more attributes?

Last edited by gkittlaus; 01-21-2014 at 07:46 AM.
Reply With Quote
  #2  
Old 01-21-2014, 07:57 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

The toXML() method takes in a Base64 encoded string.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 01-21-2014, 09:06 AM
gkittlaus gkittlaus is offline
OBX.3 Kenobi
 
Join Date: Jan 2012
Posts: 104
gkittlaus is on a distinguished road
Default

Perfect, works just fine now
Now I found actually an easier way to do whhat I wanted.

I encoded my DICOM Object base64 and stored it in the variable DICOMMESSAGE.

After sending it to the PACS the bytes pixel data was missing.
Is the DICOM sender clearing this data out?
Should I use another variable? Do I have to put the bytes of the JPG data in another variable?

thx
Reply With Quote
Reply

Tags
basicdicomobject, bytearray, dicom, serialize, xml

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:25 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation