Arbitrary Plane for Cutting

Sathya ksathya at
Tue Sep 14 12:52:23 EDT 1999

Hi David

my ImageReSlice code reads as follows

    vtkTransform *transform = vtkTransform::New ();
    transform->RotateZ (m_Angle);

    this->aslice->SetInput ( this->Reader->GetOutput ());
    this->aslice->SetResliceTransform (transform); 
    this->aslice->SetInterpolationModeToLinear ();
    this->aslice->InterpolateOff ();
    this->aslice->OptimizationOff ();
    this->aslice->Update ();
    this->aslice->ReleaseDataFlagOn ();

> One of the optimizations in vtkImageReslice can misbehave if
> the compiler isn't consistant in how it does floating-point
> calculations.  To solve this, use OptimizationOff when using
> nearest-neighbor interpolation.

> Also, if you can send me the following info I might be able
> to add #ifdefs to the code to fix it for your machine (no promises):
>  - architecture (i.e. processor)

Pentium - III 550 Mhz

>  - operating system

Windows NT 4.0
>  - compiler (including revision)

Visual C++ 6.0 Sp3
>  - version of vtkImageReslice (listed at the top of vtkImageReslice.cxx)


> As for the interpolation, don't forget that the vtkTexture also
> has InterpolateOn/Off flags.

But I can specifically see the it crashes at NearestNeighbor

Thanks a lot David



This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.

More information about the vtkusers mailing list