pub struct Export { /* private fields */ }Expand description
Builder for exporting one wsi-rs-readable whole-slide image to DICOM VL WSI.
Implementations§
Source§impl Export
impl Export
Sourcepub fn from_slide(source_path: impl Into<PathBuf>) -> Self
pub fn from_slide(source_path: impl Into<PathBuf>) -> Self
Start an export builder from a source slide path.
The builder resolves a source-aware transfer syntax in build_request
or run until with_options or transfer_syntax makes the transfer
syntax explicit. Direct export_dicom calls use the request options as
supplied and do not perform this source-aware resolution step.
Sourcepub fn to_directory(self, output_dir: impl Into<PathBuf>) -> Self
pub fn to_directory(self, output_dir: impl Into<PathBuf>) -> Self
Set the output directory for generated DICOM instances.
Sourcepub fn with_options(self, options: ExportOptions) -> Self
pub fn with_options(self, options: ExportOptions) -> Self
Replace export options and treat their transfer syntax as explicit.
Sourcepub fn with_metadata(self, metadata: MetadataSource) -> Self
pub fn with_metadata(self, metadata: MetadataSource) -> Self
Replace metadata used for DICOM conformance fields.
Sourcepub fn with_research_placeholder_metadata(self) -> Self
pub fn with_research_placeholder_metadata(self) -> Self
Use deterministic non-clinical placeholder metadata for research exports.
Sourcepub fn transfer_syntax(self, transfer_syntax: TransferSyntax) -> Self
pub fn transfer_syntax(self, transfer_syntax: TransferSyntax) -> Self
Explicitly set the output transfer syntax.
Sourcepub fn jpeg_direct_htj2k_profile(self, profile: JpegDirectHtj2kProfile) -> Self
pub fn jpeg_direct_htj2k_profile(self, profile: JpegDirectHtj2kProfile) -> Self
Select the direct JPEG-to-HTJ2K coefficient path for HTJ2K exports.
Sourcepub fn jpeg_quality(self, jpeg_quality: u8) -> Self
pub fn jpeg_quality(self, jpeg_quality: u8) -> Self
Set JPEG Baseline fallback quality.
Sourcepub fn icc_profile_policy(self, policy: IccProfilePolicy) -> Self
pub fn icc_profile_policy(self, policy: IccProfilePolicy) -> Self
Set the ICC profile policy for missing source color metadata.
Sourcepub fn encode_backend(self, backend: EncodeBackendPreference) -> Self
pub fn encode_backend(self, backend: EncodeBackendPreference) -> Self
Set the runtime encode backend preference.
Sourcepub fn codec_validation(self, validation: CodecValidation) -> Self
pub fn codec_validation(self, validation: CodecValidation) -> Self
Set the runtime codec validation policy.
Sourcepub fn source_device_decode(self, source_device_decode: bool) -> Self
pub fn source_device_decode(self, source_device_decode: bool) -> Self
Allow or disable device-backed source tile decode.
Sourcepub fn j2k_decomposition_levels(self, levels: Option<u8>) -> Self
pub fn j2k_decomposition_levels(self, levels: Option<u8>) -> Self
Override JPEG 2000 decomposition levels.
Sourcepub fn gpu_encode_inflight_tiles(self, tiles: Option<usize>) -> Self
pub fn gpu_encode_inflight_tiles(self, tiles: Option<usize>) -> Self
Set the optional GPU encode in-flight tile cap.
Sourcepub fn gpu_encode_memory_mib(self, memory_mib: Option<u64>) -> Self
pub fn gpu_encode_memory_mib(self, memory_mib: Option<u64>) -> Self
Set the optional GPU encode memory budget in MiB.
Sourcepub fn gpu_pipeline_depth(self, depth: Option<usize>) -> Self
pub fn gpu_pipeline_depth(self, depth: Option<usize>) -> Self
Set the optional GPU pipeline depth.
Sourcepub fn gpu_row_batch_rows(self, rows: Option<usize>) -> Self
pub fn gpu_row_batch_rows(self, rows: Option<usize>) -> Self
Set the optional maximum rows per GPU row batch.
Sourcepub fn gpu_row_batch_target_tiles(self, tiles: Option<usize>) -> Self
pub fn gpu_row_batch_target_tiles(self, tiles: Option<usize>) -> Self
Set the optional target tile count per GPU row batch.
Sourcepub fn source_aware_transfer_syntax(self) -> Self
pub fn source_aware_transfer_syntax(self) -> Self
Resolve the transfer syntax from the source at run time.
Sourcepub fn build_request(self) -> Result<ExportRequest, Error>
pub fn build_request(self) -> Result<ExportRequest, Error>
Convert the builder into an export request, resolving source-aware defaults.
Sourcepub fn run(self) -> Result<ExportReport, Error>
pub fn run(self) -> Result<ExportReport, Error>
Run the export and return a report.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Export
impl RefUnwindSafe for Export
impl Send for Export
impl Sync for Export
impl Unpin for Export
impl UnsafeUnpin for Export
impl UnwindSafe for Export
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more