Comment on page

Data Type Conventer

With this block, you can change variable types.
Connect data to input socket, after running the block will transform the data to a new variable type.

Data Type Converter Node Documentation

The Data Type Converter node in AugeLab Studio allows you to convert data types between different formats.

Node Overview

The Data Type Converter node enables you to convert data from one type to another based on your requirements. It provides a variety of conversion options, such as converting boolean values to integers, integers to strings, strings to integers, floats to integers, and more. Additionally, it supports converting between lists and batch lists.

Node Interaction

  1. 1.
    Drag and drop the Data Type Converter node from the node library onto the canvas in AugeLab Studio.
  2. 2.
    Connect the data you want to convert to the input socket of the node.
  3. 3.
    Choose the desired conversion type from the dropdown menu.
  4. 4.
    The node will convert the input data to the selected type and provide it as output.
  5. 5.
    Run the pipeline or execute the node to perform the data type conversion.
  6. 6.
    Retrieve the converted data from the output socket.

Available Conversion Types

The Data Type Converter node supports the following conversion types:
  • Boolean2Int: Convert a boolean value to an integer (True = 1, False = 0).
  • Int2Boolean: Convert an integer value to a boolean (0 = False, non-zero = True).
  • Int2String: Convert an integer value to a string.
  • String2Int: Convert a string to an integer.
  • Float2Int: Convert a float value to an integer.
  • Int2Float: Convert an integer value to a float.
  • List2Batch: Convert a list to a batch list.
  • Batch2List: Convert a batch list to a list.
Note: The "Batch2List" conversion type is only applicable if the input data is a batch list. Similarly, the "List2Batch" conversion type is only applicable if the input data is a list.

Implementation Details

The Data Type Converter node converts data from one type to another based on the selected conversion type. It uses a dictionary to map conversion types to the corresponding conversion functions.
During its implementation, the node performs the following steps:
  1. 1.
    Retrieve Input: The node receives the input data from the input socket.
  2. 2.
    Conversion: Based on the selected conversion type, the node applies the corresponding conversion function to the input data.
  3. 3.
    Output: The converted data is provided as output through the output socket.

Usage

  1. 1.
    Drag and drop the Data Type Converter node from the node library onto the canvas in AugeLab Studio.
  2. 2.
    Connect the data you want to convert to the input socket of the node.
  3. 3.
    Choose the desired conversion type from the dropdown menu.
  4. 4.
    The node will convert the input data to the selected type and provide it as output.
  5. 5.
    Run the pipeline or execute the node to perform the data type conversion.
  6. 6.
    Retrieve the converted data from the output socket.
  7. 7.
    Use the converted data in downstream nodes or export it for further processing.

Notes

  • The Data Type Converter node allows you to convert data types between different formats.
  • It provides various conversion options, such as converting boolean values to integers, integers to strings, strings to integers, floats to integers, and more.
  • The node supports converting between lists and batch lists.
  • You can choose the desired conversion type from the dropdown menu.
  • The input data is converted based on the selected conversion type.
  • The converted data is provided as output through the output socket for further use in the pipeline.
  • Make sure to select the appropriate conversion type based on the input data and the desired output format.
  • The Data Type Converter node simplifies the process of converting data types, making it easier to work with different formats in your pipeline.