[vtkusers] Issues with vtkImageReslice orientation

Jeffery Lewis jlewis at accuray.com
Tue Mar 6 12:22:29 EST 2018


Hi Eric,

I set the matrix passed to SetResliceTransform() to the following...

Inverse of [View]x[Volume]

Where [View] transforms world space into screen space (so it has scaling built into this matrix).
[Volume] transforms the volume coordinate system into world space.

You will probably want to center things in your view port. You can do this with SetOutputOrigin() and proving a translation of half your view port.

-----Original Message-----
From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of vtkusers-request at vtk.org
Sent: Monday, March 05, 2018 9:00 AM
To: vtkusers at vtk.org
Subject: vtkusers Digest, Vol 167, Issue 11

Send vtkusers mailing list submissions to
vtkusers at vtk.org

To subscribe or unsubscribe via the World Wide Web, visit
https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=DgEXkfu6VNZ1Wd56QoM8kMomlNJX2A725b6iRdMK-LI&e=
or, via email, send a message with subject or body 'help' to
vtkusers-request at vtk.org

You can reach the person managing the list at
vtkusers-owner at vtk.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of vtkusers digest..."


Today's Topics:

   1. Issues with vtkImageReslice orientation (Eric Petersen)
   2. Re: Error reading asci data. Possible mismatch of datasize
      with declaration (Bill Lorensen)
   3. VTK pipeline thread safety (Kit Chambers)
   4. Re: Error reading asci data. Possible mismatch of datasize
      with declaration (Bill Lorensen)
   5. Re: Error reading asci data. Possible mismatch of datasize
      with declaration (Bill Lorensen)
   6. Re: Error reading asci data. Possible mismatch of datasize
      with declaration (Bill Lorensen)


----------------------------------------------------------------------

Message: 1
Date: Mon, 5 Mar 2018 09:36:17 -0600
From: Eric Petersen <peer9802 at gmail.com>
To: VTK Users <vtkusers at vtk.org>
Subject: [vtkusers] Issues with vtkImageReslice orientation
Message-ID:
<CAGL8Xsvd8b2kgHzq=PGQxwsvuHjyDR6oZa63Kaj0O=APm+1FjQ at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello,

I'm trying to create an app where I can recreate trans-esophageal echo views using a CT scan.  My current prototype has two render windows where the "left" window displays a segmented STL of the CT data, the esophagus path, and the TEE imaging plane.  The right window then displays the double-oblique view of the simulated TEE plane.

Everything is working fine in the "left" window--I can modify the plane orientation/origin and easily see what I want to image.  The issue I'm having is converting this to the vtkImageReslice object.  My first approach was to simply take the 4x4 transform matrix "left" window (which is vtk poly data) and set this as the vtkImageReslice reslice matrix.  I quickly realized this doesn't work because the reslice plane origins are different.  I've tried some different offsets/origins for the 4x4 reslice matrix and I can get the slices correct under some conditions but not double-oblique views.

So, I have poly data (of a heart in this case) and a plane with known origin and rotation matrix (global x,y,z coordinates known).  What do I need to know in order to obtain an image of this plane using vtkImageReslice?  Do I need to approach how I'm creating the reslice matrix differently (I'm currently doing all rotations using (0,0,0) origin then translating to desired point)?

Any help is greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_pipermail_vtkusers_attachments_20180305_34b7a110_attachment-2D0001.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=5no50_yXLVhT1a8AQtLzi6EzObffznIQsYHymU6EryE&e=>

------------------------------

Message: 2
Date: Mon, 5 Mar 2018 08:24:20 -0800
From: Bill Lorensen <bill.lorensen at gmail.com>
To: Amine Aboufirass <amine.aboufirass at gmail.com>
Cc: VTK Users <vtkusers at vtk.org>, vtk-developers-request at vtk.org,  VTK
Developers <vtk-developers at vtk.org>
Subject: Re: [vtkusers] Error reading asci data. Possible mismatch of
datasize with declaration
Message-ID:
<CADZJ4hNmA+V8WWeMfgFP7ghTzor61toaCz5NpE_5Yr3ZBPVyXQ at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Tensor data should have 9 entries per point. Your data has 3 entries per point


On Mon, Mar 5, 2018 at 6:59 AM, Amine Aboufirass <amine.aboufirass at gmail.com> wrote:
> Hello,
>
>
>
> I am trying to read a vtk unstructured grid file with tensor data in
> paraview. I cannot for the life of me figure out why I am getting the
> following error message:
>
>
>
> Error reading asci data. Possible mismatch of datasize with declaration.
>
>
>
> The problem is that I have actually counted up the points and the
> tensors inside this file. It is apparent that it contains 1560 points
> and 4680 corresponding tensor entries. I have attached the file above
> so that the problem can be reproduced.
>
>
>
> Why am I getting the above error and how can I fix it?
>
>
>
> Thanks,
>
>
>
> Amine
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_op
> ensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHH
> QX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwA
> jDzi1Okrck&s=ESkfAmNs8_wGVp4YDsgAHPM6QgfbAMEzLL1Ddo_cyno&e=
>
> Please keep messages on-topic and check the VTK FAQ at:
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_V
> TK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTI
> tPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=y0B
> rzT7R-aW8qfsFKXqT1DZf0tUcbfUAOq_g0hT0-i8&e=
>
> Search the list archives at:
> https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_searc
> h_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgM
> iAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Ok
> rck&s=V2QLZp2VujunQV_x4rrXulWwRcKq0fH0UfNs3f7HZHw&e=
>
> Follow this link to subscribe/unsubscribe:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_l
> istinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMi
> AohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okr
> ck&s=DgEXkfu6VNZ1Wd56QoM8kMomlNJX2A725b6iRdMK-LI&e=
>



--
Unpaid intern in BillsParadise at noware dot com


------------------------------

Message: 3
Date: Mon, 5 Mar 2018 16:39:53 +0000
From: Kit Chambers <kit.chambers.kc at gmail.com>
To: VTK Users <vtkusers at vtk.org>
Subject: [vtkusers] VTK pipeline thread safety
Message-ID: <03E6557F-1735-4DA9-9CA9-15E9E980A3C8 at googlemail.com>
Content-Type: text/plain; charset=us-ascii

Hi,

I am looking to write a VTK filter which contains a series of sub filters which are executed in parallel inside an OpenMP loop. The RequestData would look something like this:

1- Set up the the filters (filter1 -> filter2 -> filter3), this sequence might change between different usages.
2- Start threading / create the parallel region
3- Parallel loop over some different inputs
3a - Set filter1 input
3b - Execute the filter series
3c - Add the result to output

Would I be correct in thinking that the above will result in a conflict where filter inputs and outputs get over written by successive threads? If so then is there a handy way to create a thread local copy of the VTK filters between steps 2 and 3?

Any help would be appreciated.

Kit



------------------------------

Message: 4
Date: Mon, 5 Mar 2018 08:48:02 -0800
From: Bill Lorensen <bill.lorensen at gmail.com>
To: Amine Aboufirass <amine.aboufirass at gmail.com>
Cc: VTK Users <vtkusers at vtk.org>, vtk-developers-request at vtk.org,  VTK
Developers <vtk-developers at vtk.org>
Subject: Re: [vtkusers] Error reading asci data. Possible mismatch of
datasize with declaration
Message-ID:
<CADZJ4hOTU2XHFqW0WL9uWn5-azX7Rp5nBMQj02Ca-2Mxhw_gmg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Sorry, you have 6 entries per point. Tses are symetric tensors. Declare the
type as TENSORS6 rather than TENSORS.

Bill


On Mon, Mar 5, 2018 at 8:24 AM, Bill Lorensen <bill.lorensen at gmail.com>
wrote:
> Tensor data should have 9 entries per point. Your data has 3 entries per
point
>
>
> On Mon, Mar 5, 2018 at 6:59 AM, Amine Aboufirass
> <amine.aboufirass at gmail.com> wrote:
>> Hello,
>>
>>
>>
>> I am trying to read a vtk unstructured grid file with tensor data in
>> paraview. I cannot for the life of me figure out why I am getting the
>> following error message:
>>
>>
>>
>> Error reading asci data. Possible mismatch of datasize with declaration.
>>
>>
>>
>> The problem is that I have actually counted up the points and the tensors
>> inside this file. It is apparent that it contains 1560 points and 4680
>> corresponding tensor entries. I have attached the file above so that the
>> problem can be reproduced.
>>
>>
>>
>> Why am I getting the above error and how can I fix it?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Amine
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=ESkfAmNs8_wGVp4YDsgAHPM6QgfbAMEzLL1Ddo_cyno&e=
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=y0BrzT7R-aW8qfsFKXqT1DZf0tUcbfUAOq_g0hT0-i8&e=
>>
>> Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=V2QLZp2VujunQV_x4rrXulWwRcKq0fH0UfNs3f7HZHw&e=
>>
>> Follow this link to subscribe/unsubscribe:
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=DgEXkfu6VNZ1Wd56QoM8kMomlNJX2A725b6iRdMK-LI&e=
>>
>
>
>
> --
> Unpaid intern in BillsParadise at noware dot com



--
Unpaid intern in BillsParadise at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_pipermail_vtkusers_attachments_20180305_c00abc36_attachment-2D0001.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=0FV6KMre0viC2-xv_WNGKeGryS_hg6cWkrXKw-OE5Nc&e=>

------------------------------

Message: 5
Date: Mon, 5 Mar 2018 08:49:56 -0800
From: Bill Lorensen <bill.lorensen at gmail.com>
To: Amine Aboufirass <amine.aboufirass at gmail.com>
Cc: VTK Users <vtkusers at vtk.org>, vtk-developers-request at vtk.org,  VTK
Developers <vtk-developers at vtk.org>
Subject: Re: [vtkusers] Error reading asci data. Possible mismatch of
datasize with declaration
Message-ID:
<CADZJ4hPNj8tZA_URy44ZUUiLH0i6eeXQp7njtwPcQ14w2KZ87A at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

The error message says there is a mismatch in the number declared and the
number present.

On Mar 5, 2018 8:48 AM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:

> Sorry, you have 6 entries per point. Tses are symetric tensors. Declare
> the type as TENSORS6 rather than TENSORS.
>
> Bill
>
>
> On Mon, Mar 5, 2018 at 8:24 AM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
> > Tensor data should have 9 entries per point. Your data has 3 entries per
> point
> >
> >
> > On Mon, Mar 5, 2018 at 6:59 AM, Amine Aboufirass
> > <amine.aboufirass at gmail.com> wrote:
> >> Hello,
> >>
> >>
> >>
> >> I am trying to read a vtk unstructured grid file with tensor data in
> >> paraview. I cannot for the life of me figure out why I am getting the
> >> following error message:
> >>
> >>
> >>
> >> Error reading asci data. Possible mismatch of datasize with declaration.
> >>
> >>
> >>
> >> The problem is that I have actually counted up the points and the
> tensors
> >> inside this file. It is apparent that it contains 1560 points and 4680
> >> corresponding tensor entries. I have attached the file above so that the
> >> problem can be reproduced.
> >>
> >>
> >>
> >> Why am I getting the above error and how can I fix it?
> >>
> >>
> >>
> >> Thanks,
> >>
> >>
> >>
> >> Amine
> >>
> >>
> >>
> >> _______________________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=ESkfAmNs8_wGVp4YDsgAHPM6QgfbAMEzLL1Ddo_cyno&e=
> >>
> >> Please keep messages on-topic and check the VTK FAQ at:
> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=y0BrzT7R-aW8qfsFKXqT1DZf0tUcbfUAOq_g0hT0-i8&e=
> >>
> >> Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=V2QLZp2VujunQV_x4rrXulWwRcKq0fH0UfNs3f7HZHw&e=
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=DgEXkfu6VNZ1Wd56QoM8kMomlNJX2A725b6iRdMK-LI&e=
> >>
> >
> >
> >
> > --
> > Unpaid intern in BillsParadise at noware dot com
>
>
>
> --
> Unpaid intern in BillsParadise at noware dot com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_pipermail_vtkusers_attachments_20180305_1c999855_attachment-2D0001.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=uQv1xA2Ox6-m358Wk2eloNgaG2C7hIIlIgHc8Mdbydo&e=>

------------------------------

Message: 6
Date: Mon, 5 Mar 2018 08:56:17 -0800
From: Bill Lorensen <bill.lorensen at gmail.com>
To: Amine Aboufirass <amine.aboufirass at gmail.com>
Cc: VTK Users <vtkusers at vtk.org>, vtk-developers-request at vtk.org,  VTK
Developers <vtk-developers at vtk.org>
Subject: Re: [vtkusers] Error reading asci data. Possible mismatch of
datasize with declaration
Message-ID:
<CADZJ4hM7y=7xx_B3iZSCAEAEaeshsgeW-vRkuDddbERtvaUijA at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Ignore I previous responses. I miscalcuated.


------------------------------

Subject: Digest Footer

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=ESkfAmNs8_wGVp4YDsgAHPM6QgfbAMEzLL1Ddo_cyno&e=

Please keep messages on-topic and check the VTK FAQ at: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=y0BrzT7R-aW8qfsFKXqT1DZf0tUcbfUAOq_g0hT0-i8&e=

Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=V2QLZp2VujunQV_x4rrXulWwRcKq0fH0UfNs3f7HZHw&e=

Follow this link to subscribe/unsubscribe:
https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwICAg&c=xPsIBl5KrHsS6I-OqwKVfQ&r=D9BdhfXHHQX-uhgMiAohLoGTItPHXF-7rtsYkItEKmE&m=f6inEm3Va_FOD7aAktkwQzEloGpAwmkwAjDzi1Okrck&s=DgEXkfu6VNZ1Wd56QoM8kMomlNJX2A725b6iRdMK-LI&e=


------------------------------

End of vtkusers Digest, Vol 167, Issue 11
*****************************************
-- WARNING - CONFIDENTIAL INFORMATION: The information contained in the e-mail may contain confidential and privileged information and is intended solely for the use of the intended recipient(s). Access for any review, re-transmission, dissemination or other use of, or taking of any action in regard and reliance upon this e-mail by persons or entities other than the intended recipient(s) is unauthorized and prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.


More information about the vtkusers mailing list