/usr/share/octave/site/m/pfstools/pfs_read_xyz.m is in octave-pfstools 1.8.5-2+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | function [X Y Z] = pfs_read_xyz( fileName )
## Read hdr image file (formats accepted by pfsin) and return X, Y,
## and Z color channels.
##
## [X Y Z] = hdr_read_rgb( fileName )
## Check if file exists
fid = fopen( fileName, "rb" );
if( fid == -1 )
error( sprintf( "pfs_read_xyz: File '%s' does not exist", fileName ) );
endif
fclose( fid );
unwind_protect
fid = popen( sprintf( "pfsin %s", fileName ), "r" );
pin = pfsopen( fid );
pin = pfsget( pin );
X = pin.channels.X;
Y = pin.channels.Y;
Z = pin.channels.Z;
unwind_protect_cleanup
pfsclose( pin );
fclose( fid );
end_unwind_protect
|