Saturday, February 04, 2012
Google Custom Search

ClearCanvas Highlights

Download our  Software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: b3lad
New Today New Today: 6
New Yesterday New Yesterday: 26
User Count Overall: 20479

People Online People Online:
Visitors Visitors: 40
Members Members: 0
Total Total: 40

Online Now Online Now:

ClearCanvas Community Forums

Zoom Scale problem
Last Post 2010-07-12 11:34 AM by stewart. 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
dicomprint
Posts:12

--
2010-06-28 07:52 AM  

Hi All,
         I have opened the following dcm file using ClearCanvas Workstation 2.0. While applying zoom on mouse move (even if the Value of DeltaX or DeltaY is very much minimum) the scale value increases drastically. And by default the scale value for these kind of images are much higher than the normal ones.
Can you please help me on this?
 


Attachment: zoom.dcm

dicomprint
Posts:12

--
2010-07-05 01:41 AM  

Hi All,

To describe the other way, when i tried to zoom the image using ClearCanvas, even if I move the mouse a littile bit, the zoom does happen to a greater extend. Can you please test it from your end and let me know .

 

 



dicomprint
Posts:12

--
2010-07-05 11:15 AM  

 

Hi All

After i debug the file i found the PixelAspectratio is 0.3125.
The scaleX is calculated in the following way in the function CalculateScaleToFit() of ImageSpatialTransform.cs

if (clientAspectRatio >= imageAspectRatio)
    {
     scaleX = (float)destinationWidth / (float)this.SourceWidth;
     scaleY = (float)destinationWidth / (float)this.SourceWidth * this.PixelAspectRatio;
    }

For this particular file imageAspectRatio is 0.5 . So the ScaleX  is 2.09375 and ScaleY is 0.6542969

 While i zoom the function CalculateScaleXY of ImageSpatialTransform  is called

In the function CalculateScaleXY

if (this.PixelAspectRatio >= 1)
   {
    scaleX = this.Scale;
    scaleY = this.Scale * this.PixelAspectRatio;
   }
   else
   {
                scaleX = this.Scale / (this.PixelAspectRatio);//
  scaleY = this.Scale;
   }
For this particular file it is going in else part ScaleX become  6.7 and ScaleY becomes 2.09375.


I feel this calculation makes the big difference while i move a mouse little when i zoom.


 Is there any problem with Dcm File like Pixel spacing etc..? Pleas help me regarding this issue

 



alagarajaR
Basic Member
Basic Member
Posts:16

--
2010-07-08 02:55 AM  

 Hi ,

 

As posted in the forum, I tried downloading the image attached and imported that to EFilm. Tried zooming it out. IT worked fine. But did same in ClearCanvas 2.0 Workstation. When I try to zoom, moving mouse a little from the clicked point resulted a with a image with higher zoom factor than as it happens normally.

 

I tried deleting the Pixel Spacing tag and load that in ClearCanvas Workstation , the zoom problem didnt seem to occur. And of course the Image display was not same as it was with pixel spacing been added.

Is there any issues in ClearCanvas workstation, for rectangular images?Esp with the Scale Calculation?

 

 



stewart
Senior Member
Senior Member
Posts:2032

--
2010-07-12 11:34 AM  

 Hi, this is a known bug.  I'm hoping we can fix it for the fall release of the workstation.  If you would like to fix it and submit a patch, that might ensure that it makes it in for the next release.

Thanks,

Stewart



Real-time support available to Clinical Edition and Team Edition customers
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.