[vtkusers] How to resample RT Dose Grid pixel data with respect to a CT image?

abhishek abhishek at meddiff.com
Tue Oct 9 07:11:26 EDT 2012


But that will only result in changing location of structure. What about
difference in size?

On Tue, Oct 9, 2012 at 4:35 PM, Jothy [via VTK] <
ml-node+s1045678n5716551h88 at n5.nabble.com> wrote:

> VTKImageData's first pixel is on the lower left bottom, while the
> DICOM's first pixel is on the top left.
>
> Why can't you use vtkDICOMImageReader?
>
>
>
> On Tue, Oct 9, 2012 at 12:02 PM, Abhishek Gupta <[hidden email]<http://user/SendEmail.jtp?type=node&node=5716551&i=0>>
> wrote:
>
> > I am using python's VTK wrapper. Python's dicom library to read dicoms
> and
> > wxPython to display images.
> > Here's the code that I am using:
> > ****************************************************
> > dataArray = vtk.vtkUnsignedIntArray()
> > for pixel in grid.flat:
> >     dataArray.InsertNextValue(pixel)
> >
> > imageDataArray = vtk.vtkImageData()
> > imageDataArray.SetDimensions(no. of rows, no. of columns,1)
> > imageDataArray.SetSpacing(2.5,2.5,1)
> > imageDataArray.GetPointData().SetScalars(dataArray)
> > imageDataArray.Update()
> >
> > contours = vtk.vtkContourFilter()
> > contours.SetInput(imageDataArray)
> > contours.GenerateValues(1, level,level)
> > contours.Update()
> > ****************************************************************
> >
> >
> >
> >
> > On Tue, Oct 9, 2012 at 4:27 PM, Jothybasu Selvaraj <[hidden email]<http://user/SendEmail.jtp?type=node&node=5716551&i=1>>
>
> > wrote:
> >>
> >> If you are dealing with DICOM objects in vtk, make sure you are using
> >> "FileLowerLeftOn" in the vtk readers.
> >>
> >> Are you using vtkImageViewer2 for viewing the images?
> >>
> >>
> >>
> >> On Tue, Oct 9, 2012 at 11:48 AM, abhishek <[hidden email]<http://user/SendEmail.jtp?type=node&node=5716551&i=2>>
> wrote:
> >> > Hello Jothy,
> >> >
> >> > Red color structure is at the correct location, which is what I wish
> to
> >> > achieve. The structure generated by my code is displayed in blue
> color.
> >> >
> >> > Regards,
> >> > Abhishek Gupta
> >> >
> >> > -----Original Message-----
> >> > From: Jothybasu Selvaraj [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=5716551&i=3>]
>
> >> > Sent: Tuesday, October 09, 2012 2:44 PM
> >> > To: abhishek
> >> > Subject: Re: [vtkusers] How to resample RT Dose Grid pixel data with
> >> > respect
> >> > to a CT image?
> >> >
> >> > As far as I understand, even if you don't resample your dose grid
> still
> >> > it
> >> > should be overlaid properly (unless both have different frame of
> >> > reference).
> >> >
> >> > Could you send apicture of of you get?
> >> >
> >> > If required you could resample your dose grid using vtkImageResample
> and
> >> > don't forget to update the image attributes using
> >> > vtkImageChnageInformation!
> >> >
> >> > Jothy
> >> >
> >> >
> >> >
> >> > On Tue, Oct 9, 2012 at 7:30 AM, abhishek <[hidden email]<http://user/SendEmail.jtp?type=node&node=5716551&i=4>>
> wrote:
> >> >> Dear Users,
> >> >>
> >> >> I want to draw ISODOSE contours on a CT Image. To generate ISODOSE
> >> >> contours, I am using vtkContourFilter class.
> >> >> I am using RT DOSE Grid's pixel data to create vtkImageData and
> giving
> >> >> the resulting vtkImage as input to vtkContourFilter.
> >> >>
> >> >> My problem is that, the RT DOSE Grid's and CT image's pixel spacing
> >> >> and image patient position(IPP) are different. This result's in
> >> >> generation of wrong contour points.
> >> >>
> >> >> For reference IPP and Pixel spacing for CT and RT DOSE grid are:
> >> >> CT:    [-329.6, -319, -241.3], [1.2461, 1.2461]
> >> >> Dose: [-185.1, -180, -546.3], [2.5, 2.5]
> >> >>
> >> >> I have two questions here:
> >> >> 1. I am certainly sure that I will have to some how resample dose's
> >> >> pixel data to map on to CT image. How can I do this?
> >> >>
> >> >> 2. Will vtkImageResample class be useful? If yes, then how can I use
> >> >> this class. If no, then what other options do I have?
> >> >>
> >> >> Regards
> >> >> Abhishek.
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> http://vtk.1045678.n5.nabble.com/How-to-resample-RT-Dose-Grid-pixel-da
> >> >> ta-with-respect-to-a-CT-image-tp5716546.html
> >> >> Sent from the VTK - Users mailing list archive at Nabble.com.
> >> >> _______________________________________________
> >> >> 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
> >> >
> >> >
> >> >
> >> > --
> >> > Jothybasu Selvaraj
> >> > PhD Student
> >> > University of Liverpool
> >> > UK
> >>
> >>
> >>
> >> --
> >> Jothybasu Selvaraj
> >> PhD Student
> >> University of Liverpool
> >> UK
> >
> >
>
>
>
> --
> Jothybasu Selvaraj
> PhD Student
> University of Liverpool
> UK
> _______________________________________________
> 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
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://vtk.1045678.n5.nabble.com/How-to-resample-RT-Dose-Grid-pixel-data-with-respect-to-a-CT-image-tp5716546p5716551.html
>  To unsubscribe from How to resample RT Dose Grid pixel data with respect
> to a CT image?, click here<http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5716546&code=YWJoaXNoZWtAbWVkZGlmZi5jb218NTcxNjU0NnwxMzM4ODU0MTcx>
> .
> NAML<http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-resample-RT-Dose-Grid-pixel-data-with-respect-to-a-CT-image-tp5716546p5716552.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121009/f6df8588/attachment.htm>


More information about the vtkusers mailing list