DicomOptions Class |
Namespace: Aspose.Imaging.ImageOptions
The DicomOptions type exposes the following members.
Name | Description | |
---|---|---|
![]() | DicomOptions | Initializes a new instance of the DicomOptions class |
Name | Description | |
---|---|---|
![]() ![]() | BufferSizeHint |
Gets or sets the buffer size hint which is defined max allowed size for all internal buffers.
(Inherited from ImageOptionsBase.) |
![]() ![]() | ColorType |
Gets or sets the type of the color.
|
![]() ![]() | Compression |
Gets or sets the compression.
|
![]() | Disposed |
Gets a value indicating whether this instance is disposed.
(Inherited from DisposableObject.) |
![]() | FullFrame |
Gets or sets a value indicating whether [full frame].
(Inherited from ImageOptionsBase.) |
![]() | MultiPageOptions |
The multipage options
(Inherited from ImageOptionsBase.) |
![]() ![]() | Palette |
Gets or sets the color palette.
(Inherited from ImageOptionsBase.) |
![]() ![]() | ProgressEventHandler |
Gets or sets the progress event handler.
(Inherited from ImageOptionsBase.) |
![]() ![]() | ResolutionSettings |
Gets or sets the resolution settings.
(Inherited from ImageOptionsBase.) |
![]() | Source |
Gets or sets the source to create image in.
(Inherited from ImageOptionsBase.) |
![]() | VectorRasterizationOptions |
Gets or sets the vector rasterization options.
(Inherited from ImageOptionsBase.) |
![]() | XmpData |
Gets or sets the XMP metadata container.
(Inherited from ImageOptionsBase.) |
Name | Description | |
---|---|---|
![]() | Clone |
Clones this instance.
(Inherited from ImageOptionsBase.) |
![]() ![]() | Dispose |
Disposes the current instance.
(Inherited from DisposableObject.) |
![]() | Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | (Inherited from DisposableObject.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ReleaseManagedResources |
Releases the managed resources. Make sure no unmanaged resources are released here, since they may have been already released.
(Inherited from ImageOptionsBase.) |
![]() | ReleaseUnmanagedResources |
Releases the unmanaged resources. Make sure no managed resources are released here, since they may have been already released.
(Inherited from DisposableObject.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | VerifyNotDisposed |
Verifies that the current instance is not disposed.
(Inherited from DisposableObject.) |
Name | Description | |
---|---|---|
![]() | xmpData |
XMP metadata of image.
(Inherited from ImageOptionsBase.) |
[C#] using (var inputImage = Image.Load("original.jpg")) { var options = new DicomOptions { ColorType = ColorType.Grayscale8Bit }; inputImage.Save("original_8Bit.dcm", options); }
[C#] using (var inputImage = Image.Load("original.jpg")) { var options = new DicomOptions { ColorType = ColorType.Rgb24Bit, Compression = new Compression { Type = CompressionType.Rle } }; inputImage.Save("original_RLE.dcm", options); }
[C#] using (var inputImage = Image.Load("original.jpg")) { var options = new DicomOptions { ColorType = ColorType.Rgb24Bit, Compression = new Compression { Type = CompressionType.Jpeg2000, Jpeg2000 = new Jpeg2000Options { Codec = Jpeg2000Codec.Jp2, Irreversible = false } } }; inputImage.Save("original_JPEG2000.dcm", options); }
[C#] using (var inputImage = Image.Load("original.jpg")) { var options = new DicomOptions { ColorType = ColorType.Rgb24Bit, Compression = new Compression { Type = CompressionType.Jpeg, Jpeg = new JpegOptions { CompressionType = JpegCompressionMode.Baseline, SampleRoundingMode = SampleRoundingMode.Truncate, Quality = 50 } } }; inputImage.Save("original_JPEG.dcm", options); }
[C#] string fileName = "sample.jpg"; string inputFileNameSingle = fileName; string inputFileNameMultipage = "multipage.tif"; string outputFileNameSingleDcm = "output.dcm"; string outputFileNameMultipageDcm = "outputMultipage.dcm"; // The next code sample converts JPEG image to DICOM file format using (var image = Aspose.Imaging.Image.Load(inputFileNameSingle)) { image.Save(outputFileNameSingleDcm, new Aspose.Imaging.ImageOptions.DicomOptions()); } // DICOM format supports multipage images. You can convert GIF or TIFF images to DICOM in the same way as JPEG images using (var imageMultiple = Aspose.Imaging.Image.Load(inputFileNameMultipage)) { imageMultiple.Save(outputFileNameMultipageDcm, new Aspose.Imaging.ImageOptions.DicomOptions()); }
[C#] using (DicomImage image = (DicomImage)Image.Create( new DicomOptions() { Source = new StreamSource(new MemoryStream()) }, 100, 100)) { // Draw something using vector graphics Graphics graphics = new Graphics(image); graphics.FillRectangle(new SolidBrush(Color.BlueViolet), image.Bounds); graphics.FillRectangle(new SolidBrush(Color.Aqua), 10, 20, 50, 20); graphics.FillEllipse(new SolidBrush(Color.Orange), 30, 50, 70, 30); // Save the pixels of the drawn image. They are now on the first page of the Dicom image. int[] pixels = image.LoadArgb32Pixels(image.Bounds); // Add a few pages after, making them darker for (int i = 1; i < 5; i++) { DicomPage page = image.AddPage(); page.SaveArgb32Pixels(page.Bounds, pixels); page.AdjustBrightness(i * 30); } // Add a few pages in front of the main page, making them brighter for (int i = 1; i < 5; i++) { DicomPage page = image.InsertPage(0); page.SaveArgb32Pixels(page.Bounds, pixels); page.AdjustBrightness(-i * 30); } // Save the created multi-page image to the output file image.Save("MultiPage.dcm"); }