[Rtk-users] Unable to Forward Project CT Volume With Correct Orientation
Andreas Andersen
andreasga22 at gmail.com
Tue May 26 07:15:45 EDT 2020
I'm happy to hear it worked!
I don't know the complete Varian pipeline for correction, there should in
addition to subtracting the bow-tie be something like a
calibration-chamber-based correction, but I have not figured out how to do
this (let me know if you do)
RTK does not have filters to take care of this (yet). It would be possible
to do, but you'd have to know which image in the calibration folder is the
correct one. (There may be several and I think they are named by the local
Varian engineers - not standardised)
I do a simple subtraction in my own OpenCL implementation, but looping
through projections, extracting 2D from 3D, and using the ITK subtraction
image filter would probably be simpler.
(*If I should find documentation from Varian describing this process with
some standard, I'll write it into the reader for Xim images. However, I'm
afraid their own solution might specific to each gantry or engineering team*
)
It could sound like you want to do the "a priori scatter correction", I've
implemented this for Varian based projections (hnd and xim), see:
gitlab.com/agravgaard/cbctrecon (The Develop branch should be preferred at
the moment)
The correction factor from the original Elekta implementation doesn't work
without a normalisation as mentioned above, so I'm doing some tricks to
ensure correctness of projection intensity for the subtraction, but I hope
to implement a solution/normalisation based on numbers from the machine
instead.
/Andreas
__________________________________
Andreas Gravgaard Andersen
Danish Center for Particle Therapy,
Aarhus University Hospital
Palle Juul-Jensens Blvd. 99,
8200, Aarhus
Mail: agravgaard at protonmail.com
Cell: +45 3165 8140
On Tue, 26 May 2020 at 12:37, Brani Rusanov <brani_rusanov at hotmail.com>
wrote:
> Hi Andreas,
>
> You are correct, I had failed to flip the y and z coordinates of the
> offset parameter in the header. I had thought that the transformmatrix
> would take care of this. Now the simulated projection looks as desired.
> Thank you!
>
> You mentioned the possibility of applying pre-processing on the CB
> projections for a bow-tie filter. Do you know what kind of pre-processing
> is available within RTK for bow-tie filters? I ask because I plan on
> subtracting the measured CBCT projections from the simulated CT-registered
> projections. However, the measured CBCT projections have the characteristic
> attenuation pattern on the left and right side of the image corresponding
> to a bow-tie filter. Can RTK remove these two regions of greater
> attenuation?
>
> Also, would you happen to know if rtkprojections, when converting the raw
> projection float values to attenuation, is compatible with Varian raw
> projection data? I ask this because the studies I have read that perform
> this procedure use Elekta projection data. The output attenuation values
> for my measured projection data in air region is about ~2 mm-1 after
> conversion with rtkprojections. Whereas, I previously converted the HU of
> the registered CT volume to attenuation using the formula: mu = (HU +
> 1024)/2^16 which shows air to be ~0.019mm-1 once forward projected.
>
> Thank you kindly for your advice,
> Brani
> ------------------------------
> *From:* Andreas Andersen <andreasga22 at gmail.com>
> *Sent:* Tuesday, 26 May 2020 4:51 PM
> *To:* Brani Rusanov <Brani_Rusanov at hotmail.com>
> *Cc:* rtk-users at public.kitware.com <rtk-users at public.kitware.com>
> *Subject:* Re: [Rtk-users] Unable to Forward Project CT Volume With
> Correct Orientation
>
> What do you more precisely mean by "The output projections do not look
> like the raw projections I have from the CBCT"
> Are they flipped, are they all black, are they much brighter or darker, or
> do they not align?
>
> If alignment: Consider if you need to sort the projections by gantry angle
> before visual comparison, the Xim reader just reads sequentially by the
> given regex, so a ProBeam CB (with two imagers) may interleave projections
> from different angles. This is unlikely to be a problem for a gantry with
> only one imager.
>
> If flipped or all black: Your transformation matrix looks correct to me,
> so I think the problem may be elsewhere.
> It's always a mess to figure out. Be careful, that when you flip axes
> manually like that that you also remember to flip offsets (origin),
> spacing, etc. accordingly.
> In particular orientation (directions), I can see it says RAI for
> "AnatomicalOrientation", but I think you'll need the "Orientation" tag with
> direction cosines if you want to specify the directions manually.
> https://itk.org/Wiki/ITK/MetaIO/Documentation#MetaObject_Tags
> <https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fitk.org%2FWiki%2FITK%2FMetaIO%2FDocumentation%23MetaObject_Tags&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220302299&sdata=2ZmsSExCABkVNp%2FB7i%2BdRO7avF4Ayt4i7bWNVM7VHn0%3D&reserved=0>
>
> All this being said, I would suggest to instead use ITK's readers and the
> built-in filters for image transformation if that's even necessary, to
> avoid the hell of trying to keep track of all these values manually.
>
> If intensity is darker or brighter: Check if you have preprocessed the CB
> projections correctly for bow-tie filter and the like.
>
> I hope this gives a hint to where the problem might be.
>
> /Andreas
>
> __________________________________
>
> Andreas Gravgaard Andersen
>
> Danish Center for Particle Therapy,
>
> Aarhus University Hospital
>
> Palle Juul-Jensens Blvd. 99,
>
> 8200, Aarhus
>
> Mail: agravgaard at protonmail.com
>
> Cell: +45 3165 8140
>
>
> On Tue, 26 May 2020 at 05:08, Brani Rusanov <Brani_Rusanov at hotmail.com>
> wrote:
>
> Hi all,
>
> I am attempting to forward project a CT volume (previously registered to a
> CBCT volume) using the geometry of a CBCT volume to generate raw
> projections. I also have access to the raw CBCT projections. I have used
> rktprojections to stack the raw CBCT projections and generate .mhd/raw
> files.
>
> Next, I used rtkvariabprobeamgeometry on the scan.xml file that came with
> the raw CBCT projections to generate a RTK compatible geometry.xml file.
>
> Next, I have stacked the registered CT dicoms into a .mhd/raw format. The
> trouble I'm having is creating the projections using rtkforwardprojections.
> Specifically, I cannot find the correct transformmatrix in the CT header to
> tell rtkforwardprojetions the conversion from DICOM to IEC geometry. The
> output projections do not look like the raw projections I have from the
> CBCT. This may be a stupid question, but I cannot figure it out. From my
> own estimation, the transformation should be 1 0 0 0 0 -1 0 1 0 based on
> this diagram (
> https://www.semanticscholar.org/paper/nuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray/1ec27be3617dfc4e03bba86dcd92db8f3323de21/figure/3
> <https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.semanticscholar.org%2Fpaper%2Fnuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray%2F1ec27be3617dfc4e03bba86dcd92db8f3323de21%2Ffigure%2F3&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220302299&sdata=38k6I1zbNt9Ztug3AEmqufJziS7RIeVS93bFlYmY8ms%3D&reserved=0>
>
> <https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.semanticscholar.org%2Fpaper%2Fnuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray%2F1ec27be3617dfc4e03bba86dcd92db8f3323de21%2Ffigure%2F3&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220312293&sdata=t5krH2%2BS8BqG%2BCQI0WAoV94cl95TBd3fQvqc8EUpv7I%3D&reserved=0>
> Figure 1.4 from nuclear science and technology Radiation Quantities and
> Units , Dose to the Patients , and Image Quality in Computed Tomography (
> CT ) ( RAD UNITS ) Author : | Semantic Scholar
> <https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.semanticscholar.org%2Fpaper%2Fnuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray%2F1ec27be3617dfc4e03bba86dcd92db8f3323de21%2Ffigure%2F3&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220312293&sdata=t5krH2%2BS8BqG%2BCQI0WAoV94cl95TBd3fQvqc8EUpv7I%3D&reserved=0>
> Figure 1.4 (left) The IEC patient coordinate system (the patient is lying
> in supine position); (right) transformation of coordinates between the IEC
> and DICOM coordinate systems [IEC, 2000] (cited in ICRU Report 71, 2004,
> page 35) - "nuclear science and technology Radiation Quantities and Units ,
> Dose to the Patients , and Image Quality in Computed Tomography ( CT ) (
> RAD UNITS ) Author :"
> www.semanticscholar.org
> <https://eur05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticscholar.org%2F&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220312293&sdata=O4e5uTw2FXYaR2smfbVaqhpGDxbR6N4p%2F6s6daZ8XXE%3D&reserved=0>
> )
>
> My questions are: Is this the correct transformmatrix to apply?
> Do I need to also change the offset values in order to get the correct
> projections?
> Could this have something to do with the fact that I am using variant data?
>
> The .mhd for the registered CT is:
> ObjectType = Image
> NDims = 3
> BinaryData = True
> BinaryDataByteOrderMSB = False
> CompressedData = False
> TransformMatrix = 1 0 0 0 0 -1 0 1 0
> Offset = -131.03451538085938 -131.03451538085938 -91.809638977050781
> CenterOfRotation = 0 0 0
> AnatomicalOrientation = RAI
> ElementSpacing = 0.51285523409720002 0.51285523409720002 1.9958648681640625
> DimSize = 512 512 93
> ElementType = MET_DOUBLE
> ElementDataFile = CIRS_6A.raw
>
> Similarly, the .mhd for the raw CBCT projections is:
> ObjectType = Image
> NDims = 3
> BinaryData = True
> BinaryDataByteOrderMSB = False
> CompressedData = False
> TransformMatrix = 1 0 0 0 1 0 0 0 1
> Offset = -198.46200000000002 -148.798 0
> CenterOfRotation = 0 0 0
> AnatomicalOrientation = RAI
> ElementSpacing = 0.38800000000000001 0.38800000000000001 1
> DimSize = 1024 768 501
> ElementType = MET_FLOAT
> ElementDataFile = CIRS_6A_SCGH_P.raw
>
> Thank you kindly for your response,
> Brani
>
> _______________________________________________
> Rtk-users mailing list
> Rtk-users at public.kitware.com
> https://public.kitware.com/mailman/listinfo/rtk-users
> <https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Frtk-users&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220322282&sdata=rEtT1yvJkExK7XBd9vaVFqdBI%2F%2FY8UtNwE80AP5BaGU%3D&reserved=0>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/rtk-users/attachments/20200526/56414f91/attachment-0001.htm>
More information about the Rtk-users
mailing list