# How can I crop some CT data into same region?

**URL:** <https://discourse.slicer.org/t/how-can-i-crop-some-ct-data-into-same-region/16863>\
**Category:** Support\
**Created:** [March 31, 2021, 3:35am UTC](https://discourse.slicer.org/t/how-can-i-crop-some-ct-data-into-same-region/16863 "2021-03-31T03:35:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hir](https://avatars.discourse-cdn.com/v4/letter/h/edb3f5/32.png) [@hir](https://discourse.slicer.org/u/hir)\
**Post date:** [March 31, 2021, 3:35am UTC](https://discourse.slicer.org/t/how-can-i-crop-some-ct-data-into-same-region/16863/1 "2021-03-31T03:35:55Z")

</div>

Hi, I’m new to 3D slicer.

I have several series of CT data, like day0,1,… for each mouse.  
I want to compare bone volume change over time.

I use “Expert Automated Registration” to align the orientations.

Then, I want to crop same region like below image.  
Which tool is appropriate?

 ![スクリーンショット 2021-03-31 12.31.06](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/6/56276271937914525664bbf2f5efe226b2d7523d.jpeg)  
blue: day0  
yellow: day1  
red: day2  
green: day3  
black line: some regions I want to crop.(I will do it more accurately.)

---

<div class="post-metadata">

**Author:** ![timeanddoctor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/timeanddoctor/32/5839_2.png) [@timeanddoctor](https://discourse.slicer.org/u/timeanddoctor)\
**Post date:** [March 31, 2021, 4:29am UTC](https://discourse.slicer.org/t/how-can-i-crop-some-ct-data-into-same-region/16863/2 "2021-03-31T04:29:07Z")

</div>

you can crop it with the same ROI box.

---

<div class="post-metadata">

**Author:** ![hir](https://avatars.discourse-cdn.com/v4/letter/h/edb3f5/32.png) [@hir](https://discourse.slicer.org/u/hir)\
**Post date:** [March 31, 2021, 5:39am UTC](https://discourse.slicer.org/t/how-can-i-crop-some-ct-data-into-same-region/16863/3 "2021-03-31T05:39:37Z")

</div>

Thank you for replying.

I tried that and I can.  
Now my procedure is below.

Load series of DICOM data.  
→ Use “Expert Automated Registration”, fix:day0 move:day1,2,3  
→ Make Segmentations to see bone volumes(like the photo above.)  
→ make ROI box and rotate it with “Transform”  
→ Apply ROI box to original volume data with “Crop Volume”  
→ Make Segmentations of cropped Volume.  
→Calculate segment Volume with “Segment statistics”

It takes much time. Can I shorten these steps?  
Also, is it possible to apply scissor tool(free form) simultaneously to these Segmentations?

thanks.

---

<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:** [April 3, 2021, 2:25am UTC](https://discourse.slicer.org/t/how-can-i-crop-some-ct-data-into-same-region/16863/4 "2021-04-03T02:25:34Z")

</div>

You can write a short Python code snippet that performs all the steps automatically. You can run the code snippet using a keyboard shortcut (or if you want to have a more convenient GUI then create a Python scripted module). See lots of examples in [the script repository](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository). You can learn about basics of Slicer programming from [developer tutorials](https://www.slicer.org/wiki/Documentation/Nightly/Training#PerkLab.27s_Slicer_bootcamp_training_materials).

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [April 3, 2021, 8:28am UTC](https://discourse.slicer.org/t/how-can-i-crop-some-ct-data-into-same-region/16863/5 "2021-04-03T08:28:41Z")

</div>

> [@lassoan](#):
>
> create a Python scripted module

As far as ‘crop some CT data into same region’ is concerned, you may get some insight from this [module](https://github.com/chir-set/TemplateROICrop). It applies saved ROIs to crop CT volumes of known dimensions. You will obviously need more scripting for your requirements.

---

<div class="post-metadata">

**Author:** ![hir](https://avatars.discourse-cdn.com/v4/letter/h/edb3f5/32.png) [@hir](https://discourse.slicer.org/u/hir)\
**Post date:** [April 5, 2021, 12:56am UTC](https://discourse.slicer.org/t/how-can-i-crop-some-ct-data-into-same-region/16863/6 "2021-04-05T00:56:15Z")

</div>

Thanks a lot!  
I will try to make python scripts.
