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 2, 2012 7:46:33 PM(UTC)

kb7  
kb7

Groups: Registered
Posts: 71


Hi,

Is it possible to add an option of croping image by drawing some rectangular region on the image in Main3DDemo or MedicalViewerDemo? If, then can you please provide some sample code or some demo example for this.

Thanks.
 

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 : Sunday, March 4, 2012 4:39:03 AM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


Hello,
You can use CropCommand class to implement this feature. By selecting the rectangular region you want then using with CropCommand.Run().
For example,if you select a rectangular region from Cell[0] (main cell) in the Medical Viewer demo and applied the following code:

=================
MedicalViewerMultiCell cell1 = Viewer.Cells[0] as MedicalViewerMultiCell;
CropCommand Crop = new CropCommand();
Crop.Rectangle = cell1.Image.GetRegionBounds(null);
Crop.Run(cell1.Image);
=================

You will get a cropped image of the area you selected.

 
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-2020, Yet Another Forum.NET
This page was generated in 0.074 seconds.