←Select platform

KernelType Property

Summary
Gets the type of the LEADTOOLS kernel.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public static RasterKernelType KernelType { get; } 
+ (LTRasterKernelType)kernelType 
public static RasterKernelType getKernelType(); 
public: 
static property RasterKernelType KernelType { 
   RasterKernelType get(); 
} 
KernelType # get  (RasterSupport) 

Property Value

Aa RasterKernelType enumeration member indicating the LEADTOOLS kernel type.

Remarks

The following table describes the types of LEADTOOLS kernels:

Kernel Description
Release This is the Release kernel.
Evaluation This is the Evaluation kernel, which has all features unlocked, but displays an "eval" message during execution. This kernel will also expire.
Example

This example will check the LEADTOOLS kernel type and whether it has expired

C#
Java
using Leadtools; 
 
 
public void LeadtoolsKernelExample() 
{ 
	// show current kernel 
	switch (RasterSupport.KernelType) 
	{ 
		case RasterKernelType.Release: 
			Console.WriteLine("Release kernel"); 
			break; 
 
		case RasterKernelType.Evaluation: 
			Console.WriteLine("Evaluation kernel"); 
			// show if the kernel has expired 
			if (RasterSupport.KernelExpired) 
				Console.WriteLine("Evaluation kernel has expired"); 
			else 
				Console.WriteLine("Evaluation kernel has not expired yet"); 
			break; 
	} 
} 
import java.io.File; 
import java.io.FileInputStream; 
import java.io.IOException; 
import java.io.InputStream; 
import java.nio.file.Files; 
import java.nio.file.Paths; 
 
import org.junit.*; 
import org.junit.runner.JUnitCore; 
import org.junit.runner.Result; 
import org.junit.runner.notification.Failure; 
import static org.junit.Assert.*; 
 
import leadtools.*; 
 
 
public void kernelExpired() { 
 
   Platform.setLibPath("C:\\LEADTOOLS22\\Bin\\CDLL\\x64"); 
   Platform.loadLibrary(LTLibrary.LEADTOOLS); 
 
   switch (RasterSupport.getKernelType()) { 
      case RELEASE: 
         System.out.println("Release kernel"); 
         assertTrue("Kernel is release", RasterSupport.getKernelType() == RasterKernelType.RELEASE); 
         break; 
      case EVALUATION: 
         System.out.println("Evaluation kernel"); 
         assertTrue("Kernel is evaluation", RasterSupport.getKernelType() == RasterKernelType.EVALUATION); 
         if (RasterSupport.getKernelExpired()) { 
            System.out.println("Evaluation kernel has expired"); 
            assertTrue("Kernel has expired", RasterSupport.getKernelExpired()); 
         } else { 
            System.out.println("Evaluation kernel has not expired yet"); 
            assertTrue("Kernel has not expired", !RasterSupport.getKernelExpired()); 
         } 
         break; 
      default: 
   } 
} 
Requirements

Target Platforms

Help Version 22.0.2024.2.22
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.