This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, March 2, 2012 7:46:33 PM(UTC)
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.
#2
Posted
:
Sunday, March 4, 2012 4:39:03 AM(UTC)
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.