You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: Function_Specificsurface_direct_Algorithm.m
    path of file: ./repos/MATBOX_Microstructure_analysis_toolbox/src/Microstructure_characterization
    
    the code of the file until where you have to start completion: function [Postion_surface,surface] = Function_Specificsurface_direct_Algorithm(binary_phase)

% Domain size
Current_Domain_size = size(binary_phase);

% Position of the faces, Initialization
% One step is equal to half voxel length
Postion_surface.direction(1).value=zeros(2*Current_Domain_size(1)-1,2);
Postion_surface.direction(2).value=zeros(2*Current_Domain_size(2)-1,2);

    
function [Postion_surface,surface] = Function_Specificsurface_direct_Algorithm(binary_phase)

% Domain size
Current_Domain_size = size(binary_phase);

% Position of the faces, Initialization
% One step is equal to half voxel length
Postion_surface.direction(1).value=zeros(2*Current_Domain_size(1)-1,2);
Postion_surface.direction(2).value=zeros(2*Current_Domain_size(2)-1,2);
Postion_surface.direction(3).value=zeros(2*Current_Domain_size(3)-1,2);
% Position (axis)
Postion_surface.direction(1).value(:,1)=(0.5:0.5:(0.5*2*Current_Domain_size(1)-0.5))';
Postion_surface.direction(2).value(:,1)=(0.5:0.5:(0.5*2*Current_Domain_size(2)-0.5))';
Postion_surface.direction(3).value(:,1)=(0.5:0.5:(0.5*2*Current_Domain_size(3)-0.5))';

% The xor(A,B) function (which is the matlab built-in function for the
% logical exclusive-OR) allows to calculate the boudnary surface easily:
% example: the phase is [0 0 1 1 0 0 1 0]
% then :              A=[0 0 1 1 0 0 1]
%                     B=  [0 1 1 0 0 1 0]
% xor(A,B)=xor( [0 0 1 1 0 0 1],
%               [0 1 1 0 0 1 0] );
%         =     [0 1 0 1 0 1 1]
% suface=sum(xor(A,B))=4

% Detection of the faces normal to the direction 1
Face_normal_1 = xor( binary_phase(1:Current_Domain_size(1)-1,:,:) , binary_phase(2:Current_Domain_size(1),:,:));
% Summation of all these faces
sum1 = sum(sum(sum( Face_normal_1 )));
% Position of all these faces
for position_1=1:1:Current_Domain_size(1)-1
    Postion_surface.direction(1).value(2*position_1,2)= sum(sum(Face_normal_1(position_1,:,:)==1));
end