hi all,<div><br></div><div>I have correctly resliced a 3D CT volume by an oblique plane using the following code in python:</div><div><div><div><br></div><div>CTReslice = vtk.vtkImageReslice()</div><div>CTReslice.SetInputConnection( CTReader.GetOutputPort() )</div>
<div>CTReslice.SetOutputDimensionality( 2 )</div><div>CTReslice.SetInterpolationModeToLinear()</div><div>CTReslice.SetOutputSpacing( math.fabs( ImageSpacing[0] ),</div><div>                            math.fabs( ImageSpacing[1] ),</div>
<div>                            math.fabs( ImageSpacing[2] ) )</div><div><br></div><div>CTReslice.SetResliceAxesOrigin( Transform.GetPosition() )</div><div>CTReslice.SetResliceAxesDirectionCosines( xdir[0], xdir[1], xdir[2],</div>
<div>                                          ydir[0], ydir[1], ydir[2],</div><div>                                          zdir[0], zdir[1], zdir[2] )</div><div>CTReslice.Update()</div><div>print CTReslice</div><div>print CTReslice.GetResliceAxes()</div>
<div><br></div><div><br></div><div><br></div><div>However, when I take a look at the OutputOrigin and OutputExtent they are set to some default INT/FLOAT_MAX value instead of, according to the class documentation, &quot;The default output origin/extent is the input origin/extent permuted through the ResliceAxes&quot; :</div>
<div><br></div><div><div>vtkImageReslice (02532CD8)</div><div>  Debug: Off</div><div>  Modified Time: 316</div><div>  Reference Count: 2</div><div>  Registered Events: (none)</div><div>  Executive: 03137A00</div><div>  ErrorCode: No error</div>
<div>  Information: 0252BA70</div><div>  AbortExecute: Off</div><div>  Progress: 1</div><div>  Progress Text: (None)</div><div>  NumberOfThreads: 8</div><div>  ResliceAxes: 0253AE68</div><div>    Debug: Off</div><div>    Modified Time: 316</div>
<div>    Reference Count: 1</div><div>    Registered Events: (none)</div><div>    Elements:</div><div>        0.656103 0.461 0.597502 121.967</div><div>        -0.325707 -0.541228 0.775234 181.053</div><div>        0.680768 -0.703243 -0.204951 270.487</div>
<div>        0 0 0 1</div><div>  ResliceAxesDirectionCosines: 0.656103 -0.325707 0.680768</div><div>                               0.461 -0.541228 -0.703243</div><div>                               0.597502 0.775234 -0.204951</div>
<div>  ResliceAxesOrigin: 121.967 181.053 270.487</div><div>  ResliceTransform: 00000000</div><div>  InformationInput: 00000000</div><div>  TransformInputSampling: On</div><div>  AutoCropOutput: Off</div><div>  OutputSpacing: 0.2631 0.2631 1</div>
<div>  OutputOrigin: 1e+299 1e+299 1e+299</div><div>  OutputExtent: -2147483648 2147483647 -2147483648 2147483647 -2147483648 2147483647</div><div>  OutputDimensionality: 2</div><div>  Wrap: Off</div><div>  Mirror: Off</div>
<div>  Border: On</div><div>  InterpolationMode: Linear</div><div>  Optimization: On</div><div>  BackgroundColor: 0 0 0 0</div><div>  BackgroundLevel: 0</div><div>  Stencil: 00000000</div><div><br></div><div><br></div><div>
vtkMatrix4x4 (0253AE68)</div><div>  Debug: Off</div><div>  Modified Time: 316</div><div>  Reference Count: 2</div><div>  Registered Events: (none)</div><div>  Elements:</div><div>    0.656103 0.461 0.597502 121.967</div><div>
    -0.325707 -0.541228 0.775234 181.053</div><div>    0.680768 -0.703243 -0.204951 270.487</div><div>    0 0 0 1</div><div><br></div><div><br></div><div>Moreoever, if I specify my own OutputOrigin/OutputExtent, the image I get is not where I think it should be.</div>
<div><br></div><div>What I would like to get as output is a sub-image of the original CTReslice.GetOutput().  I thought I could accomplish this by setting the OutputOrigin (bottom-left corner of the output 2D image) and OutputExtent (number of pixels in the (x,y,z) direction).  Is this the right way to extract a sub-image from CTReslice.GetOutput()?</div>
<div><br></div><div>any help is very much appreciated,</div><div><br></div></div></div></div>