Patent Document

BACKGROUND OF THE INVENTION  
         [0001]    The present invention relates to an endoscope system adapted to manage data of a plurality of endoscopes.  
           [0002]    There are endoscopes provided with a solid state imaging device for capturing images inside human body. Such endoscopes, so called electronic endoscopes, are normally connected to a processor that transforms the output signals from the solid state imaging device into image signals so that output devices such as monitors and video printers can display or print the image captured by the solid state imaging device.  
           [0003]    The endoscope is connected detachably to the processor so that the endoscope can be changed to a suitable type in accordance with the location of the human body to be inspected or treated with the endoscope. That is, the endoscope and the processor can be used in various combinations.  
           [0004]    The endoscope is usually provided with a memory, such as an EEPROM, into which various kinds of data related to the endoscope are stored. Data stored into the memory includes, for example, type and serial number of the endoscope, and calibration data for adjusting the white balance of the image captured by the solid state imaging device. The calibration data for adjusting the white balance includes the amount of brightness increase/decrease of red and blue colors, which will be referred hereinafter as to “wb(r)” and “wb(b)”, respectively.  
           [0005]    The endoscope type and serial number are read by the processor as the endoscope is connected to it to display them on, for example, the monitor. The calibration data for white balance, wb(r) and wb(b), are also read by the processor to adjust the white balance of the image generated in the processor based on the output signals from the solid state imaging device.  
           [0006]    The white balance adjusting ability, however, are slightly different between each processor. Therefore, the processor often fails to achieve proper white balance by adjusting the colors merely in accordance with the calibration data obtained from the endoscope. In such case, proper white balance is achieved by performing manually a fine adjustment.  
           [0007]    Recently, processors have been developed that are provided with a memory for storing the calibration data obtained as a result of the fine adjustment mentioned above. The calibration data is stored in the memory in association with data intrinsic to the endoscope such as serial number as a dataset like a database so that the processor can utilize the calibration data if the endoscope is connected and used again in the future. In this way, the processor eliminates the necessity of repetitive manual fine adjustment of the white balance.  
           [0008]    The number of endoscopes, however, of which data can be registered to the memory of the processor is restricted because of the finite available memory space thereof. Thus, if there is not available memory space for storing data of a new endoscope, unimportant data such as that of old or seldom used endoscopes should be deleted manually to free up memory space. Such manual operation is a cumbersome task and may cause deletion of important data such as that of new or frequently used endoscopes for lack of proper care.  
           [0009]    For example, there are endoscopes purchased and endoscopes leased for a certain term. The leased endoscopes, in particular, endoscopes leased for a short term tends to quickly increase the number of registered endoscopes until the memory is filled. The data of such leased endoscopes remain in the memory even after the leased term is over and prevent the registration of a new purchased endoscope of which data registration should take precedence to the that of leased endoscope&#39;s data.  
           [0010]    Further, if the data filling the memory includes both data of purchased and leased endoscopes, the manual operation for registering new endoscope data may cause deletion of purchased endoscope data instead of data of the endoscope leased in the past and already returned.  
         SUMMARY OF THE INVENTION  
         [0011]    The present invention provides the advantage in that, in an endoscope system, new endoscope data is automatically registered in a database of endoscopes&#39; data without requiring cumbersome manual operation even if the database is full.  
           [0012]    An endoscope system according to an aspect of the invention includes a processor connectable to various endoscopes to process signals generated by the endoscope being connected via a connector. The processor includes a database, a data selector and a data register. The database is configured to be registered a plurality of pieces of endoscope data, each of which being related to different one of the endoscopes connectable to the connector. Each piece of the endoscope data includes priority information indicating the priority of deleting the piece of endoscope data. The data selector selects one piece of the endoscope data based on the priority information. The data register registers a new endoscope with the database by replacing the selected piece of endoscope data with the piece of endoscope data of the new endoscope.  
           [0013]    Thus, even if there isn&#39;t any available storage space in the database, the endoscope system can register a new endoscope with the database without deleting data of relatively important endoscopes.  
           [0014]    Optionally, the priority information includes the date of when the piece of endoscope data is registered with the database. In this case, the priority information may include the date of when the endoscope is connected to the processor for the first time as the date of when the piece of endoscope data is registered with the database.  
           [0015]    Optionally, the priority information includes the date of when the endoscope is used for the last time. In this case, the priority information may include the date of when the endoscope is connected to the processor for the last time as the date of when the endoscope is used for the last time.  
           [0016]    In the above two optional cases, the data selector may select the piece of endoscope data related to the priority information including the oldest date, since such data may be related to old endoscopes or endoscopes seldom used.  
           [0017]    According to another aspect of the invention, an endoscope system is provided which has an endoscope and a processor to be connected to the endoscope to process signals generated by the endoscope. The processor includes, a storage device, a data receiver, a database selector, and a data register. The storage device includes a plurality of databases. The data receiver receives first and second data related to the endoscope, the second data includes information on the property of said endoscope. The database selector selects one of the databases in the storage device based on the second data. The data register registers the endoscope with the selected database by storing at least the first data into the selected database so that the endoscope is registered with the database corresponding to the property of the endoscope.  
           [0018]    Each of said plurality of databases may be defined in a different data file, or in a different single continuous storage area of said storage device.  
           [0019]    Optionally, the data register is adapted to store priority information of the endoscope into the selected database in association with the first data. In case the selected database does not have available storage space for storing the first and second data, the data register selects one of the first and second data previously stored in the database based on the priority information to replace it with the first and second data received by the data receiver.  
           [0020]    The priority information may include the date of when the endoscope data is stored into the selected database. For example, the priority information includes the date of when the endoscope is connected to the processor for the first time as the date of when the endoscope data is stored into the selected database.  
           [0021]    Alternatively, the priority information may include the date of when the endoscope is used for the last time. For example, the priority information includes the date of when the endoscope is connected to the processor as said date of when the endoscope is used for the last time, which is updated when the endoscope is connected to the processor.  
           [0022]    In the case the priority information includes the date described above, the data register may select the endoscope data related to the priority information including the oldest date.  
           [0023]    Optionally, the processor further includes a text information generator for displaying text information on an monitor connected to the processor. The text information generator generates the text information on the property of the endoscope based on the second data. The text information generator displays the text information on the monitor when the endoscope is in use. Therefore, the operator using the endoscope can confirm the property of the endoscope on the monitor.  
           [0024]    The data register may store the second data into the selected database in association with the first data, so that the text information generator can obtain the second data from the selected database when the endoscope is in use and display the text information.  
           [0025]    The processor may include a video signal generator which generates video signal from output signals of an imaging device provided to the endoscope. The video signal generator may generate that video signal as the endoscope is connected to the processor to display an image captured by the imaging device on the monitor at the same time the text information is displayed. The endoscope information may be superimposed on the image captured by the imaging device.  
           [0026]    The data receiver may receive the first and second data from a memory provided to the endoscope.  
           [0027]    Alternatively, the data receiver may receive the first data from a memory provided to the endoscope while the second data from an input unit which can be manually operated by an operator.  
           [0028]    Optionally, the second data includes information on the ownership of the endoscope. For example, the second data includes information on whether or not the endoscope is purchased. Alternatively, the second data includes information on whether or not the endoscope is leased. In the later case, the second data may include information on whether or not the endoscope is leased for a term longer than a predetermined term.  
           [0029]    The first data may include information for adjusting white balance of an image captured by an imaging device provided to the endoscope. 
       
    
    
     BRIEF DESCRIPTION OF THE ACCOMPANYING DRAWINGS  
       [0030]    [0030]FIG. 1 schematically shows the configuration of an electronic endoscope system according to an embodiment of the invention;  
         [0031]    [0031]FIG. 2 shows an exemplary format of the data in a memory provided to an electronic endoscope of the endoscope system of FIG. 1;  
         [0032]    [0032]FIG. 3 shows an example of the content of the data stored in the memory of the electronic endoscope in FIG. 1;  
         [0033]    [0033]FIG. 4 shows an exemplary structure of a database established in a memory of a processor shown in FIG. 1;  
         [0034]    [0034]FIG. 5 is a flow chart showing the main routine related to the operation of the processor according to first embodiment of the invention;  
         [0035]    [0035]FIG. 6 is a flow chart showing a subroutine DISPLAY SCOPE NAME called in the main routine shown in FIG. 5;  
         [0036]    [0036]FIG. 7 is a flow chart showing a subroutine FILE OPEN called in the main routine shown in FIG. 5;  
         [0037]    [0037]FIG. 8 is a flow chart showing a subroutine ENDOSCOPE REGISTRATION called in the main routine in FIG. 5;  
         [0038]    [0038]FIG. 9 is a flow chart showing a subroutine DISPLAY DATE &amp; TIME in the main routine shown in FIG. 5;  
         [0039]    [0039]FIG. 10 is a flow chart showing a subroutine ADJUSTMENT in the main routine shown in FIG. 5;  
         [0040]    [0040]FIG. 11 shows a modification of the flow chart shown in FIG. 8;  
         [0041]    [0041]FIG. 12 schematically shows an address map of the memory  208  in which two areas are defined for storing endoscope data as second embodiment of the invention;  
         [0042]    [0042]FIG. 13 shows a modification of the flow chart shown in FIG. 7:  
         [0043]    [0043]FIG. 14 shows a modification of the flow chart shown in FIG. 8. 
     
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS  
       [0044]    Hereinafter, an embodiment of the invention will be described with reference to the accompanying drawings.  
         [0045]    [0045]FIG. 1 schematically shows the configuration of an electronic endoscope system  1  according to an embodiment of the invention.  
         [0046]    The electronic endoscope system  1  includes an electronic endoscope  100 , and a processor  200  for processing signals from the electronic endoscope  100 .  
         [0047]    The electronic endoscope  100  includes an flexible inserting tube  110  to be inserted into a human body and an operation portion  120  connected to the proximal end of the inserting tube  110 . The electronic endoscope  100  further includes a connector  130  which is detachably connected to the processor  200 .  
         [0048]    A solid state imaging device such as a CCD  104  and an objective optical system  101  for forming an optical image on a light receiving surface of the CCD  104  are provided to the distal end portion of the inserting tube  110 .  
         [0049]    Further, One or more operation buttons  107  are provided to the operation portion  120  for controlling the operation of the processor  200 .  
         [0050]    Further, a memory such as an EEPROM  102  is provided to the electronic endoscope  100  for storing data related to the endoscope  100 , in particular, data intrinsic to each endoscope. In the present embodiment, the EEPROM  102  is located in the connector  130 .  
         [0051]    The processor  200  includes a CPU  201  which is connected to the operation buttons  107  and the EEPROM  102  via an signal cable  108  of the endoscope  100 . The CPU  201  controls the operation of the processor  200  in accordance with the signals from the operation buttons  107 . The CPU  201  also accesses to the EEPROM  102  to retrieve data stored therein.  
         [0052]    The CPU  201  is further connected to an input unit, such as a keyboard  400 , via an interface  212 , to control the operation of the processor  200  in accordance with the commands inputted through the keyboard  400 .  
         [0053]    An operation panel  207  is provided to the processor  200 . A plurality of operation buttons (not shown) are arranged on the operation panel  207  at the portion exposed to outside of the case of the processor  200 . such that an operator of the endoscope system  1  can press each button. Each button outputs a signal to the CPU  201 , as being pressed, to control the operation of the processor  200 .  
         [0054]    The processor includes a light source  203  optically connected to the end of a light guide  103  that is arranged throughout the electronic endoscope  100  from the connector  130  to the tip end of the inserting tube  110 . The light emitted from the light source  203  is transmitted through the light guide  103  to illuminate the area in front of the tip end of the inserting tube  110 .  
         [0055]    An diaphragm  210  is provided on the light path of the light emitted from the light source  203  to restrict the amount of light introduced into the light guide  103 . An diaphragm controller  211  controls the opening size of the diaphragm  210 , or the amount of light introduced into the light guide  103 , in accordance with signals from the CPU  201 . The operator can freely control the opening size of the diaphragm  210  by operating the keyboard  400  or the operation panel  207 .  
         [0056]    First and second signal processors  204  and  205  are provided to the processor  200  to display images captured by the CCD  104  on a monitor  300 . The first signal processor  204  receives the signal from the CCD  104  via a CCD signal cable  109  and transforms it into RGB digital image data represented in 256 levels of gray scale. The first signal processor  204  outputs the digital image data to the second signal processor  205  which generates video signal, such as NTSC, from the digital image data. The second signal processor  205  also adjusts the white balance of the video signal based on calibration data wr(r) and wr(b) received from the CPU  201  as will be described later. The second signal processor  205  outputs the video signal to the monitor  300  so that the monitor  300  displays the image captured by the CCD  104 .  
         [0057]    Note that the output device to which the second signal processor  205  may be connected is not limited to the monitor  300 , however, the second signal processor  205  may also be connected to other kinds of output devices such as video printer, for example.  
         [0058]    A CRT controller  206  is provided to the processor to superimpose text information on the image displayed on the monitor  300 . The CRT controller  206  generates video signals representing the text information, the patient information and so on, requested by the CPU  201  and output the video signals to the monitor  300  in synchronization with the video signal from the second signal processor  205 . In this way, the processor  200  superimposes arbitrary text information obtained from the CPU  201  on the image captured by the CCD  104 . The text information may include information obtained from the EEPROM  102 .  
         [0059]    The processor  200  is also provided with a Real Time Clock (RTC)  209  and a memory  208 . The RTC  209  provides information on current date &amp; time to the CPU  201 . The memory  208  is adapted to include one or more databases of data related to endoscopes, as will be described later.  
         [0060]    [0060]FIG. 2 shows an exemplary format of the data in the EEPROM  102 , and FIG. 3 shows an example of the content of the data stored in the EEPROM  102 .  
         [0061]    In the present embodiment, the storage capacity of the EEPROM  102  is 16 bytes. The following information are stored in the EEPROM  102  in the following order.  
         [0062]    1) “serial no.” (three bytes): the serial number of the electronic endoscope  100  which is unique for each endoscope. The “serial no.” may be set to one of values from 1 through 16777215 (0×1 through 0×ffffff hexadecimal digit).  
         [0063]    2) “scope name” (six bytes): six alphanumeric characters representing the type of the electronic endoscope  100 .  
         [0064]    3) “wb(r)” (one byte) a calibration value of the red color brightness for adjusting white balance of the image captured by the CCD  104 .  
         [0065]    4) “wb(b)” (one byte): a calibration value of the blue color brightness for adjusting white balance of the image captured by the CCD  104 . Both “wb(r)” and “wb(b)” can take a value between −128 and 127. As shown in FIG. 3, “wb(r)” and “wb(b)” are respectively set to −4 and 10 (0×7c and 0×8a in hexadecimal digit) in the present embodiment. This indicates that the brightness of red color should be decreased by four levels in gray scale, while the brightness of blue should be increased by ten levels.  
         [0066]    5) “ownership” (one byte): a variable representing whether the endoscope is purchased or leased. “ownership”=0, 1 and 2 (0×0, 0×1, and 0×2 in hexadecimal digit) respectively represents the endoscope is purchased, leased for a long term (a term not less than 30 days, for example), and leased for a short term (term less than 30 days, for example).  
         [0067]    6) “spec” (one byte): a variable representing the specification of the electronic endoscope  100 . If the electronic endoscope  100  is a standard type, then “speck” is set to 0. If the electronic endoscope is a custom made endoscope, then “spec” is set to a value corresponding to the particular specification. In the present embodiment, “spec” is set to 1 which indicates the optical system  101  includes a lens applied with special coatings.  
         [0068]    7) “expiration” (three bytes): the expiration date of the lease of the electronic endoscope  100 . The first one byte of “expiration” indicates the year, the next one the month, and the last one the day. In the example shown in FIG. 3, value 040331 is assigned to “expiration” which indicates the expiration of the lease is Mar. 31, 2004. If the electronic endoscope  100  is a purchased one, then 000000 is assigned to “expiration”.  
         [0069]    Among the items recited above, the “serial no.”, “scope name”, “ownership”, and “expiration”are examples of information for managing endoscopes, while “wb(r)”, “wb(b)”, and “spec” are examples of information representing the characteristics of endoscopes.  
         [0070]    The data of EEPROM  102  are copied to the memory  208  of the processor  200  as the electronic endoscope  100  is connected to the processor  200  for the first time to register the endoscope to one of the database.  
         [0071]    [0071]FIG. 4 shows an exemplary structure of the database established in the memory  208  of the processor  200 . The memory  208 -is operated by the CPU  201  such that it includes at least two data aggregates each of which being defined to correspond to a specific condition of the endoscopes. In the present embodiment, two data files of CSV format, for example, are established in the memory  208  as two data aggregates. One of the data file, “file-0”, is defined to register data related to purchased endoscopes, or endoscopes of which “ownership” is set to 0, while the other data file, “file-1”, is defined to register data related to leased endoscope, or endoscopes of which “ownership” is set to 1 or 2.  
         [0072]    It should be noted, however, that the memory  208  may also include three data files, and utilize the first one for registering data related to purchased endoscopes, the second one for registering data related to endoscopes leased for long term (“ownership”=1), and the third one for registering data related to endoscopes leased for short term (“ownership”=2).  
         [0073]    Each data file includes 39 records and each record is defined for storing data related to one specific endoscope. Thus, data of 39 endoscopes can be stored in each of the data files.  
         [0074]    Each record includes the following items in the following order,  
         [0075]    1) “register no.”,  
         [0076]    2) “scope name” 
         [0077]    3) “serial no.”,  
         [0078]    4) “wb(r)”,  
         [0079]    5) “wb(b)”,  
         [0080]    6) “ownership  
         [0081]    7) “spec”,  
         [0082]    8) “expiration”,  
         [0083]    9) “registered date &amp; time”,  
         [0084]    10) “used date &amp; time”,  
         [0085]    11) “count”.  
         [0086]    “register no.” is utilized for identifying the record. In the present embodiment, a serial number from 1 to 39 is assigned to the records.  
         [0087]    “scope name”, “serial no.”, “wb(r)” and “wb(b)”, “ownership”, “spec”, and “expiration”, are items same as that in the EEPROM  102 .  
         [0088]    “registered date &amp; time” is the date and time when the electronic endoscope  100  is connected to the processor  200  for the first time. “registered date &amp; time” includes six figures date information and four figures time information. If “registered date” is set to “001015.1424”, for example, then it represents Oct. 15, 2000, 2:24 p.m.  
         [0089]    “used date &amp; time” is the date and time when the electronic endoscope  100  was connected to the processor  200 , or used, for the last time. The format of “used date &amp; time” is same as that of “registered date &amp; time” 
         [0090]    “count” is the number of times the electronic endoscope  100  is connected to the processor  200 , or used. This variable may be used as an indication of the frequency in use of the endoscope.  
         [0091]    [0091]FIG. 5 is a flow chart showing the main routine related to the operation of the processor  200  according to first embodiment of the invention.  
         [0092]    At first, the CPU  201  of the processor  200  initializes a variable “current_scope” to 0 (S 100 ). The variable “current 13 scope” is for storing the “register no.” of the record in which the data of the endoscope currently connected to the processor  200  are stored. If 0 is assigned to “current_scope”, it represents that no endoscope is currently connected to the processor  200 .  
         [0093]    After the initialization of “current_scope”, the CPU  201  waits until the electronic endoscope  100  is connected to the processor  200  if there isn&#39;t any (S 102 ).  
         [0094]    If the electronic endoscope  100  is connected to the processor  200  (S 102 : Yes), the CPU  201  accesses to the EEPROM  102  of the electronic endoscope  100  and obtains the data stored therein (S 104 ). Next, the first and second signal processors transform the output signal from the CCD  104  into video signal to display the image captured by the CCD (S 106 ).  
         [0095]    Then, the CPU  201  displays the “scope name” of the currently connected electronic endoscope  100  on the monitor  300  (S 108 ). Further, the CPU  201  opens one of the data files in the memory  208  (S 11 O), and then stores the data obtained from the EEPROM  102  therein (S 112 ).  
         [0096]    Next, the white balance of the image captured by the CCD  104  of the electronic endoscope  100  is adjusted using the calibration value (“wb(r)”, “wb(b)”) obtained form the EEPROM  102  (S 114 ). That is, the CPU  201  sends the calibration value of “wb(r)” and “wb(b)” to the second signal processor  205  so that the second signal processor  205  adjusts the color balance of the image signals generated there.  
         [0097]    After S 114 , the processor watches whether the endoscope  100  is still connected, and as long as the electronic endoscope  100  is still connected to the processor  200  (S 116 :Yes), the processor  200  displays the current date and time on the monitor  300  (S 118 ), and also performs various kinds of adjustments in accordance with manual operation by the operator (S 120 ).  
         [0098]    If the electronic endoscope  100  is disconnected from the processor  200 , the CPU  201  closes the file opened in S 110  (S 122 ). After S 122 , the operation of the processor  200  goes back to S 100 .  
         [0099]    [0099]FIG. 6 is a flow chart showing a subroutine DISPLAY SCOPE NAME called in S 108  of the main routine shown in FIG. 5.  
         [0100]    In scope name displaying routine, the CPU  201  first decides whether the currently connected endoscope is a purchased one or a leased one. This is done by checking the value of “ownership” obtained from the EEPROM  102  (S 152 ).  
         [0101]    If “ownership” indicates the endoscope is purchased, i.e., “ownership”=0, then CPU  201  sends the alphanumeric characters of the “scope name” obtained from the EEPROM  102  to the CRT controller  206  to superimpose the type of the electronic endoscope  100  on the image captured by the CCD  102  and displayed on the monitor  205  (S 154 ).  
         [0102]    If “ownership” indicates the endoscope is leased, i.e., “ownership”=1 or 2, then the CPU  201  sends the characters indicated by “scope name” together with characters “leased” to the CRT controller to superimpose those characters on the image displayed on the monitor  300  (S 156 ). After the execution of S 154  or S 156 , the operation of the processor  200  returns to the main flow shown in FIG. 5.  
         [0103]    [0103]FIG. 7 is a flow chart showing a subroutine FILE OPEN called in S 110  of the main routine shown in FIG. 5. In this routine, the CPU  201  selects the data file, or database, for storing the data of the electronic endoscope  100  in accordance with the ownership of the electronic endoscope  100 .  
         [0104]    That is, the CPU  201  checks the state of “ownership” obtained from the EEPROM  102  (S 172 ). IF “ownership” is 0, indicating the endoscope is purchased, then the CPU  201  select the data file “file-0” by substituting the file name into a character string “file name” (S 174 ). If “ownership” is 1 or 2, indicating the endoscope is leased, then the CPU  201  selects the data file “file-1” (S 176 ). After the selection of the data file, the CPU  201  accesses the memory  208  and opens the data file specified by “file name”.  
         [0105]    It should be noted that the data file to be opened may also be determined based on information of “scope name”, “spec” and/or “expirations” of the endoscopes. Further, the data file to be opened may be determined based on information manually Inputted through input units such as the keyboard  400 , instead of the data obtained from the EEPROM  102 .  
         [0106]    [0106]FIG. 8 is a flow chart showing a subroutine ENDOSCOPE REGISTRATION called in S 112  of the main routine of FIG. 5.  
         [0107]    In this routine, the CPU  201  decides whether or not the data related to the currently connected endoscope is already registered with the memory  208  (S 202 ). This is achieved by searching within the data file opened in S 110  for a record including data that matches the “scope name” and “serial no.” obtained from the EEPROM  102 .  
         [0108]    If there is a record including the above mentioned data (S 202 :Yes), it means the data of the electronic endoscope  100  currently connected is already registered with the memory  208 . In this case, the “register no.” of the record found is set to “current_scope” (S 204 ) and the operation of the processor  200  proceeds to S 220  which will be described latter.  
         [0109]    If a record including the above mentioned data is not found, it means the electronic endoscope  100  is not yet registered (S 202 :No). In this case, the CPU  201  checks whether there is still any available memory space, or open records, in which the data except for the “register no.” are empty, within the data file to register the data obtain from the EEPROM  102  (S 206 ).  
         [0110]    In the case where there is still an open record (S 206 :Yes), the “register no.” of the open record is set to “current scope” (S 208 ). If there are more than one open records, the smallest “register no.” is preferably selected and set to the “current scope”. After execution of S 208 , the operation of the processor  200  proceeds to S 216  which will be described later.  
         [0111]    In the case where no open record is found (S 206 :No), then the “register no.” of the record including the oldest “registered date &amp; time” is specified (S 210 ), and the data of the record identified by the specified “register no.” is deleted, except for the “register no”, to free up the record (S 212 ). Further, the specified “register no.” is set to “current_scope” (S 214 ).  
         [0112]    After the execution of S 208  or S 214 , the CPU  201  stores the data obtained from EEPROM  102 , or the data of currently connected electronic endoscope  100 , into the record identified by the register number in “current_scope” (S 216 ).  
         [0113]    Specifically, the CPU  201  stores “serial no.”, “scope name”, “wb(r)”, “wb(b)”, “ownership”, “spec”, and “expiration” obtained from the EEPROM  102  into the record. In this manner, the data of the new endoscope is automatically registered with the database.  
         [0114]    Next, the CPU  201  obtains the current date and time information from the RTC  209  and stores it in “registered date &amp; time” of the record specified by “register no.” (S 218 ). This is to make a record of the date and time of registration of the new electronic endoscope  100 ,  
         [0115]    After the execution of S 218  or S 204 , “used date &amp; time” and “count” of the record specified by “current scope” are updated. That is, the current time information obtained from the RTC  209  is overwritten to “used date &amp; time” (S 220 ), and “count” is incremented by one (S 222 ). After S 222 , the operation of the processor  200  returns to the main flow shown in FIG. 5.  
         [0116]    [0116]FIG. 9 is a flow chart showing a subroutine DISPLAY DATE &amp; TIME in S 118  of the main routine shown in FIG. 5.  
         [0117]    In this routine, the CPU  201  checks whether or not the date and time information of a variable “date &amp; time” indicates the exact time by comparing “date &amp; time” with the date and time information from the RTC  209  (S 242 ).  
         [0118]    If the difference between the two pieces of the date and time information is less than a second, then the CPU  201  decides the two pieces of the date and time information are same (S 242 :Yes). In this case, the operation of the processor  200  immediately returns to the main flow of in FIG. 5 without updating the “date &amp; time”.  
         [0119]    If the difference between the two date and time information is not less that one second (S 242 :No), then the date and time information from the RTC  209 , or the current date and time, is set to “date &amp; time” (S 244 ). Then, the CPU  201  generates text information indicating the date and time stored in “date &amp; time” such as “May 21, 2002, 15:20:31”, for example, and sends it to the CRT controller  206  to superimpose the current date and time on the image displayed by the monitor  300  (S 246 ). In this manner, time information displayed is updated every second.  
         [0120]    After the execution of S 246 , the operation of the processor  200  returns to the main flow shown in FIG. 5.  
         [0121]    [0121]FIG. 10 is a flow chart showing a subroutine ADJUSTMENT in S 120  of the main routine shown in FIG. 5. This routine is for allowing the operator to manually adjust the white balance of the image captured by the CCD  104 , and the opening size of the diaphragm  210 .  
         [0122]    In this routine, the CPU  201  decides whether or not the adjustment of white balance is requested by checking the signals from the keyboard  400 , the operation panel  207 , and the operation buttons  107  (S 262 ). If there is a request (S 262 :Yes), then the CPU  201  rewrites the value of the “wb(r)”, “wb(b)” in the record specified by “current scope” in accordance with the signal from the keyboard  400 , the operation panel  207 , or the operation buttons  107  (S 264 ). Further, the CPU  201  sends the value of latest “wb(r)” and “wb(b)” to the second signal processor  205  so that the second signal processor  205  re-adjusts the white balance of the image generated there (S 266 ).  
         [0123]    After the execution of S 266  or in the case there isn&#39;t any request for white balance adjustment (S 262 :No), the CPU  201  checks again the output signals from the keyboard  400 , the operation panel  207 , and the operation buttons  107  to decide whether or not the adjustment of diaphragm is requested (S 268 ).  
         [0124]    If there is a request (S 268 :Yes), then the CPU  201  opens/closes the diaphragm  210 , via the diaphragm controller  211 , in accordance with the request from the keyboard  400 , the operation panel  207 , or the operation buttons  107  to control the amount of light introduced into the light guide  103  (S 270 ).  
         [0125]    If there isn&#39;t any request (S 268 :No), the operation of the processor returns to the main flow of FIG. 5.  
         [0126]    It should be noted that the operation of processor  200  described in FIG. 5 through FIG. 10 may be modified in many ways within the scope of the invention.  
         [0127]    For example, S 210  in the subroutine ENDOSCOPE REGISTRATION shown in FIG. 8 may be replaced with a step that specifies the “register no.” of the record including the oldest “used date &amp; time” as shown in FIG. 11 (see S 210 *). If S 210  is replaced with S 210 *, the data related to the endoscope not used recently, and may have the lowest possibility to be used again in the future, is deleted to free up memory space for registering data of the new endoscope. Further, S 212  in FIG. 8 may also be canceled if data is overwritten in S 214  through S 216 .  
         [0128]    The manner of managing the data in the memory  208  may also be modified in many ways. For example, a plurality of areas may be defined within one data file of the memory  208 , and data of the electronic endoscope  100  may be registered in the area corresponding to the feature of the electronic endoscope  100  indicated by “ownership”, “spec”, and/or “expiration”, or any data inputted manually into the keyboard  400 .  
         [0129]    [0129]FIG. 12 schematically shows an address map of the memory  208  in which two data areas are defined in one data file as second embodiment of the invention. As shown in FIG. 12, the memory  208  includes a data file  216 , and first and second data areas  220   a  and  220   b  are defined within the data file  216 . The first data area  220   a  extends from address  0  to  1499  (in decimal system), and the second data area  220   b  from address  1500  to  2999  (in decimal system). Each of first and second data areas  220   a  and  220   b  includes  39  records having same format as that shown in FIG. 4. The first and second data areas  220   a  and  220   b  are for registering data related to purchased endoscopes and leased endoscopes, respectively.  
         [0130]    If the memory  208  is managed as shown in FIG. 12, S 110  and S 112  of FIG. 5 should be modified as shown in FIG. 13 and  14 .  
         [0131]    That is, in the subroutine FILE OPEN (S 110 ), the CPU  201  opens the data file  216  (S 302 ). Next, the CPU  201  checks the state of “ownership” obtained from EEPROM  102  (S 304 ). If “ownership” is 0 (S 304 :Yes), indicating the endoscope is purchased, then the CPU  201  sets a variable “offset” to 0 (S 306 ). “Offset” is used later as an address start to reading the memory  208 . If “ownership” is 1 or 2, indicating the endoscope is leased, then the CPU  201  sets “offset” to 1500. After the execution of S 306  or S 308 , the operation of the processor  200  returns to the main flow shown in FIG. 5 to execute the subroutine ENDOSCOPE REGISTRATION (S 112 ).  
         [0132]    In the subroutine ENDOSCOPE REGISTRATION (S 112 ) shown in FIG. 14, S 202 , S 206 , S 208 , and S 210  are replaced with S 202 *, S 206 *, S 208 *, and S 210 *, respectively. Other steps are same as that in FIG. 8.  
         [0133]    The contents of S 202 *,  206 *, S 208 *, and S 220 * are same as that of the replaced steps except that the memory area that the CPU  201  can treat is limited to the address “offset” through “offset”+1499. That is, if “offset” is set to 0 in the subroutine FILE OPEN (S 110 ), then the CPU  201  can read, write, and delete data only within the first data area  220   a  of the memory  208 , and if “offset” is 1500, then the CPU  201  can handle the data only in the second data area  220   b . Accordingly, if a new leased endoscope, for example, is connected to the processor  200 , the CPU  201  never accesses to the first data area  220   a , and thus never deletes data of purchased endoscopes, which may be more important than data of leased endoscopes, in order to register leased endoscopes&#39; data.  
         [0134]    The present disclosure relates to the subject matters contained in Japanese Patent Application No. P2001-200209, filed on Jun. 29, 2001, and Japanese Patent Application No. P2001-323463, filed on Oct. 22, 2001, which are expressly incorporated herein by reference in their entireties.

Technology Category: 1