Open GoogleCodeExporter opened 9 years ago
I think I see the problem -- with no file meta info to give the transfer
syntax, pydicom assumes implicit VR little
endian, but that file is explicit VR (your matlab output indicates it used
explicit VR, and the VR characters are
there in the hex output).
So we don't need any example files, I can create a test case based on your hex
output.
I've changed the title of this issue to reflect the more general problem.
As a temporary solution to read this RT Ion file, in filereader.py you could
add an extra optional argument to
read_file, passed along to read_partial, to tell the reader the file is
explicit VR. I'll see if I can work up something
like that to add to these functions. Even if there is a good heuristic, there
may still be cases it doesn't handle
properly, and the user should be able to force the correct one.
Original comment by darcymason@gmail.com
on 30 Apr 2010 at 1:35
Hi,
thanks for the quick answer. I was actually just reading up on implicit and
explicit
VR and can confirm your findings. All of the files in my output directory
contain
the DICOM data encoded with implicit VR, except for the one file with the RT
Ion
Plan (don't ask me why!).
I just edited my RT Ion Plan with a hex editor and deleted the first few VR's
and
made the encoding match implicit VR and I was able to read the first few
elements
with pydicom. Thanks for that. But yes, I agree. It would be nice to let the
user
choose the encoding when the transfer syntax is unknown.
I will contact the customer support and ask if there is a way to export the
file
meta info as well. This would probably be the most elegant way.
Thanks again!
Cheers,
Andy
Original comment by sticktot...@googlemail.com
on 30 Apr 2010 at 1:53
Original issue reported on code.google.com by
sticktot...@googlemail.com
on 30 Apr 2010 at 9:48