Comments (23)
Please post the output of:
dcm.summary
from ruby-dicom.
System Properties:
Ruby DICOM version: 0.9.5
Byte Order (CPU): Little Endian
DICOM Object Properties:
Source: File (successfully read): /Users/camol/projects/dicom-manager/public/system/dicom_files/dicoms/000/000/001/original/IM-0001-0001.dcm
Modality: MR Image Storage
Meta Header: Yes
Value Representation: Explicit
Byte Order (File): Little Endian
Pixel Data: Yes
Image Size: 512*512
Number of frames: 1
Photometry: MONOCHROME2
Compression: JPEG 2000 Image Compression
Bits per Pixel: 16
=> ["Source: File (successfully read): /Users/camol/projects/dicom-manager/public/system/dicom_files/dicoms/000/000/001/original/IM-0001-0001.dcm", "Modality: MR Image Storage", "Meta Header: Yes", "Value Representation: Explicit", "Byte Order (File): Little Endian", "Pixel Data: Yes", "Image Size: 512*512", "Number of frames: 1", "Photometry: MONOCHROME2", "Compression: JPEG 2000 Image Compression", "Bits per Pixel: 16"]
from ruby-dicom.
This is basically a duplicate of issue #45, and a known limitation of ruby-dicom.
Unfortunately, ImageMagick (which ruby-dicom uses for handling jpeg compressed image data) is not able to decode some of the jpeg compression variants that exist.
You can verify this by trying to directly convert it using imagemagick:
convert IM-0001-0001.dcm image.jpg
I would love to be able to fix this limitation, but unfortunetaly at the moment, there are noone actively pursuing this it seems.
from ruby-dicom.
How to exactly try the manual conversion should it be done in irb or what?
Kamil Łęczycki
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Friday, 19 April 2013 at 14:48, Christoffer Lervåg wrote:
This is basically a duplicate of issue #45 (#45), and a known limitation of ruby-dicom.
Unfortunately, ImageMagick (which ruby-dicom uses for handling jpeg compressed image data) is not able to decode some of the jpeg compression variants that exist.
You can verify this by trying to directly convert it using imagemagick:
convert IM-0001-0001.dcm image.jpg
I would love to be able to fix this limitation, but unfortunetaly at the moment, there are noone actively pursuing this it seems.—
Reply to this email directly or view it on GitHub (#49 (comment)).
from ruby-dicom.
That is done in the terminal/console/Command Prompt.
(not in irb)
from ruby-dicom.
Basically, if you can manage to get a version of ImageMagick that will successfully do this conversion, then ruby-dicom will successfully extract this image as well.
from ruby-dicom.
So your saying that there could be a version which will handle that and it doesn't have to be the newest one
Kamil Łęczycki
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Friday, 19 April 2013 at 14:55, Christoffer Lervåg wrote:
Basically, if you can manage to get a version of ImageMagick that will successfully do this conversion, then ruby-dicom will successfully extract this image as well.
—
Reply to this email directly or view it on GitHub (#49 (comment)).
from ruby-dicom.
I think I did read about it a long time ago that it should be possible to specially compile ImageMagick some way to be able to handle these images, but I have never tried it myself. Try to google imagemagick plus the error you get when you try to run:
convert IM-0001-0001.dcm image.jpg
You might find some sources.
from ruby-dicom.
Thx I will get you know if I figure sth
Kamil Łęczycki
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Friday, 19 April 2013 at 15:01, Christoffer Lervåg wrote:
I think I did read about it a long time ago that it should be possible to specially compile ImageMagick some way to be able to handle these images, but I have never tried it myself. Try to google imagemagick plus the error you get when you try to run:
convert IM-0001-0001.dcm image.jpg
You might find some sources.—
Reply to this email directly or view it on GitHub (#49 (comment)).
from ruby-dicom.
I see in gemspec that ruby-dicom has rmagick and mini_magick which one of them is being exactly used to be sure which version of ImageMagic is used?
Kamil Łęczycki
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Friday, 19 April 2013 at 15:02, Kamil Łęczycki wrote:
Thx I will get you know if I figure sth
Kamil Łęczycki
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)On Friday, 19 April 2013 at 15:01, Christoffer Lervåg wrote:
I think I did read about it a long time ago that it should be possible to specially compile ImageMagick some way to be able to handle these images, but I have never tried it myself. Try to google imagemagick plus the error you get when you try to run:
convert IM-0001-0001.dcm image.jpg
You might find some sources.—
Reply to this email directly or view it on GitHub (#49 (comment)).
from ruby-dicom.
ruby-dicom by default uses RMagick.
To check your installed ImageMagick version type:
convert -version
from ruby-dicom.
It seems to be rather a problem on my laptop. I begun to continue this topic http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=19420&start=15
from ruby-dicom.
I've finally managed to convert another dicom, but still can't convert the which started this issue for me. When I use the 'image' method on dicom object I get:
NameError: uninitialized constant Magick
from ruby-dicom.
You need to load RMagick first in your script before you call the image method on DObject:
require 'rmagick'
from ruby-dicom.
When I add:
require 'rmagick'
in my model. I get:
LoadError: no such file to load -- rmagick
So I added rmagick to my gemfile and then I can not even start my rails console
Kamil Łęczycki
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Monday, 6 May 2013 at 13:50, Christoffer Lervåg wrote:
You need to load RMagick first in your script before you call the image method on DObject:
require 'rmagick'—
Reply to this email directly or view it on GitHub (#49 (comment)).
from ruby-dicom.
Well, you need to make sure that RMagick is properly loaded in your environment, before you can use the DObject#image method. How to achieve that however, is an RMagick/Rails issue so I can't help with that.
from ruby-dicom.
as instructed i am able to convert via terminal using command convert IM-0001-0001.dcm image.jpg,
but when i run it with the gem it throws error LoadError: cannot load such file -- rmagick
I have added a question on stack overflow with details here
from ruby-dicom.
@supertracer Thank you for reporting your issue.
Can you try the following in two separate irb sessions on your system:
require 'rmagick'
require 'RMagick'
Does one, both or none of these succeed?!
If the first one fails, can you please report your operating system, ruby and rmagick versions.
from ruby-dicom.
when i use require 'rmagick' , it doesn't even read the dcm file.
Using 'RMagick' ,reads the dcm file successfully but gives error DICOM: Decompressing pixel values has failed (unsupported transfer syntax: '1.2.840.10008.1.2.4.91' - JPEG 2000 Image Compression)
Using mini_magick, converts the dicom image to jpg, but the jpg file is not readable.
My system configurations: OS :Ubuntu 14.04,Ruby: 2.2.2p95 , RMagick: rmagick (2.13.2)
from ruby-dicom.
When i use include Magick , instead of DICOM.image_processor = :rmagick gives error
cannot load such file -- rmagick
from ruby-dicom.
Regarding the case sensitivity problems ('RMagick' vs 'rmagick'), you should upgrade to rmagick 2.13.4 (or later).
Regarding the failure to decompress the image data, this is usually because image magick is not able to handle the particular jpeg compression variant. However, from your case, it seems you are able to succeed with the convert command, so that makes it somewhat surprising.
I wonder if you can try this again with a newer version of rmagick, and if it still fails like this, if you can send me this dicom file.
from ruby-dicom.
Thanks the problem is fixed by upgrading to the newest version of RMagick
from ruby-dicom.
Im happy to hear that.
It would be great if you could post an update on the stackoverflow link above that your issue was fixed by upgrading rmagick to 2.13.4 or later.
from ruby-dicom.
Related Issues (20)
- Migrate rubyforge documentation HOT 4
- Support "1.2.840.10008.1.2.4.90" transfer syntax HOT 1
- ran rubocop linter HOT 1
- Making a dicom from a png file HOT 1
- get_image_pos() problem HOT 13
- dcm.value('0018,6018', :array => true) not working HOT 1
- Deprecation warning for Ruby 2.4.0 HOT 2
- Failing specs on Linux HOT 1
- Reading data after pixel data. HOT 1
- Fail to see image data on OsiriX after annonymization HOT 1
- Larger DICOM Files are not uploading from local to server HOT 1
- warning: constant ::Fixnum is deprecated HOT 2
- SystemStackError -Logging error with require 'dicom' + include DICOM HOT 6
- Unable to process RLE images HOT 4
- branches/tags are missing after v0.9.3 HOT 1
- How to stop DObject.read from setting some tags to nil? HOT 6
- Reference this gem into awesome-ruby HOT 1
- dcm.summary print 2 times HOT 1
- Best way to setup a timeout on tcp connection? HOT 1
- Keen and interested to know any acttive development HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-dicom.