Welcome to LEAD Support Forum Login | Register | Faq  

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

How can i get the total no.of pixel for all annotation?
Started by Gunasekaran at 06-02-2008 8:21. Topic has 10 replies.

Print Search « Previous Thread Next Thread »
  06-02-2008, 8:21
Gunasekaran is not online. Last active: 8/29/2008 7:23:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 98
How can i get the total no.of pixel for all annotation?
Reply Quote

Hi Dude

                    I am using lead tools version 15.0, working in VB.Net environment using Medical Viewer control. In medical viewer sample project (MediaclViewerDemo) how can I get the total no of pixel in the rectangle annotation not in the rectangle region? I can get the no of pixel when I draw the rectangle region but I can’t get the total no. of pixel when I draw rectangle annotation. How can I get the total no. Of pixel when I draw the rectangle annotation, ellipse annotation and so on? Why I want this I have to calculated area for the particular annotation for example (rectangle annotation, ellipse annotation) and so on (all annotations) and also that area displayed in the medical viewer control


Thanks in Advance
Guna


Thanks and Regards
Guna
   Report 
  06-03-2008, 11:24
Adnan Ismail is not online. Last active: 9/4/2008 2:25:00 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,150
Re: How can i get the total no.of pixel for all annotation?
Reply Quote
Guna,
One way to do that is to Use the ConvertAnnotationToRegion() function to convert the annotation object to region and set the second flag in it to false so you can keep the annotation object.
After that, you can use the CalculateRegionArea Method to get the area of the region, then you can delete the region.
Adnan Ismail
LEADTOOLS Technical Support

   Report 
  06-04-2008, 2:51
Gunasekaran is not online. Last active: 8/29/2008 7:23:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 98
Re: How can i get the total no.of pixel for all annotation?
Reply Quote
Hi,
As per your idea  I carried on like this
1. I draw a rectangle over the image .
2. calling a function Area()
private sub Area()
                For Each cell As MedicalViewerCell In Viewer.Cells
                If cell.Selected Then
                    Dim image As RasterImage = _medicalViewer.Cells(0).Image
                    cell.ConvertAnnotationToRegion(RasterRegionCombineMode.Set, True)              
                    Dim area As Integer = image.CalculateRegionArea()
                    MessageBox.Show(area.ToString)
                End If
            Next cell
end sub
It gives out the total area of the image instead of selected region ..Is any thing wrong in my code .please correct me
thanks
Guna

Thanks and Regards
Guna
   Report 
  06-04-2008, 12:18
Adnan Ismail is not online. Last active: 9/4/2008 2:25:00 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,150
Re: How can i get the total no.of pixel for all annotation?
Reply Quote
Guna,
I want to report this to our engineers. Can you please send a message to support@leadtools.com with your LEADTOOLS toolkit serial number and mention this post.
Adnan Ismail
LEADTOOLS Technical Support

   Report 
  06-11-2008, 1:20
Gunasekaran is not online. Last active: 8/29/2008 7:23:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 98
Re: How can i get the total no.of pixel for all annotation?
Reply Quote
Hello dude

    Now we are eavaluating ur lead tools product so can u send ur new latest patches then only we can convert Annotation to region for getting no of pixel in the selected Area.

Thanks and Regards
Guna

Thanks and Regards
Guna
   Report 
  06-11-2008, 15:13
Adnan Ismail is not online. Last active: 9/4/2008 2:25:00 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,150
Re: How can i get the total no.of pixel for all annotation?
Reply Quote
Please send an email to support@leadtools.com in order to get the download instructions for the last build and in order to report this issue to our engineers.  For verification purposes, I need you to include the following information:
 
- Your name and a valid email address


Adnan Ismail
LEADTOOLS Technical Support

   Report 
  07-16-2008, 6:31
Gunasekaran is not online. Last active: 8/29/2008 7:23:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 98
Re: How can i get the total no.of pixel for all annotation?
Reply Quote
Hello Dude

        Have u check with ur engineers reg this topic. i want get the total no.of pixel for all anootation. why i am need this based on this pixel i can convert to measurement like cm or mm or inch. thas y i need total number of pixel for all annotation. already i posted this code for getting pixel but u said we have send to ur engineers. have u solved the problem in below code
Hi,
As per your idea  I carried on like this
1. I draw a rectangle over the image .
2. calling a function Area()
private sub Area()
                For Each cell As MedicalViewerCell In Viewer.Cells
                If cell.Selected Then
                    Dim image As RasterImage = _medicalViewer.Cells(0).Image
                    cell.ConvertAnnotationToRegion(RasterRegionCombineMode.Set, True)              
                    Dim area As Integer = image.CalculateRegionArea()
                    MessageBox.Show(area.ToString)
                End If
            Next cell
end sub

Thanks and Regards
Guna

Thanks and Regards
Guna
   Report 
  07-16-2008, 11:36
Adnan Ismail is not online. Last active: 9/4/2008 2:25:00 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,150
Re: How can i get the total no.of pixel for all annotation?
Reply Quote
Guna,
This issue is now reported in incident 7141AMN. Please keep this number for future reference. I will update this post once the patch that has the fix for it is available.
Adnan Ismail
LEADTOOLS Technical Support

   Report 
  08-03-2008, 11:35
Adnan Ismail is not online. Last active: 9/4/2008 2:25:00 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,150
Re: How can i get the total no.of pixel for all annotation?
Reply Quote
Our engineers marked incident number 7141AMN as Fix. The fix is now available in the latest LEADTOOLS v15 patches. Please send your LEADTOOLS toolkit serial number to support@leadtools.com and mention this post so I can send you these patches.
Adnan Ismail
LEADTOOLS Technical Support

   Report 
  08-06-2008, 3:33
Gunasekaran is not online. Last active: 8/29/2008 7:23:22 AM Gunasekaran



Top 25 Posts
Joined on 05-07-2008
Chennai,India
Posts 98
Re: How can i get the total no.of pixel for all annotation?

Attachment: bug.zip
Reply Quote
Hi Ismail

    I had dowloaded the new pateches and based on ur insturction i overwrite all the dll files to Bin\Dotnet and redist\dotnet folder and also run gacutil.exe file but my application was crash when i run it, just i click the run button in .NET suddenly crash the application. i attached the screen shot of error message. but previous version dll ( before update the ur new dll version) are working properly. can u give the sample code for getting number of pixel for all annotation.

Thanks and Regards
Guna
   Report 
  08-06-2008, 11:22
Adnan Ismail is not online. Last active: 9/4/2008 2:25:00 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,150
Re: How can i get the total no.of pixel for all annotation?
Reply Quote
I used your code in this forum inside our MedicalViewer demo and it worked fine. Can you remove all LEADTOOLS DLLs from the GAC and then use the latest DLLs from the latest patch. If you do that, do you still get the crash?
Please make sure that you are using DLLs from the same version (same patch) and do not mix old DLLs with new DLLs.


Adnan Ismail
LEADTOOLS Technical Support

   Report 
Post
LEAD Support Fo... » Developer » General » How can i get the total no.of pixel for all annotation?

Powered by Community Server, by Telligent Systems