Skip to content

Commit

Permalink
Merge pull request #558 from DimitriPapadopoulos/codespell
Browse files Browse the repository at this point in the history
Fix typos found by codespell
  • Loading branch information
Enet4 authored Sep 13, 2024
2 parents 4f2c0d8 + a4686cd commit a94307d
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion core/src/dictionary/data_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ pub trait DataDictionary {
/// The data element dictionary entry type,
/// representing a DICOM attribute.
pub trait DataDictionaryEntry {
/// The full possible tag range of the atribute,
/// The full possible tag range of the attribute,
/// which this dictionary entry can represent.
fn tag_range(&self) -> TagRange;

Expand Down
2 changes: 1 addition & 1 deletion core/src/dictionary/uid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl std::fmt::Display for UidType {
UidType::CodingScheme => "Coding Scheme",
UidType::ApplicationContextName => "Application Context Name",
UidType::ServiceClass => "Service Class",
UidType::ApplicationHostingModel => "Application Hosting Modle",
UidType::ApplicationHostingModel => "Application Hosting Model",
UidType::MappingResource => "Mapping Resource",
UidType::LdapOid => "LDAP OID",
UidType::SynchronizationFrameOfReference => "Synchronization Frame of Reference",
Expand Down
4 changes: 2 additions & 2 deletions core/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ impl<I, P> DataElement<I, P> {
/// - if the value is a data set sequence,
/// the VR is set to `SQ` and the length is reset to undefined;
/// - if the value is a pixel data fragment sequence,
/// the VR is set to `OB` and the lenght is reset to undefined;
/// the VR is set to `OB` and the length is reset to undefined;
/// - if the value is primitive,
/// the length is recalculated, leaving the VR as is.
///
Expand Down Expand Up @@ -1140,7 +1140,7 @@ fn parse_tag_part(s: &str) -> Result<(u16, &str), ParseTagError> {
/// assert_ne!(Length::UNDEFINED, Length::UNDEFINED);
/// ```
///
/// Any addition or substraction with at least one undefined
/// Any addition or subtraction with at least one undefined
/// length results in an undefined length.
///
/// ```
Expand Down
2 changes: 1 addition & 1 deletion core/src/value/partial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub struct DicomDate(DicomDateImpl);
/// Represents a Dicom time (TM) value with a partial precision,
/// where some time components may be missing.
///
/// Unlike [chrono::NaiveTime], this implemenation has only 6 digit precision
/// Unlike [chrono::NaiveTime], this implementation has only 6 digit precision
/// for fraction of a second.
///
/// `DicomTime` implements [AsRange] trait, enabling to retrieve specific
Expand Down
4 changes: 2 additions & 2 deletions core/src/value/primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ impl PrimitiveValue {
/// }
/// ```
pub fn to_multi_str(&self) -> Cow<[String]> {
/// Auxillary function for turning a sequence of values
/// Auxiliary function for turning a sequence of values
/// into a sequence of strings.
fn seq_to_str<I>(iter: I) -> Vec<String>
where
Expand Down Expand Up @@ -4128,7 +4128,7 @@ impl PrimitiveValue {
/// The output of this method is equivalent to calling the method `to_str`
impl Display for PrimitiveValue {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
/// Auxillary function for turning a sequence of values
/// Auxiliary function for turning a sequence of values
/// into a backslash-delimited string.
fn seq_to_str<I>(iter: I) -> String
where
Expand Down
2 changes: 1 addition & 1 deletion devtools/dictionary-builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! Run the application with one of the following subcommands:
//!
//! - **`data-element`** or **`tags`**: DICOM data element dictionary
//! - **`uid`** or **`uids`**: DICOM unique identifers dictionary
//! - **`uid`** or **`uids`**: DICOM unique identifiers dictionary
//!
//! It will automatically retrieve dictionary specifications
//! from a credible source and output the result as a Rust code file
Expand Down
2 changes: 1 addition & 1 deletion devtools/dictionary-builder/src/uids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl std::fmt::Display for UidType {
UidType::CodingScheme => "Coding Scheme",
UidType::ApplicationContextName => "Application Context Name",
UidType::ServiceClass => "Service Class",
UidType::ApplicationHostingModel => "Application Hosting Modle",
UidType::ApplicationHostingModel => "Application Hosting Model",
UidType::MappingResource => "Mapping Resource",
UidType::LdapOid => "LDAP OID",
UidType::SynchronizationFrameOfReference => "Synchronization Frame of Reference",
Expand Down
4 changes: 2 additions & 2 deletions dictionary-std/src/uids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1420,10 +1420,10 @@ pub const IMPLANT_TEMPLATE_GROUP_INFORMATION_MODEL_MOVE: &str = "1.2.840.10008.5
/// SOP Class: Implant Template Group Information Model - GET
#[rustfmt::skip]
pub const IMPLANT_TEMPLATE_GROUP_INFORMATION_MODEL_GET: &str = "1.2.840.10008.5.1.4.45.4";
/// Application Hosting Modle: Native DICOM Model
/// Application Hosting Model: Native DICOM Model
#[rustfmt::skip]
pub const NATIVE_DICOM_MODEL: &str = "1.2.840.10008.7.1.1";
/// Application Hosting Modle: Abstract Multi-Dimensional Image Model
/// Application Hosting Model: Abstract Multi-Dimensional Image Model
#[rustfmt::skip]
pub const ABSTRACT_MULTI_DIMENSIONAL_IMAGE_MODEL: &str = "1.2.840.10008.7.1.2";
/// Mapping Resource: DICOM Content Mapping Resource
Expand Down
2 changes: 1 addition & 1 deletion echoscu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fn run() -> Result<(), Whatever> {
debug!("Association with {} successful", addr);
}

// commands are always in implict VR LE
// commands are always in implicit VR LE
let ts = dicom_transfer_syntax_registry::entries::IMPLICIT_VR_LITTLE_ENDIAN.erased();

let obj = create_echo_command(message_id);
Expand Down
2 changes: 1 addition & 1 deletion encoding/src/encode/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ use self::BasicEncoder::{BE, LE};
/// Handle multiple encoding tasks with the expected endianness. The parameter `$e`
/// will either yield a `LittleEndianBasicEncoder` or a `BigEndianBasicEncoder`. When
/// the specific basic encoder is still unknown in compile-time, this macro can be used
/// to resolve the endianess only once.
/// to resolve the endianness only once.
macro_rules! for_both {
($endianness: expr, |$e: ident| $f: expr) => {
match *$endianness {
Expand Down
2 changes: 1 addition & 1 deletion object/src/attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub trait Attribute<'a> {
type Item: 'a;
type ItemIter: IntoIterator<Item = Self::Item>;

/// Retrive the header information of this attribute.
/// Retrieve the header information of this attribute.
fn header(&self) -> DataElementHeader;

/// Retrieve the value representation.
Expand Down
4 changes: 2 additions & 2 deletions object/src/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl InMemDicomObject<StandardDataDictionary> {
///
/// The default character set is assumed
/// until _Specific Character Set_ is found in the encoded data,
/// after which the text decoder will be overriden accordingly.
/// after which the text decoder will be overridden accordingly.
#[inline]
pub fn read_dataset_with_ts<S>(from: S, ts: &TransferSyntax) -> Result<Self, ReadError>
where
Expand Down Expand Up @@ -1822,7 +1822,7 @@ where
self.into_iter()
}

/// Obtain an iteartor over the tags of the object's elements.
/// Obtain an iterator over the tags of the object's elements.
pub fn tags(&self) -> impl Iterator<Item = Tag> + '_ {
self.entries.keys().copied()
}
Expand Down
2 changes: 1 addition & 1 deletion object/src/tokens.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Convertion of DICOM objects into tokens.
//! Conversion of DICOM objects into tokens.
use crate::mem::InMemDicomObject;
use dicom_core::DataElement;
use dicom_parser::dataset::{DataToken, IntoTokens, IntoTokensOptions};
Expand Down
2 changes: 1 addition & 1 deletion parser/src/dataset/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! This module contains a mid-level abstraction for printing DICOM data sets
//! sequentially.
//! The [`DataSetWriter`] receieves data tokens to be encoded and written
//! The [`DataSetWriter`] receives data tokens to be encoded and written
//! to a writer.
//! In this process, the writer will also adapt values
//! to the necessary DICOM encoding rules.
Expand Down
2 changes: 1 addition & 1 deletion parser/src/stateful/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ where
/// Create a new DICOM stateful decoder from its parts,
/// while assuming a base reading position.
///
/// `position` should be calculatd with care.
/// `position` should be calculated with care.
/// Decoding or parsing errors may occur
/// if this position does not match the real position of the reader.
#[inline]
Expand Down
4 changes: 2 additions & 2 deletions pixeldata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ pub enum VoiLutOption {
Identity,
}

/// Output iamge bit depth specifier.
/// Output image bit depth specifier.
///
/// Note that this is only applied
/// when converting to an image.
Expand Down Expand Up @@ -439,7 +439,7 @@ pub struct DecodedPixelData<'a> {
/// the window level specified via width and center
window: Option<Vec<WindowLevel>>,

/// Enforce frame funcional groups VMs match `number_of_frames`
/// Enforce frame functional groups VMs match `number_of_frames`
enforce_frame_fg_vm_match: bool,
}

Expand Down
4 changes: 2 additions & 2 deletions storescp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fn run(scu_stream: TcpStream, args: &App) -> Result<(), Whatever> {
} else if data_value.value_type == PDataValueType::Command
&& data_value.is_last
{
// commands are always in implict VR LE
// commands are always in implicit VR LE
let ts =
dicom_transfer_syntax_registry::entries::IMPLICIT_VR_LITTLE_ENDIAN
.erased();
Expand Down Expand Up @@ -228,7 +228,7 @@ fn run(scu_stream: TcpStream, args: &App) -> Result<(), Whatever> {
info!("Stored {}", file_path.display());

// send C-STORE-RSP object
// commands are always in implict VR LE
// commands are always in implicit VR LE
let ts =
dicom_transfer_syntax_registry::entries::IMPLICIT_VR_LITTLE_ENDIAN
.erased();
Expand Down
2 changes: 1 addition & 1 deletion transfer-syntax-registry/src/adapters/rle_lossless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl PixelDataReader for RleLosslessAdapter {
Ok(())
}

/// Decode a singe frame of the DICOM image from RLE Lossless.
/// Decode a single frame of the DICOM image from RLE Lossless.
///
/// See <https://dicom.nema.org/medical/dicom/2023e/output/chtml/part05/chapter_G.html>
fn decode_frame(
Expand Down
2 changes: 1 addition & 1 deletion transfer-syntax-registry/tests/submit_pixel_stub.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Independent test for submission of a dummy TS implementation
//! withour adapters.
//! without adapters.
//!
//! Only applicable to the inventory-based registry.
#![cfg(feature = "inventory-registry")]
Expand Down
2 changes: 1 addition & 1 deletion ul/src/association/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ impl<'a> ClientAssociationOptions<'a> {
/// which refers to the target DICOM node.
///
/// The default is `ANY-SCP`.
/// Passing an emoty string resets the AE title to the default
/// Passing an empty string resets the AE title to the default
/// (or to the one passed via [`establish_with`](ClientAssociationOptions::establish_with)).
pub fn called_ae_title<T>(mut self, called_ae_title: T) -> Self
where
Expand Down

0 comments on commit a94307d

Please sign in to comment.