Differences
This shows you the differences between two versions of the page.
1.0.0:volumerendering [2023/02/22 14:57] – created - external edit 127.0.0.1 | 1.0.0:volumerendering [2023/02/23 13:06] (current) – [NRRD File] admin | ||
---|---|---|---|
Line 171: | Line 171: | ||
__NOTICE:__ **LF** and **CRLF** are supported as line endings. | __NOTICE:__ **LF** and **CRLF** are supported as line endings. | ||
+ | ==== Image Slices ==== | ||
+ | The component is able to load 3D data from a number of image slices, often given by medical services. | ||
+ | |||
+ | <file pascal> | ||
+ | procedure LoadFromImageSlices(APath : String; const AFileNamePattern : String; | ||
+ | const AFromIdx, AToIdx : Integer; const APadLeftLen : Integer; | ||
+ | const APadChar : Char; const AWidth, AHeight, ADepth : Integer); | ||
+ | </ | ||
+ | |||
+ | Here is an example to load such data at runtime. | ||
+ | * Image slices are given as *.jpg files from " | ||
+ | * Each slice has the __same size__ of 128 x 128 pixels | ||
+ | * The size of the volumetric mesh should be capable to hold this size of data, here 128 x 128 | ||
+ | * The depth should be equal or larger than the number of slices imported, here: 212 slices and a depth of 256. | ||
+ | |||
+ | <file pascal> | ||
+ | GorillaVolumetricMesh1.RenderInside := true; | ||
+ | |||
+ | GorillaVolumetricMesh1.BeginUpdate(); | ||
+ | try | ||
+ | GorillaVolumetricMesh1.CustomSize := Size3D(128, 128, 256); | ||
+ | GorillaVolumetricMesh1.Sizes := TGorillaVolumetricMeshSize.vmsCustom; | ||
+ | GorillaVolumetricMesh1.DataType := TGorillaVolumetricMeshDataType.vmdtRGBAUInt8; | ||
+ | GorillaVolumetricMesh1.Details := 0.1; | ||
+ | finally | ||
+ | GorillaVolumetricMesh1.EndUpdate(); | ||
+ | end; | ||
+ | |||
+ | GorillaVolumetricMesh1.LoadFromImageSlices( | ||
+ | ' | ||
+ | ); | ||
+ | </ | ||
+ | |||
+ | The method expects the following input arguments for dynamic filename masking: | ||
+ | ^Argument ^Type ^ Value ^ | ||
+ | |APath | String | Directory where all images are | | ||
+ | |AFileNamePattern | String |A pattern for dynamic filename masking | | ||
+ | |AFromIdx | Integer | Index of first slice | | ||
+ | |AToIdx | Integer | Index of last slice | | ||
+ | |APadLeftLen | Integer | Length of left padding | | ||
+ | |APadChar | Char | Character for left padding | | ||
+ | |AWidth | Integer | Width of the image data | | ||
+ | |AHeight | Integer| Height of the image data | | ||
+ | |ADepth | Integer | Depth of image image data / Number of slices | | ||
==== Procedural Data ==== | ==== Procedural Data ==== | ||