Aspose.Total for .NET is a comprehensive suite of APIs that enables developers to easily export PostScript (PS) to DICOM image within any .NET applications. This suite of APIs provides a wide range of features and functionalities that can be used to create, manipulate, convert, and render various file formats.
The process of exporting PS to DICOM image can be completed in two simple steps. First, by using Aspose.PDF for .NET, developers can export PS to JPEG. This API provides a wide range of features and functionalities that can be used to create, manipulate, convert, and render various file formats. It also provides a set of features that can be used to convert PS to JPEG.
Once the PS file is converted to JPEG, developers can use Aspose.Imaging for .NET Image Processing API to convert JPEG to DICOM. This API provides a wide range of features and functionalities that can be used to create, manipulate, convert, and render various image formats. It also provides a set of features that can be used to convert JPEG to DICOM.
By using Aspose.Total for .NET, developers can easily export PS to DICOM image within any .NET applications. This suite of APIs provides a wide range of features and functionalities that can be used to create, manipulate, convert, and render various file formats. It also provides a set of features that can be used to convert PS to JPEG and then JPEG to DICOM. This makes it easy for developers to export PS to DICOM image within any .NET applications.
Convert PS file to DICOM via .NET
- Open PS file using Document class
- Initialize JpegDevice class object and render PS to JPEG by using Process method
- Load JPEG file by using Image class
- Save the document to DICOM format using Save method
Conversion Requirements
Install from command line as nuget install Aspose.Total
or install directly from Package Manager Console of Visual Studio.
Alternatively, get the offline MSI installer or DLLs in a ZIP file from downloads .
Convert PS File to DICOM in a Single File via C#
Using the API, you can also convert PS file to DICOM to a single image file. In order to convert all pages, you can first render your PS document to one TIFF file and after that you can export TIFF file to DICOM. You can open the input file using Document class and create Resolution, TiffSettings, & TIFF device objects. You can get a single TIFF image using Process method of TiffDevice class. Finally, you can load TIFF file using Image class and save it to DICOM format using Save method.
Convert PS to DICOM With Watermark via C#
Using the API, you can also convert PS file to DICOM with watermark in your DICOM document. In order to add a watermark, you can first render your PS document to JPEG and add a watermark in it. To demonstrate the operation, you can load your converted JPEG image, add transformations using an object of Matrix class and draw a string as the watermark on the image surface using the Graphics class’ DrawString method. After adding the watermark in it, you can save the JPEG as DICOM format. Below is a code example that demonstrates how to add a diagonal watermark to your document.
Convert & Rotate PS File to DICOM via C#
Using the API, you can also rotate the output DICOM image as per your needs. The Image.RotateFlip method can be used to rotate the image by 90/180/270-degrees and flip the image horizontally or vertically. You can specify the type of rotation and flip to apply to the image. In order to rotate and flip the image you can load the converted JPEG image using the factory method exposed by Image class and call the Image.RotateFlip method while specifying the appropriate RotateFlipType .
Explore PS Conversion Options with .NET
What is PS File Format?
The PS (PostScript) file format is a page description language developed by Adobe Systems. It is commonly used for printing and is supported by a wide range of printers and imaging devices. PS files contain instructions that describe how elements such as text, images, and graphics should be rendered on a printed page.
PS files are created by applications that generate PostScript output, such as Adobe Illustrator, Adobe InDesign, or other graphics software. They are primarily used in professional printing workflows, where high-quality and consistent output is required.
The PS file format is based on a stack-based programming language, where commands and operands are placed on a stack and executed in a sequential manner. This allows for precise control over page layout, typography, color, and other printing parameters.
PS files are typically text-based and can be opened and edited with a text editor. They consist of a series of ASCII characters that represent the PostScript code. The code describes the arrangement and appearance of objects on a page, including text positioning, image placement, and graphical transformations.
While PS files are primarily used for printing, they can also be converted to other formats for digital distribution or further processing. For example, PS files can be converted to PDF (Portable Document Format) files, which are widely supported and can be easily viewed and printed on various devices.
What is DICOM File Format?
Digital Imaging and Communications in Medicine (DICOM) is a standard for storing and transmitting medical images. It includes a file format definition and a network protocol. DICOM files can be exchanged between two entities, such as a medical imaging device and a picture archiving and communication system (PACS), or between two PACS. DICOM enables the integration of medical imaging devices and information systems.DICOM files are composed of a file header and a series of data sets. The file header contains information about the file, such as the DICOM version, the transfer syntax used, the patients name, and the study date. The data sets contain the image data and associated information, such as the patient ID, the image modality, and the image orientation.DICOM files can be exchanged over a network using the DICOM protocol. The DICOM protocol is a set of rules that define how DICOM files are to be transmitted. The protocol is based on the TCP/IP protocol.