# cannot use mpReviewpreprocessor to convert dicom to nrrd in batch mode 

**URL:** https://discourse.slicer.org/t/cannot-use-mpreviewpreprocessor-to-convert-dicom-to-nrrd-in-batch-mode/18717
**Category:** Support
**Tags:** dicom
**Created:** [July 14, 2021, 3:15am UTC](https://discourse.slicer.org/t/cannot-use-mpreviewpreprocessor-to-convert-dicom-to-nrrd-in-batch-mode/18717 "2021-07-14T03:15:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Vuong\_Thuy\_Tran](https://avatars.discourse-cdn.com/v4/letter/v/b9bd4f/32.png) [@Vuong\_Thuy\_Tran](https://discourse.slicer.org/u/Vuong_Thuy_Tran)
#### Post date: [July 14, 2021, 3:15am UTC](https://discourse.slicer.org/t/cannot-use-mpreviewpreprocessor-to-convert-dicom-to-nrrd-in-batch-mode/18717/1 "2021-07-14T03:15:30Z")

</div>

Hi, I am trying to convert dicom series to nrrd in batch mode by using mpReviewpreprocessor module in 3d slicer 4.10.2, but it always shows error like the photo below. How can I handle it? Thank you!

 ![3d slicer](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/3/b336cca56e64abf24dfce59b62abc240ab927a56.jpeg)

This is error message in case photo not appear: Traceback (most recent call last):  
File “C:\Users\Vuong Thuy Tran\AppData\Roaming\NA-MIC\Extensions-28257\mpReview\lib\Slicer-4.10\qt-scripted-modules\mpReviewPreprocessor.py”, line 71, in onRunClicked  
logic = mpReviewPreprocessorLogic()  
File “C:\Users\Vuong Thuy Tran\AppData\Roaming\NA-MIC\Extensions-28257\mpReview\lib\Slicer-4.10\qt-scripted-modules\mpReviewPreprocessor.py”, line 108, in **init**  
shutil.rmtree(self.dataDir)  
File “C:\Program Files\Slicer 4.10.2\lib\Python\Lib\shutil.py”, line 247, in rmtree  
rmtree(fullname, ignore\_errors, onerror)  
File “C:\Program Files\Slicer 4.10.2\lib\Python\Lib\shutil.py”, line 252, in rmtree  
onerror(os.remove, fullname, sys.exc\_info())  
File “C:\Program Files\Slicer 4.10.2\lib\Python\Lib\shutil.py”, line 250, in rmtree  
os.remove(fullname)  
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u’C:/Users/Vuong Thuy Tran/AppData/Local/Temp/Slicer\mpReviewPreprocessor\CtkDICOMDatabase\ctkDICOM.sql’

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [July 14, 2021, 3:22am UTC](https://discourse.slicer.org/t/cannot-use-mpreviewpreprocessor-to-convert-dicom-to-nrrd-in-batch-mode/18717/2 "2021-07-14T03:22:08Z")

</div>

The issue is probably that you have chosen the DICOM database folder to be inside the folder that the mpReviewPreprocessor is using. Choosing a different folder for DICOM database may fix this.

However, most features of multiparametric image review modules have been incorporated to Slicer core, so most likely you’ll be able to accomplish what you need by just using the current Slicer version. If you describe what you would like to do then we can describe how to do it using Slicer core features.

---

<div class="post-metadata">

### Author: ![Vuong\_Thuy\_Tran](https://avatars.discourse-cdn.com/v4/letter/v/b9bd4f/32.png) [@Vuong\_Thuy\_Tran](https://discourse.slicer.org/u/Vuong_Thuy_Tran)
#### Post date: [July 14, 2021, 3:32am UTC](https://discourse.slicer.org/t/cannot-use-mpreviewpreprocessor-to-convert-dicom-to-nrrd-in-batch-mode/18717/3 "2021-07-14T03:32:32Z")

</div>

Thank you for your reply.  
Actually I have a lot of dicom images and masks ( in nii format) and I want to extract features from them using pyradiomics.  
But pyradiomics just accepts nrrd format so I need to convert them into nrrd format in batch mode.  
And I have another problem is my dicom images and mask not getting space match each other when I run pyradiomics.

If you know how to handle it in batch mode please let me know.  
Thank you a lot!

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [July 14, 2021, 3:37am UTC](https://discourse.slicer.org/t/cannot-use-mpreviewpreprocessor-to-convert-dicom-to-nrrd-in-batch-mode/18717/4 "2021-07-14T03:37:20Z")

</div>

You can find examples for all these operations in the script repository:

- [import image from DICOM](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#dicom)
- [save volume to file](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#save-volume-to-file)
- [process segmentations](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#segmentations) (import segmentation, export segmentation resampled into a chosen image geometry, etc.)
