# Stretched CPR instead of Straightened CPR

**URL:** https://discourse.slicer.org/t/stretched-cpr-instead-of-straightened-cpr/26176
**Category:** Development
**Created:** [November 10, 2022, 5:26am UTC](https://discourse.slicer.org/t/stretched-cpr-instead-of-straightened-cpr/26176 "2022-11-10T05:26:17Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![hbr](https://avatars.discourse-cdn.com/v4/letter/h/8edcca/32.png) [@hbr](https://discourse.slicer.org/u/hbr)
#### Post date: [November 10, 2022, 5:26am UTC](https://discourse.slicer.org/t/stretched-cpr-instead-of-straightened-cpr/26176/1 "2022-11-10T05:26:17Z")

</div>

hi

i want to use Stretched CPR in slicer but i found in sandbox extension in curved planar reformat just Straightened CPR.  
like this pic:  
 ![cpr](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/3/7316dbc82e8a763e9ed985bd5428d9d54451a561.png)

Is Stretched CPR in any extensions in slicer?

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: [November 21, 2022, 10:06pm UTC](https://discourse.slicer.org/t/stretched-cpr-instead-of-straightened-cpr/26176/2 "2022-11-21T22:06:17Z")

</div>

Currently only straightened mode is implemented. It would not be hard to add the stretched mode - this code part would need to be updated to compute the slice axes so that the two axes are not the curve normal and binormal but the curve normal and a fixed direction. This paper explains the difference between the straightened and stretched mode: [https://www.cg.tuwien.ac.at/research/vis/adapt/Vis2002/AKanitsar\_CPR.pdf](https://www.cg.tuwien.ac.at/research/vis/adapt/Vis2002/AKanitsar_CPR.pdf)

---

<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: [November 22, 2022, 9:50pm UTC](https://discourse.slicer.org/t/stretched-cpr-instead-of-straightened-cpr/26176/3 "2022-11-22T21:50:48Z")

</div>

I’ve implemented [“stretched” mode](https://github.com/PerkLab/SlicerSandbox#curved-planar-reformat).

![CurvedPlanarReformat_4.png](https://raw.githubusercontent.com/PerkLab/SlicerSandbox/master/CurvedPlanarReformat_4.png)

You can get it by updating Sandbox module from the Extensions Manager tomorrow. Let me know how it works for you.

---

<div class="post-metadata">

### Author: ![hbr](https://avatars.discourse-cdn.com/v4/letter/h/8edcca/32.png) [@hbr](https://discourse.slicer.org/u/hbr)
#### Post date: [November 23, 2022, 4:56am UTC](https://discourse.slicer.org/t/stretched-cpr-instead-of-straightened-cpr/26176/4 "2022-11-23T04:56:58Z")

</div>

Hi Andras

thanks alot

it is great work

i will test it and let you know how it works

---

<div class="post-metadata">

### Author: ![hbr](https://avatars.discourse-cdn.com/v4/letter/h/8edcca/32.png) [@hbr](https://discourse.slicer.org/u/hbr)
#### Post date: [November 23, 2022, 5:33am UTC](https://discourse.slicer.org/t/stretched-cpr-instead-of-straightened-cpr/26176/5 "2022-11-23T05:33:38Z")

</div>

sorry

i updated sandbox but i can not found where it is

---

<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: [November 24, 2022, 2:33am UTC](https://discourse.slicer.org/t/stretched-cpr-instead-of-straightened-cpr/26176/6 "2022-11-24T02:33:21Z")

</div>

It is available in the extensions manager for Slicer versions 5.2.0 (to be released in a day or two) or the latest Slicer 5.3.1 release (not for 5.0.3).

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/8/28b792964b40233eb21e617c8a70198e07fe2f53.png)

---

<div class="post-metadata">

### Author: ![hbr](https://avatars.discourse-cdn.com/v4/letter/h/8edcca/32.png) [@hbr](https://discourse.slicer.org/u/hbr)
#### Post date: [November 24, 2022, 6:36am UTC](https://discourse.slicer.org/t/stretched-cpr-instead-of-straightened-cpr/26176/7 "2022-11-24T06:36:51Z")

</div>

ok

i have to change slicer version

thanks
