public RasterViewPerspective ViewPerspective { get; set; }
@property (nonatomic, assign) LTRasterViewPerspective viewPerspective
public RasterViewPerspective getViewPerspective();
public:
property RasterViewPerspective ViewPerspective {
RasterViewPerspective get();
void set ( RasterViewPerspective );
}
ViewPerspective # get and set (RasterImage)
The view perspective of the image data of this RasterImage.
The view perspective indicates where the beginning of the image is stored. For more information, see RasterViewPerspective.
For more information refer to Accounting For View Perspective.
Note: You should be careful when setting the view-perspective of an image using this property since it will not change the orientation of the data of the image. To do that, use ChangeViewPerspective.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;
public void ChangeViewPerspectiveCommandExample()
{
RasterCodecs codecs = new RasterCodecs();
string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp");
// Load the source image from disk
RasterImage image = codecs.Load(srcFileName);
// Check the view perspective
Console.WriteLine("Original view perspective = {0}", image.ViewPerspective);
// If the view perspective is TopLeft, change to BottomLeft and vise versa
RasterViewPerspective viewPerspective = image.ViewPerspective;
if (viewPerspective == RasterViewPerspective.TopLeft)
viewPerspective = RasterViewPerspective.BottomLeft;
else
viewPerspective = RasterViewPerspective.TopLeft;
// Change the image view perspective
ChangeViewPerspectiveCommand command = new ChangeViewPerspectiveCommand();
command.ViewPerspective = viewPerspective;
command.InPlace = true;
command.Run(image);
// Re-check the view perspective
Console.WriteLine("New view perspective = {0}", image.ViewPerspective);
Assert.IsTrue(image.ViewPerspective == viewPerspective);
// Clean up
image.Dispose();
codecs.Dispose();
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document