The picture and text mask method that a kind of DICOM image film is printed
Technical field
The present invention relates to the picture and text mask method that a kind of DICOM image film is printed, relate in particular in DICOM Film PrintSCU end transmission image film print out task process, the interpolation picture and text mark the method among film DICOM imaged object to be printed.
Background technology
DICOM is as a kind of consensus standard that is widely used in the radiologic medicine image check, various medical imaging equipment such as CR, DR, CT, MRI, the equipment such as DSA all send the film printing task as DICOM Film Print SCU end to the laser camera as DICOM Film PrintSCP, and the film of printout medical imaging is read the sheet diagnosis for the doctor.
In the process of film printing, usually all need with this patient check relevant information, as patient name, sex, age, actinoscopy parameter, window width, the numerical value such as window position, engineer's scale information, perhaps about the figure labeling of focus position, the informational needs such as left and right label character mark the relevant position of printout film, for the doctor provides diagnosis necessary information, auxiliary diagnosis.
How will be in the optional position of image, the picture and text mark printout of arbitrary shape helps the doctor to realize that the film printing picture and text mark effect of What You See Is What You Get is an essential functional component of DICOM image printing among film.
Summary of the invention
The picture and text mask method that a kind of DICOM image film is printed comprises following performing step, realization flow such as Fig. 1:
The 1st step: response Client-initiated film printing event, obtain the user at the graphic context label Bitmap object in current browsing image district.
The 2nd step: the general 8Bit dark BitMap in position is converted to 2 dark monochromatic Mono Bitmap objects.
The 3rd step: carry out convergent-divergent for Mono Bitmap, obtain a Mono Bitmap object with DICOM imaged object formed objects to be printed.
The 4th step: the pixel that travels through DICOM imaged object to be printed, and obtain the pixel of Mono Bitmap opposite position, according to Mono Bitmap and AnnotationGray parameter, the pixel in the DICOM image is carried out conversion, thereby user's picture and text mark is added on the DICOM image of film to be printed, as Fig. 2 in the mode of What You See Is What You Get.
The 5th step: the film DICOM imaged object to be printed that will add the picture and text markup informations sends to laser camera by DICOM film print SCU and DICOM film print SCP communications protocol, and printing-out tape has the image film of What You See Is What You Get picture and text markup information.
Description of drawings
Fig. 1: DICOM image printing picture and text mark process flow diagram
Fig. 2: film DICOM image to be printed carries out corresponding flow path switch figure according to comprising the Mono Bitmap pixel that marks graph text information
Specific implementation method
Below in conjunction with accompanying drawing, the present invention is described in further details.
The picture and text mask method that a kind of DICOM image film is printed comprises following performing step, realization flow such as Fig. 1:
The 1st step: response Client-initiated film printing event, obtain the user at the graphic context label Bitmap object in current browsing image district:
Depend on the current hanging protocol of readding sheet, span mode, the content of the Bitmap of graphic context label is that the picture and text markup information of current DICOM imaged object to be printed in the co-located region in browsing image district is (as film four footmark explanatory notes word information, engineer's scale information, figure labeling information etc.), picture and text markup information in the system acquisition above-mentioned zone, and build the Bitmap object.
The 2nd step: the general 8Bit dark BitMap in position is converted to 2 dark monochrome facsimile mark Mono Bitmap image objects.
The 3rd step: carry out convergent-divergent for Mono Bitmap, obtains the picture and text with DICOM imaged object formed objects to be printed and mark Mono Bitmap image object.
The 4th step: the pixel that travels through DICOM imaged object to be printed, and obtain the pixel of Mono Bitmap opposite position, according to Mono Bitmap and AnnotationGray parameter, the pixel in the DICOM image is carried out conversion, thereby user's picture and text mark is added on the DICOM image of film to be printed, as Fig. 2 in the mode of What You See Is What You Get.
In Mono Bitmap image, preserved the image information of user's picture and text marks, these information mode with 8 Byte in this Mono Bitmap object exists, so read the Byte of a MonoBitmap in the process of traversal DICOM image pixel at every turn, and be according to preserving in order line by line from top to bottom pixel in Bitmap object internal memory according to Bitmap one by one, the DICOM image is from top to bottom, preserves line by line the pixel mapping rule of pixel and carries out the pixel transitions mapping.
Each symbol implication in following formula:
P
Dicom (x, y): film DICOM imaged object Y to be printed is capable, the pixel value of X column position pixel.
AnnotationGray: the current GTG numerical value that the highlighted picture and text of expression mark in the DICOM of printing film imaged object.。
P
MonoBitmap (x, Height-y): corresponding x in comprising the Mono Bitmap image of picture and text markup information, the pixel value of y coordinate (its value gets 1 or 0).
Height: zoom to the height (number of lines of pixels) with film DICOM imaged object to be printed Mono Bitmap of the same size image.
The 5th step: the film DICOM imaged object to be printed that will add the picture and text markup informations sends to laser camera by DICOM film print SCU and DICOM film print SCP communications protocol, and printing-out tape has the image film of What You See Is What You Get picture and text markup information.