Add new classmethods to create coordinate transformers (ImageToReferenceTransformer, PixelToReferenceTransformer, ReferenceToImageTransformer, ReferenceToPixelTransformer) for a given image by simply passing the image. In many situations, having the user extract the relevant spatial information from the images to pass into the constructors can get surprisingly complex and error prone when multiframe images and total pixel matrices get involved.
Add new PixelToPixelTransformer and ImageToImageTransformer classes to facilitate mapping between pixel indices and image coordinates, respectively, of two images or image frames.
Add new options round_output and drop_slice_indices to the ReferenceToPixelTransformer, and drop_slice_coord to ReferenceToImageTransformer
In order to facilitate this I had to move several functions from highdicom.utils to highdicom.spatial in order to avoid circular dependencies. The methods are re-exported from highdicom.utils for backwards compatibility.
I also corrected several of the test images, which I found had errors relating to their spatial information presumably going right back to the start of the library.
@DanielaSchacherer this will help simplify some parts of your notebook
ImageToReferenceTransformer
,PixelToReferenceTransformer
,ReferenceToImageTransformer
,ReferenceToPixelTransformer
) for a given image by simply passing the image. In many situations, having the user extract the relevant spatial information from the images to pass into the constructors can get surprisingly complex and error prone when multiframe images and total pixel matrices get involved.PixelToPixelTransformer
andImageToImageTransformer
classes to facilitate mapping between pixel indices and image coordinates, respectively, of two images or image frames.round_output
anddrop_slice_indices
to theReferenceToPixelTransformer
, anddrop_slice_coord
toReferenceToImageTransformer
In order to facilitate this I had to move several functions from
highdicom.utils
tohighdicom.spatial
in order to avoid circular dependencies. The methods are re-exported fromhighdicom.utils
for backwards compatibility.I also corrected several of the test images, which I found had errors relating to their spatial information presumably going right back to the start of the library.
@DanielaSchacherer this will help simplify some parts of your notebook