ImageDev

WriteArrayXi64

Writes an ArrayXi64 object in a binary or text file.

Function Syntax

This function returns the None output parameter.
// Function prototype.
void
writeArrayXi64( std::shared_ptr<iolink::ArrayXi64> inputArrayXi64,
                std::string filePath,
                WriteArrayXi64::WriteType writeType,
                bool overwrite );
This function returns the None output parameter.
// Function prototype.
write_array_xi64( input_array_xi64,
                  file_path = "",
                  write_type = WriteArrayXi64.WriteType.BINARY,
                  overwrite = False )
This function returns the None output parameter.
// Function prototype.
public static void
WriteArrayXi64( IOLink.ArrayXi64 inputArrayXi64,
                String filePath = "",
                WriteArrayXi64.WriteType writeType = ImageDev.WriteArrayXi64.WriteType.BINARY,
                bool overwrite = false );

Class Syntax

Parameters

Class Name WriteArrayXi64

Parameter Name Description Type Supported Values Default Value
input
inputArrayXi64
The input ArrayXi64 object to write. ArrayXi64 nullptr
input
filePath
The file path where the ArrayXd is written. String ""
input
writeType
The type of writting.
The ArrayXd can be written as text or binary.
TEXT Writes as text.
BINARY Writes as binary.
Enumeration BINARY
input
overwrite
Allows the overwriting of an existing file. Bool false

Object Examples

std::shared_ptr< iolink::ArrayXi64> polyline2d_1( new iolink::ArrayXi64( { 0 } ) );
readArrayXi64( std::string( IMAGEDEVDATA_OBJECTS_FOLDER ) + "polyline2d_1.arrayxi64", polyline2d_1);

WriteArrayXi64 writeArrayXi64Algo;
writeArrayXi64Algo.setInputArrayXi64( polyline2d_1 );
writeArrayXi64Algo.setFilePath( "output_writeArrayXd.arrayxi64" );
writeArrayXi64Algo.setWriteType( WriteArrayXi64::WriteType::TEXT );
writeArrayXi64Algo.setOverwrite( true );
writeArrayXi64Algo.execute();
polyline_2d_1 = np.zeros(0, dtype=np.int64)
polyline_2d_1 = imagedev.read_array_xi64(imagedev_data.get_object_path("polyline2d_1.arrayxi64"), polyline_2d_1)

write_array_xi64_algo = imagedev.WriteArrayXi64()
write_array_xi64_algo.input_array_xi64 = polyline_2d_1
write_array_xi64_algo.file_path = "output_writeArrayXd.arrayxi64"
write_array_xi64_algo.write_type = imagedev.WriteArrayXi64.TEXT
write_array_xi64_algo.overwrite = True
write_array_xi64_algo.execute()
IOLink.ArrayXi64 polyline2d_1 = new IOLink.ArrayXi64(new IOLink.VectorXu64( 0 ) ) ;
polyline2d_1 = Data.ReadArrayXi64( @"Data/objects/polyline2d_1.arrayxi64", polyline2d_1 );

WriteArrayXi64 writeArrayXi64Algo = new WriteArrayXi64
{
    inputArrayXi64 = polyline2d_1,
    filePath = "output_writeArrayXd.arrayxi64",
    writeType = WriteArrayXi64.WriteType.TEXT,
    overwrite = true
};
writeArrayXi64Algo.Execute();

Function Examples

std::shared_ptr< iolink::ArrayXi64> polyline2d_1( new iolink::ArrayXi64( { 0 } ) );
readArrayXi64( std::string( IMAGEDEVDATA_OBJECTS_FOLDER ) + "polyline2d_1.arrayxi64", polyline2d_1);

writeArrayXi64( polyline2d_1, "output_writeArrayXd.arrayxi64", WriteArrayXi64::WriteType::TEXT, true );
polyline_2d_1 = np.zeros(0, dtype=np.int64)
polyline_2d_1 = imagedev.read_array_xi64(imagedev_data.get_object_path("polyline2d_1.arrayxi64"), polyline_2d_1)

imagedev.write_array_xi64( polyline_2d_1, "output_writeArrayXd.arrayxi64", imagedev.WriteArrayXi64.TEXT, True )
IOLink.ArrayXi64 polyline2d_1 = new IOLink.ArrayXi64(new IOLink.VectorXu64( 0 ) ) ;
polyline2d_1 = Data.ReadArrayXi64( @"Data/objects/polyline2d_1.arrayxi64", polyline2d_1 );

Processing.WriteArrayXi64( polyline2d_1, "output_writeArrayXd.arrayxi64", WriteArrayXi64.WriteType.TEXT, true );