The information processing method of image and device, display methods and device
Technical field
The present invention relates to technical field of image processing, particularly to information processing method and the dress of a kind of image
Put, display methods and device.
Background technology
Along with the development of computer technology, the digitlization storage of various information is the most gradually used by people,
The bulk information of society all occurs in that information waste in various degree, information blocking etc. in all trades and professions
Problem, the storage of magnanimity information, analyze, the aspect such as process is all worth people to further investigate.
In various information, image information is the highest a kind of information of utilization rate.Image information is as information carrier
Tend to express more information content than Word message, but, along with the increasing of image information range of application
Greatly, the requirement of the character such as picture quality, precision can be met by people to a certain extent, but
Image information is not single data, in addition to simple view data, also has other information to need storage,
But these information can not be preserved on existing simple image file, and is intended to the file with other
Form preserves separately, and this causes the integration of image information the most in disorder.People use these files time,
Owing to file number is various, file management difficulty can be produced, compress the problems such as the efficiency replicated is low.
In terms of pathology particularly true, pathological section (glass slice) is the one of Pathologic specimen;Pass
Part is typically had the tissue of pathology or internal organs through various chemicals and to bury by the pathological section of system when making
The process of Tibetan method, is allowed to fixing hardening, thinly slices on slicer, adhere on the glass sheet, contaminate with
Shades of colour, for checking under the microscope, to observe pathological change, makes pathological diagnosis, examines for clinic
Disconnected and treatment provides help.Digital slices image is then the result being digitized pathological section processing;
Digital slices image includes all image informations of pathological section, user can at computer or
Numeral sectioning image is observed on other service terminals of person, and without by microscope.
But, digital slices image factor data produces precision and the raising of quality of equipment, and its resolution ratio is
The highest, therefore the data volume of the information that digital slices image produces is huge.These data are often wrapped
Include sectioning image scanning focus information, the image information of scanning figure, the image information of label figure, other
File mark etc., but prior art often by image information with jpg file format preserve, focus information and
Alternative document marks etc. preserve with txt text message, and so mode of storage image information not only results in whole
The amount of storage of individual file system is huge, and not containing of its image file itself compresses data;Due to image literary composition
Part at least includes jpg file and txt file, and document form is the most single, during user operation gathering information without
Method disposably completes, it is necessary to entry operates, and must respectively carry out at least two file when processing information,
Needing to be compressed file or during the operation such as duplication user, the efficiency that data process is low;In addition,
Owing to focus information and other file marks etc. preserve with txt text message, the security of txt text is the highest,
In the case of content is maintained secrecy or contains privacy information, text message is easy to be acquired, and with jpg literary composition
The image information that part preserves, can be read directly completely.
Summary of the invention
Solved by the invention technical problem is that: all view data how scanning obtained be stored in
One image file.
For solving above-mentioned technical problem, technical solution of the present invention provides the information processing method of a kind of image,
Including:
Reading in scanning file, described scanning file includes that at least one scans map file;
Obtaining the header file information of described scanning file, described header file information includes indicating whether to store
3rd mark and compress mode of scanning figure;
Based on described scanning map file, it is thus achieved that the image information of the scanning figure of corresponding multiplying power group, described multiplying power
Group includes multiple different multiplying power;
By described compress mode, the image information of described scanning figure is compressed, to obtain the pressure of scanning figure
Contracting image information;
By compression image information and the header file information write image file of described scanning figure.
Optionally, header file information is write image file, including:
Described header file information is encrypted, the header file information after encryption is write described image file.
Optionally, described described header file information is encrypted, based on equation below:
a=M1×b+M2
Wherein, a is described encryption back fileinfo, and b is the True Data of header file information, M1,
M2 is the checking coefficient of header file information.
Optionally, the scanning file read in also includes that other map files, described header file information also include
Indicate whether to store other figures mark of other figures;
The information processing method of described image, also includes:
Based on other map files described, it is thus achieved that the image information of other figures corresponding;
By described compress mode, the image information of other figures described is compressed, to obtain the pressure of other figures
Contracting image information;
The compression image information of other figures described is write described image file.
Optionally, other figures described include preview graph and/or label figure.
Optionally, the information of write image file stores with binary data format.
Optionally, described multiplying power group includes original magnification and at least one setting multiplying power of scanning figure;Based on
Described scanning map file, it is thus achieved that the image information of the scanning figure of corresponding multiplying power group includes:
Described scanning figure is divided into several tactic sub-scanning figures;
Each sub-scanning figure is reduced by each setting multiplying power;
Determine the image information that each sub-scanning figure is corresponding under described original magnification and each setting multiplying power respectively;
Correspondence is set to the set of the image information of the sub-scanning figure of one scan figure the image letter of this scanning figure
Breath.
For solving the problems referred to above, technical solution of the present invention additionally provides the display methods of a kind of image, described
Image generates based on image file, and described image file uses the information processing method of above-mentioned image to obtain,
Including:
Receive scanning figure and show that request, described scanning figure show that the information asking to carry includes that scanning figure shows
Multiplying power;
Read head fileinfo;
When the 3rd mark instruction in described header file information has stored scanning figure, select in described multiplying power group
Select and show, with described scanning figure, the multiplying power that multiplying power is corresponding;
Read the compression image letter of described scanning figure corresponding with selected multiplying power in described image file
Breath;
Compression image information based on the scanning figure to being read of the compress mode in described header file information is entered
Row decompresses, to obtain the image information of described scanning figure;
Image information based on described scanning figure generates scanning figure and is shown.
Optionally, the header file information of described image file is encrypted header file information, described reading
Header file information includes: reads the header file information of described image file and is decrypted.
Optionally, described header file information also includes other figures mark indicating whether to store other figures;
The display methods of described image also includes:
Receive other figures and show request;
Read head fileinfo;
Store other figures when other figures of described header file information mark instruction, read other figures described
Compression image information;
Compression image informations based on other figures to being read of the compress mode in described header file information are entered
Row decompresses, to obtain the image information of other figures;
Image informations based on other figures described generate other figures and are shown.
Optionally, other figures described are preview graph and/or label figure.
Optionally, described scanning figure shows that the information that request is carried also includes scanning figure viewing area;Described
The compression image information of scanning figure is the collection of the compression image information of the corresponding sub-scanning figure with one scan figure
Close;
The compression image of described scanning figure corresponding with selected multiplying power in the described image file of described reading
Information includes: read the compression figure of described scanning figure corresponding with selected multiplying power in described image file
As information has the compression image information of the sub-scanning figure of common factor with described viewing area;
The compression image letter of the described scanning figure based on the compress mode in described header file information to being read
Breath decompresses, and includes obtaining the image information of described scanning figure: based in described header file information
The compression image information of the compress mode sub-scanning figure to being read decompress, to obtain described son
The image information of scanning figure;
Described image information based on described scanning figure generates scanning figure and gives display and include: based on being obtained
The image information of the sub-scanning figure obtained generates the partial scan figure of corresponding described viewing area and is shown.
For solving the problems referred to above, technical solution of the present invention additionally provides the information processor of a kind of image,
Including:
Reading unit, be used for reading in scanning file, described scanning file includes that at least one scans map file;
Acquiring unit, for obtaining the header file information of described scanning file, described header file information includes
Indicate whether to store the 3rd mark and compress mode of scanning figure;
Obtain unit, for based on described scanning map file, it is thus achieved that the image of the scanning figure of corresponding multiplying power group
Information, described multiplying power group includes multiple different multiplying power;
Compression unit, for the image information of described scanning figure being compressed by described compress mode, with
Obtain the compression image information of scanning figure;
Writing unit, for by civilian to compression image information and the header file information write image of described scanning figure
Part.
Optionally, said write unit includes:
Ciphering unit, for being encrypted described header file information;
Sub-writing unit, for writing described image file by the header file information after encryption.
Optionally, the scanning file read in also includes that other map files, described header file information also include
Indicate whether to store other figures mark of other figures;
Described acquisition unit, is additionally operable to based on other map files described, it is thus achieved that the image letter of other figures corresponding
Breath;
Described compression unit, is additionally operable to press the image information of other figures described by described compress mode
Contracting, to obtain the compression image information of other figures;
Said write unit, is additionally operable to the compression image information of other figures described is write described image file.
Optionally, described multiplying power group includes original magnification and at least one setting multiplying power of scanning figure;Described
Acquisition unit includes:
Division unit, for being divided into several tactic sub-scanning figures by described scanning figure;
Reducing unit, for being reduced by each setting multiplying power each sub-scanning figure;
Determine unit, be used for determining that each sub-scanning figure is right under described original magnification and each setting multiplying power respectively
Correspondence is also set to this scanning with the set of the image information of the sub-scanning figure of one scan figure by the image information answered
The image information of figure.
For solving the problems referred to above, technical solution of the present invention additionally provides the display device of a kind of image, described
Image generates based on image file, and described image file uses the information processor of above-mentioned image to obtain,
Including:
Receive unit, be used for receiving scanning figure and show that request, described scanning figure show the information that request is carried
Multiplying power is shown including scanning figure;
Header file Information reading unit, for read head fileinfo;
Select unit, for having stored scanning figure when the 3rd mark instruction in described header file information,
Described multiplying power group selects show, with described scanning figure, the multiplying power that multiplying power is corresponding;
Image information reading unit, for reading institute corresponding with selected multiplying power in described image file
State the compression image information of scanning figure;
Decompression unit, for based on the scanning figure to being read of the compress mode in described header file information
Compression image information decompress, to obtain the image information of described scanning figure;
Display unit, generates scanning figure for image information based on described scanning figure and is shown.
Optionally, the header file information of described image file is encrypted header file information, described head literary composition
Part Information reading unit includes:
Son reads unit, for reading the header file information of described image file;
Decryption unit, for being decrypted the header file information of described image file.
Optionally, described header file information also includes other figures mark indicating whether to store other figures;
Described reception unit, is additionally operable to receive other figures and shows request;
Described image information reading unit, is additionally operable to when other figures of described header file information have marked instruction
Store other figures, read the compression image information of other figures described;
Described decompression unit, is additionally operable to based on compress mode in described header file information being read
The compression image information of other figures decompresses, to obtain the image information of other figures;
Described display unit, is additionally operable to image information based on other figures described and generates other figures and shown
Show.
Optionally, described scanning figure shows that the information that request is carried also includes scanning figure viewing area;Described
The compression image information of scanning figure is the collection of the compression image information of the corresponding sub-scanning figure with one scan figure
Close;
Described image information reading unit, corresponding with selected multiplying power for reading in described image file
Described scanning figure compression image information in have the compression figure of sub-scanning figure of common factor with described viewing area
As information;
Described decompression unit, for based on the son to being read of the compress mode in described header file information
The compression image information of scanning figure decompresses, to obtain the image information of described sub-scanning figure;
Described display unit, generates corresponding described aobvious for image information based on the sub-scanning figure obtained
Show the partial scan figure in region and shown.
Technical solution of the present invention at least includes following beneficial effect:
All data produced in scanning file are stored in same image file, directly to storage number
According to being compressed process, and substantial amounts of scan data is carried out multiplying power layering, it is achieved the data of single file
Storage, improves data call and the efficiency of file management.
In alternative, it is also equipped with other advantages:
Improve the security of image text content, this is embodied in associating of header file information and other information
On;Header file information is a kind of information being encrypted with user-defined format, itself includes existing skill
With some words about scanning file and the device flag information of the storage of txt text formatting, these tools in art
After having the content-encrypt of secrecy and privacy, it is only capable of by from the decrypted reading of data type set;
In addition, arrange described 3rd mark of header file information storage and the figure storage such as other figure marks with
No information, it is achieved header file information and scanning figure, the associating of other figures (preview graph or/and label figure)
Property;Only in reading and deciphering header file information, scanning can be read by above-mentioned mark and scheme and other
Figure, thus improve the security of picture material.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the information processing method of a kind of image of embodiment 1;
Fig. 2 is the schematic diagram of embodiment 1 preview graph;
Fig. 3 is the structural representation of the header file information in embodiment 1 image file;
Fig. 4 is the structural representation of the compression image information of the scanning figure in embodiment 1 image file;
Fig. 5 is the schematic flow sheet of the information processing method of a kind of image of embodiment 2;
Fig. 6 is the schematic diagram of embodiment 2 label figure;
Fig. 7 is a kind of schematic flow sheet of embodiment 2 step S204;
Fig. 8 is the parts of images schematic diagram of a width scanning figure of embodiment 2;
Fig. 9 is the structural representation of the image file KFB that embodiment 2 is formed;
Figure 10 is the schematic flow sheet of the display methods of a kind of image of embodiment 3.
Detailed description of the invention
Prior art is using scanner scanning image, such as sectioning image, produces to I haven't seen you for ages and up to a hundred magnifies picture
The image of element, may generally be 1000PX × 2098PX.But owing to a lot of weight can be produced during scanning
The information wanted, as a example by sectioning image, including: focus information, image tagged information, each image information.
Traditional approach is to be by focus information, and image tagged information etc. uses text (such as txt file) place
Reason, each image information presses map file (such as jpg file) format analysis processing.But the processing mode of above-mentioned data
May create the problem that
1) file number is various: above-mentioned processing mode makes the file formed based on scan data at least include
Text and map file, file number arises that file management difficulty more, compresses duplicate copy speed
The problems such as slowly, File Open speed is slow;
2) file storage content is big: the initial data produced through standard scan is bigger, above-mentioned file
The data stored are not through particularly compressing, and data volume itself can not be made to be reduced;
3) file security can not be protected: all scan datas are being processed into text and picture and text
In the case of part, processing without security, the confidentiality of information is the lowest.
Inventor, for the problems referred to above, creates following invention thinking: during scan image, only
Produce an image file, it is possible to preserve the information in all scanning files;Further, stored sweeps
The information in file of retouching is through overcompression, and its compress mode can be stored in image file, it is achieved compression
Mode self-defined.
Embodiment 1
The information processing method of a kind of image as shown in Figure 1, its corresponding thinking with foregoing invention people,
Including:
Step S101, reads in scanning file.
Described scanning file includes that at least one scans map file.
Such as, for a sectioning image, because of the organization chart picture that its sweep object is the most biological,
In scanning process, first have to the tissue of scanning is chosen the focal position of concrete scanning and produces this focus
On focus information, also have scanning device can produce preview graph file, the signal of preview graph after scanning
Figure sees Fig. 2.Organization chart picture after scanning process also can calculate scanning according to the outer rim size of this preview graph
Total length and width (unit: pixel, PX) and composition number, this number i.e. its produce scanning figure
Quantity, preview graph is also shown in the focus information of scanning, such as the focus X-ray 1 ~ X4 in Fig. 2.
Step S102, obtains the header file information of described scanning file.
Described header file information includes the 3rd mark and the compress mode indicating whether to store scanning figure.
Described header file information has specifically included the global information of described image file, header file information be
Scanning process directly can be obtained by scanning device, include but not limited to herein below:
Focus information in scanning process, including focus number, with the coordinate information of focus on one scan figure;
Focus information in each focus;
Label information, including the 3rd mark;
The compress mode of image file.
Fig. 3 is the structural representation of the header file information in image file.
The type of above-mentioned 3rd mark can be the quantity information of described scanning figure.
Step S103, based on described scanning map file, generates the image information of the scanning figure of corresponding multiplying power group.
Described multiplying power group includes multiple different multiplying power.
Step S104, is compressed by the image information of the described compress mode scanning figure to being generated, with
Obtain the compression image information of scanning figure.
In the present embodiment, step S103 ~ S104 is to scan data, particularly scans the image information of figure
Carry out being layered and compressing the processing procedure of storage, the reading rate of scanning figure can be made to get a promotion while,
Reduce memory data output.
Described multiplying power group is user-defined one group of multiplying power data, for reading with user and showing scanning figure
Mode match, this step process scanning map file in data, based on scanning diagram data form correspondence
The image information of the scanning figure of different multiplying, the custom phase of the general display multiplying power of this multiplying power and user
Closely.Multiplying power group includes scanning multiplying power when original magnification, original magnification are exactly to be scanned section, is
One maximum multiplying power, sets in the present embodiment, and original magnification is 40, can arrange multiplying power group containing multiplying power 1,2,
5、10、20、40。
According to above-mentioned, the compression image letter of the scanning figure of the corresponding different multiplying group moderate multiplying factor being ultimately formed
Breath defines the part data in generating described image file, the scanning figure of corresponding multiplying power group moderate multiplying factor
Compression image information structure refer to Fig. 4, include but not limited to herein below:
Data entries quantity;
Scanning figure is virtual deposits path;
Scanning map file name;
Scanning figure origin coordinates, defines the coordinate information of scanning figure starting point;
The initial length and width of scanning figure;
The magnification information (such as 1,2,5,10,20 or 40) that scanning figure is corresponding;
Scanning figure reduction length, defines scanning figure after completing data compression in specific compression mode, should
The length information of compression data;
Scanning figure compression data, define scanning figure pressure after completing data compression in specific compression mode
Contracting data.
Step S105, by compression image information and the header file information write image file of described scanning figure.
The order of write can be the compression image information of scanning figure and header file information (certainly, as long as
It is sequentially written in, but header file information must write on the head of data), header file information is described in reading
First it is read during image file;Header file information is contained within the 3rd mark, only when the head of image file
Fileinfo includes the 3rd mark being shown as "Yes", the compression image information place data of scanning figure
Positional information just can be read, therefore there is certain file defencive function;In addition, header file
Information further comprises the data of compress mode, when to be read out the data compressed, the most first reads
Take header file information, the data compressed can have been decompressed, it is achieved the confidentiality of file.
Embodiment 2
The present embodiment is a kind of technical scheme being more highly preferred to based on embodiment 1, sees Fig. 5.
The processing method of the image file shown in Fig. 5 includes:
Step S201, reads in scanning file.
Described scanning file includes at least one scanning map file, preview graph file and label map file.This
In, preview graph file and label map file are also referred to as other map files.
Here, the implication of step S201 is similar with step S101, and except for the difference that, label figure can be
With the information of Quick Response Code form storage, its some tag identification information pointing to scanning file and label figure
Column information, as shown in Figure 6, label figure describes scanning file and is belonging to xxxxx hospital, pathology department
And image in 2 D code.
Step S202, obtains the header file information of described scanning file.
Described header file information includes indicating whether to store the first mark of preview graph, indicating whether to deposit
The second of storage label figure marks, indicates whether to store the 3rd mark and compress mode of scanning figure;Here,
First mark and second is labeled as corresponding other figures mark, and compress mode refers to that the information to processing is carried out
The mode of compression, this compress mode can be in prior art be compressed binary data any
A kind of feasible mode, it is also possible to be the combination of self-defining prior art, because belonging to the model of prior art
Farmland, here is omitted.
Corresponding embodiment 1, the structure of the header file information of the present embodiment image file is similar with Fig. 3, its bag
Include but be not limited to herein below:
Focus information in scanning process, including focus number, with the coordinate information of focus on one scan figure;
Focus information in each focus;
The quantity of scanning figure;
Label information, including the first mark, the second mark and the 3rd mark;
The compress mode of image file.
Step S203, is encrypted described header file information.
Described described header file information is encrypted, based on equation below:
A=M1 × b+M2 (1)
In formula (1), a is described encryption back fileinfo, and b is the True Data of header file information,
M1, M2 are the checking coefficient of header file information.
Above-mentioned cipher mode is a kind of self-defined mode, and checking coefficient M1, M2 of header file information can
With sets itself, certainly, in other embodiments, encryption formula can use other to have encryption function
Formula.
Step S204, based on described scanning map file, generates the image information of the scanning figure of corresponding multiplying power group.
Described multiplying power group includes multiple different multiplying power.
Step S205, based on described preview graph file, generates the image information of corresponding preview graph;
Step S206, based on described label map file, generates the image information of corresponding label figure.
Certainly, the order between step S204 ~ S206 can be in any permutation.
Step S207, by described compress mode respectively to the image information of scanning figure generated, preview graph
Image information and the image information of label figure be compressed, with obtain scanning figure compression image information,
The compression image information of preview graph and the compression image information of label figure.
Through the process of step S204 ~ S207, the knot of the compression image information of the scanning figure of corresponding multiplying power group
Structure is consistent with embodiment 1.Similar with the definition mode of the compression image information of scanning figure, formed
The compression image information of preview graph defines the part data for generating described image file preview graph, bag
Include but be not limited to herein below:
The virtual of preview graph deposits path;
The filename of preview graph;
The origin coordinates of preview graph, defines the coordinate information of preview graph starting point;
The initial length and width of preview graph;
The corresponding magnification information of preview graph, define the preview graph correspondence original structure that scanning formed times
Rate information;
The reduction length of preview graph, defines after the data compression completing preview graph in specific compression mode,
The length information of preview graph compression data;
The compression data of preview graph, define preview graph after completing data compression in specific compression mode
Compression data.
The compression image information of the label figure formed defines for generating described image file label figure
Part data, include but not limited to herein below:
The virtual of label figure deposits path;
The filename of label figure;
The origin coordinates of label figure, defines the coordinate information of label figure starting point;
The initial length and width of label figure;
The corresponding magnification information of label figure, define the label figure correspondence original structure that scanning formed times
Rate information;
The reduction length of label figure, defines after the data compression completing preview graph in specific compression mode,
The length information of preview graph compression data;
The compression data of label figure, define preview graph after completing data compression in specific compression mode
Compression data.
The compression image information of above-mentioned scanning figure, preview graph or label figure is to store with binary data format
's.
Step S208, by the compression image information of described scanning figure, the compression image information of preview graph, mark
Header file information write image file after the compression image information of label figure and encryption.
The order of write can be the compression image information of scanning figure, the compression image information of preview graph, mark
Sign the header file information after the compression image information of figure and encryption (certain, as long as be sequentially written in,
But header file information must write on the head of data), when image file is read out, first read
It is header file information;Header file information be contained within the first mark, second mark and the 3rd mark, only when
The header file information of image file includes and is shown as the first mark of "Yes", the second mark or the 3rd mark
Note, the positional information of the write data of compression image information of corresponding preview graph, label figure and scanning figure
Just can be read.In addition, header file information further comprises compress mode, when to believe compression image
When breath is read out, the most first have read header file information, compression image information can be decompressed.
Owing to further comprises the ciphering process of header file information at the present embodiment.In conjunction with above-mentioned, it is known that, logical
Arrange between the compression image information of excessive fileinfo and image (label figure, scanning figure, preview graph)
Information read association, it is possible to increase the Information Security of image file and security performance.
In the present embodiment, described multiplying power group includes original magnification and at least one setting multiplying power of scanning figure,
Such as, continuing to use the example of embodiment 1, original magnification is 40, set multiplying power include 1,2,5,10,
12;As it is shown in fig. 7, step S204, specifically can realize by following manner:
Step S241, is divided into several tactic sub-scanning figures by described scanning figure;
Step S242, is reduced by each setting multiplying power each sub-scanning figure;
Step S243, determines each sub-scanning figure correspondence under described original magnification and each setting multiplying power respectively
Image information;
Step S244, is set to this scanning by correspondence with the set of the image information of the sub-scanning figure of one scan figure
The image information of figure.
Said process can be referring specifically to Fig. 8.Shown in Fig. 8 is the parts of images of certain one scan figure, this is swept
Tracing divides, and forms tactic sub-scanning figure, and this order does not limits, but with positive the four of rule
Limit type divides and is advisable, and the sub-scan image of each positive four limit types is matrix array arrangement, as illustrated in the drawing son
Scan image 100.Step is specifically can refer to the step for that each sub-scanning figure being reduced by each setting multiplying power
The description of S204.Through step S214 ~ S244, the compression image information of the scanning figure that step S207 is formed
Be the compression image information of the set of the compression image information of sub-scanning figure, i.e. scanning figure be with sub-scanning figure
Compression image information be information storage units, the definition mode of the compression image information of sub-scanning figure,
As a example by son scanning Figure 100 in Fig. 8, certainly, it is the part of scanning figure for corresponding a certain multiplying power,
Include but not limited to herein below:
Son scanning the virtual of Figure 100 deposits path;
The filename of son scanning Figure 100;
The origin coordinates of son scanning Figure 100, defines the coordinate information of sub-scanning Figure 100 starting point,
In Fig. 8, i.e. put the coordinate of S1, certainly, take a S2 and also may be used as the point of origin coordinates;
The initial length and width of son scanning Figure 100;
The corresponding magnification information of son scanning Figure 100;
The reduction length of son scanning Figure 100, defines sub-scanning Figure 100 and completes in specific compression mode
After data compression, the length information of these compression data;
The compression data of son scanning Figure 100, define sub-scanning Figure 100 and complete in specific compression mode
Compression data after data compression.
The form of the image file KFB that the present embodiment ultimately forms can be found in Fig. 9.
Embodiment 3
The display methods of a kind of image as shown in Figure 10, based on the image file obtained by embodiment 2,
Including:
Step S301, receives scanning figure and shows request;
Described scanning figure shows that the information that request is carried includes that scanning figure shows multiplying power and scanning figure viewing area
Territory.
Step S302, reads described header file information.
Owing to described header file information is encrypted header file information, described reading described header file information,
Based on equation below:
B=(a-M2) ÷ M1 (2)
In formula (2), a is described encrypted header file information, and b is the header file information that read
True Data, M1, M2 are the checking coefficient of header file information.
Step S303, when the 3rd mark of described header file information is designated as being to read described image file
In the described scanning figure corresponding with selected multiplying power compression image information in described scanning figure viewing area
There is the compression image information of the sub-scanning figure of common factor in territory.
Here, the 3rd mark is designated as "Yes", refers to that the number of scanning figure is not 0, represents to have stored and sweeps
Tracing.The compression image information of scanning figure is the set of the compression image information of its all sub-scanning figures.
Step S304, pressure based on the sub-scanning figure to being read of the compress mode in described header file information
Contracting image information decompresses, to obtain the image information of described sub-scanning figure;
Step S305, image information based on the sub-scanning figure obtained generates corresponding described viewing area
Partial scan figure is also shown.
The scanning figure of the corresponding viewing area generated specifically can be shown at display window.Said process is aobvious
Show the process of scanning figure.
For the preview graph in embodiment 2 image file and the display mode of label figure, it is similar to above-mentioned mistake
Journey:
For the display of preview graph, including step:
Receive preview graph display request;
Read head fileinfo;
When the first mark instruction of described header file information has stored other figures (such as "Yes"), read
The compression image information of preview graph;
Compression image information based on the preview graph to being read of the compress mode in described header file information is entered
Row decompresses, to obtain the image information of preview graph;
Image information based on described preview graph generates preview graph and is shown at display window.
For the display of label figure, the step that its step shows with preview graph is similar, and here is omitted.
It addition, current embodiment require that it is emphasized that:
1) owing to image file housing the compressed image file of the scanning figure of corresponding different multiplying, its
Matter is that the image information to scanning figure carries out Bedding storage according to different multiplying;Image file is also to each scanning figure
Carry out the division of sub-scanning figure.Showing the scanning figure under these different multiplying, its main thought is
The partial scan figure image that display is spliced to form by corresponding sub-scanning figure, advantage of this is that and can change
Kind user's reading speed of scanning figure under browsing different proportion, solves slower the asking of user's image browsing
Topic.
Such as, with the process that realizes of the process of example explanation step S301 ~ S305:
The scanning figure sent in client operation user interface receiving user shows request;This display please
Asking can be by the hardware input such as user operation mouse, keyboard and the special icon opening in user interface
Link send, instruction user require display window display scanning figure image.Scanning figure shows in request
Include scanning figure and show magnification information and display region information.Certainly, can be by with adjusting display window
Mode, loaded and displayed request in display magnification information and display region information (such as, display window
The image of display itself has determined that display position, can be adjusted with user by current window length and width length
The ratio of length and width length of window calculate the display multiplying power needed for user).
The scanning figure being suitable in the scanning figure of corresponding multiplying power group is selected to include two kinds of tolerance situations:
The display multiplying power asked as user is precisely the multiplying power in multiplying power group, then the most corresponding corresponding times
The scanning of rate is schemed;
The display multiplying power asked as user is not equal in multiplying power group any multiplying power, then need correspondence the most
Near but greater than the scanning figure of the multiplying power in the multiplying power group of this display multiplying power, adjust this scanning figure the most again
Multiplying power is described display multiplying power.
The most only include the scanning figure of scanning figure and 20 multiplying powers storing corresponding 10 multiplying powers, then for
The display requirement of 10 multiplying powers is asked at family, then directly select the scanning figure of corresponding 10 multiplying powers;If but user please
Ask the display requirement of 15 multiplying powers, then select the scanning figure of corresponding 20 multiplying powers, then sweeping corresponding 20 multiplying powers
The display multiplying power of tracing is adjusted to 15 multiplying powers.
The main purpose done so is to prevent display distortion.
Additionally, due to what the display positional information that user is given occurred often in dots, such as user
Display window arbitrarily selects certain point, is the concept of coordinate points on image.But for sub-scanning figure,
The then area size of the corresponding viewing area display window to be combined including this point, therefore user sends
Viewing area is given according to the display window region including a position.Further, due to display window
Length and width length is that user adjusts, the point that its relative length selects plus user, defines required showing
Show that region (such as, arranges the viewing area central point that point is request that user selects, in conjunction with display window
Length and width length, obtain required viewing area).
Display window is finally shown that partial scan figure, and this partial scan figure is to be shown by with this part
Region has the sub-scanning figure splicing of scanning figure common factor, above-mentioned to be formed.
The mode that above-mentioned this request display loads, is greatly accelerated digital independent and display efficiency.
2) store with binary data due to the information of image file, this image file is being entered
When row reads, it is necessary to the label information in first read head fileinfo and compress mode, can be read it
His diagram data (such as the scanning compression image information of figure, the compression image information of label figure, preview graph
Compression image information).
Label information in header file, the such as first mark, the second mark and the 3rd mark, essence is figure
As the byte number of data, and in the binary data of image file, reading view data is with byte number
Position this view data position in the binary data of image file, say, that if user is not
Read head fileinfo, user cannot position Data Position to be read, and it is right also cannot to ask to be shown to
The image answered.Such as, the 3rd mark can be that the number information of above-mentioned scanning figure is (because scanning figure is certainly
It is to have storage data), it is assumed that image information (the compression image information of label figure, a pressure for preview graph
Contracting image information, the compression image information of scanning figure or the compression image information of son scanning figure) stored number
According to byte number be 20 bytes, the storage byte number of other items for information is 4 bytes, then, Ke Yicong
Items for information in header file information obtains and carries out specific image in the image file stored with binary data
The positional information of data, thus be read out.Such as, in binary data, fileinfo (bag right overhead
Include label information) shared by byte be 4 × N, byte shared by the compression image information of preview graph is 20, label
Byte shared by the compression image information of figure is 20, and byte shared by the compression image information of scanning figure is 20 × M,
Wherein N is the data entries quantity of header file information, and M is all scanning of compression image information of scanning figure
The quantity of figure, then when first is labeled as being to directly read 4 × N+1 byte in binary data
~ 4 × N+20 byte, it is the compression image information of preview graph;When second is labeled as being to read label figure
Compression image information in like manner;When the 3rd, be labeled as storage is the number of scanning figure, when reading P
The compressing image data of scanning figure, can position in reading binary data [4 × N+40+20 × (P-1)+1]
Byte ~ [4 × N+40+20 × P] byte.
Additionally, due to header file information stores the compress mode of above-mentioned data, by read head file
Information can know it is to compress data in which way, otherwise cannot realize the decompression of data.
Therefore, it is encrypted by correct fileinfo, it is possible to achieve image file general image data
Security and confidentiality.
Although the present invention is open as above with preferred embodiment, but it is not for limiting the present invention, appoints
What those skilled in the art without departing from the spirit and scope of the present invention, may be by the disclosure above
Technical solution of the present invention is made possible variation and amendment by method and technology contents, therefore, every does not takes off
From the content of technical solution of the present invention, it is any that above example is made by the technical spirit of the foundation present invention
Simple modification, equivalent variations and modification, belong to the protection domain of technical solution of the present invention.