A non-transitory computer-accessible hardware medium which includes thereon software, wherein, when executed by a computer processing arrangement, the software configures the computer processing arrangement to execute procedures to determine at least one position of at least one portion of a sample, the software comprising:
- a first set of instructions which, when executed by the computer processing arrangement, obtains information associated with an interference signal that includes a first electro-magnetic radiation received from the sample and a second electro-magnetic radiation received from a reference;
- a second set of instructions which, when executed by the computer processing arrangement, obtains depth information of the at least one portion of the sample based on multiple points within a single A-line of the first electro-magnetic radiation;
- a third set of instructions which, when executed by the computer processing arrangement, applies at least one weight function to the depth information so as to generate resulting information;
- a fourth set of instructions which, when executed by the computer processing arrangement, ascertains a particular information which is at least one of a surface position or a depth position of the at least one portion of the sample based on the resulting information;
- a further set of instructions which, when executed by the computer processing arrangement, modifies a range of the reference based on the particular information;
- and
- a fourth set of instructions which, when executed by the computer processing arrangement, generates an image of the at least one portion of the sample based on the obtained depth information of the at least one portion of the sample, and wherein the modification of the range of the reference is performed during the generation of the image.