Occurs when the image data or attributes has changed.
public event EventHandler<RasterImageChangedEventArgs> Changed Public Event Changed As EventHandler(Of RasterImageChangedEventArgs) public event EventHandler<RasterImageChangedEventArgs> Changed extern NSString *const LTRasterImageChangedNotificationextern NSString *const LTRasterImageChangedNotificationFlags
synchronized public void addChangedListener(RasterImageChangedListener listener)synchronized public void removeChangedListener(RasterImageChangedListener listener)
add_Changed(function(sender, e))remove_Changed(function(sender, e))
public:event EventHandler<RasterImageChangedEventArgs^>^ Changed
The event handler receives an argument of type RasterImageChangedEventArgs containing data related to this event. The following RasterImageChangedEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Flags | Gets the flags for the Changed event. |
When the data or attributes of a RasterImage object changes, the Changed event is fired with information of what has changed. For example, you can subscribe to this event to get notified when the RasterImage object has been changed and need to be updated in your user interface by re-painting it.
For more information, refer to RasterImageChangedEventArgs.
using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Core;using Leadtools.ImageProcessing.Color;using Leadtools.Dicom;using Leadtools.Drawing;using Leadtools.Controls;using LeadtoolsExamples.Common;using Leadtools.Svg;public void ChangedExample(){RasterCodecs codecs = new RasterCodecs();string srcFileName = Path.Combine(ImagesPath.Path, "Image1.cmp");// Load the imageRasterImage img = codecs.Load(srcFileName);// Subscribe to the Changed event of this imageimg.Changed += new EventHandler<RasterImageChangedEventArgs>(img_Changed);// Call a few methods and image processing commands that changes the imageConsole.WriteLine("Calling FlipViewPerspective");img.FlipViewPerspective(true);Console.WriteLine("Calling RotateViewPerspective");img.RotateViewPerspective(90);Console.WriteLine("Calling FlipCommand");FlipCommand flip = new FlipCommand(true);flip.Run(img);// Now disable firing the events and call the methods againConsole.WriteLine("Disabling the events");img.DisableEvents();Console.WriteLine("Calling FlipViewPerspective");img.FlipViewPerspective(true);Console.WriteLine("Calling RotateViewPerspective");img.RotateViewPerspective(90);Console.WriteLine("Calling FlipCommand while");flip.Run(img);// Re-enable the events and fire it manuallyConsole.WriteLine("Re-enabling the events");img.EnableEvents();Console.WriteLine("Firing the event manually");RasterImageChangedFlags flags = RasterImageChangedFlags.Data | RasterImageChangedFlags.ViewPerspective;RasterImageChangedEventArgs e = new RasterImageChangedEventArgs(flags);img.OnChanged(e);// Clean upimg.Changed -= new EventHandler<RasterImageChangedEventArgs>(img_Changed);img.Dispose();codecs.Dispose();}void img_Changed(object sender, RasterImageChangedEventArgs e){// Show the changed flagsConsole.WriteLine("Changed: {0}", e.Flags);}
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.ImageProcessingImports Leadtools.ImageProcessing.CoreImports Leadtools.ImageProcessing.ColorImports Leadtools.ControlsImports Leadtools.DicomImports Leadtools.DrawingImports Leadtools.SvgPublic Sub ChangedExample()Dim codecs As RasterCodecs = New RasterCodecs()Dim srcFileName As String = Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp")' Load the imageDim img As RasterImage = codecs.Load(srcFileName)' Subscribe to the Changed event of this imageAddHandler img.Changed, AddressOf img_Changed' Call a few methods and image processing commands that changes the imageConsole.WriteLine("Calling FlipViewPerspective")img.FlipViewPerspective(True)Console.WriteLine("Calling RotateViewPerspective")img.RotateViewPerspective(90)Console.WriteLine("Calling FlipCommand")Dim flip As FlipCommand = New FlipCommand(True)flip.Run(img)' Now disable firing the events and call the methods againConsole.WriteLine("Disabling the events")img.DisableEvents()Console.WriteLine("Calling FlipViewPerspective")img.FlipViewPerspective(True)Console.WriteLine("Calling RotateViewPerspective")img.RotateViewPerspective(90)Console.WriteLine("Calling FlipCommand while")flip.Run(img)' Re-enable the events and fire it manuallyConsole.WriteLine("Re-enabling the events")img.EnableEvents()Console.WriteLine("Firing the event manually")Dim flags As RasterImageChangedFlags = RasterImageChangedFlags.Data Or RasterImageChangedFlags.ViewPerspectiveDim e As RasterImageChangedEventArgs = New RasterImageChangedEventArgs(flags)img.OnChanged(e)' Clean upRemoveHandler img.Changed, AddressOf img_Changedimg.Dispose()codecs.Dispose()End SubPrivate Sub img_Changed(ByVal sender As Object, ByVal e As RasterImageChangedEventArgs)' Show the changed flagsConsole.WriteLine("Changed: {0}", e.Flags)End SubPublic NotInheritable Class LEAD_VARSPublic Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"End Class
using Leadtools;using Leadtools.Codecs;using Leadtools.Dicom;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Core;using Leadtools.ImageProcessing.Color;using Leadtools.Examples;using Leadtools.Windows.Media;public void ChangedExample(){// create a new image to work withRasterImage img = new RasterImage(RasterMemoryFlags.Conventional, 500, 500, 24, RasterByteOrder.Bgr, RasterViewPerspective.TopLeft, null, null, 0);// Subscribe to the Changed event of this imageimg.Changed += new EventHandler<RasterImageChangedEventArgs>(img_Changed);// Call a few methods and image processing commands that changes the imageDebug.WriteLine("Calling FlipViewPerspective");img.FlipViewPerspective(true);Debug.WriteLine("Calling RotateViewPerspective");img.RotateViewPerspective(90);Debug.WriteLine("Calling FlipCommand");FlipCommand flip = new FlipCommand(true);flip.Run(img);// Now disable firing the events and call the methods againDebug.WriteLine("Disabling the events");img.DisableEvents();Debug.WriteLine("Calling FlipViewPerspective");img.FlipViewPerspective(true);Debug.WriteLine("Calling RotateViewPerspective");img.RotateViewPerspective(90);Debug.WriteLine("Calling FlipCommand while");flip.Run(img);// Re-enable the events and fire it manuallyDebug.WriteLine("Re-enabling the events");img.EnableEvents();Debug.WriteLine("Firing the event manually");RasterImageChangedFlags flags = RasterImageChangedFlags.Data | RasterImageChangedFlags.ViewPerspective;RasterImageChangedEventArgs e = new RasterImageChangedEventArgs(flags);img.OnChanged(e);// Clean upimg.Changed -= new EventHandler<RasterImageChangedEventArgs>(img_Changed);img.Dispose();}void img_Changed(object sender, RasterImageChangedEventArgs e){// Show the changed flagsDebug.WriteLine("Changed: {0}", e.Flags);}
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.DicomImports Leadtools.ImageProcessingImports Leadtools.ImageProcessing.CoreImports Leadtools.ImageProcessing.ColorImports Leadtools.Windows.MediaPublic Sub ChangedExample()' create a new image to work withDim img As RasterImage = New RasterImage(RasterMemoryFlags.Conventional, 500, 500, 24, RasterByteOrder.Bgr, RasterViewPerspective.TopLeft, Nothing, Nothing, 0)' Subscribe to the Changed event of this imageAddHandler img.Changed, AddressOf img_Changed' Call a few methods and image processing commands that changes the imageDebug.WriteLine("Calling FlipViewPerspective")img.FlipViewPerspective(True)Debug.WriteLine("Calling RotateViewPerspective")img.RotateViewPerspective(90)Debug.WriteLine("Calling FlipCommand")Dim flip As FlipCommand = New FlipCommand(True)flip.Run(img)' Now disable firing the events and call the methods againDebug.WriteLine("Disabling the events")img.DisableEvents()Debug.WriteLine("Calling FlipViewPerspective")img.FlipViewPerspective(True)Debug.WriteLine("Calling RotateViewPerspective")img.RotateViewPerspective(90)Debug.WriteLine("Calling FlipCommand while")flip.Run(img)' Re-enable the events and fire it manuallyDebug.WriteLine("Re-enabling the events")img.EnableEvents()Debug.WriteLine("Firing the event manually")Dim flags As RasterImageChangedFlags = RasterImageChangedFlags.Data Or RasterImageChangedFlags.ViewPerspectiveDim e As RasterImageChangedEventArgs = New RasterImageChangedEventArgs(flags)img.OnChanged(e)' Clean upRemoveHandler img.Changed, AddressOf img_Changedimg.Dispose()End SubPrivate Sub img_Changed(ByVal sender As Object, ByVal e As RasterImageChangedEventArgs)' Show the changed flagsDebug.WriteLine("Changed: {0}", e.Flags)End Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
