# Correct image and mask using command line

**URL:** <https://discourse.slicer.org/t/correct-image-and-mask-using-command-line/9386>\
**Category:** Radiomics\
**Tags:** dicom, radiomics\
**Created:** [December 4, 2019, 3:07pm UTC](https://discourse.slicer.org/t/correct-image-and-mask-using-command-line/9386 "2019-12-04T15:07:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [December 6, 2019, 3:30pm UTC](https://discourse.slicer.org/t/correct-image-and-mask-using-command-line/9386/2 "2019-12-06T15:30:53Z")

</div>

You probably need to export to labelmap.

See:

> [@The resolutions of segment and mri are different](https://discourse.slicer.org/t/the-resolutions-of-segment-and-mri-are-different/9394):
>
> Operating system: Win 10 Pro x64 Slicer version: 4.10.2 Expected behavior: Actual behavior: Some segmentation file resolutions are different with originial mri image resolutions. ex1) mri - (150, 512, 512) / seg - (44, 101, 101) This seems to happen to the most of the segmentation files with multiple segmentations. I created multiple nodes for each tumor and merged them into one node. Was this the cause for it? Is there any way to fit seg’s res to mri’s? and if the above method causes pr…

> [@Aligning Segmentations and images using python](https://discourse.slicer.org/t/aligning-segmentations-and-images-using-python/7446):
>
> Dear all I have a problem to understand how to use Segmentations nrrd file with image files in Python. My problem is: I’m able to open a stack of images and its segmentations using pynrrd. However I can’t understand how to align the segmentation with the stack of images. Reading the header of the segmentation I can’t understand how to shift the segmentation to align with the original image. The same operation when performed in 3DSlicer is straightforward, and the alignment perfect. So, I …

---

_[View the full topic](https://discourse.slicer.org/t/correct-image-and-mask-using-command-line/9386)._
