function [cellROIs_refined] = SegmentShinyObjects(StackTrack, parCellSeg, whattoprint)

nFrames = length(StackTrack);

for i = 1:nFrames;
    cellROIs_refined(i) = segment_fromImage_refinedWS(StackTrack(i).data, parCellSeg);
    disp(i) 
    
    LabelsMap=labelmatrix(cellROIs_refined(i)); 

 
    if strcmp(whattoprint,'YES')
    [B,L] = bwboundaries(LabelsMap>0);
    
    figure(3000)
    imagesc(StackTrack(i).data);
    colormap('hot')
    hold on;
     for k = 1:length(B)
            figure(3000)
            boundary = B{k};
            plot(boundary(:,2), boundary(:,1), 'w', 'LineWidth', 1);
     end
        
     
   
    
    
    end; 
    

    
    hold off; 
    
    
end


end

