I have created a Rails application based on this tutorial: http://dicom.rubyforge.org/tutorial1.html I''m trying to view a DICOM image. I was able to convert .dcm to .jpg. But, when I try to view the .jpg image I get as shown in the "Snapshot" file attached within this message. Where is the problem? Thanks. Attachments: http://www.ruby-forum.com/attachment/5019/DICOM.zip -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 8 September 2010 20:13, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have created a Rails application based on this tutorial: > http://dicom.rubyforge.org/tutorial1.html > > I''m trying to view a DICOM image. I was able to convert .dcm to .jpg. > > But, when I try to view the .jpg image I get as shown in the "Snapshot" > file attached within this message. > > Where is the problem? > > Thanks. > > Attachments: > http://www.ruby-forum.com/attachment/5019/DICOM.zipPlease don''t send attachments, just describe the problem and post whatever is necessary to explain what you are doing/seeing. To save others downloading and opening it up, the OP is seeing a broken link instead of the image. Have a look at the html (View, Page Source or similar in browser) and see the url that is being generated for the image. Does it look correct? Try just opening that url in the browser. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks @Colin. Yes, I think that the path was an issue. Now, in "show.html.rb", I have made this change: <img src="C:\Users\Abder-Rahman\Desktop\Research\dicom\<%= @examination.image %>" /> And, when I "View source", I have the following path for example <img src="C:\Users\Abder-Rahman\Desktop\Research\dicom\05115014-mr-siemens-avanto-syngo-with-palette-icone.jpg" /> And, when I try this path in a browser I get the image displayed. But, the issue of vieewing the image(s) through the Rails application still remains. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 8 September 2010 21:50, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Thanks @Colin. > > Yes, I think that the path was an issue. > > Now, in "show.html.rb", I have made this change: > > <img src="C:\Users\Abder-Rahman\Desktop\Research\dicom\<%> @examination.image %>" /> > > And, when I "View source", I have the following path for example > > <img > src="C:\Users\Abder-Rahman\Desktop\Research\dicom\05115014-mr-siemens-avanto-syngo-with-palette-icone.jpg" > /> > > And, when I try this path in a browser I get the image displayed.You cannot show files on the local machine (that is C:) in a web page, the browser will not allow it. Usually images are put in a folder under the public folder of your app. For example if you put them in public/images then the img src should be /images/filename.jpg Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law wrote:> On 8 September 2010 21:50, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > wrote: >> >> <img >> src="C:\Users\Abder-Rahman\Desktop\Research\dicom\05115014-mr-siemens-avanto-syngo-with-palette-icone.jpg" >> /> >> >> And, when I try this path in a browser I get the image displayed. > > You cannot show files on the local machine (that is C:) in a web page, > the browser will not allow it. Usually images are put in a folder > under the public folder of your app. For example if you put them in > public/images then the img src should be /images/filename.jpg > > ColinIt seems I''m doing something wrong but not aware of it. In the dicom_info.rb file which is attached, I made a change in the the loop for retrieving dicom files as follows: Dir["./public/images/dcm_files/*.dcm"].each do |dcm| dicom_files << dcm end In this case, when I "View source", I get the path as follows: <img alt="05115014-mr-siemens-avanto-syngo-with-palette-icone" src="/images/./public/images/dcm_files/05115014-mr-siemens-avanto-syngo-with-palette-icone.jpg" /> Provided that I''m using: <%= image_tag(@examination.image) %> In "show.html.erb". How can I overcome this path issue? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 8 September 2010 22:19, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:>... > It seems I''m doing something wrong but not aware of it. > > In the dicom_info.rb file which is attached, I made a change in the the > loop for retrieving dicom files as follows: > > Dir["./public/images/dcm_files/*.dcm"].each do |dcm| > dicom_files << dcm > end > > In this case, when I "View source", I get the path as follows: > > <img alt="05115014-mr-siemens-avanto-syngo-with-palette-icone" > src="/images/./public/images/dcm_files/05115014-mr-siemens-avanto-syngo-with-palette-icone.jpg" > /> > > Provided that I''m using: > > <%= image_tag(@examination.image) %>Have you looked at the docs for image_tag? If you do you will see that image_tag( "fiename") provides /images/filename in the img src, so expecting the image to be in public/images. Therefore you need @examination.image to contain just dcm_files/longfilename.jpg or to strip the bit off the front before you pass it to image_tag, or of course you could just code up the img tag yourself rather than using image_tag. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sep 8, 10:19 pm, Abder-Rahman Ali <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote:> In the dicom_info.rb file which is attached, I made a change in the the > loop for retrieving dicom files as follows: > > Dir["./public/images/dcm_files/*.dcm"].each do |dcm| > dicom_files << dcm > end > > In this case, when I "View source", I get the path as follows: > > <img alt="05115014-mr-siemens-avanto-syngo-with-palette-icone" > src="/images/./public/images/dcm_files/05115014-mr-siemens-avanto-syngo-wit h-palette-icone.jpg" > /> >The path in the image tag should be relative to the public folder, ie something like /images/dcm_files/... Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks @Colin. Yes, this is the point I''m not able to perform: "strip the bit off the front before you pass it to image_tag''. How can I remove the path to the file and keep the file name which I will then pass? Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
he means you should change this Dir["./public/images/dcm_ files/*.dcm"].each do |dcm| dicom_files << dcm end to this Dir["public/images/dcm_ files/*.dcm"].each do |dcm|> dicom_files << dcm > endputting the / at the beginning means c:/public/images/dcm_file/*.dcm that means the path is absolute. On Thu, Sep 9, 2010 at 7:23 AM, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> Thanks @Colin. > > Yes, this is the point I''m not able to perform: > > "strip the bit off the front before you pass it to image_tag''. > > How can I remove the path to the file and keep the file name which I > will then pass? > > Thanks. > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks @radhames. When I change it as you mentioned, and then view the source of the page, I get the path as follows: <img alt="05115014-mr-siemens-avanto-syngo-with-palette-icone" src="/images/public/images/dcm_files/05115014-mr-siemens-avanto-syngo-with-palette-icone.jpg" /> How can I strip the /images part, which I can see it is causing the path to be wrong? Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Sorry, I mean to strip; public/images/ As for example when I view the database, I''m getting this entry for the image file; public/images/dcm_files/05115014-mr-siemens-avanto-syngo-with-palette-icone.jpg What I''m looking for is to strip public/images/, so, I have the following entry in the database: 05115014-mr-siemens-avanto-syngo-with-palette-icone.jpg Any ideas on that? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
We have to strip the following; public/images/dcm_files/ Right? Looking forward for your replies. Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Tanks a lot everyone, I got it working using File.basename, based on this tutorial: http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm Where I remove the path and keep the file name. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
great good luck On Thu, Sep 9, 2010 at 8:15 AM, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> Tanks a lot everyone, I got it working using File.basename, based on > this tutorial: > > http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm > > Where I remove the path and keep the file name. > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Abder-Rahman Ali
2010-Sep-09 14:04 UTC
Re: Re: Re: Re: Re: Why isn''t the image showing up
radhames brito wrote:> great good luckThanks @radhames :-) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
How can i implement the dicom in ruby on rails. plz send the code -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Nov 8, 2011, at 9:56 PM, Rajashekar R. wrote:> How can i implement the dicom in ruby on rails. plz send the codeWell, you can start by asking a question that makes sense. -- Scott Ribe scott_ribe-ZCQMRMivIIdUL8GK/JU1Wg@public.gmane.org http://www.elevated-dev.com/ (303) 722-0567 voice -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Scott Ribe wrote in post #1030990:> On Nov 8, 2011, at 9:56 PM, Rajashekar R. wrote: > >> How can i implement the dicom in ruby on rails. plz send the code > > Well, you can start by asking a question that makes sense.>> Can some one guide me in implementing "DICOM" functionality using "ROR".-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rajashekar R. wrote in post #1031004:> Scott Ribe wrote in post #1030990: >> On Nov 8, 2011, at 9:56 PM, Rajashekar R. wrote: >> >>> How can i implement the dicom in ruby on rails. plz send the code >> >> Well, you can start by asking a question that makes sense. > >>> Can some one guide me in implementing "DICOM" functionality using "ROR". Theattachment was not helped me. Attachments: http://www.ruby-forum.com/attachment/6733/DICOM.rar -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I think you need to ask a more specific question. I''d never heard of DICOM before I read this and I''m very new to ROR. But the attachment seemed very helpful to me. On Tue, Nov 8, 2011 at 11:17 PM, Rajashekar R. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Rajashekar R. wrote in post #1031004: > > Scott Ribe wrote in post #1030990: > >> On Nov 8, 2011, at 9:56 PM, Rajashekar R. wrote: > >> > >>> How can i implement the dicom in ruby on rails. plz send the code > >> > >> Well, you can start by asking a question that makes sense. > > > >>> Can some one guide me in implementing "DICOM" functionality using > "ROR". The > attachment was not helped me. > > Attachments: > http://www.ruby-forum.com/attachment/6733/DICOM.rar > > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 9 November 2011 04:56, Rajashekar R. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> How can i implement the dicom in ruby on rails. plz send the codeDid you try google for help? Searching for rails dicom and gem dicom gave lots of hits that look interesting. I imagine few if any here know about dicom. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.