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 : Tuesday, September 22, 2009 7:41:18 AM(UTC)
seinarsson

Groups: Registered
Posts: 22


I'm using LEADTOOLS .NET v16.5.

I see the command to do image subtraction (DigitalSubtractCommand)... is there one for doing image division?
 

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 : Thursday, September 24, 2009 5:43:13 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

If you mean that you want to combine two images and divide the destination image by the source, or divide the source by the destination, you can use the Leadtools.ImageProcessing.Effects.CombineCommand with the CombineCommandFlags.OperationDivideSource or CombineCommandFlags.OperationDivideDestination Flags.
For more information, please read the help topics "CombineCommand Class" and "CombineCommandFlags Enumeration" in the LEADTOOLS .Net documentation.
 
Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Friday, September 25, 2009 11:48:56 AM(UTC)
seinarsson

Groups: Registered
Posts: 22


That sounds like exactly what I want to do, but I'm a little confused as to what flags I need to set.

I'm working with 16-bit grayscale images taken from a medical xray machine.

I have a RAW anatomy image taken of a patient's knee. I have a RAW control image, taken for flat field correction.

I need to divide [anatomy / control]. Here is the current code that doesn't look like it's working quite like I want...

CombineCommand cc = new CombineCommand();
cc.SourceImage = controlImage;
cc.DestinationRectangle = new Rectangle(0, 0, anatomyImage.Width, anatomyImage.Height);
cc.Flags = CombineCommandFlags.OperationDivideDestination;
cc.Run(anatomyImage);
return anatomyImage;

Which one of these should be set to the Source image? Which flags should be set? i assume the image I run the function on acts as the destination image?
 
#4 Posted : Sunday, September 27, 2009 3:10:18 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

The OperationDivideDestination    flag will divide the source by the destination.
This means your code will divide controlImage/anatomyImage and store the result in anatomyImage.

This means you either swap the source and destination images, or change the flag to OperationDivideSource.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Wednesday, September 30, 2009 4:35:40 AM(UTC)
seinarsson

Groups: Registered
Posts: 22


This worked, thanks!
 
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-2024, Yet Another Forum.NET
This page was generated in 0.089 seconds.