ImageDev

Initialization

This section introduces how to initialize and finalize ImageDev.

Syntax

Method Description
void init() Initializes the ImageDev library. This method performs some mandatory internal initializations and checks the license.
void finish() Finalizes the ImageDev library. This method frees some internal objects and releases the license when using floating licensing.
bool isInitialized() Checks if the ImageDev library has been initialized. Returns true if ImageDev is initialized, returns false otherwise.
 // ImageDev library initialization
imagedev::init();
// Check initialization if( imagedev::isInitialized() ) { std::cout << "ImageDev is initialized" << std::endl;
// Open a tif file auto imageInput = ioformat::readImage(std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "hello_imagedev.tif");
// Apply a normalization of its graylevels using function coding style std::shared_ptr < iolink::ImageView > imageNorm = imagedev::rescaleIntensity(imageInput, imagedev::RescaleIntensity::OutputType::SAME_AS_INPUT, imagedev::RescaleIntensity::RangeMode::PERCENTILE, { 2, 98 }, { 0, 255 }, { 0, 255 });
// ImageDev library finalization imagedev::finish(); }
Method Description
init() Initializes the ImageDev library. This method performs some mandatory internal initializations and checks the license.
finish() Finalizes the ImageDev library. This method frees some internal objects and releases the license when using floating licensing.
is_initialized() Checks if the ImageDev library has been initialized. Returns true if ImageDev is initialized, returns false otherwise.
 # ImageDev library initialization
imagedev.init() 
if( imagedev.is_initialized() == True ): # Open and display a tif file image_input = ioformat.read_image(imagedev_data.get_image_path("hello_imagedev.tif"))
# Apply a normalization of its graylevels using function coding style image_norm = imagedev.rescale_intensity(image_input, range_mode=imagedev.RescaleIntensity.RangeMode.PERCENTILE) imagedev.imshow(image_norm)
# ImageDev library finalization imagedev.finish()
Method Description
public Init() Initializes the ImageDev library. This method performs some mandatory internal initializations and checks the license.
public Finish() Finalizes the ImageDev library. This method frees some internal objects and releases the license when using floating licensing.
public IsInitialized() Checks if the ImageDev library has been initialized. Returns true if ImageDev is initialized, returns false otherwise.
 // ImageDev library initialization
Initialization.Init();
if (Initialization.IsInitialized() == true) { // Open a tif file ImageView imageInput = IOFormat.ViewIO.ReadImage(@"Data/images/hello_imagedev.tif") as ImageView; try { // Apply a normalization of its graylevels using function coding style var imageNorm = Processing.RescaleIntensity(imageInput, RescaleIntensity.OutputType.SAME_AS_INPUT, RescaleIntensity.RangeMode.MIN_MAX, new double[] { 2, 98 }, new double[] { 0, 255 }, new double[] { 0, 255 }); // Notify the garbage collector that the intermediate image can be freed imageNorm.Dispose(); } catch { Utilities.WriteErrorMsg("RescaleIntensity function failed!"); } }