<div dir="ltr">Hi Vincent,<div><br></div><div>The circumferencial spacing is incorrect, because that output dimension</div><div>is measured in radians and should have a total range of [0, 2*pi].</div><div><br></div><div>However, the image that you attached isn't what I expected so I think</div><div>something else is going wrong. I'll try running this pipeline on my own</div><div>machine, but I probably won't be able to do so until the weekend.</div><div><br></div><div> - David</div><div> <br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 10, 2014 at 2:39 AM, Vincent32160 <span dir="ltr"><<a href="mailto:vsh@magellium.fr" target="_blank">vsh@magellium.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I tried to set these three variables. Unfortunately what I got is a simple<br>
slice.<br>
<br>
Just to provide the context.<br>
The original data I am loading are 480 slices of 512x512 pixels with a<br>
spacing of (0.117 ; 0.117; 0.3). In order to get squared voxel I set the<br>
output spacing to (0.117 ; 0.117 ; 0.117) which means that I got a data<br>
which is 512x512x1227 voxels.<br>
When I apply the cylindrical transform to this data, I do not see any slice<br>
with a dimension of 2*pi*radius with 0<radius <256.<br>
<br>
Is the order I am setting each variable important?<br>
<br>
I ran the code below to have an overview of the data after the cylindrical<br>
transform. I set an output extent bigger than the original data to see if I<br>
got unrolled cylinder plane.<br>
<br>
vtkCylindricalTransform * cylTransform = vtkCylindricalTransform::New();<br>
<br>
vtkImageReslice * imageReslice = vtkImageReslice::New();<br>
imageReslice->SetInputConnection(imageInfos->GetOutputPort());<br>
imageReslice->SetOutputOrigin(0,0,0);<br>
imageReslice->SetResliceTransform(cylTransform);<br>
imageReslice->SetOutputDimensionality(3);<br>
imageReslice->InterpolateOn();<br>
double outputSpacing[3];<br>
outputSpacing[0] = scale->GetOutput()->GetSpacing()[0]; // radius<br>
outputSpacing[1] = scale->GetOutput()->GetSpacing()[1];; // circumferential<br>
angle<br>
outputSpacing[2] = scale->GetOutput()->GetSpacing()[0]; // longitudinal<br>
sample spacings<br>
imageReslice->SetOutputSpacing(outputSpacing);<br>
<br>
int outputExtent[6]; // number of samples<br>
outputExtent[0] = 0;<br>
outputExtent[1] = 600;<br>
outputExtent[2] = 0;<br>
outputExtent[3] = 600;<br>
outputExtent[4] = 0;<br>
outputExtent[5] = 1400;<br>
imageReslice->SetOutputExtent(outputExtent);<br>
imageReslice->Update();<br>
<br>
Result :<br>
<<a href="http://vtk.1045678.n5.nabble.com/file/n5729771/extent.png" target="_blank">http://vtk.1045678.n5.nabble.com/file/n5729771/extent.png</a>><br><div class="HOEnZb"><div class="h5"><br>
</div></div></blockquote></div><br></div></div></div>