Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Window level problem?
Started by Gunasekaran at 05-30-2008 7:04. Topic has 17 replies.

Print Search « Previous Thread Next Thread »
  05-30-2008, 7:04
Gunasekaran is not online. Last active: 12/18/2008 10:19:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 174
Window level problem?
Reply Quote
Hello dude

      I am using lead tools version 15.0, working in VB.Net environment using Medical Viewer control. In medical viewer sample project (MediaclViewerDemo)contain window level function only for 8 bits/pixel images  but not for 24 bits/pixel images.How can i apply the window level to 24 bits/pixel images(colour images) in medical viewer control?

Thanks in Advance
Guna

Thanks and Regards
Guna
   Report 
  06-02-2008, 4:12
Adnan Ismail is not online. Last active: 1/6/2009 4:12:02 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,361
Re: Window level problem?
Reply Quote
Guna,
Window-leveling is only valid for 12 and 16-bit grayscale images. It will not work for 24bit images.

Adnan Ismail
LEADTOOLS Technical Support

   Report 
  06-03-2008, 1:11
Gunasekaran is not online. Last active: 12/18/2008 10:19:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 174
Re: Window level problem?
Reply Quote
Hi dude

   Got the result thanks a lot....

Thanks and Regards
Guna

Thanks and Regards
Guna
   Report 
  09-19-2008, 6:25
Gunasekaran is not online. Last active: 12/18/2008 10:19:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 174
Re: Window level problem?
Reply Quote
Hi

     Does anyway to apply window level for 24 bit colour image? Is it possible or not? If yes how can i do that? becos in my application i used 8 bit,12 bit, 16 bit and also 24 bit colour and grey scale images, i don't want avoid window level method its only to 24 bit images. Kindly do the help.



Thanks and Regards
Guna
   Report 
  09-21-2008, 10:55
Adnan Ismail is not online. Last active: 1/6/2009 4:12:02 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,361
Re: Window level problem?
Reply Quote
Guna,
Window-leveling is only valid for 12 and 16-bit grayscale images. It will not work for 24bit images.
If you want to change the intensity, contrast or Paint Gamma of the image without affecting pixel values, that can be done for 24-bit images, but not window leveling.


Adnan Ismail
LEADTOOLS Technical Support

   Report 
  09-22-2008, 1:45
Gunasekaran is not online. Last active: 12/18/2008 10:19:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 174
Re: Window level problem?
Reply Quote
sounds good. If we can change the intensity , contrast of the image without affecting pixel values using the mouse movement it would be greate. would be of very helpful if you send us the sample code.

Thanks and Regards
Guna
   Report 
  09-22-2008, 5:51
Adnan Ismail is not online. Last active: 1/6/2009 4:12:02 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,361
Re: Window level problem?
Reply Quote
You can do that by handling the mouse events and use the following properties in the RasterImage Class:
- PaintGamma Property
- PaintContrast Property
- PaintIntensity Property

For code sample, please see this topic:
CustomPaint Event

Adnan Ismail
LEADTOOLS Technical Support

   Report 
  09-25-2008, 2:34
Gunasekaran is not online. Last active: 12/18/2008 10:19:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 174
Re: Window level problem?

Attachment: imageinformation.zip
Reply Quote

Hi

    Thanks for ur reply. i am using this code for getting window level 24 bit images its working but its gives error for big size images. i have attached the image information dialog for ur reference.the following code i am using window level for 24 bit images.
***************************************************************************
_Image = m_Viewer.Cells(m_curr_idx).Image
        If _Image.BitsPerPixel = 24 And m_window = True Then
            m_Viewer.Cursor = Cursors.VSplit
            Dim mintensity As Double
            Dim mcontrast As Double
            mintensity = System.Math.Abs(e.X() - _Image.Width())
            mcontrast = System.Math.Abs(e.Y() - _Image.Width())
            _Image.PaintIntensity = CInt(mintensity)
            _Image.PaintContrast = CInt(mcontrast)
            m_Viewer.Refresh()
            m_Viewer.Invalidate()
        End If
***************************************************************************
  if i done anything wrong in my code kindly correct the code and send back to me.. kindly do the help as early as possible..


Thanks and Regards
Guna
   Report 
  09-25-2008, 10:07
Adnan Ismail is not online. Last active: 1/6/2009 4:12:02 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,361
Re: Window level problem?
Reply Quote
Can you send me a sample file you tried to process? Also, can you put your code in a very small project (not your full application) and send it to me in a ZIP or RAR file so I can check it for you?
Adnan Ismail
LEADTOOLS Technical Support

   Report 
  09-26-2008, 1:01
Gunasekaran is not online. Last active: 12/18/2008 10:19:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 174
Re: Window level problem?

Attachment: SampleProjectwithimage.zip
Reply Quote
Hi Ismail

      Here i have attached SampleProjectwithimage.zip its contain Sample project(DrawDemo) and sample file(image1.bmp). kindly do the help as much as possible..if u run the project and load the image and select the Draw line icon in the tool bar and draw the line its increase brightness and contrast...

Thanks and Regards
Guna
   Report 
  09-28-2008, 6:48
Adnan Ismail is not online. Last active: 1/6/2009 4:12:02 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,361
Re: Window level problem?
Reply Quote
The demo you sent does not have the MedicalViewer in it and does not use the code you post previously. However, I ran the project and it worked fine with no problems. If your problem is when you try to do the same using the MedicalViewer, please try to create a very small application (not your full project) that show it.
Adnan Ismail
LEADTOOLS Technical Support

   Report 
  11-12-2008, 0:27
Gunasekaran is not online. Last active: 12/18/2008 10:19:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 174
Re: Window level problem?
Reply Quote

Hi Adam

  I can't able to attach the file. So i sent mail to support@leadtools.com and i mentioned this post. Kindly help me as much as possible...

Thanks and Regards
Guna
   Report 
  11-12-2008, 10:28
Adnan Ismail is not online. Last active: 1/6/2009 4:12:02 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,361
Re: Window level problem?
Reply Quote
I ran the demo you sent.  However, I am did not see the problem you are referring to on this post. Can you send me more details about the issue you are facing and how to reproduce it using the demo you sent me?
Adnan Ismail
LEADTOOLS Technical Support

   Report 
  11-12-2008, 23:30
Gunasekaran is not online. Last active: 12/18/2008 10:19:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 174
Re: Window level problem?
Reply Quote
Hi Adnan

Modify this following code
************************************************************************************************************
_Image = medicalViewer1.Cells[0].Image;
if (_Image.BitsPerPixel == 24)
                    {
                        double mintensity = 0;
                        double mcontrast = 0;
                        mintensity = System.Math.Abs(e.X - _Image.Width / e.X);
                        mcontrast = System.Math.Abs(e.Y - _Image.Width / e.X);
                         // Comment this if condition
                        //if (mintensity < 1000 & mcontrast < 1000)
                        //{
                            _Image.PaintIntensity = (int)mintensity;
                            _Image.PaintContrast = (int)mcontrast;
                        //}
                    }
************************************************************************************************************

After done the above modification in that project(which one i have attached the mail (support@leadtools.com)) RUN it... and load the big images like image width 3500  and image height 2500. It will give error...
Thanks and Regards
Guna
   Report 
  11-13-2008, 10:06
Adnan Ismail is not online. Last active: 1/6/2009 4:12:02 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,361
Re: Window level problem?
Reply Quote
Guna,
Even when I followed your steps and loaded a 24- bit image with(3500x2500) size. I could not get any error. If this happens with a certain image you have, please send it to me in a ZIP or RAR file so I can see the problem.
Adnan Ismail
LEADTOOLS Technical Support

   Report 
Post
 Page 1 of 2 (18 items) 1 2 »
LEAD Support Fo... » Developer » General » Window level problem?

Powered by Community Server, by Telligent Systems