[vtkusers] vtkImagePlaneWidget and save to jpg

Raúl Ferriz raul at torresyvalero.com
Tue Oct 5 06:51:13 EDT 2010


  Many thanks Dave!

Now I have another issue: when I save the file to a file, I want that 
image get rotated 90 degrees on Y axis (2D). I tried to do this way:

         _imgdata = imagePlaneWidget->GetResliceOutput();
         if ( _imgdata )
         {
                     // _imgdata is the image data
                     transform->RotateY ( 90 );

                     transformFilter->SetTransform ( transform );
                     transformFilter->SetInput ( _imgdata );

                     _imgcast_->SetOutputScalarTypeToUnsignedChar();
                     _imgcast_->SetInput ( transformFilter->GetOutput() );
                     _imgcast_->Update ();

                     _writer_->SetFileName ( path );
                     _writer_->SetInput ( _imgcast_->GetOutput () );
                     _writer_->Write();
         }


But no rotation is made on saved file.






More information about the vtkusers mailing list