[vtkusers] Rotating a vector field

Darshan Pai darshanpai at gmail.com
Thu Oct 7 12:53:58 EDT 2010


Yeah never found any filter doing that . I had also ended up doing the same
thing as you ..

On Thu, Oct 7, 2010 at 11:43 AM, David Doria <daviddoria at gmail.com> wrote:

> On Thu, Oct 7, 2010 at 11:39 AM, Jothy <jothybasu at gmail.com> wrote:
>
>> I am not able to understand totally  what you want to do.
>>
>> Could you post that part of code?
>>
>> Jothy
>>
>
>   // Rotate gradient 90 degrees
>   for(vtkIdType i = extents[0]; i < extents[1]; i++)
>     {
>     for(vtkIdType j = extents[2]; j < extents[3]; j++)
>       {
>       double* pixel =
> static_cast<double*>(normalizedGradient->GetScalarPointer(i,j,0));
>       double temp[2] = {pixel[0], pixel[1]};
>       pixel[0] = -temp[1];
>       pixel[1] = temp[0];
>       }
>     }
>
> It is only short because the rotation is 90 degrees. I was just wondering
> if there was a general rotation filter.
>
> David
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101007/7d4a557e/attachment.htm>


More information about the vtkusers mailing list