Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, March 15, 2013 10:17:35 PM(UTC)

skshin  
skshin

Groups: Registered
Posts: 6



I'musing medical image viewer(v17, vc)

howto reset zoom and panning?
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, March 18, 2013 7:52:26 AM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


If you are using CDLL, you need to call ImageViewerCell->SetCellScaleMode() and set it to Normal.
To reset panning, you will need to call ImageViewerCell->AddAction( CONTAINER_ACTION_OFFSET , 0);

 
#3 Posted : Tuesday, March 19, 2013 7:56:57 PM(UTC)

skshin  
skshin

Groups: Registered
Posts: 6


I implement "fit window" button.

click after call your code ..

but medical image viewer(cell) no effect.
 
#4 Posted : Wednesday, March 20, 2013 5:21:50 AM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


You can Fit the image by setting the cell’s scale to 100. The code will be something as follows:
+---------+
LImageViewerCell* hCellWnd = NULL;
hCellWnd = m_ImageViewer.GetCellHandle(0, 0);
hCellWnd->SetCellScale(0,100,CELL_APPLYTOTHIS);
hCellWnd->UpdateCellView(0);
+---------+

 
#5 Posted : Wednesday, March 20, 2013 4:18:37 PM(UTC)

skshin  
skshin

Groups: Registered
Posts: 6


Thank you for your reply.
zoom reset complete.

but panning(offset) not reset.
hCellWnd->AddAction(CONTAINER_ACTION_OFFSET, 0);

 
#6 Posted : Wednesday, March 20, 2013 10:01:38 PM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


Please try the following code to reset the panning:
=================
DISPOFFSETACTIONPROPS OffsetProp;
hCellWnd->GetActionProperties(CONTAINER_ACTION_OFFSET,0, &OffsetProp,CONTAINER_ACTION_CELLLEVEL);              
OffsetProp.nXOffset = 0;
OffsetProp.nYOffset = 0;                  
hCellWnd->SetActionProperties(CONTAINER_ACTION_OFFSET,0, &OffsetProp,CONTAINER_ACTION_CELLLEVEL);
hCellWnd->UpdateCellView(0);
=================
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2017, Yet Another Forum.NET
This page was generated in 0.182 seconds.