How to use dcmpsmk

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

How to use dcmpsmk

#1 Post by Xiao »

Anyone can tell me how to use dcmpsmk to create ps file with
ShutterEllipse
ShutterRectangle
ShutterFreehand
Rectangle
Ellipse
Arrow
Line
Angle
Text
Polygon

I will be very appreciated, if someone can give me a sample, thanks!

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#2 Post by J. Riesmeier »

The short answer is: Only shutters can be activated if present in the DICOM image, since the other constructs are never present in a DICOM image object.

Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

#3 Post by Xiao »

Thank you for your update.
Now I have write a new dcmpsmk, which can be used to create ps file.
usage:
$dcmpsmk dicomfile pstemplatefile
pstemplatefile format:
[Shutter]
shutterShape=RECTANGULAR\\CIRCULAR\\POLYGONAL
shutterLeftVerticalEdge=52
shutterRightVerticalEdge=327
shutterUpperHorizontalEdge=26
shutterLowerHorizontalEdge=307
centerOfCircularShutter=35\\71
radiusOfCircularShutter=344
verticesOfThePolygonalShutter=56\\67\\293\\64\\307\\267\\26\\293\\63\\19\\56\\67
shutterPresentationValue=0

[GraphicAnnotation]
TextObject=(BoundingBoxAnnotationUnits=PIXEL;TextValue=aaa;AnchorPointAnnotationUnits=;AnchorPointX=;AnchorPointY=;AnchorPointVisibility=;BoundingBoxTopLeftHandCornerX=133.103241;BoundingBoxTopLeftHandCornerY=191.488052;BoundingBoxBottomRightHandCornerX=145.450897;BoundingBoxBottomRightHandCornerY=182.445084;BoundingBoxTextHorizontalJustification=LEFT;)
TextObject=(BoundingBoxAnnotationUnits=PIXEL;TextValue=bbb;AnchorPointAnnotationUnits=;AnchorPointX=;AnchorPointY=;AnchorPointVisibility=;BoundingBoxTopLeftHandCornerX=268.743195;BoundingBoxTopLeftHandCornerY=225.890778;BoundingBoxBottomRightHandCornerX=259.700226;BoundingBoxBottomRightHandCornerY=211.543121;BoundingBoxTextHorizontalJustification=CENTER;)

GraphicObject=(GraphicAnnotationUnits=PIXEL;NumberofGraphicPoints=2;GraphicData=159.815704,72.989761,94.832764,194.764511,;GraphicType=POLYLINE;GraphicFilled=N;)
GraphicObject=(GraphicAnnotationUnits=PIXEL;NumberofGraphicPoints=5;GraphicData=222.614334,74.627983,275.037537,74.627983,275.037537,159.269623,222.614334,159.269623,222.614334,74.627983,;GraphicType=POLYLINE;GraphicFilled=N;)
GraphicObject=(GraphicAnnotationUnits=PIXEL;NumberofGraphicPoints=1;GraphicData=287.051208,53.331059,;GraphicType=POINT;GraphicFilled=;)
GraphicObject=(GraphicAnnotationUnits=PIXEL;NumberofGraphicPoints=2;GraphicData=164.184296,171.283279,256.471008,216.061432,;GraphicType=CIRCLE;GraphicFilled=N;)


[softcopyVOIList]
WindowCenter=200
WindowWidth=500

[PresentationLUT]
PresentationLUTShape=INVERSE

[SpatialTransformation]
ImageHorizontalFlip=Y
ImageRotation=90

[DisplayedArea]
DisplayedAreaTopLeftHandCornerX=1
DisplayedAreaTopLeftHandCornerY=1
DisplayedAreaBottomRightHandCornerX=320
DisplayedAreaBottomRightHandCornerY=320
PresentationSizeMode=MAGNIFY
PresentationPixelSpacingX=0.5
PresentationPixelSpacingY=0.5
PresentationPixelMagnificationRatio=2.000000

Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

#4 Post by Xiao »

Another question, can you tell how to save a arrow in PS file, thanks.

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#5 Post by J. Riesmeier »

how to save a arrow in PS file
I guess you mean an anchor point that is associated with a textual annotation, right?

Regarding your "new dcmpsmk": Since your template file looks pretty much like a 1:1 mapping of the DICOM Presentation State object, why don't you use XML and an appropriate stylesheet (XSLT) in order to create the input for xml2dcm?

Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

#6 Post by Xiao »

thank you for replay.
Graphic Type:
The shape of graphic that is to be drawn.
See C.10.5.1.2.
Enumerated Values:
POINT
POLYLINE
INTERPOLATED
CIRCLE
ELLIPSE
in despite of there is no ARROW, I still want to save the arrow drawn on image in PS file, what should I do?

good idea, maybe later I will change it to XML.

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#7 Post by J. Riesmeier »

An ARROW has been added as a Compound Graphic Type in March 2010 with Supplement 120. This Supplement has also been incorporated into the 2011 edition of the DICOM standard.

Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

#8 Post by Xiao »

Thank you very much.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest