From lotte.schyns at maastro.nl Fri Mar 3 08:39:12 2017 From: lotte.schyns at maastro.nl (Lotte Schyns) Date: Fri, 3 Mar 2017 13:39:12 +0000 Subject: [Rtk-users] I0EstimationProjectionFilter Message-ID: Hello, I would like to set the maximum pixel value in rtk::I0EstimationProjectionFilter to (2^32)-1 since I have (unsigned) pixels of 4 bytes each. However, the input for SetMaxPixelValue requires an unsigned short, so I can only set a maximum value of (2^16)-1, which is not enough. Is there a possible solution/workaround for this? Could you also tell me what the bitShift represents in rtk::I0EstimationProjectionFilter? Thanks in advance. Lotte From simon.rit at creatis.insa-lyon.fr Sat Mar 4 05:25:17 2017 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 4 Mar 2017 11:25:17 +0100 Subject: [Rtk-users] I0EstimationProjectionFilter In-Reply-To: References: Message-ID: Hi Lotte, This code has only be used for unsigned short. I guess you should replace all "unsigned short" in the two code files by InputImagePixelType which is already defined in the header. I would also advise a code review, for example 16 line 33 of rtkI0EstimationProjectionFilter.hxx should be replace by std::numeric_limits ::digits. I0EstimationProjectionFilter is based on a histogram analysis. Using 2^16 bins for unsigned shorts or 2^32 for unsigned int is too large so bitShift is used to reduce the number of bins to, e.g., for unsigned shorts, 2^(16-bitShift) bins. If you can't figure it out, let us know. If you do, please share your dev! Thanks, Simon On Fri, Mar 3, 2017 at 2:39 PM, Lotte Schyns wrote: > Hello, > > I would like to set the maximum pixel value in > rtk::I0EstimationProjectionFilter to (2^32)-1 since I have (unsigned) > pixels of 4 bytes each. However, the input for SetMaxPixelValue requires > an unsigned short, so I can only set a maximum value of (2^16)-1, which > is not enough. Is there a possible solution/workaround for this? Could > you also tell me what the bitShift represents in > rtk::I0EstimationProjectionFilter? Thanks in advance. > > Lotte > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lotte.schyns at maastro.nl Mon Mar 6 07:02:48 2017 From: lotte.schyns at maastro.nl (Lotte Schyns) Date: Mon, 6 Mar 2017 12:02:48 +0000 Subject: [Rtk-users] I0EstimationProjectionFilter In-Reply-To: References: Message-ID: <7730b179-f457-5829-c20b-c3257a74bbf3@maastro.nl> Hello Simon, Thanks for the quick response. I made some changes and sent you a pull request. However, because of the changes I made, I'm now having some problems in rtk::LUTbasedVariableI0RawToAttenuationImageFilter::BeforeThreadedGenerateData(). I tried to solve it using typename, but it seems to be unsuccessful. Could you please have a look? The I0EstimationProjectionFilter seems to work now. Lotte On 04-03-17 11:25, Simon Rit wrote: Hi Lotte, This code has only be used for unsigned short. I guess you should replace all "unsigned short" in the two code files by InputImagePixelType which is already defined in the header. I would also advise a code review, for example 16 line 33 of rtkI0EstimationProjectionFilter.hxx should be replace by std::numeric_limits::digits. I0EstimationProjectionFilter is based on a histogram analysis. Using 2^16 bins for unsigned shorts or 2^32 for unsigned int is too large so bitShift is used to reduce the number of bins to, e.g., for unsigned shorts, 2^(16-bitShift) bins. If you can't figure it out, let us know. If you do, please share your dev! Thanks, Simon On Fri, Mar 3, 2017 at 2:39 PM, Lotte Schyns > wrote: Hello, I would like to set the maximum pixel value in rtk::I0EstimationProjectionFilter to (2^32)-1 since I have (unsigned) pixels of 4 bytes each. However, the input for SetMaxPixelValue requires an unsigned short, so I can only set a maximum value of (2^16)-1, which is not enough. Is there a possible solution/workaround for this? Could you also tell me what the bitShift represents in rtk::I0EstimationProjectionFilter? Thanks in advance. Lotte _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Tue Mar 7 16:38:48 2017 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 7 Mar 2017 22:38:48 +0100 Subject: [Rtk-users] I0EstimationProjectionFilter In-Reply-To: <7730b179-f457-5829-c20b-c3257a74bbf3@maastro.nl> References: <7730b179-f457-5829-c20b-c3257a74bbf3@maastro.nl> Message-ID: Hi Lotte, You had removed the default templates, which was the cause of the compilation problem. I have fixed it and put the change in a new branch: https://github.com/SimonRit/RTK/tree/Lotte1990-patch I'll merge tomorrow if the tests pass. Thanks for the work, Simon On Mon, Mar 6, 2017 at 1:02 PM, Lotte Schyns wrote: > Hello Simon, > > Thanks for the quick response. I made some changes and sent you a pull > request. However, because of the changes I made, I'm now having some > problems in rtk::LUTbasedVariableI0RawToAttenuationImageFilter::BeforeThreadedGenerateData(). > I tried to solve it using typename, but it seems to be unsuccessful. Could > you please have a look? The I0EstimationProjectionFilter seems to work now. > > Lotte > > > On 04-03-17 11:25, Simon Rit wrote: > > Hi Lotte, > This code has only be used for unsigned short. I guess you should replace > all "unsigned short" in the two code files by InputImagePixelType which is > already defined in the header. I would also advise a code review, for > example 16 line 33 of rtkI0EstimationProjectionFilter.hxx should be > replace by std::numeric_limits > PixelType>::digits. > I0EstimationProjectionFilter is based on a histogram analysis. Using 2^16 > bins for unsigned shorts or 2^32 for unsigned int is too large so bitShift > is used to reduce the number of bins to, e.g., for unsigned shorts, > 2^(16-bitShift) bins. > If you can't figure it out, let us know. If you do, please share your dev! > Thanks, > Simon > > On Fri, Mar 3, 2017 at 2:39 PM, Lotte Schyns > wrote: > >> Hello, >> >> I would like to set the maximum pixel value in >> rtk::I0EstimationProjectionFilter to (2^32)-1 since I have (unsigned) >> pixels of 4 bytes each. However, the input for SetMaxPixelValue requires >> an unsigned short, so I can only set a maximum value of (2^16)-1, which >> is not enough. Is there a possible solution/workaround for this? Could >> you also tell me what the bitShift represents in >> rtk::I0EstimationProjectionFilter? Thanks in advance. >> >> Lotte >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lotte.schyns at maastro.nl Wed Mar 8 06:03:14 2017 From: lotte.schyns at maastro.nl (Lotte Schyns) Date: Wed, 8 Mar 2017 11:03:14 +0000 Subject: [Rtk-users] I0EstimationProjectionFilter In-Reply-To: References: <7730b179-f457-5829-c20b-c3257a74bbf3@maastro.nl> Message-ID: <7a22d419-be41-8f2f-b0f7-956cc3bc80d8@maastro.nl> Hello Simon, Thanks for fixing it. The reason I removed the default templates was because there were unsigned shorts in the default templates and for an instance of the I0EstimationProjectionFilter class in rtk::LUTbasedVariableI0RawToAttenuationImageFilter::BeforeThreadedGenerateData(), only TInputImage is defined, so I wanted to prevent some undesired unsigned shorts to show up there because of the default templates. Do you think LUTbasedVariableI0RawToAttenuationImageFilter can now also handle unsigned ints in BeforeThreadedGenerateData, even with the default templates? I wasn't sure, so I deleted them. Lotte On 07-03-17 22:38, Simon Rit wrote: Hi Lotte, You had removed the default templates, which was the cause of the compilation problem. I have fixed it and put the change in a new branch: https://github.com/SimonRit/RTK/tree/Lotte1990-patch I'll merge tomorrow if the tests pass. Thanks for the work, Simon On Mon, Mar 6, 2017 at 1:02 PM, Lotte Schyns > wrote: Hello Simon, Thanks for the quick response. I made some changes and sent you a pull request. However, because of the changes I made, I'm now having some problems in rtk::LUTbasedVariableI0RawToAttenuationImageFilter::BeforeThreadedGenerateData(). I tried to solve it using typename, but it seems to be unsuccessful. Could you please have a look? The I0EstimationProjectionFilter seems to work now. Lotte On 04-03-17 11:25, Simon Rit wrote: Hi Lotte, This code has only be used for unsigned short. I guess you should replace all "unsigned short" in the two code files by InputImagePixelType which is already defined in the header. I would also advise a code review, for example 16 line 33 of rtkI0EstimationProjectionFilter.hxx should be replace by std::numeric_limits::digits. I0EstimationProjectionFilter is based on a histogram analysis. Using 2^16 bins for unsigned shorts or 2^32 for unsigned int is too large so bitShift is used to reduce the number of bins to, e.g., for unsigned shorts, 2^(16-bitShift) bins. If you can't figure it out, let us know. If you do, please share your dev! Thanks, Simon On Fri, Mar 3, 2017 at 2:39 PM, Lotte Schyns > wrote: Hello, I would like to set the maximum pixel value in rtk::I0EstimationProjectionFilter to (2^32)-1 since I have (unsigned) pixels of 4 bytes each. However, the input for SetMaxPixelValue requires an unsigned short, so I can only set a maximum value of (2^16)-1, which is not enough. Is there a possible solution/workaround for this? Could you also tell me what the bitShift represents in rtk::I0EstimationProjectionFilter? Thanks in advance. Lotte _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Mar 8 07:23:26 2017 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 8 Mar 2017 13:23:26 +0100 Subject: [Rtk-users] I0EstimationProjectionFilter In-Reply-To: <7a22d419-be41-8f2f-b0f7-956cc3bc80d8@maastro.nl> References: <7730b179-f457-5829-c20b-c3257a74bbf3@maastro.nl> <7a22d419-be41-8f2f-b0f7-956cc3bc80d8@maastro.nl> Message-ID: Hi, Yes, you need to modify it, add the TOutputImageType to overwrite the default line 80 of rtkLUTbasedVariableI0RawToAttenuationImageFilter.hxx . But note that bitshift 2 (the default) seems small to me for unsigned int because your histogram will be 8 GB. You probably want to test different bitshifts in this function and use a larger one for int. Actually, you'll also have a similarly huge lookup table. Have you considered casting your projections to unsigned short for the I0 estimation? Simon On Wed, Mar 8, 2017 at 12:03 PM, Lotte Schyns wrote: > Hello Simon, > > Thanks for fixing it. The reason I removed the default templates was > because there were unsigned shorts in the default templates and for an > instance of the I0EstimationProjectionFilter class in rtk:: > LUTbasedVariableI0RawToAttenuationImageFilter::BeforeThreadedGenerateData(), > only TInputImage is defined, so I wanted to prevent some undesired unsigned > shorts to show up there because of the default templates. Do you think > LUTbasedVariableI0RawToAttenuationImageFilter can now also handle > unsigned ints in BeforeThreadedGenerateData, even with the default > templates? I wasn't sure, so I deleted them. > > Lotte > > On 07-03-17 22:38, Simon Rit wrote: > > Hi Lotte, > You had removed the default templates, which was the cause of the > compilation problem. I have fixed it and put the change in a new branch: > https://github.com/SimonRit/RTK/tree/Lotte1990-patch > I'll merge tomorrow if the tests pass. > Thanks for the work, > Simon > > On Mon, Mar 6, 2017 at 1:02 PM, Lotte Schyns > wrote: > >> Hello Simon, >> >> Thanks for the quick response. I made some changes and sent you a pull >> request. However, because of the changes I made, I'm now having some >> problems in rtk::LUTbasedVariableI0RawToAttenuationImageFilter::BeforeThreadedGenerateData(). >> I tried to solve it using typename, but it seems to be unsuccessful. Could >> you please have a look? The I0EstimationProjectionFilter seems to work now. >> >> Lotte >> >> >> On 04-03-17 11:25, Simon Rit wrote: >> >> Hi Lotte, >> This code has only be used for unsigned short. I guess you should replace >> all "unsigned short" in the two code files by InputImagePixelType which is >> already defined in the header. I would also advise a code review, for >> example 16 line 33 of rtkI0EstimationProjectionFilter.hxx should be >> replace by std::numeric_limits >> > PixelType>::digits. >> I0EstimationProjectionFilter is based on a histogram analysis. Using 2^16 >> bins for unsigned shorts or 2^32 for unsigned int is too large so bitShift >> is used to reduce the number of bins to, e.g., for unsigned shorts, >> 2^(16-bitShift) bins. >> If you can't figure it out, let us know. If you do, please share your dev! >> Thanks, >> Simon >> >> On Fri, Mar 3, 2017 at 2:39 PM, Lotte Schyns >> wrote: >> >>> Hello, >>> >>> I would like to set the maximum pixel value in >>> rtk::I0EstimationProjectionFilter to (2^32)-1 since I have (unsigned) >>> pixels of 4 bytes each. However, the input for SetMaxPixelValue requires >>> an unsigned short, so I can only set a maximum value of (2^16)-1, which >>> is not enough. Is there a possible solution/workaround for this? Could >>> you also tell me what the bitShift represents in >>> rtk::I0EstimationProjectionFilter? Thanks in advance. >>> >>> Lotte >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lotte.schyns at maastro.nl Thu Mar 9 09:36:19 2017 From: lotte.schyns at maastro.nl (Lotte Schyns) Date: Thu, 9 Mar 2017 14:36:19 +0000 Subject: [Rtk-users] I0EstimationProjectionFilter In-Reply-To: References: <7730b179-f457-5829-c20b-c3257a74bbf3@maastro.nl> <7a22d419-be41-8f2f-b0f7-956cc3bc80d8@maastro.nl> Message-ID: <31f39215-ec93-303e-5ce1-6e92f0f308c6@maastro.nl> Hello Simon, That is exactly what I'm doing now, I just wanted to see if using the full depth of the image gives a better result. I sent you a pull request for an updated version of rtkLUTbasedVariableI0RawToAttenuationImageFilter.hxx. At least now the users can decide for themselves which data type they want to use. Thanks again for your help :) Lotte On 08-03-17 13:23, Simon Rit wrote: Hi, Yes, you need to modify it, add the TOutputImageType to overwrite the default line 80 of rtkLUTbasedVariableI0RawToAttenuationImageFilter.hxx. But note that bitshift 2 (the default) seems small to me for unsigned int because your histogram will be 8 GB. You probably want to test different bitshifts in this function and use a larger one for int. Actually, you'll also have a similarly huge lookup table. Have you considered casting your projections to unsigned short for the I0 estimation? Simon On Wed, Mar 8, 2017 at 12:03 PM, Lotte Schyns > wrote: Hello Simon, Thanks for fixing it. The reason I removed the default templates was because there were unsigned shorts in the default templates and for an instance of the I0EstimationProjectionFilter class in rtk::LUTbasedVariableI0RawToAttenuationImageFilter::BeforeThreadedGenerateData(), only TInputImage is defined, so I wanted to prevent some undesired unsigned shorts to show up there because of the default templates. Do you think LUTbasedVariableI0RawToAttenuationImageFilter can now also handle unsigned ints in BeforeThreadedGenerateData, even with the default templates? I wasn't sure, so I deleted them. Lotte On 07-03-17 22:38, Simon Rit wrote: Hi Lotte, You had removed the default templates, which was the cause of the compilation problem. I have fixed it and put the change in a new branch: https://github.com/SimonRit/RTK/tree/Lotte1990-patch I'll merge tomorrow if the tests pass. Thanks for the work, Simon On Mon, Mar 6, 2017 at 1:02 PM, Lotte Schyns > wrote: Hello Simon, Thanks for the quick response. I made some changes and sent you a pull request. However, because of the changes I made, I'm now having some problems in rtk::LUTbasedVariableI0RawToAttenuationImageFilter::BeforeThreadedGenerateData(). I tried to solve it using typename, but it seems to be unsuccessful. Could you please have a look? The I0EstimationProjectionFilter seems to work now. Lotte On 04-03-17 11:25, Simon Rit wrote: Hi Lotte, This code has only be used for unsigned short. I guess you should replace all "unsigned short" in the two code files by InputImagePixelType which is already defined in the header. I would also advise a code review, for example 16 line 33 of rtkI0EstimationProjectionFilter.hxx should be replace by std::numeric_limits::digits. I0EstimationProjectionFilter is based on a histogram analysis. Using 2^16 bins for unsigned shorts or 2^32 for unsigned int is too large so bitShift is used to reduce the number of bins to, e.g., for unsigned shorts, 2^(16-bitShift) bins. If you can't figure it out, let us know. If you do, please share your dev! Thanks, Simon On Fri, Mar 3, 2017 at 2:39 PM, Lotte Schyns > wrote: Hello, I would like to set the maximum pixel value in rtk::I0EstimationProjectionFilter to (2^32)-1 since I have (unsigned) pixels of 4 bytes each. However, the input for SetMaxPixelValue requires an unsigned short, so I can only set a maximum value of (2^16)-1, which is not enough. Is there a possible solution/workaround for this? Could you also tell me what the bitShift represents in rtk::I0EstimationProjectionFilter? Thanks in advance. Lotte _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From shang_hj at hotmail.com Wed Mar 15 22:11:24 2017 From: shang_hj at hotmail.com (=?gb2312?B?ycwguuq93A==?=) Date: Thu, 16 Mar 2017 02:11:24 +0000 Subject: [Rtk-users] Varian's *.seq filetype Message-ID: Hello RTK?s users, Is there anybody using Varian?s *.seq filetype to finish reconstruction? Are you converting the *.seq file into a series *.tiff or using the *.seq file directly? Can anyone give me some tips about this question? Thanks in advance. Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: From prekrasnaya1985 at gmail.com Thu Mar 23 06:14:25 2017 From: prekrasnaya1985 at gmail.com (Julia Semyakishkina) Date: Thu, 23 Mar 2017 16:14:25 +0600 Subject: [Rtk-users] using rtk in matlab : input images for filters from matlab data types Message-ID: Hello. In matlab example from http://wiki.openrtk.org/index.php/SimpleRTK volume which is projected generates in SheppLoganPhantomFilter(). But i have my own volume, that is stored in matlab regular matrix for example. What i want to do: forward = py.JosephForwardProjectionImageFilter(); forward.SetGeometry(g); projs = forward.Execute(projs, volume); The problem is to initialize the volume parameter. By this code data_size = size(matimg); transpose = matimg'; result=py.numpy.reshape(transpose(:)', int32(data_size)); volume = py.Image.fromarray(result); i store volume in type of py.Image, but in Execute() method i have to pass py.SimpleRTK.SimpleRTK.Image type. So, is there way to do such convertation ? Or is there some another way to init py.SimpleRTK.SimpleRTK.Image with my own matlab data ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Mar 23 13:01:18 2017 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 23 Mar 2017 18:01:18 +0100 Subject: [Rtk-users] using rtk in matlab : input images for filters from matlab data types In-Reply-To: References: Message-ID: Hi Julia, I would have used volume = py.GetImageFromArray(result) instead of your last line. Does this work? If it does, then you have to be sure that you set correctly the origin, spacing and direction (the ITK meta information). One way to do this if you already have an image with the correct meta information would be to use py.volume.CopyInformation(volume) Simon On Thu, Mar 23, 2017 at 11:14 AM, Julia Semyakishkina wrote: > Hello. > In matlab example from http://wiki.openrtk.org/index.php/SimpleRTK volume > which is projected generates in SheppLoganPhantomFilter(). But i have my own > volume, that is stored in matlab regular matrix for example. > > What i want to do: > forward = py.JosephForwardProjectionImageFilter(); > forward.SetGeometry(g); > projs = forward.Execute(projs, volume); > > The problem is to initialize the volume parameter. > By this code > data_size = size(matimg); > transpose = matimg'; > result=py.numpy.reshape(transpose(:)', int32(data_size)); > volume = py.Image.fromarray(result); > > i store volume in type of py.Image, but in Execute() method i have to pass > py.SimpleRTK.SimpleRTK.Image type. So, is there way to do such convertation > ? Or is there some another way to init py.SimpleRTK.SimpleRTK.Image with my > own matlab data ? > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From shang_hj at hotmail.com Thu Mar 23 21:31:00 2017 From: shang_hj at hotmail.com (=?gb2312?B?ycwguuq93A==?=) Date: Fri, 24 Mar 2017 01:31:00 +0000 Subject: [Rtk-users] About CR(Computed Radiography) Message-ID: Hi, Are there any classes of Computed Radiography in RTK? I do preciate if someone can give me some hints! Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: From prekrasnaya1985 at gmail.com Fri Mar 24 04:16:58 2017 From: prekrasnaya1985 at gmail.com (Julia Semyakishkina) Date: Fri, 24 Mar 2017 14:16:58 +0600 Subject: [Rtk-users] using rtk in matlab : input images for filters from matlab data types In-Reply-To: References: Message-ID: thanks for the fast reply. Oops, it seems i missed that there is a backward operation of GetArrayFromImage, i.e. GetImageFromArray.. However, forward still doesn't work for me. This example code % geometry g = py.SimpleRTK.ThreeDCircularProjectionGeometry(); for i=0:359, g.AddProjection(500,1000,i); end % what projects cube1 = zeros(128,128,128); cube = single(cube1); cube(17:112,17:112,17:112) = 1; cube(33:96,33:96,33:96) = 0; data_size = size(cube); result = py.numpy.reshape(cube(:)', int32(fliplr(size(transpose)))); volume = py.SimpleRTK.GetImageFromArray(result); const = py.SimpleRTK.ConstantImageSource(); const.SetSpacing(py.list([1,1,1])); const.SetSize(py.list(int32(data_size))); const.SetOrigin(py.list([-64.5,-64.5,-64.5])); volume_meta = const.Execute(); volume.CopyInformation(volume_meta); % projections const2 = py.SimpleRTK.ConstantImageSource(); const2.SetSpacing(py.list([1,1,1])); const2.SetSize(py.list(int32([512,1,360]))); const2.SetOrigin(py.list([-255.5,0,0])); proj = const2.Execute(); % forward forward = py.SimpleRTK.JosephForwardProjectionImageFilter(); forward.SetGeometry(g); proj = forward.Execute(proj, img); caused the following error : Error using SimpleRTK>Execute (line 6218) Python Error: RuntimeError: Exception thrown in SimpleRTK JosephForwardProjectionImageFilter_Execute: $RTK_BUILD$/SimpleRTK-build/Code/BasicFilters/src/srtkJosephForwardProjectionImageFilter.cxx:100: srtk::ERROR: Image2 for JosephForwardProjectionImageFilter doesnt match type or dimension! I tried different types of cube, but with no success. On Thu, Mar 23, 2017 at 11:01 PM, Simon Rit wrote: > Hi Julia, > I would have used > volume = py.GetImageFromArray(result) > instead of your last line. Does this work? If it does, then you have > to be sure that you set correctly the origin, spacing and direction > (the ITK meta information). One way to do this if you already have an > image with the correct meta information would be to use > py.volume.CopyInformation(volume) > Simon > > On Thu, Mar 23, 2017 at 11:14 AM, Julia Semyakishkina > wrote: > > Hello. > > In matlab example from http://wiki.openrtk.org/index.php/SimpleRTK > volume > > which is projected generates in SheppLoganPhantomFilter(). But i have my > own > > volume, that is stored in matlab regular matrix for example. > > > > What i want to do: > > forward = py.JosephForwardProjectionImageFilter(); > > forward.SetGeometry(g); > > projs = forward.Execute(projs, volume); > > > > The problem is to initialize the volume parameter. > > By this code > > data_size = size(matimg); > > transpose = matimg'; > > result=py.numpy.reshape(transpose(:)', int32(data_size)); > > volume = py.Image.fromarray(result); > > > > i store volume in type of py.Image, but in Execute() method i have to > pass > > py.SimpleRTK.SimpleRTK.Image type. So, is there way to do such > convertation > > ? Or is there some another way to init py.SimpleRTK.SimpleRTK.Image with > my > > own matlab data ? > > > > > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at public.kitware.com > > http://public.kitware.com/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Fri Mar 24 04:54:39 2017 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 24 Mar 2017 09:54:39 +0100 Subject: [Rtk-users] About CR(Computed Radiography) In-Reply-To: References: Message-ID: <0cb37118-c355-6845-d9ff-2428cec1405b@creatis.insa-lyon.fr> Hi Sam, I think you need to ask a more precise question. RTK is primarily a tomography toolkit, but contains some pre-processing methods that might suit your needs. Can you describe what you are trying to do ? Cyril On 24/03/2017 02:31, ? ?? wrote: > > Hi, > > Are there any classes of Computed Radiography in RTK? I do preciate > if someone can give me some hints! > > > Sam > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Mar 24 05:32:10 2017 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 24 Mar 2017 10:32:10 +0100 Subject: [Rtk-users] using rtk in matlab : input images for filters from matlab data types In-Reply-To: References: Message-ID: Hi, SimpleRTK is compiled in single precision and Matlab uses double precision by default. So you need to do volume = py.SimpleRTK.GetImageFromArray(result.astype(py.numpy.float32)); A few remarks on your program: - there is a transpose that I renamed to cube, - you create volume_meta just to copy information from it, I think you can directly set information to volume, - there is a typo at the end, volume should be used instead of img. Your modified example is attached. Simon On Fri, Mar 24, 2017 at 9:16 AM, Julia Semyakishkina wrote: > thanks for the fast reply. > > Oops, it seems i missed that there is a backward operation of > GetArrayFromImage, i.e. GetImageFromArray.. > However, forward still doesn't work for me. > This example code > > % geometry > g = py.SimpleRTK.ThreeDCircularProjectionGeometry(); > for i=0:359, > g.AddProjection(500,1000,i); > end > > % what projects > cube1 = zeros(128,128,128); > cube = single(cube1); > > cube(17:112,17:112,17:112) = 1; > cube(33:96,33:96,33:96) = 0; > > data_size = size(cube); > result = py.numpy.reshape(cube(:)', int32(fliplr(size(transpose)))); > volume = py.SimpleRTK.GetImageFromArray(result); > > const = py.SimpleRTK.ConstantImageSource(); > const.SetSpacing(py.list([1,1,1])); > const.SetSize(py.list(int32(data_size))); > const.SetOrigin(py.list([-64.5,-64.5,-64.5])); > volume_meta = const.Execute(); > > volume.CopyInformation(volume_meta); > > % projections > > const2 = py.SimpleRTK.ConstantImageSource(); > const2.SetSpacing(py.list([1,1,1])); > const2.SetSize(py.list(int32([512,1,360]))); > const2.SetOrigin(py.list([-255.5,0,0])); > proj = const2.Execute(); > > % forward > > forward = py.SimpleRTK.JosephForwardProjectionImageFilter(); > forward.SetGeometry(g); > proj = forward.Execute(proj, img); > > caused the following error : > Error using SimpleRTK>Execute (line 6218) > Python Error: RuntimeError: Exception thrown in SimpleRTK > JosephForwardProjectionImageFilter_Execute: > $RTK_BUILD$/SimpleRTK-build/Code/BasicFilters/src/srtkJosephForwardProjectionImageFilter.cxx:100: > srtk::ERROR: Image2 for JosephForwardProjectionImageFilter doesnt match type > or dimension! > > I tried different types of cube, but with no success. > > > On Thu, Mar 23, 2017 at 11:01 PM, Simon Rit > wrote: >> >> Hi Julia, >> I would have used >> volume = py.GetImageFromArray(result) >> instead of your last line. Does this work? If it does, then you have >> to be sure that you set correctly the origin, spacing and direction >> (the ITK meta information). One way to do this if you already have an >> image with the correct meta information would be to use >> py.volume.CopyInformation(volume) >> Simon >> >> On Thu, Mar 23, 2017 at 11:14 AM, Julia Semyakishkina >> wrote: >> > Hello. >> > In matlab example from http://wiki.openrtk.org/index.php/SimpleRTK >> > volume >> > which is projected generates in SheppLoganPhantomFilter(). But i have my >> > own >> > volume, that is stored in matlab regular matrix for example. >> > >> > What i want to do: >> > forward = py.JosephForwardProjectionImageFilter(); >> > forward.SetGeometry(g); >> > projs = forward.Execute(projs, volume); >> > >> > The problem is to initialize the volume parameter. >> > By this code >> > data_size = size(matimg); >> > transpose = matimg'; >> > result=py.numpy.reshape(transpose(:)', int32(data_size)); >> > volume = py.Image.fromarray(result); >> > >> > i store volume in type of py.Image, but in Execute() method i have to >> > pass >> > py.SimpleRTK.SimpleRTK.Image type. So, is there way to do such >> > convertation >> > ? Or is there some another way to init py.SimpleRTK.SimpleRTK.Image with >> > my >> > own matlab data ? >> > >> > >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at public.kitware.com >> > http://public.kitware.com/mailman/listinfo/rtk-users >> > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: test.m Type: application/octet-stream Size: 836 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Fri Mar 24 05:33:30 2017 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 24 Mar 2017 10:33:30 +0100 Subject: [Rtk-users] About CR(Computed Radiography) In-Reply-To: <0cb37118-c355-6845-d9ff-2428cec1405b@creatis.insa-lyon.fr> References: <0cb37118-c355-6845-d9ff-2428cec1405b@creatis.insa-lyon.fr> Message-ID: Hi, If you mean Digitally Reconstructed Radiograph (DRR), this is what is called forward projection in RTK. See e.g. http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection Simon On Fri, Mar 24, 2017 at 9:54 AM, Cyril Mory wrote: > Hi Sam, > > > I think you need to ask a more precise question. RTK is primarily a > tomography toolkit, but contains some pre-processing methods that might > suit your needs. > > Can you describe what you are trying to do ? > > > Cyril > > On 24/03/2017 02:31, ? ?? wrote: > > Hi, > > Are there any classes of Computed Radiography in RTK? I do preciate > if someone can give me some hints! > > > Sam > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lotte.schyns at maastro.nl Fri Mar 24 07:29:32 2017 From: lotte.schyns at maastro.nl (Lotte Schyns) Date: Fri, 24 Mar 2017 11:29:32 +0000 Subject: [Rtk-users] Cupping Correction Coefficients Message-ID: <724e11a8-bf1b-7842-9334-b9990f167d07@maastro.nl> Hello, Does anyone have a piece code (doesn't have to be in C++) that can fit the coefficients for the cupping correction in rtk::WaterPrecorrectionImageFilter? Lotte From shang_hj at hotmail.com Fri Mar 24 22:48:28 2017 From: shang_hj at hotmail.com (=?gb2312?B?ycwguuq93A==?=) Date: Sat, 25 Mar 2017 02:48:28 +0000 Subject: [Rtk-users] =?gb2312?b?tPC4tDogIEFib3V0IENSKENvbXB1dGVkIFJhZGlv?= =?gb2312?b?Z3JhcGh5KQ==?= In-Reply-To: References: <0cb37118-c355-6845-d9ff-2428cec1405b@creatis.insa-lyon.fr>, Message-ID: Thanks Simon and Cyril, I apoIogize for my confused question. I want to get a Radiofluoroscopic image rather than a Tomographic one from a phatom under certain angle. Is it possible to achieve this aim using RTK? ________________________________ ???: simon.rit at gmail.com ?? Simon Rit ????: 2017?3?24? 17:33 ???: Cyril Mory ??: ? ??; rtk-users at public.kitware.com ??: Re: [Rtk-users] About CR(Computed Radiography) Hi, If you mean Digitally Reconstructed Radiograph (DRR), this is what is called forward projection in RTK. See e.g. http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection RTK/Scripts/ForwardProjection - Openrtk wiki.openrtk.org Note that the original file is in Hounsfield units which explains the negative values in the projection images since, e.g., the attenuation of air is -1000 HU. Simon On Fri, Mar 24, 2017 at 9:54 AM, Cyril Mory > wrote: Hi Sam, I think you need to ask a more precise question. RTK is primarily a tomography toolkit, but contains some pre-processing methods that might suit your needs. Can you describe what you are trying to do ? Cyril On 24/03/2017 02:31, ? ?? wrote: Hi, Are there any classes of Computed Radiography in RTK? I do preciate if someone can give me some hints! Sam _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Sat Mar 25 10:26:15 2017 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sat, 25 Mar 2017 15:26:15 +0100 Subject: [Rtk-users] =?utf-8?b?562U5aSNOiAgQWJvdXQgQ1IoQ29tcHV0ZWQgUmFk?= =?utf-8?q?iography=29?= In-Reply-To: References: <0cb37118-c355-6845-d9ff-2428cec1405b@creatis.insa-lyon.fr> Message-ID: Hi, This page illustrates how to project (or compute radiographs) of a phantom: http://wiki.openrtk.org/index.php/RTK/Scripts/FDK Simon On Sat, Mar 25, 2017 at 3:48 AM, ? ?? wrote: > Thanks Simon and Cyril, > > I apoIogize for my confused question. I want to get a Radiofluoroscopic > image rather than a Tomographic one from a phatom under certain angle. Is > it possible to achieve this aim using RTK? > > > ------------------------------ > *???:* simon.rit at gmail.com ?? Simon Rit < > simon.rit at creatis.insa-lyon.fr> > *????:* 2017?3?24? 17:33 > *???:* Cyril Mory > *??:* ? ??; rtk-users at public.kitware.com > *??:* Re: [Rtk-users] About CR(Computed Radiography) > > Hi, > If you mean Digitally Reconstructed Radiograph (DRR), this is what is > called forward projection in RTK. See e.g. > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > RTK/Scripts/ForwardProjection - Openrtk > > wiki.openrtk.org > Note that the original file is in Hounsfield units which explains the > negative values in the projection images since, e.g., the attenuation of > air is -1000 HU. > > > Simon > > On Fri, Mar 24, 2017 at 9:54 AM, Cyril Mory fr> wrote: > >> Hi Sam, >> >> >> I think you need to ask a more precise question. RTK is primarily a >> tomography toolkit, but contains some pre-processing methods that might >> suit your needs. >> >> Can you describe what you are trying to do ? >> >> >> Cyril >> >> On 24/03/2017 02:31, ? ?? wrote: >> >> Hi, >> >> Are there any classes of Computed Radiography in RTK? I do preciate >> if someone can give me some hints! >> >> >> Sam >> >> >> _______________________________________________ >> Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Sun Mar 26 05:36:13 2017 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 26 Mar 2017 11:36:13 +0200 Subject: [Rtk-users] Cupping Correction Coefficients In-Reply-To: <724e11a8-bf1b-7842-9334-b9990f167d07@maastro.nl> References: <724e11a8-bf1b-7842-9334-b9990f167d07@maastro.nl> Message-ID: Hi Lotte, I have created a wiki page to explain how I do it using SimpleRTK based on a Gate simulation: http://wiki.openrtk.org/index.php/WaterPreCorrection I hope this helps, Simon On Fri, Mar 24, 2017 at 12:29 PM, Lotte Schyns wrote: > Hello, > > Does anyone have a piece code (doesn't have to be in C++) that can fit > the coefficients for the cupping correction in > rtk::WaterPrecorrectionImageFilter? > > Lotte > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.calliess at gmx.de Sun Mar 26 07:37:59 2017 From: robert.calliess at gmx.de (Robert Calliess) Date: Sun, 26 Mar 2017 13:37:59 +0200 Subject: [Rtk-users] iterative fdk Message-ID: <001b01d2a625$6c0a2290$441e67b0$@gmx.de> Hello, Would you please tell me what is the purpose of the iterative fdk filter in RTK? How does this work and what is the idea behind ? As I can see it begins with a usual fdk backprojection. What are the next steps during one iteration ? Is there a paper that covers the iterative fdk filter ? kind regards & nice weekend, Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Sun Mar 26 14:54:22 2017 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Sun, 26 Mar 2017 20:54:22 +0200 Subject: [Rtk-users] iterative fdk In-Reply-To: <001b01d2a625$6c0a2290$441e67b0$@gmx.de> References: <001b01d2a625$6c0a2290$441e67b0$@gmx.de> Message-ID: Hi, I would suggest to look at part V.3 of Cyril's thesis where he gives a brief description and provides a few references. Simon On Sun, Mar 26, 2017 at 1:37 PM, Robert Calliess wrote: > Hello, > > Would you please tell me what is the purpose of the iterative fdk filter > in RTK? > > How does this work and what is the idea behind ? > > As I can see it begins with a usual fdk backprojection. What are the next > steps > > during one iteration ? Is there a paper that covers the iterative fdk > filter ? > > > > kind regards & nice weekend, > > Robert > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.calliess at gmx.de Sun Mar 26 15:07:42 2017 From: robert.calliess at gmx.de (Robert Calliess) Date: Sun, 26 Mar 2017 21:07:42 +0200 Subject: [Rtk-users] iterative fdk In-Reply-To: References: <001b01d2a625$6c0a2290$441e67b0$@gmx.de> Message-ID: <000601d2a664$3f13fa60$bd3bef20$@gmx.de> Thank you. Kind regards, Robert Von: simon.rit at gmail.com [mailto:simon.rit at gmail.com] Im Auftrag von Simon Rit Gesendet: Sonntag, 26. M?rz 2017 20:54 An: Robert Calliess Cc: rtk-users at public.kitware.com Betreff: Re: [Rtk-users] iterative fdk Hi, I would suggest to look at part V.3 of Cyril's thesis where he gives a brief description and provides a few references. Simon On Sun, Mar 26, 2017 at 1:37 PM, Robert Calliess wrote: Hello, Would you please tell me what is the purpose of the iterative fdk filter in RTK? How does this work and what is the idea behind ? As I can see it begins with a usual fdk backprojection. What are the next steps during one iteration ? Is there a paper that covers the iterative fdk filter ? kind regards & nice weekend, Robert _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Mar 29 01:34:19 2017 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 29 Mar 2017 07:34:19 +0200 Subject: [Rtk-users] RTK data In-Reply-To: References: Message-ID: Hi, Please use the mailing list. The Elekta reconstruction is in the archive elekta/img_1.3.46.423632.135428.1351013645.166/Reconstruction/1.3.46.423632.135428.1351013331.163.23.10.2012193405890.SCAN You can open it with, e.g., vv . The Varian reconstruction is in the archive as well varian/Scan0/ReconstructedSlices but I don't remember how the slice files can be opened. Simon On Wed, Mar 29, 2017 at 1:34 AM, Andriy Myronenko wrote: > Hi Simon, > > I've been reading about RTK, thanks for creating this great software! > Also thanks for the publicly available data for Catphan 503, 504 here > https://midas3.kitware.com/midas/community/20# > > I was wondering if there a way to download the 3D CBCT reconstruction > result (produced by Varian and Elekta) for those phantoms? (Or the > reconstruction result produced by RTK)? > > -- > Thank you, > Andriy Myronenko, PhD, > Accuray Research, Imaging > www.accuray.com > -- 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. > -------------- next part -------------- An HTML attachment was scrubbed... URL: