[vtkusers] vtkImagePlaneWidget and save to jpg
Raúl Ferriz
raul at torresyvalero.com
Tue Oct 5 07:15:58 EDT 2010
El 05/10/2010 13:05, David Gobbi escribió:
> Hi Raul,
>
> I think you want a RotateZ(90) here, because the widget has already
> transformed the slice from its original orientation to the XY plane.
>
> David
>
> On Tue, Oct 5, 2010 at 4:51 AM, Raúl Ferriz<raul at torresyvalero.com> wrote:
>> 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.
Hi David,
I tried with RotateX(90), RotateY(90) and RotateZ(90) but nothing
changes on output files.
More information about the vtkusers
mailing list