From fotosentido at gmail.com Tue Sep 1 03:45:00 2015 From: fotosentido at gmail.com (Marcos) Date: Tue, 1 Sep 2015 09:45:00 +0200 Subject: [ITK-users] Export specific frame/slice of multiframe dicom file: ExtractSliceImageFilter? In-Reply-To: <1441062996943-36084.post@n7.nabble.com> References: <1441062996943-36084.post@n7.nabble.com> Message-ID: Hi, the input of vtkJPEGWriter: template void Exporter::exportImage(QString fileName, QVTKWidget *widget) { vtkWindowToImageFilter* filter = vtkWindowToImageFilter::New(); filter->SetInput(widget->GetRenderWindow()); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName(fileName.toStdString().c_str()); writer->SetInputConnection(filter->GetOutputPort()); writer->Write(); } T can be an vtkJPEGWriter, vtkPNGWriter, etc. I set the slice with vtkImageViewer2::GetSlice() But this depends on the vtk renderwindow, and its size,... That's why I need to do it with ITK, unless I can export the original frame with VTK. Thank you. 2015-09-01 1:16 GMT+02:00 Siavash Khallaghi : > Hi Marcos, > > How do you set the input of your vtkJPEGWriter? > > Siavash > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-Export-specific-frame-slice-of-multiframe-dicom-file-ExtractSliceImageFilter-tp36081p36084.html > Sent from the ITK - 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Tue Sep 1 04:31:42 2015 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Tue, 1 Sep 2015 10:31:42 +0200 (CEST) Subject: [ITK-users] [ITK] Export specific frame/slice of multiframe dicom file: ExtractSliceImageFilter? In-Reply-To: References: <1441062996943-36084.post@n7.nabble.com> Message-ID: <1126007203.99237351.1441096302024.JavaMail.zimbra@enst.fr> Hello Marcos, You can extract one slice from your 3D data with itk::ExtractImageFilter You have to specify the region you want to get as indicated here http://www.itk.org/Doxygen/html/classitk_1_1ExtractImageFilter.html More precisely, you have to indicate the index of the slice you want and set the third dimension size to 0. For example, saying you have an image 250x250x250 and you want the 89th slice you have to set: RegionSize = {250,250,0} RegionIndex = {0,0,89} The filter return a 2D image when you collapse the third dimension. I think this can be what you want ? Tim ----- Mail original ----- De: "Marcos" ?: insight-users at itk.org Envoy?: Mardi 1 Septembre 2015 09:45:00 Objet: Re: [ITK] [ITK-users] Export specific frame/slice of multiframe dicom file: ExtractSliceImageFilter? Hi, the input of vtkJPEGWriter: template < class T > void Exporter :: exportImage ( QString fileName , QVTKWidget * widget ) { vtkWindowToImageFilter * filter = vtkWindowToImageFilter :: New (); filter -> SetInput ( widget -> GetRenderWindow ()); vtkSmartPointer < T > writer = vtkSmartPointer < T >:: New (); writer -> SetFileName ( fileName . toStdString (). c_str ()); writer -> SetInputConnection ( filter -> GetOutputPort ()); writer -> Write (); } T can be an vtkJPEGWriter, vtkPNGWriter, etc. I set the slice with vtkImageViewer2::GetSlice() But this depends on the vtk renderwindow, and its size,... That's why I need to do it with ITK, unless I can export the original frame with VTK. Thank you. 2015-09-01 1:16 GMT+02:00 Siavash Khallaghi < siavashk at ece.ubc.ca > : Hi Marcos, How do you set the input of your vtkJPEGWriter? Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Export-specific-frame-slice-of-multiframe-dicom-file-ExtractSliceImageFilter-tp36081p36084.html Sent from the ITK - 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 Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From kolin9105 at gmail.com Tue Sep 1 11:04:10 2015 From: kolin9105 at gmail.com (meikolin saimara) Date: Tue, 1 Sep 2015 22:04:10 +0700 Subject: [ITK-users] (no subject) Message-ID: how to remove the outer circle of the brain(skull) without using VTK and others, just use the ITK -------------- next part -------------- An HTML attachment was scrubbed... URL: From kolin9105 at gmail.com Tue Sep 1 11:07:50 2015 From: kolin9105 at gmail.com (meikolin saimara) Date: Tue, 1 Sep 2015 22:07:50 +0700 Subject: [ITK-users] (no subject) Message-ID: hi every one, how to connect ITK with matlab and pleaz give me step by step how to connect its. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Sep 1 11:43:43 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 1 Sep 2015 11:43:43 -0400 Subject: [ITK-users] (no subject) In-Reply-To: References: Message-ID: Is the data MRI? On Tue, Sep 1, 2015 at 11:04 AM, meikolin saimara wrote: > how to remove the outer circle of the brain(skull) without using VTK and > others, just use the ITK > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -- Unpaid intern in BillsBasement at noware dot com From tjklein at gmail.com Tue Sep 1 12:02:12 2015 From: tjklein at gmail.com (Tassilo Klein) Date: Tue, 1 Sep 2015 12:02:12 -0400 Subject: [ITK-users] SimpleITK Anaconda Issue In-Reply-To: <8E140389-E26E-4949-9000-52A3958666E0@mail.nih.gov> References: <8E140389-E26E-4949-9000-52A3958666E0@mail.nih.gov> Message-ID: Hi, well, it doesn't work for me. I am just trying to load a Nifti (.nii) image: dwiImg = sitk.ReadImage(glob.glob(dataPath+'/*DWI*/*.nii')) when getting the error. Reinstallation didn't help either. There is nothing special about these files. It's MRIs. home/tjklein/anaconda/envs/sitkpy/lib/python2.7/site-packages/SimpleITK/SimpleITK.py in ReadImage(*args) 7726 7727 """-> 7728 return _SimpleITK.ReadImage(*args) 7729 class HashImageFilter(ProcessObject): 7730 """ RuntimeError: Exception thrown in SimpleITK ReadImage: /home/blowekamp/anaconda/conda-bld/work/Code/IO/src/sitkImageSeriesReader.cxx:143: sitk::ERROR: The file in the series have unsupported 3 dimensions. Thanks, Tassilo On Sat, Aug 29, 2015 at 11:12 AM, Bradley Lowekamp wrote: > Hello, > > That is great you got SimpleITK up and running by following those updated > instructions for Anaconda. > > Could you describe what you are trying to do and have a snippet of code? > > Brad > > On Aug 28, 2015, at 6:52 PM, Tassilo Klein wrote: > > Thanks Ziv, > > I forgot to activate the environment before. > > After following the steps, now I get a different error when trying to load > an image, which worked some time before: > > /home/tjklein/anaconda/envs/sitkpy3/lib/python2.7/site-packages/SimpleITK/SimpleITK.py in ReadImage(*args) 7726 7727 """-> 7728 return _SimpleITK.ReadImage(*args) 7729 class HashImageFilter(ProcessObject): 7730 """ > RuntimeError: Exception thrown in SimpleITK ReadImage: /home/blowekamp/anaconda/conda-bld/work/Code/IO/src/sitkImageSeriesReader.cxx:143: > sitk::ERROR: The file in the series have unsupported 3 dimensions. > > > > On Thu, Aug 27, 2015 at 5:10 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] < > zivrafael.yaniv at nih.gov> wrote: > >> Hi Tassilo, >> >> Did you downgrade to libpng1.5 after creating the virtual environment? >> This is what I suggested in the thread you cited and was the solution at >> the time. It no longer works because anaconda upgraded additional packages. >> >> When you create the virtual environment with libpng set to 1.5 (conda >> create -n sitkpy anaconda libpng=1.5) all of the dependent packages are >> downgraded to work with this version of libpng and then you will not have >> this issue. The three steps are given in the FAQ that I pointed you to - I >> am assuming here you did not follow that solution, it is pasted below for >> your convenience: >> >> conda create -n sitkpy anaconda libpng=1.5 >> conda install -c https://conda.binstar.org/simpleitk/channel/main >> SimpleITK >> conda install libpng=1.5 >> >> If you followed this set of instructions and it doesn't work, let us know >> and we will try to recreate the problem and find a solution. >> >> regards >> Ziv >> >> ------------------------------ >> *From:* Tassilo Klein [tjklein at gmail.com] >> *Sent:* Thursday, August 27, 2015 4:56 PM >> *To:* Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] >> *Cc:* insight-users at itk.org >> *Subject:* Re: [ITK-users] SimpleITK Anaconda Issue >> >> Hi Ziv, >> >> thanks. yes, that's what I did but then I get these errors: >> >> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like >> ImportError: libpng16.so.16: cannot open shared object file: No such file or directory >> >> >> On Thu, Aug 27, 2015 at 3:55 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] < >> zivrafael.yaniv at nih.gov> wrote: >> >>> Hello Tassilo, >>> >>> Please follow the instructions found in our FAQ 'I am using the binary >>> distribution of SimpleITK for Anaconda, why do I get an error about >>> libpng?' found here: http://www.itk.org/Wiki/SimpleITK/FAQ >>> >>> We are working on a more permanent solution for our next release. >>> >>> regards >>> Ziv >>> >>> ------------------------------ >>> *From:* Tassilo Klein [tjklein at gmail.com] >>> *Sent:* Thursday, August 27, 2015 3:42 PM >>> *To:* insight-users at itk.org >>> *Subject:* [ITK-users] SimpleITK Anaconda Issue >>> >>> Hi, >>> >>> I have issues getting my SimpleITK running on a Linux machine. >>> >>> I used to get errors: >>> >>> http://public.kitware.com/pipermail/community/2015-May/009117.html >>> >>> ImportError: libpng15.so.15: cannot open shared object file: No such >>> >>> >>> >>> Then I took an earlier version of libpng as mentioned here: >>> >>> http://public.kitware.com/pipermail/community/2015-May/009120.html >>> >>> conda install libpng=1.5.13 >>> >>> >>> >>> But then I get the following error: >>> >>> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/colorbar.py in () 32 import matplotlib.artist as martist 33 import matplotlib.cbook as cbook---> 34 import matplotlib.collections as collections 35 import matplotlib.colors as colors 36 import matplotlib.contour as contour >>> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/collections.py in () 25 import matplotlib.artist as artist 26 from matplotlib.artist import allow_rasterization---> 27 import matplotlib.backend_bases as backend_bases 28 import matplotlib.path as mpath 29 from matplotlib import _path >>> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.py in () 54 55 import matplotlib.tight_bbox as tight_bbox---> 56 import matplotlib.textpath as textpath 57 from matplotlib.path import Path 58 from matplotlib.cbook import mplDeprecation >>> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/textpath.py in () 17 from matplotlib.path import Path 18 from matplotlib import rcParams---> 19 import matplotlib.font_manager as font_manager 20 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING 21 from matplotlib.ft2font import LOAD_TARGET_LIGHT >>> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like >>> ImportError: libpng16.so.16: cannot open shared object file: No such file or directory >>> >>> >>> >>> Any idea? >>> >>> Best, >>> Tassilo >>> >> >> > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjklein at gmail.com Tue Sep 1 12:15:10 2015 From: tjklein at gmail.com (Tassilo Klein) Date: Tue, 1 Sep 2015 12:15:10 -0400 Subject: [ITK-users] [ITK] SimpleITK Anaconda Issue In-Reply-To: References: <8E140389-E26E-4949-9000-52A3958666E0@mail.nih.gov> Message-ID: Sure, this this already. Same thing. On Tue, Sep 1, 2015 at 12:13 PM, Kayhan Batmanghelich < batmanghelich at gmail.com> wrote: > Tassilo, > > Can you do test this, instead of glob which produce a lit of file, specify > one file and try the ReadImage on one specific file and see if it works or > not. > > Thanks, > Kayhan > > On Tue, Sep 1, 2015 at 12:02 PM, Tassilo Klein wrote: > >> Hi, >> >> well, it doesn't work for me. I am just trying to load a Nifti (.nii) >> image: >> >> dwiImg = sitk.ReadImage(glob.glob(dataPath+'/*DWI*/*.nii')) >> >> >> when getting the error. Reinstallation didn't help either. There is >> nothing special about these files. It's MRIs. >> >> home/tjklein/anaconda/envs/sitkpy/lib/python2.7/site-packages/SimpleITK/SimpleITK.py in ReadImage(*args) 7726 7727 """-> 7728 return _SimpleITK.ReadImage(*args) 7729 class HashImageFilter(ProcessObject): 7730 """ >> RuntimeError: Exception thrown in SimpleITK ReadImage: /home/blowekamp/anaconda/conda-bld/work/Code/IO/src/sitkImageSeriesReader.cxx:143: >> sitk::ERROR: The file in the series have unsupported 3 dimensions. >> >> >> >> Thanks, >> Tassilo >> >> On Sat, Aug 29, 2015 at 11:12 AM, Bradley Lowekamp < >> blowekamp at mail.nih.gov> wrote: >> >>> Hello, >>> >>> That is great you got SimpleITK up and running by following those >>> updated instructions for Anaconda. >>> >>> Could you describe what you are trying to do and have a snippet of code? >>> >>> Brad >>> >>> On Aug 28, 2015, at 6:52 PM, Tassilo Klein wrote: >>> >>> Thanks Ziv, >>> >>> I forgot to activate the environment before. >>> >>> After following the steps, now I get a different error when trying to >>> load an image, which worked some time before: >>> >>> /home/tjklein/anaconda/envs/sitkpy3/lib/python2.7/site-packages/SimpleITK/SimpleITK.py in ReadImage(*args) 7726 7727 """-> 7728 return _SimpleITK.ReadImage(*args) 7729 class HashImageFilter(ProcessObject): 7730 """ >>> RuntimeError: Exception thrown in SimpleITK ReadImage: /home/blowekamp/anaconda/conda-bld/work/Code/IO/src/sitkImageSeriesReader.cxx:143: >>> sitk::ERROR: The file in the series have unsupported 3 dimensions. >>> >>> >>> >>> On Thu, Aug 27, 2015 at 5:10 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] < >>> zivrafael.yaniv at nih.gov> wrote: >>> >>>> Hi Tassilo, >>>> >>>> Did you downgrade to libpng1.5 after creating the virtual environment? >>>> This is what I suggested in the thread you cited and was the solution at >>>> the time. It no longer works because anaconda upgraded additional packages. >>>> >>>> When you create the virtual environment with libpng set to 1.5 (conda >>>> create -n sitkpy anaconda libpng=1.5) all of the dependent packages are >>>> downgraded to work with this version of libpng and then you will not have >>>> this issue. The three steps are given in the FAQ that I pointed you to - I >>>> am assuming here you did not follow that solution, it is pasted below for >>>> your convenience: >>>> >>>> conda create -n sitkpy anaconda libpng=1.5 >>>> conda install -c https://conda.binstar.org/simpleitk/channel/main >>>> SimpleITK >>>> conda install libpng=1.5 >>>> >>>> If you followed this set of instructions and it doesn't work, let us >>>> know and we will try to recreate the problem and find a solution. >>>> >>>> regards >>>> Ziv >>>> >>>> ------------------------------ >>>> *From:* Tassilo Klein [tjklein at gmail.com] >>>> *Sent:* Thursday, August 27, 2015 4:56 PM >>>> *To:* Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] >>>> *Cc:* insight-users at itk.org >>>> *Subject:* Re: [ITK-users] SimpleITK Anaconda Issue >>>> >>>> Hi Ziv, >>>> >>>> thanks. yes, that's what I did but then I get these errors: >>>> >>>> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like >>>> ImportError: libpng16.so.16: cannot open shared object file: No such file or directory >>>> >>>> >>>> On Thu, Aug 27, 2015 at 3:55 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] < >>>> zivrafael.yaniv at nih.gov> wrote: >>>> >>>>> Hello Tassilo, >>>>> >>>>> Please follow the instructions found in our FAQ 'I am using the binary >>>>> distribution of SimpleITK for Anaconda, why do I get an error about >>>>> libpng?' found here: http://www.itk.org/Wiki/SimpleITK/FAQ >>>>> >>>>> We are working on a more permanent solution for our next release. >>>>> >>>>> regards >>>>> Ziv >>>>> >>>>> ------------------------------ >>>>> *From:* Tassilo Klein [tjklein at gmail.com] >>>>> *Sent:* Thursday, August 27, 2015 3:42 PM >>>>> *To:* insight-users at itk.org >>>>> *Subject:* [ITK-users] SimpleITK Anaconda Issue >>>>> >>>>> Hi, >>>>> >>>>> I have issues getting my SimpleITK running on a Linux machine. >>>>> >>>>> I used to get errors: >>>>> >>>>> http://public.kitware.com/pipermail/community/2015-May/009117.html >>>>> >>>>> ImportError: libpng15.so.15: cannot open shared object file: No such >>>>> >>>>> >>>>> >>>>> Then I took an earlier version of libpng as mentioned here: >>>>> >>>>> http://public.kitware.com/pipermail/community/2015-May/009120.html >>>>> >>>>> conda install libpng=1.5.13 >>>>> >>>>> >>>>> >>>>> But then I get the following error: >>>>> >>>>> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/colorbar.py in () 32 import matplotlib.artist as martist 33 import matplotlib.cbook as cbook---> 34 import matplotlib.collections as collections 35 import matplotlib.colors as colors 36 import matplotlib.contour as contour >>>>> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/collections.py in () 25 import matplotlib.artist as artist 26 from matplotlib.artist import allow_rasterization---> 27 import matplotlib.backend_bases as backend_bases 28 import matplotlib.path as mpath 29 from matplotlib import _path >>>>> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.py in () 54 55 import matplotlib.tight_bbox as tight_bbox---> 56 import matplotlib.textpath as textpath 57 from matplotlib.path import Path 58 from matplotlib.cbook import mplDeprecation >>>>> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/textpath.py in () 17 from matplotlib.path import Path 18 from matplotlib import rcParams---> 19 import matplotlib.font_manager as font_manager 20 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING 21 from matplotlib.ft2font import LOAD_TARGET_LIGHT >>>>> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like >>>>> ImportError: libpng16.so.16: cannot open shared object file: No such file or directory >>>>> >>>>> >>>>> >>>>> Any idea? >>>>> >>>>> Best, >>>>> Tassilo >>>>> >>>> >>>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >>> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zivrafael.yaniv at nih.gov Tue Sep 1 13:16:27 2015 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Tue, 1 Sep 2015 17:16:27 +0000 Subject: [ITK-users] [ITK] SimpleITK Anaconda Issue In-Reply-To: References: <8E140389-E26E-4949-9000-52A3958666E0@mail.nih.gov> Message-ID: Hello Tassilo, My guess with regard to the exception is that the glob is returning a list of files where each file contains a 3D image. The SimpleITK ReadImage function is overloaded. It will work with a single file (2D or 3D) - returns a 2D or 3D image as appropriate, and with a list of files (2D) which are slices from a 3D image - returns the 3D image. To debug your code I would suggest trying to read data using explicit file names and files that contain data for which you know the dimensionality (2D or 3D). hope this helps Ziv From: Tassilo Klein > Date: Tuesday, September 1, 2015 at 12:15 PM To: Kayhan Batmanghelich > Cc: "insight-users at itk.org" > Subject: Re: [ITK-users] [ITK] SimpleITK Anaconda Issue Sure, this this already. Same thing. On Tue, Sep 1, 2015 at 12:13 PM, Kayhan Batmanghelich > wrote: Tassilo, Can you do test this, instead of glob which produce a lit of file, specify one file and try the ReadImage on one specific file and see if it works or not. Thanks, Kayhan On Tue, Sep 1, 2015 at 12:02 PM, Tassilo Klein > wrote: Hi, well, it doesn't work for me. I am just trying to load a Nifti (.nii) image: dwiImg = sitk.ReadImage(glob.glob(dataPath+'/*DWI*/*.nii')) when getting the error. Reinstallation didn't help either. There is nothing special about these files. It's MRIs. home/tjklein/anaconda/envs/sitkpy/lib/python2.7/site-packages/SimpleITK/SimpleITK.py in ReadImage(*args) 7726 7727 """ -> 7728 return _SimpleITK.ReadImage(*args) 7729 class HashImageFilter(ProcessObject): 7730 """ RuntimeError: Exception thrown in SimpleITK ReadImage: /home/blowekamp/anaconda/conda-bld/work/Code/IO/src/sitkImageSeriesReader.cxx:143: sitk::ERROR: The file in the series have unsupported 3 dimensions. Thanks, Tassilo On Sat, Aug 29, 2015 at 11:12 AM, Bradley Lowekamp > wrote: Hello, That is great you got SimpleITK up and running by following those updated instructions for Anaconda. Could you describe what you are trying to do and have a snippet of code? Brad On Aug 28, 2015, at 6:52 PM, Tassilo Klein > wrote: Thanks Ziv, I forgot to activate the environment before. After following the steps, now I get a different error when trying to load an image, which worked some time before: /home/tjklein/anaconda/envs/sitkpy3/lib/python2.7/site-packages/SimpleITK/SimpleITK.py in ReadImage(*args) 7726 7727 """ -> 7728 return _SimpleITK.ReadImage(*args) 7729 class HashImageFilter(ProcessObject): 7730 """ RuntimeError: Exception thrown in SimpleITK ReadImage: /home/blowekamp/anaconda/conda-bld/work/Code/IO/src/sitkImageSeriesReader.cxx:143: sitk::ERROR: The file in the series have unsupported 3 dimensions. On Thu, Aug 27, 2015 at 5:10 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] > wrote: Hi Tassilo, Did you downgrade to libpng1.5 after creating the virtual environment? This is what I suggested in the thread you cited and was the solution at the time. It no longer works because anaconda upgraded additional packages. When you create the virtual environment with libpng set to 1.5 (conda create -n sitkpy anaconda libpng=1.5) all of the dependent packages are downgraded to work with this version of libpng and then you will not have this issue. The three steps are given in the FAQ that I pointed you to - I am assuming here you did not follow that solution, it is pasted below for your convenience: conda create -n sitkpy anaconda libpng=1.5 conda install -c https://conda.binstar.org/simpleitk/channel/main SimpleITK conda install libpng=1.5 If you followed this set of instructions and it doesn't work, let us know and we will try to recreate the problem and find a solution. regards Ziv ________________________________ From: Tassilo Klein [tjklein at gmail.com] Sent: Thursday, August 27, 2015 4:56 PM To: Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] Cc: insight-users at itk.org Subject: Re: [ITK-users] SimpleITK Anaconda Issue Hi Ziv, thanks. yes, that's what I did but then I get these errors: /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_likeImportError: libpng16.so.16: cannot open shared object file: No such file or directory On Thu, Aug 27, 2015 at 3:55 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] > wrote: Hello Tassilo, Please follow the instructions found in our FAQ 'I am using the binary distribution of SimpleITK for Anaconda, why do I get an error about libpng?' found here: http://www.itk.org/Wiki/SimpleITK/FAQ We are working on a more permanent solution for our next release. regards Ziv ________________________________ From: Tassilo Klein [tjklein at gmail.com] Sent: Thursday, August 27, 2015 3:42 PM To: insight-users at itk.org Subject: [ITK-users] SimpleITK Anaconda Issue Hi, I have issues getting my SimpleITK running on a Linux machine. I used to get errors: http://public.kitware.com/pipermail/community/2015-May/009117.html ImportError: libpng15.so.15: cannot open shared object file: No such Then I took an earlier version of libpng as mentioned here: http://public.kitware.com/pipermail/community/2015-May/009120.html conda install libpng=1.5.13 But then I get the following error: /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/colorbar.py in () 32 import matplotlib.artist as martist 33 import matplotlib.cbook as cbook---> 34 import matplotlib.collections as collections 35 import matplotlib.colors as colors 36 import matplotlib.contour as contour/home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/collections.py in () 25 import matplotlib.artist as artist 26 from matplotlib.artist import allow_rasterization---> 27 import matplotlib.backend_bases as backend_bases 28 import matplotlib.path as mpath 29 from matplotlib import _path/home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.py in () 54 55 import matplotlib.tight_bbox as tight_bbox---> 56 import matplotlib.textpath as textpath 57 from matplotlib.path import Path 58 from matplotlib.cbook import mplDeprecation/home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/textpath.py in () 17 from matplotlib.path import Path 18 from matplotlib import rcParams---> 19 import matplotlib.font_manager as font_manager 20 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING 21 from matplotlib.ft2font import LOAD_TARGET_LIGHT/home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_likeImportError: libpng16.so.16: cannot open shared object file: No such file or directory Any idea? Best, Tassilo _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Sep 1 14:05:08 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 1 Sep 2015 14:05:08 -0400 Subject: [ITK-users] (no subject) In-Reply-To: References: Message-ID: Please keep the itk users list in the replies. When you configure vtk with cmake, //Request building SkullStrip Module_SkullStrip:BOOL=ON The technique is described here: http://hdl.handle.net/10380/3353 Or, the slicer app has a plugin using the same algorithm. You can get slicer here: http://www.slicer.org/ and the skull stripper documentation here: http://www.slicer.org/slicerWiki/index.php/Documentation/4.4/Modules/SwissSkullStripper Enjoy, Bill On Tue, Sep 1, 2015 at 1:55 PM, meikolin saimara wrote: > can you help me sir?? > > > On Wed, Sep 2, 2015 at 12:16 AM, meikolin saimara > wrote: >> >> yapz.. >> MRI. >> >> On Tue, Sep 1, 2015 at 10:43 PM, Bill Lorensen >> wrote: >>> >>> Is the data MRI? >>> >>> >>> On Tue, Sep 1, 2015 at 11:04 AM, meikolin saimara >>> wrote: >>> > how to remove the outer circle of the brain(skull) without using VTK >>> > and >>> > others, just use the ITK >>> > >>> > _____________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Kitware offers ITK Training Courses, for more information visit: >>> > http://www.kitware.com/products/protraining.php >>> > >>> > Please keep messages on-topic and check the ITK FAQ at: >>> > http://www.itk.org/Wiki/ITK_FAQ >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/insight-users >>> > >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >> >> > -- Unpaid intern in BillsBasement at noware dot com From fotosentido at gmail.com Tue Sep 1 14:41:47 2015 From: fotosentido at gmail.com (Marcos) Date: Tue, 1 Sep 2015 20:41:47 +0200 Subject: [ITK-users] [ITK] Export specific frame/slice of multiframe dicom file: ExtractSliceImageFilter? In-Reply-To: <1126007203.99237351.1441096302024.JavaMail.zimbra@enst.fr> References: <1441062996943-36084.post@n7.nabble.com> <1126007203.99237351.1441096302024.JavaMail.zimbra@enst.fr> Message-ID: Hmmm, yes, that's the idea. I was trying, and I think I got it, but something is wrong connecting its output to the input of another filter: void Exporter::exportOriginal(QString fileName, ImageType::Pointer image, int frame) { typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName(fileName.toStdString().c_str()); writer->SetInput(image); ImageType::RegionType inputRegion = image->GetLargestPossibleRegion(); ImageType::IndexType index = inputRegion.GetIndex(); ImageType::SizeType size = inputRegion.GetSize(); index[0] = 0; index[1] = 0; index[2] = frame; size[2] = 0; ImageType::RegionType outputRegion; outputRegion.SetIndex(index); outputRegion.SetSize(size); typedef itk::Testing::ExtractSliceImageFilter ExtractType; ExtractType::Pointer extracter = ExtractType::New(); extracter->SetExtractionRegion(outputRegion); writer->GetInput(extracter->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject &ex) { std:cerr << ex << std::endl; } } Trying to compile, it gives me: "error: C2664: 'const itk::Image *itk::ImageFileWriter::GetInput(unsigned int)' : cannot convert argument 1 from 'itk::Image *' to 'unsigned int' There is no context in which this conversion is possible" Well, where is the unsigned int?? The input and output format of ExtractSliceImageFilter were unsigned short, and after seeing this I changed to unsigned int, with same result. Anyone seeing the problem? Cause I can't understand the error. Thank you. 2015-09-01 10:31 GMT+02:00 Timothee Evain : > Hello Marcos, > > You can extract one slice from your 3D data with itk::ExtractImageFilter > You have to specify the region you want to get as indicated here > http://www.itk.org/Doxygen/html/classitk_1_1ExtractImageFilter.html > More precisely, you have to indicate the index of the slice you want and > set the third dimension size to 0. > For example, saying you have an image 250x250x250 and you want the 89th > slice you have to set: > RegionSize = {250,250,0} > RegionIndex = {0,0,89} > > The filter return a 2D image when you collapse the third dimension. > > I think this can be what you want ? > > Tim > > ----- Mail original ----- > De: "Marcos" > ?: insight-users at itk.org > Envoy?: Mardi 1 Septembre 2015 09:45:00 > Objet: Re: [ITK] [ITK-users] Export specific frame/slice of multiframe > dicom file: ExtractSliceImageFilter? > > Hi, > > the input of vtkJPEGWriter: > > template < class T > > void Exporter :: exportImage ( QString fileName , QVTKWidget * widget ) > { > vtkWindowToImageFilter * filter = vtkWindowToImageFilter :: New (); > filter -> SetInput ( widget -> GetRenderWindow ()); > > vtkSmartPointer < T > writer = vtkSmartPointer < T >:: New (); > writer -> SetFileName ( fileName . toStdString (). c_str ()); > writer -> SetInputConnection ( filter -> GetOutputPort ()); > > writer -> Write (); > } > > T can be an vtkJPEGWriter, vtkPNGWriter, etc. > I set the slice with vtkImageViewer2::GetSlice() > But this depends on the vtk renderwindow, and its size,... > > That's why I need to do it with ITK, unless I can export the original > frame with VTK. > > Thank you. > > 2015-09-01 1:16 GMT+02:00 Siavash Khallaghi < siavashk at ece.ubc.ca > : > > > Hi Marcos, > > How do you set the input of your vtkJPEGWriter? > > Siavash > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-Export-specific-frame-slice-of-multiframe-dicom-file-ExtractSliceImageFilter-tp36081p36084.html > Sent from the ITK - 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Tue Sep 1 15:19:32 2015 From: fotosentido at gmail.com (Marcos) Date: Tue, 1 Sep 2015 21:19:32 +0200 Subject: [ITK-users] [ITK] Export specific frame/slice of multiframe dicom file: ExtractSliceImageFilter? In-Reply-To: References: <1441062996943-36084.post@n7.nabble.com> <1126007203.99237351.1441096302024.JavaMail.zimbra@enst.fr> Message-ID: I'm sorry, obviously it's: typedef itk::ImageFileWriter WriterType; and writer->SetInput(extracter->GetOutput()); It's working. Just a thing: size gives me {512, 512, 0} but the image output is 998x881. It's weird, isn't it? Thank you. 2015-09-01 20:41 GMT+02:00 Marcos : > Hmmm, yes, that's the idea. > > I was trying, and I think I got it, but something is wrong connecting its > output to the input of another filter: > > void Exporter::exportOriginal(QString fileName, ImageType::Pointer image, int frame) > > { > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName(fileName.toStdString().c_str()); > > writer->SetInput(image); > > > ImageType::RegionType inputRegion = image->GetLargestPossibleRegion(); > > ImageType::IndexType index = inputRegion.GetIndex(); > > ImageType::SizeType size = inputRegion.GetSize(); > > > index[0] = 0; > > index[1] = 0; > > index[2] = frame; > > size[2] = 0; > > > ImageType::RegionType outputRegion; > > outputRegion.SetIndex(index); > > outputRegion.SetSize(size); > > > typedef itk::Testing::ExtractSliceImageFilter ExtractType; > > ExtractType::Pointer extracter = ExtractType::New(); > > extracter->SetExtractionRegion(outputRegion); > > > writer->GetInput(extracter->GetOutput()); > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject &ex) > > { > > std:cerr << ex << std::endl; > > } > > } > > > Trying to compile, it gives me: > > > "error: C2664: 'const itk::Image *itk::ImageFileWriter::GetInput(unsigned int)' : cannot convert argument 1 from 'itk::Image *' to 'unsigned int' > There is no context in which this conversion is possible" > > > Well, where is the unsigned int?? The input and output format of ExtractSliceImageFilter were unsigned short, and after seeing this I changed to unsigned int, with same result. > > > Anyone seeing the problem? Cause I can't understand the error. > > > Thank you. > > > 2015-09-01 10:31 GMT+02:00 Timothee Evain : > >> Hello Marcos, >> >> You can extract one slice from your 3D data with itk::ExtractImageFilter >> You have to specify the region you want to get as indicated here >> http://www.itk.org/Doxygen/html/classitk_1_1ExtractImageFilter.html >> More precisely, you have to indicate the index of the slice you want and >> set the third dimension size to 0. >> For example, saying you have an image 250x250x250 and you want the 89th >> slice you have to set: >> RegionSize = {250,250,0} >> RegionIndex = {0,0,89} >> >> The filter return a 2D image when you collapse the third dimension. >> >> I think this can be what you want ? >> >> Tim >> >> ----- Mail original ----- >> De: "Marcos" >> ?: insight-users at itk.org >> Envoy?: Mardi 1 Septembre 2015 09:45:00 >> Objet: Re: [ITK] [ITK-users] Export specific frame/slice of multiframe >> dicom file: ExtractSliceImageFilter? >> >> Hi, >> >> the input of vtkJPEGWriter: >> >> template < class T > >> void Exporter :: exportImage ( QString fileName , QVTKWidget * widget ) >> { >> vtkWindowToImageFilter * filter = vtkWindowToImageFilter :: New (); >> filter -> SetInput ( widget -> GetRenderWindow ()); >> >> vtkSmartPointer < T > writer = vtkSmartPointer < T >:: New (); >> writer -> SetFileName ( fileName . toStdString (). c_str ()); >> writer -> SetInputConnection ( filter -> GetOutputPort ()); >> >> writer -> Write (); >> } >> >> T can be an vtkJPEGWriter, vtkPNGWriter, etc. >> I set the slice with vtkImageViewer2::GetSlice() >> But this depends on the vtk renderwindow, and its size,... >> >> That's why I need to do it with ITK, unless I can export the original >> frame with VTK. >> >> Thank you. >> >> 2015-09-01 1:16 GMT+02:00 Siavash Khallaghi < siavashk at ece.ubc.ca > : >> >> >> Hi Marcos, >> >> How do you set the input of your vtkJPEGWriter? >> >> Siavash >> >> >> >> -- >> View this message in context: >> http://itk-users.7.n7.nabble.com/ITK-users-Export-specific-frame-slice-of-multiframe-dicom-file-ExtractSliceImageFilter-tp36081p36084.html >> Sent from the ITK - 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 >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kolin9105 at gmail.com Wed Sep 2 13:20:35 2015 From: kolin9105 at gmail.com (meikolin saimara) Date: Thu, 3 Sep 2015 00:20:35 +0700 Subject: [ITK-users] (no subject) Message-ID: hi everyone.. I have a data brain tumor from MRI and I want to calculate the are of brain tumor. so when a data MRI we are input to itk, we are waiting result of calculate the are brain tumor without using visualization or without seeing how about the process. so I just need source code to know about pixel of image. from pixel value I will calculate the are of brain tumor. but I have a trouble How I can separate brain tumor and skull. so far I did segmentation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kolin9105 at gmail.com Wed Sep 2 13:23:20 2015 From: kolin9105 at gmail.com (meikolin saimara) Date: Thu, 3 Sep 2015 00:23:20 +0700 Subject: [ITK-users] (no subject) Message-ID: hi everyone... can you give me a full program skullStripping.cxx -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Sep 2 13:40:27 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 2 Sep 2015 13:40:27 -0400 Subject: [ITK-users] (no subject) In-Reply-To: References: Message-ID: When you build ITK, set Module_SkullStrip:BOOL=ON On Wed, Sep 2, 2015 at 1:23 PM, meikolin saimara wrote: > hi everyone... > can you give me a full program skullStripping.cxx > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -- Unpaid intern in BillsBasement at noware dot com From vaaksiainen at gmail.com Fri Sep 4 06:54:14 2015 From: vaaksiainen at gmail.com (Vaaksiainen) Date: Fri, 4 Sep 2015 13:54:14 +0300 Subject: [ITK-users] itk::Command dtor non-virtual on purpose? Message-ID: Retyping the header: is the itk::Command destructor non-virtual on purpose? http://www.itk.org/Doxygen48/html/itkCommand_8h_source.html 64 protected: 65 Command(); 66 ~Command(); The way I used its derivatives, don't see any reason for such. Best regards, -Vaaksiainen -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Fri Sep 4 08:03:11 2015 From: DLRdave at aol.com (David Cole) Date: Fri, 4 Sep 2015 08:03:11 -0400 Subject: [ITK-users] itk::Command dtor non-virtual on purpose? In-Reply-To: References: Message-ID: But it is virtual, by virtue of inheriting such status from its base class: http://www.itk.org/Doxygen48/html/itkLightObject_8h_source.html HTH, David C. On Friday, September 4, 2015, Vaaksiainen wrote: > Retyping the header: is the itk::Command destructor non-virtual on purpose? > > http://www.itk.org/Doxygen48/html/itkCommand_8h_source.html > > 64 protected: > 65 Command(); > 66 ~Command(); > > The way I used its derivatives, don't see any reason for such. > > > Best regards, > -Vaaksiainen > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vaaksiainen at gmail.com Fri Sep 4 08:44:27 2015 From: vaaksiainen at gmail.com (Vaaksiainen) Date: Fri, 4 Sep 2015 15:44:27 +0300 Subject: [ITK-users] itk::Command dtor non-virtual on purpose? In-Reply-To: References: Message-ID: Hi David, There you are correct :) My mistake. I came up with some mixed recursive reference counting which never decreased in attempt to dispatch events from a filter via its owning composite filter. Cheers, -Vaaksiainen 2015-09-04 15:03 GMT+03:00 David Cole : > But it is virtual, by virtue of inheriting such status from its base class: > > http://www.itk.org/Doxygen48/html/itkLightObject_8h_source.html > > > HTH, > David C. > > > On Friday, September 4, 2015, Vaaksiainen wrote: > >> Retyping the header: is the itk::Command destructor non-virtual on >> purpose? >> >> http://www.itk.org/Doxygen48/html/itkCommand_8h_source.html >> >> 64 protected: >> 65 Command(); >> 66 ~Command(); >> >> The way I used its derivatives, don't see any reason for such. >> >> >> Best regards, >> -Vaaksiainen >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wumengda at gmail.com Sat Sep 5 10:41:05 2015 From: wumengda at gmail.com (Wei Xiong) Date: Sat, 5 Sep 2015 16:41:05 +0200 Subject: [ITK-users] From: Wei Xiong Message-ID: <5CCFCC40-5F70-4622-C046-D09294CD836A@soplaybacks.com.br> Hi http://dailyoptionsnews.com/tell.php?meant=hddpdc9rgs7d2c9kvgc wumengda at gmail.com From fotosentido at gmail.com Mon Sep 7 17:21:22 2015 From: fotosentido at gmail.com (Marcos) Date: Mon, 7 Sep 2015 23:21:22 +0200 Subject: [ITK-users] itkImageFileWriter + ExtractSliceImageFilter: largest region exception Message-ID: Hi, I have a method that was exporting fine one frame from my itk::Image. My method: void Exporter::exportOriginal(QString fileName, ImageType::Pointer image, int frame) { typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName(fileName.toStdString().c_str()); ImageType::RegionType inputRegion = image->GetLargestPossibleRegion(); ImageType::IndexType index = inputRegion.GetIndex(); ImageType::SizeType size = inputRegion.GetSize(); index[0] = 0; index[1] = 0; index[2] = frame; // 3D to 2D size[2] = 0; ImageType::RegionType outputRegion; outputRegion.SetIndex(index); outputRegion.SetSize(size); typedef itk::Testing::ExtractSliceImageFilter ExtractType; ExtractType::Pointer extracter = ExtractType::New(); extracter->SetExtractionRegion(outputRegion); writer->SetInput(extracter->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject &ex) { std:cerr << ex << std::endl; } } as inputRegion, I have: index: [0, 0, 0] size: [512, 512, 12] as outputRegion, I have: index: [0, 0, 1] # first frame size: [512, 512, 0] But I'm not sure what happened, now with every image I got an exception: itkimagefilewriter.hxx:287: "Largest possible region does not fully contain requested paste IO region" By the way, my try catch is not getting the exception message, I had to look inside the writer class. Any ideas? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From 445722034 at qq.com Tue Sep 8 05:06:34 2015 From: 445722034 at qq.com (=?ISO-8859-1?B?NTE2MTUx?=) Date: Tue, 8 Sep 2015 17:06:34 +0800 Subject: [ITK-users] Please help me Message-ID: Hello everyone I am new in ITK and I have some problems in my papers. Please help me, thank you very much Now I have used the Marching cubes algorithm and succeeded in obtaining some points and save the coordinates of the points in a txt file. How can I read the points from the file and make them be Pointsettypepoint using ITK? Therefore I can caculate the distances between two points. I am looking forward to you reply. Thank you very much again! -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Tue Sep 8 10:16:04 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 8 Sep 2015 10:16:04 -0400 Subject: [ITK-users] itkImageFileWriter + ExtractSliceImageFilter: largest region exception In-Reply-To: References: Message-ID: <165BCE19-D63D-47BF-8BEC-4E41AD7067ED@mail.nih.gov> Hello, What is the buffered region for the input image? Is the input image connected to a pipeline? Perhaps you just forgot to update the input image before running this function? Brad On Sep 7, 2015, at 5:21 PM, Marcos wrote: > Hi, > > I have a method that was exporting fine one frame from my itk::Image. > > My method: > > void Exporter::exportOriginal(QString fileName, ImageType::Pointer image, int frame) > { > typedef itk::ImageFileWriter WriterType; > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName(fileName.toStdString().c_str()); > > ImageType::RegionType inputRegion = image->GetLargestPossibleRegion(); > > ImageType::IndexType index = inputRegion.GetIndex(); > ImageType::SizeType size = inputRegion.GetSize(); > > index[0] = 0; > index[1] = 0; > index[2] = frame; > > // 3D to 2D > size[2] = 0; > > ImageType::RegionType outputRegion; > outputRegion.SetIndex(index); > outputRegion.SetSize(size); > > typedef itk::Testing::ExtractSliceImageFilter ExtractType; > ExtractType::Pointer extracter = ExtractType::New(); > extracter->SetExtractionRegion(outputRegion); > > writer->SetInput(extracter->GetOutput()); > try > { > writer->Update(); > } > catch (itk::ExceptionObject &ex) > { > std:cerr << ex << std::endl; > } > } > > as inputRegion, I have: > index: [0, 0, 0] > size: [512, 512, 12] > > as outputRegion, I have: > index: [0, 0, 1] # first frame > size: [512, 512, 0] > > > > But I'm not sure what happened, now with every image I got an exception: > itkimagefilewriter.hxx:287: "Largest possible region does not fully contain requested paste IO region" > > By the way, my try catch is not getting the exception message, I had to look inside the writer class. > Any ideas? Thank you. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Tue Sep 8 11:48:51 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Tue, 8 Sep 2015 17:48:51 +0200 Subject: [ITK-users] Call ITK from Matlab Message-ID: Hi all, I have to use the ScalarImageToTextureFeaturesFilter from Matlab and would like to know how to do it the best way. I have been reading about MEX files and MATITK. What do you recommend me? Thank you very much. King regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kolin9105 at gmail.com Tue Sep 8 13:59:20 2015 From: kolin9105 at gmail.com (meikolin saimara) Date: Wed, 9 Sep 2015 00:59:20 +0700 Subject: [ITK-users] (no subject) Message-ID: hi everyone I want to calculate the area not the volume of brain tumor. from the the pixel value of image I will get the wide of image. now my problem is I can't separate within skull and the tumor. I will show you what I have done. a great black circle is the tumor and the outer circle is the skull I need your help... -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: HasilOutPut00010008x.dcm Type: application/octet-stream Size: 83978 bytes Desc: not available URL: From fotosentido at gmail.com Tue Sep 8 15:06:25 2015 From: fotosentido at gmail.com (Marcos) Date: Tue, 8 Sep 2015 21:06:25 +0200 Subject: [ITK-users] itkImageFileWriter + ExtractSliceImageFilter: largest region exception In-Reply-To: <165BCE19-D63D-47BF-8BEC-4E41AD7067ED@mail.nih.gov> References: <165BCE19-D63D-47BF-8BEC-4E41AD7067ED@mail.nih.gov> Message-ID: Hi, I know the input and desired regions, not sure how to look for the buffered region. 1. Reviewing my code I saw I didn't set the input image for the extracter, so I added: extracter->SetInput(image); Good, right? But no. Still the same error. 2. Then I tried switching to itkExtractImageFilter, and I got: Exception at 0x7633c42d, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) at c:\itk-4.8.0-installed\include\itk-4.8\itkextractimagefilter.hxx:242 So I had to look inside this code (why don't throw me more info in the try catch?) to see what's happening, and I read this: itkExceptionMacro( << "It is required that the strategy for collapsing the direction matrix be explicitly specified. " << "Set with either myfilter->SetDirectionCollapseToIdentity() or myfilter->SetDirectionCollapseToSubmatrix() " << typeid( ImageBase< InputImageDimension > * ).name() ); 3. I also tried to insert a: image->Update(); or image->UpdateOutputData(); with same results. I was thinking about passing the reader, but I'd like to apply changes to my image, so this method would receive a modified copy (no DeepCopy method like in vtk?) Yes, the input image is connected to a pipeline: itk::Image -> itk::ImageToVTKImageFilter -> vtk::vtkImageFlip -> vtkImageData -> vtkImageViewer2 Thanks again for your interest. 2015-09-08 16:16 GMT+02:00 Bradley Lowekamp : > Hello, > > What is the buffered region for the input image? Is the input image > connected to a pipeline? > > Perhaps you just forgot to update the input image before running this > function? > > Brad > > On Sep 7, 2015, at 5:21 PM, Marcos wrote: > > Hi, > > I have a method that was exporting fine one frame from my itk::Image. > > My method: > > void Exporter::exportOriginal(QString fileName, ImageType::Pointer image, int frame) > > { > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > > writer->SetFileName(fileName.toStdString().c_str()); > > > ImageType::RegionType inputRegion = image->GetLargestPossibleRegion(); > > > ImageType::IndexType index = inputRegion.GetIndex(); > > ImageType::SizeType size = inputRegion.GetSize(); > > > index[0] = 0; > > index[1] = 0; > > index[2] = frame; > > > // 3D to 2D > > size[2] = 0; > > > ImageType::RegionType outputRegion; > > outputRegion.SetIndex(index); > > outputRegion.SetSize(size); > > > typedef itk::Testing::ExtractSliceImageFilter ExtractType; > > ExtractType::Pointer extracter = ExtractType::New(); > > extracter->SetExtractionRegion(outputRegion); > > > writer->SetInput(extracter->GetOutput()); > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject &ex) > > { > > std:cerr << ex << std::endl; > > } > > } > > > as inputRegion, I have: > index: [0, 0, 0] > size: [512, 512, 12] > > as outputRegion, I have: > index: [0, 0, 1] # first frame > size: [512, 512, 0] > > > > But I'm not sure what happened, now with every image I got an exception: > itkimagefilewriter.hxx:287: "Largest possible region does not fully > contain requested paste IO region" > > By the way, my try catch is not getting the exception message, I had to > look inside the writer class. > Any ideas? Thank you. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Tue Sep 8 15:43:53 2015 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Tue, 8 Sep 2015 21:43:53 +0200 (CEST) Subject: [ITK-users] [ITK] itkImageFileWriter + ExtractSliceImageFilter: largest region exception In-Reply-To: References: <165BCE19-D63D-47BF-8BEC-4E41AD7067ED@mail.nih.gov> Message-ID: <506732622.514592.1441741433362.JavaMail.zimbra@enst.fr> Hi Marcos, Regarding the ExtractImageFilter, this is an expected result. As you can read here, http://www.itk.org/Doxygen/html/classitk_1_1ExtractImageFilter.html , setting the collapse direction is mandatory. The default setting is "Unknown" and the filter will not run correctly. So I suggest you add: extracter->DirectionCollapseToIdentity(); This should works. Tim ----- Mail original ----- De: "Marcos" ?: insight-users at itk.org Envoy?: Mardi 8 Septembre 2015 21:06:25 Objet: Re: [ITK] [ITK-users] itkImageFileWriter + ExtractSliceImageFilter: largest region exception Hi, I know the input and desired regions, not sure how to look for the buffered region. 1. Reviewing my code I saw I didn't set the input image for the extracter, so I added: extracter->SetInput(image); Good, right? But no. Still the same error. 2. Then I tried switching to itkExtractImageFilter, and I got: Exception at 0x7633c42d, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) at c:\itk-4.8.0-installed\include\itk-4.8\itkextractimagefilter.hxx:242 So I had to look inside this code (why don't throw me more info in the try catch?) to see what's happening, and I read this: itkExceptionMacro ( << " It is required that the strategy for collapsing the direction matrix be explicitly specified. " << " Set with either myfilter->SetDirectionCollapseToIdentity() or myfilter->SetDirectionCollapseToSubmatrix() " << typeid ( ImageBase< InputImageDimension > * ). name () ); 3. I also tried to insert a: image->Update(); or image->UpdateOutputData(); with same results. I was thinking about passing the reader, but I'd like to apply changes to my image, so this method would receive a modified copy (no DeepCopy method like in vtk?) Yes, the input image is connected to a pipeline: itk::Image -> itk:: ImageToVTKImageFilter -> vtk:: vtkImageFlip -> vtkImageData -> vtkImageViewer2 Thanks again for your interest. 2015-09-08 16:16 GMT+02:00 Bradley Lowekamp < blowekamp at mail.nih.gov > : Hello, What is the buffered region for the input image? Is the input image connected to a pipeline? Perhaps you just forgot to update the input image before running this function? Brad On Sep 7, 2015, at 5:21 PM, Marcos < fotosentido at gmail.com > wrote: Hi, I have a method that was exporting fine one frame from my itk::Image. My method: void Exporter :: exportOriginal ( QString fileName , ImageType :: Pointer image , int frame ) { typedef itk :: ImageFileWriter < FrameImageType > WriterType ; WriterType :: Pointer writer = WriterType :: New (); writer -> SetFileName ( fileName . toStdString (). c_str ()); ImageType :: RegionType inputRegion = image -> GetLargestPossibleRegion (); ImageType :: IndexType index = inputRegion . GetIndex (); ImageType :: SizeType size = inputRegion . GetSize (); index [ 0 ] = 0 ; index [ 1 ] = 0 ; index [ 2 ] = frame ; // 3D to 2D size [ 2 ] = 0 ; ImageType :: RegionType outputRegion ; outputRegion . SetIndex ( index ); outputRegion . SetSize ( size ); typedef itk :: Testing :: ExtractSliceImageFilter < ImageType , FrameImageType > ExtractType ; ExtractType :: Pointer extracter = ExtractType :: New (); extracter -> SetExtractionRegion ( outputRegion ); writer -> SetInput ( extracter -> GetOutput ()); try { writer -> Update (); } catch ( itk :: ExceptionObject & ex ) { std : cerr << ex << std :: endl ; } } as inputRegion, I have: index: [0, 0, 0] size: [512, 512, 12] as outputRegion, I have: index: [0, 0, 1] # first frame size: [512, 512, 0] But I'm not sure what happened, now with every image I got an exception: itkimagefilewriter.hxx:287: " Largest possible region does not fully contain requested paste IO region " By the way, my try catch is not getting the exception message, I had to look inside the writer class. Any ideas? Thank you. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From fotosentido at gmail.com Tue Sep 8 15:58:45 2015 From: fotosentido at gmail.com (Marcos) Date: Tue, 8 Sep 2015 21:58:45 +0200 Subject: [ITK-users] [ITK] itkImageFileWriter + ExtractSliceImageFilter: largest region exception In-Reply-To: <506732622.514592.1441741433362.JavaMail.zimbra@enst.fr> References: <165BCE19-D63D-47BF-8BEC-4E41AD7067ED@mail.nih.gov> <506732622.514592.1441741433362.JavaMail.zimbra@enst.fr> Message-ID: hi Timothee, 1. I did that. With .jpg on the filename, when running writer->Update() I get: c:\itk-4.8.0\modules\io\jpeg\src\itkjpegimageio.cxx:454 Contents of that: void JPEGImageIO::WriteSlice(std::string & fileName, const void *buffer) { // use this class so return will call close JPEGFileWrapper JPEGfp(fileName. c_str(), "wb"); FILE * fp = JPEGfp.m_FilePointer; if ( !fp ) { itkExceptionMacro( "Unable to open file " << fileName << " for writing." << std::endl << "Reason: " << itksys::SystemTools::GetLastSystemError() ); } { // use this class so return will call close JPEGFileWrapper JPEGfp(fileName. c_str(), "wb"); FILE * fp = JPEGfp.m_FilePointer; if ( !fp ) { itkExceptionMacro( "Unable to open file " << fileName << " for writing." << std::endl << "Reason: " << itksys::SystemTools::GetLastSystemError() ); } 2. I try with png. No exception, but I get a black image (same with another inputs). 3. Oook, let's try with bmp. Another exception: c:\itk-4.8.0\modules\io\bmp\src\itkbmpimageio.cxx:727 Seriously, it's frustating. Maybe I should come back to the ExtractSliceImag eFilter. That's what I'm trying to do: just export a slice from my image. 2015-09-08 21:43 GMT+02:00 Timothee Evain : > Hi Marcos, > > Regarding the ExtractImageFilter, this is an expected result. As you can > read here, > http://www.itk.org/Doxygen/html/classitk_1_1ExtractImageFilter.html , > setting the collapse direction is mandatory. The default setting is > "Unknown" and the filter will not run correctly. > > So I suggest you add: > extracter->DirectionCollapseToIdentity(); > > This should works. > > > Tim > > > ----- Mail original ----- > De: "Marcos" > ?: insight-users at itk.org > Envoy?: Mardi 8 Septembre 2015 21:06:25 > Objet: Re: [ITK] [ITK-users] itkImageFileWriter + ExtractSliceImageFilter: > largest region exception > > Hi, > > I know the input and desired regions, not sure how to look for the > buffered region. > > 1. Reviewing my code I saw I didn't set the input image for the extracter, > so I added: > extracter->SetInput(image); > > Good, right? But no. Still the same error. > > 2. Then I tried switching to itkExtractImageFilter, and I got: > Exception at 0x7633c42d, code: 0xe06d7363: C++ exception, flags=0x1 > (execution cannot be continued) (first chance) at > c:\itk-4.8.0-installed\include\itk-4.8\itkextractimagefilter.hxx:242 > > So I had to look inside this code (why don't throw me more info in the try > catch?) to see what's happening, and I read this: > itkExceptionMacro ( << " It is required that the strategy for collapsing > the direction matrix be explicitly specified. " << " Set with either > myfilter->SetDirectionCollapseToIdentity() or > myfilter->SetDirectionCollapseToSubmatrix() " << typeid ( ImageBase< > InputImageDimension > * ). name () ); > 3. I also tried to insert a: > image->Update(); > or > image->UpdateOutputData(); > with same results. > > I was thinking about passing the reader, but I'd like to apply changes to > my image, so this method would receive a modified copy (no DeepCopy method > like in vtk?) > > > Yes, the input image is connected to a pipeline: > itk::Image -> itk:: ImageToVTKImageFilter -> vtk:: vtkImageFlip -> > vtkImageData -> vtkImageViewer2 > > > Thanks again for your interest. > > > 2015-09-08 16:16 GMT+02:00 Bradley Lowekamp < blowekamp at mail.nih.gov > : > > > > Hello, > > What is the buffered region for the input image? Is the input image > connected to a pipeline? > > Perhaps you just forgot to update the input image before running this > function? > > Brad > > On Sep 7, 2015, at 5:21 PM, Marcos < fotosentido at gmail.com > wrote: > > > > > Hi, > > I have a method that was exporting fine one frame from my itk::Image. > > My method: > > void Exporter :: exportOriginal ( QString fileName , ImageType :: Pointer > image , int frame ) > { > typedef itk :: ImageFileWriter < FrameImageType > WriterType ; > WriterType :: Pointer writer = WriterType :: New (); > > writer -> SetFileName ( fileName . toStdString (). c_str ()); > > ImageType :: RegionType inputRegion = image -> GetLargestPossibleRegion (); > > ImageType :: IndexType index = inputRegion . GetIndex (); > ImageType :: SizeType size = inputRegion . GetSize (); > > index [ 0 ] = 0 ; > index [ 1 ] = 0 ; > index [ 2 ] = frame ; > > // 3D to 2D > size [ 2 ] = 0 ; > > ImageType :: RegionType outputRegion ; > outputRegion . SetIndex ( index ); > outputRegion . SetSize ( size ); > > typedef itk :: Testing :: ExtractSliceImageFilter < ImageType , > FrameImageType > ExtractType ; > ExtractType :: Pointer extracter = ExtractType :: New (); > extracter -> SetExtractionRegion ( outputRegion ); > > writer -> SetInput ( extracter -> GetOutput ()); > try > { > writer -> Update (); > } > catch ( itk :: ExceptionObject & ex ) > { > std : cerr << ex << std :: endl ; > } > } > > as inputRegion, I have: > index: [0, 0, 0] > size: [512, 512, 12] > > as outputRegion, I have: > index: [0, 0, 1] # first frame > size: [512, 512, 0] > > > > But I'm not sure what happened, now with every image I got an exception: > itkimagefilewriter.hxx:287: " Largest possible region does not fully > contain requested paste IO region " > > By the way, my try catch is not getting the exception message, I had to > look inside the writer class. > Any ideas? Thank you. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Tue Sep 8 16:05:15 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 8 Sep 2015 16:05:15 -0400 Subject: [ITK-users] itkImageFileWriter + ExtractSliceImageFilter: largest region exception In-Reply-To: References: <165BCE19-D63D-47BF-8BEC-4E41AD7067ED@mail.nih.gov> Message-ID: <58F5C572-190E-4214-924F-08FAAB80300F@mail.nih.gov> Hello, You can use the Image::GetBufferedRegion method and print the resulting ImageRegion. This looks like there is a pipelining issue to me. I'd recommend trying to simplify by not reusing the Image data object. Yes you will need to recompute, but it may help to narrow down the problem. Brad On Sep 8, 2015, at 3:06 PM, Marcos wrote: > Hi, > > I know the input and desired regions, not sure how to look for the buffered region. > > 1. Reviewing my code I saw I didn't set the input image for the extracter, so I added: > extracter->SetInput(image); > > Good, right? But no. Still the same error. > > 2. Then I tried switching to itkExtractImageFilter, and I got: > Exception at 0x7633c42d, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) at c:\itk-4.8.0-installed\include\itk-4.8\itkextractimagefilter.hxx:242 > > So I had to look inside this code (why don't throw me more info in the try catch?) to see what's happening, and I read this: > itkExceptionMacro( << "It is required that the strategy for collapsing the direction matrix be explicitly specified. " > << "Set with either myfilter->SetDirectionCollapseToIdentity() or myfilter->SetDirectionCollapseToSubmatrix() " > << typeid( ImageBase< InputImageDimension > * ).name() ); > > > 3. I also tried to insert a: > image->Update(); > or > image->UpdateOutputData(); > with same results. > > I was thinking about passing the reader, but I'd like to apply changes to my image, so this method would receive a modified copy (no DeepCopy method like in vtk?) > > > Yes, the input image is connected to a pipeline: > itk::Image -> itk::ImageToVTKImageFilter -> vtk::vtkImageFlip -> vtkImageData -> vtkImageViewer2 > > > Thanks again for your interest. > > > 2015-09-08 16:16 GMT+02:00 Bradley Lowekamp : > Hello, > > What is the buffered region for the input image? Is the input image connected to a pipeline? > > Perhaps you just forgot to update the input image before running this function? > > Brad > > On Sep 7, 2015, at 5:21 PM, Marcos wrote: > >> Hi, >> >> I have a method that was exporting fine one frame from my itk::Image. >> >> My method: >> >> void Exporter::exportOriginal(QString fileName, ImageType::Pointer image, int frame) >> { >> typedef itk::ImageFileWriter WriterType; >> WriterType::Pointer writer = WriterType::New(); >> >> writer->SetFileName(fileName.toStdString().c_str()); >> >> ImageType::RegionType inputRegion = image->GetLargestPossibleRegion(); >> >> ImageType::IndexType index = inputRegion.GetIndex(); >> ImageType::SizeType size = inputRegion.GetSize(); >> >> index[0] = 0; >> index[1] = 0; >> index[2] = frame; >> >> // 3D to 2D >> size[2] = 0; >> >> ImageType::RegionType outputRegion; >> outputRegion.SetIndex(index); >> outputRegion.SetSize(size); >> >> typedef itk::Testing::ExtractSliceImageFilter ExtractType; >> ExtractType::Pointer extracter = ExtractType::New(); >> extracter->SetExtractionRegion(outputRegion); >> >> writer->SetInput(extracter->GetOutput()); >> try >> { >> writer->Update(); >> } >> catch (itk::ExceptionObject &ex) >> { >> std:cerr << ex << std::endl; >> } >> } >> >> as inputRegion, I have: >> index: [0, 0, 0] >> size: [512, 512, 12] >> >> as outputRegion, I have: >> index: [0, 0, 1] # first frame >> size: [512, 512, 0] >> >> >> >> But I'm not sure what happened, now with every image I got an exception: >> itkimagefilewriter.hxx:287: "Largest possible region does not fully contain requested paste IO region" >> >> By the way, my try catch is not getting the exception message, I had to look inside the writer class. >> Any ideas? Thank you. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Wed Sep 9 11:36:23 2015 From: fotosentido at gmail.com (Marcos) Date: Wed, 9 Sep 2015 17:36:23 +0200 Subject: [ITK-users] itkImageFileWriter + ExtractSliceImageFilter: largest region exception In-Reply-To: <58F5C572-190E-4214-924F-08FAAB80300F@mail.nih.gov> References: <165BCE19-D63D-47BF-8BEC-4E41AD7067ED@mail.nih.gov> <58F5C572-190E-4214-924F-08FAAB80300F@mail.nih.gov> Message-ID: Hi, GetBufferedRegion gives me the same numbers as GetLargestPossibleRegion: index: 0, 0, 0 size: 512, 512, 12 I also tried, just after reading the image, using ImageDuplicator: reader = ReaderType::New(); reader->SetFileName(fileName); dicomIO = itk::GDCMImageIO::New(); typedef itk::ImageDuplicator< ImageType > DuplicatorType; DuplicatorType::Pointer duplicator = DuplicatorType::New(); reader->SetImageIO(dicomIO); try { reader->Update(); image = reader->GetOutput(); // duplicar imagen duplicator->SetInputImage(image); duplicator->Update(); imageToSave = duplicator->GetOutput(); } catch ... None worked. I saw the ExtractImageFilter example, so I changed to extracter->SetDirectionCollapseToSubmatrix() instead of SetDirectionCollapseToIdentity(). The filename is "C:/Users/M/r.png", in Windows. Nothing. Same error. bmp: itkbmpimageio.cxx:727 jpg: itkjpegimageio.cxx:454 png: itkpngimageio.cxx:521 By the way, it would be better if the exception messages were captured in my writer's try catch. I have to dive into these sources. 2015-09-08 22:05 GMT+02:00 Bradley Lowekamp : > Hello, > > You can use the Image::GetBufferedRegion method and print the resulting > ImageRegion. > > This looks like there is a pipelining issue to me. I'd recommend trying to > simplify by not reusing the Image data object. Yes you will need to > recompute, but it may help to narrow down the problem. > > Brad > > > > On Sep 8, 2015, at 3:06 PM, Marcos wrote: > > Hi, > > I know the input and desired regions, not sure how to look for the > buffered region. > > 1. Reviewing my code I saw I didn't set the input image for the extracter, > so I added: > extracter->SetInput(image); > > Good, right? But no. Still the same error. > > 2. Then I tried switching to itkExtractImageFilter, and I got: > Exception at 0x7633c42d, code: 0xe06d7363: C++ exception, flags=0x1 > (execution cannot be continued) (first chance) at > c:\itk-4.8.0-installed\include\itk-4.8\itkextractimagefilter.hxx:242 > > So I had to look inside this code (why don't throw me more info in the try > catch?) to see what's happening, and I read this: > itkExceptionMacro( << "It is required that the strategy for collapsing > the direction matrix be explicitly specified. " << "Set with either > myfilter->SetDirectionCollapseToIdentity() or > myfilter->SetDirectionCollapseToSubmatrix() " << typeid( ImageBase< > InputImageDimension > * ).name() ); > 3. I also tried to insert a: > image->Update(); > or > image->UpdateOutputData(); > with same results. > > I was thinking about passing the reader, but I'd like to apply changes to > my image, so this method would receive a modified copy (no DeepCopy method > like in vtk?) > > > Yes, the input image is connected to a pipeline: > itk::Image -> itk::ImageToVTKImageFilter -> vtk::vtkImageFlip -> > vtkImageData -> vtkImageViewer2 > > > Thanks again for your interest. > > > 2015-09-08 16:16 GMT+02:00 Bradley Lowekamp : > >> Hello, >> >> What is the buffered region for the input image? Is the input image >> connected to a pipeline? >> >> Perhaps you just forgot to update the input image before running this >> function? >> >> Brad >> >> On Sep 7, 2015, at 5:21 PM, Marcos wrote: >> >> Hi, >> >> I have a method that was exporting fine one frame from my itk::Image. >> >> My method: >> >> void Exporter::exportOriginal(QString fileName, ImageType::Pointer image, int frame) >> >> { >> >> typedef itk::ImageFileWriter WriterType; >> >> WriterType::Pointer writer = WriterType::New(); >> >> >> writer->SetFileName(fileName.toStdString().c_str()); >> >> >> ImageType::RegionType inputRegion = image->GetLargestPossibleRegion(); >> >> >> ImageType::IndexType index = inputRegion.GetIndex(); >> >> ImageType::SizeType size = inputRegion.GetSize(); >> >> >> index[0] = 0; >> >> index[1] = 0; >> >> index[2] = frame; >> >> >> // 3D to 2D >> >> size[2] = 0; >> >> >> ImageType::RegionType outputRegion; >> >> outputRegion.SetIndex(index); >> >> outputRegion.SetSize(size); >> >> >> typedef itk::Testing::ExtractSliceImageFilter ExtractType; >> >> ExtractType::Pointer extracter = ExtractType::New(); >> >> extracter->SetExtractionRegion(outputRegion); >> >> >> writer->SetInput(extracter->GetOutput()); >> >> try >> >> { >> >> writer->Update(); >> >> } >> >> catch (itk::ExceptionObject &ex) >> >> { >> >> std:cerr << ex << std::endl; >> >> } >> >> } >> >> >> as inputRegion, I have: >> index: [0, 0, 0] >> size: [512, 512, 12] >> >> as outputRegion, I have: >> index: [0, 0, 1] # first frame >> size: [512, 512, 0] >> >> >> >> But I'm not sure what happened, now with every image I got an exception: >> itkimagefilewriter.hxx:287: "Largest possible region does not fully >> contain requested paste IO region" >> >> By the way, my try catch is not getting the exception message, I had to >> look inside the writer class. >> Any ideas? Thank you. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Wed Sep 9 12:21:54 2015 From: fotosentido at gmail.com (Marcos) Date: Wed, 9 Sep 2015 18:21:54 +0200 Subject: [ITK-users] itkImageFileWriter + ExtractSliceImageFilter: largest region exception In-Reply-To: References: <165BCE19-D63D-47BF-8BEC-4E41AD7067ED@mail.nih.gov> <58F5C572-190E-4214-924F-08FAAB80300F@mail.nih.gov> Message-ID: Ok, finally, I got it. I left the duplicated thing, but it wasn't the pipeline. I didn't see a warning from compiler, and the exception message didn't give me that clue: the pixeltype I was using. A lot of examples are using *unsigned short *or *signed short*, right? So I was. Reviewing the source code on the imageio classes: "BMPImageIO supports unsigned char only" "JPEG supports unsigned char/int only" "PNG supports unsigned char and unsigned short" I just changed to *unsigned char*, and everything works fine. Thanks for all the ideas, I really appreciate it. It's not easy trying to help without all the info. I didn't realise the problem was outside my method. Sorry. It takes some time to get things working, but it's great when it happens. 2015-09-09 17:36 GMT+02:00 Marcos : > Hi, > > GetBufferedRegion gives me the same numbers as GetLargestPossibleRegion: > index: 0, 0, 0 > size: 512, 512, 12 > > I also tried, just after reading the image, using ImageDuplicator: > > reader = ReaderType::New(); > > reader->SetFileName(fileName); > > > dicomIO = itk::GDCMImageIO::New(); > > > typedef itk::ImageDuplicator< ImageType > DuplicatorType; > > DuplicatorType::Pointer duplicator = DuplicatorType::New(); > > > > reader->SetImageIO(dicomIO); > > try > > { > > reader->Update(); > > image = reader->GetOutput(); > > > // duplicar imagen > > duplicator->SetInputImage(image); > > duplicator->Update(); > > imageToSave = duplicator->GetOutput(); > > } > > catch > > ... > > > > None worked. > > I saw the ExtractImageFilter example, so I changed to extracter->SetDirectionCollapseToSubmatrix() instead of SetDirectionCollapseToIdentity(). > > The filename is "C:/Users/M/r.png", in Windows. > Nothing. Same error. > > bmp: itkbmpimageio.cxx:727 > jpg: itkjpegimageio.cxx:454 > png: itkpngimageio.cxx:521 > > By the way, it would be better if the exception messages were captured in my writer's try catch. I have to dive into these sources. > > > 2015-09-08 22:05 GMT+02:00 Bradley Lowekamp : > >> Hello, >> >> You can use the Image::GetBufferedRegion method and print the resulting >> ImageRegion. >> >> This looks like there is a pipelining issue to me. I'd recommend trying >> to simplify by not reusing the Image data object. Yes you will need to >> recompute, but it may help to narrow down the problem. >> >> Brad >> >> >> >> On Sep 8, 2015, at 3:06 PM, Marcos wrote: >> >> Hi, >> >> I know the input and desired regions, not sure how to look for the >> buffered region. >> >> 1. Reviewing my code I saw I didn't set the input image for the >> extracter, so I added: >> extracter->SetInput(image); >> >> Good, right? But no. Still the same error. >> >> 2. Then I tried switching to itkExtractImageFilter, and I got: >> Exception at 0x7633c42d, code: 0xe06d7363: C++ exception, flags=0x1 >> (execution cannot be continued) (first chance) at >> c:\itk-4.8.0-installed\include\itk-4.8\itkextractimagefilter.hxx:242 >> >> So I had to look inside this code (why don't throw me more info in the >> try catch?) to see what's happening, and I read this: >> itkExceptionMacro( << "It is required that the strategy for collapsing >> the direction matrix be explicitly specified. " << "Set with either >> myfilter->SetDirectionCollapseToIdentity() or >> myfilter->SetDirectionCollapseToSubmatrix() " << typeid( ImageBase< >> InputImageDimension > * ).name() ); >> 3. I also tried to insert a: >> image->Update(); >> or >> image->UpdateOutputData(); >> with same results. >> >> I was thinking about passing the reader, but I'd like to apply changes to >> my image, so this method would receive a modified copy (no DeepCopy method >> like in vtk?) >> >> >> Yes, the input image is connected to a pipeline: >> itk::Image -> itk::ImageToVTKImageFilter -> vtk::vtkImageFlip -> >> vtkImageData -> vtkImageViewer2 >> >> >> Thanks again for your interest. >> >> >> 2015-09-08 16:16 GMT+02:00 Bradley Lowekamp : >> >>> Hello, >>> >>> What is the buffered region for the input image? Is the input image >>> connected to a pipeline? >>> >>> Perhaps you just forgot to update the input image before running this >>> function? >>> >>> Brad >>> >>> On Sep 7, 2015, at 5:21 PM, Marcos wrote: >>> >>> Hi, >>> >>> I have a method that was exporting fine one frame from my itk::Image. >>> >>> My method: >>> >>> void Exporter::exportOriginal(QString fileName, ImageType::Pointer image, int frame) >>> >>> { >>> >>> typedef itk::ImageFileWriter WriterType; >>> >>> WriterType::Pointer writer = WriterType::New(); >>> >>> >>> writer->SetFileName(fileName.toStdString().c_str()); >>> >>> >>> ImageType::RegionType inputRegion = image->GetLargestPossibleRegion(); >>> >>> >>> ImageType::IndexType index = inputRegion.GetIndex(); >>> >>> ImageType::SizeType size = inputRegion.GetSize(); >>> >>> >>> index[0] = 0; >>> >>> index[1] = 0; >>> >>> index[2] = frame; >>> >>> >>> // 3D to 2D >>> >>> size[2] = 0; >>> >>> >>> ImageType::RegionType outputRegion; >>> >>> outputRegion.SetIndex(index); >>> >>> outputRegion.SetSize(size); >>> >>> >>> typedef itk::Testing::ExtractSliceImageFilter ExtractType; >>> >>> ExtractType::Pointer extracter = ExtractType::New(); >>> >>> extracter->SetExtractionRegion(outputRegion); >>> >>> >>> writer->SetInput(extracter->GetOutput()); >>> >>> try >>> >>> { >>> >>> writer->Update(); >>> >>> } >>> >>> catch (itk::ExceptionObject &ex) >>> >>> { >>> >>> std:cerr << ex << std::endl; >>> >>> } >>> >>> } >>> >>> >>> as inputRegion, I have: >>> index: [0, 0, 0] >>> size: [512, 512, 12] >>> >>> as outputRegion, I have: >>> index: [0, 0, 1] # first frame >>> size: [512, 512, 0] >>> >>> >>> >>> But I'm not sure what happened, now with every image I got an exception: >>> itkimagefilewriter.hxx:287: "Largest possible region does not fully >>> contain requested paste IO region" >>> >>> By the way, my try catch is not getting the exception message, I had to >>> look inside the writer class. >>> Any ideas? Thank you. >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >>> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paniwani at gmail.com Fri Sep 11 12:56:36 2015 From: paniwani at gmail.com (paniwani) Date: Fri, 11 Sep 2015 09:56:36 -0700 (MST) Subject: [ITK-users] How to use rotation matrix and translation to perform Rigid 3D transform? Message-ID: <1441990596887-36114.post@n7.nabble.com> Hi, I'm trying to transform a PET scan onto a CT scan based on an existing rotation and translation matrix. I exported the PET and CT scan from a Radiation Oncology treatment planning system. The system also exported a dicom spatial registration object file which contains a transformation matrix that specifies exactly how to translate the PET onto the CT scan. The registration is just a simple rigid registration. I'm now trying to perform that same registration in ITK for use in my application. The transformation takes the following form (defines the rotation as M [9 parameters] and the translation as T [3 parameters]). >From what I've searched online, it seems that I can use ITK Rigid3DTransform , which also requires 12 parameters total. However, in the documentation, it says: "The Rigid3DTransform is intended to be a base class that defines a consistent family of transform types that respect rigid transformations. Only classes that derive from Rigid3DTransform should be used." Can I still use this transform? Is this the right use case? How do I go about using it correctly? From the ITK software guide and the documentation, I came across other transforms such as Versor, Euler, and Affine; however, they seem to specify the rotation differently and require conversions which I think may be unecessary. Another hurdle is that up to this point I have been using SimpleITK in python and I do not think the Rigid3DTransform class is available in SimpleITK. Will I have to use original ITK to perform this transform? Thanks in advance for the help! -- View this message in context: http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114.html Sent from the ITK - Users mailing list archive at Nabble.com. From siavashk at ece.ubc.ca Fri Sep 11 13:14:37 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Fri, 11 Sep 2015 10:14:37 -0700 (MST) Subject: [ITK-users] How to use rotation matrix and translation to perform Rigid 3D transform? In-Reply-To: <1441990596887-36114.post@n7.nabble.com> References: <1441990596887-36114.post@n7.nabble.com> Message-ID: <1441991677614-36115.post@n7.nabble.com> Hello Paniwani, Are you trying to: 1. Resample the PET image into the CT image using the transformation matrix from dicom? or 2. Perform multi-modality intensity-based registration to calculate the rigid transform from PET-to-CT space and compare it against the dicom transform as gold standard? Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114p36115.html Sent from the ITK - Users mailing list archive at Nabble.com. From paniwani at gmail.com Fri Sep 11 13:19:06 2015 From: paniwani at gmail.com (paniwani) Date: Fri, 11 Sep 2015 10:19:06 -0700 (MST) Subject: [ITK-users] How to use rotation matrix and translation to perform Rigid 3D transform? In-Reply-To: <1441991677614-36115.post@n7.nabble.com> References: <1441990596887-36114.post@n7.nabble.com> <1441991677614-36115.post@n7.nabble.com> Message-ID: <1441991946044-36116.post@n7.nabble.com> Hi, Thank you for the speedy reply! I am trying to do number 1. From what I understand so far, I thought I would need to use Rigid3DTransform to apply the dicom transform and then use the ResampleImageFilter to match the PET and CT size, spacing, number of slices, etc. -- View this message in context: http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114p36116.html Sent from the ITK - Users mailing list archive at Nabble.com. From siavashk at ece.ubc.ca Fri Sep 11 13:28:48 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Fri, 11 Sep 2015 10:28:48 -0700 (MST) Subject: [ITK-users] How to use rotation matrix and translation to perform Rigid 3D transform? In-Reply-To: <1441991946044-36116.post@n7.nabble.com> References: <1441990596887-36114.post@n7.nabble.com> <1441991677614-36115.post@n7.nabble.com> <1441991946044-36116.post@n7.nabble.com> Message-ID: <1441992528633-36117.post@n7.nabble.com> It seems that the itkEuler3DTransform is what you need. Just beware that in your resample image filter you need to specify the CT-to-PET transform. Something that might be challenging for you is that the PET and CT transforms are most likely with respect to trackers in the patient room. That is the transform that you read from Dicom is PET-to-PETTracker and CT-To-CTTracker transforms. If PETTracker = CTTracker, then you can calculate the CT-to-PET transform via a simple inversion: CT-to-PET = CT-to-CTTracker * inv(PET-to-PETTracker) I personally would recommend using the C++ ITK to perform resampling. Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114p36117.html Sent from the ITK - Users mailing list archive at Nabble.com. From paniwani at gmail.com Fri Sep 11 13:35:47 2015 From: paniwani at gmail.com (paniwani) Date: Fri, 11 Sep 2015 10:35:47 -0700 (MST) Subject: [ITK-users] How to use rotation matrix and translation to perform Rigid 3D transform? In-Reply-To: <1441992528633-36117.post@n7.nabble.com> References: <1441990596887-36114.post@n7.nabble.com> <1441991677614-36115.post@n7.nabble.com> <1441991946044-36116.post@n7.nabble.com> <1441992528633-36117.post@n7.nabble.com> Message-ID: <1441992947423-36118.post@n7.nabble.com> I have been able to use a 3rd party radiotherapy visualization tool to verify that the registration works properly. So I don't think the images are registered to a particular tracker. That should not be a problem. The Euler transform states: "The serialization of the optimizable parameters is an array of 6 elements. The first 3 represents three euler angle of rotation respectively about the X, Y and Z axis. The last 3 parameters defines the translation in each dimension." I don't have Euler angles; I only have a rotation matrix M as above. Can I just use the Rigid3DTransform (as I seem to already have all the input parameters for it and won't require any conversions)? -- View this message in context: http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114p36118.html Sent from the ITK - Users mailing list archive at Nabble.com. From siavashk at ece.ubc.ca Fri Sep 11 13:47:14 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Fri, 11 Sep 2015 10:47:14 -0700 (MST) Subject: [ITK-users] How to use rotation matrix and translation to perform Rigid 3D transform? In-Reply-To: <1441992947423-36118.post@n7.nabble.com> References: <1441990596887-36114.post@n7.nabble.com> <1441991677614-36115.post@n7.nabble.com> <1441991946044-36116.post@n7.nabble.com> <1441992528633-36117.post@n7.nabble.com> <1441992947423-36118.post@n7.nabble.com> Message-ID: <1441993634245-36119.post@n7.nabble.com> paniwani wrote > I have been able to use a 3rd party radiotherapy visualization tool to > verify that the registration works properly. So I don't think the images > are registered to a particular tracker. That should not be a problem. This is because the 3rd party tool has knowledge of the reference or that the transform is already a PET-to-CT transform. I am just telling you this to help you avoid problems in the future. paniwani wrote > I don't have Euler angles; I only have a rotation matrix M as above. You can use the SetMatrix method of itkEuler3DTransform. paniwani wrote > Can I just use the Rigid3DTransform (as I seem to already have all the > input parameters for it and won't require any conversions)? I am not sure, but give it a try, and if it works, post the results here. HTH, Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114p36119.html Sent from the ITK - Users mailing list archive at Nabble.com. From fotosentido at gmail.com Sat Sep 12 18:51:24 2015 From: fotosentido at gmail.com (Marcos) Date: Sun, 13 Sep 2015 00:51:24 +0200 Subject: [ITK-users] Filter working on exporting, not in view (VTK) Message-ID: Hi, I have an itk::Image, and set it as input of a IntensityWindowingImageFilter I change the values of window level and, if I export, I see changes. But I don't see these changes on VTK. After doing a change, I update the QVTKWidget or the vtkImageViewer2, but I see the same image. I'm not sure if the ImageToVTKImageFilter is the problem. My pipeline is: itk::Image -> IntensityWindowingImageFilter -> vtkImageFlip ->vtkImageViewer2 -> QVTKWidget Exporting is working: itk::Image -> IntensityWindowImageFilter -> ImageFileWriter Greetings. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kolin9105 at gmail.com Sun Sep 13 13:15:33 2015 From: kolin9105 at gmail.com (meikolin saimara) Date: Mon, 14 Sep 2015 00:15:33 +0700 Subject: [ITK-users] (no subject) Message-ID: hi everyone.. how to remove the skull from brain MRI in ITK ? I have one image not full head image. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Sun Sep 13 15:58:37 2015 From: fotosentido at gmail.com (Marcos) Date: Sun, 13 Sep 2015 21:58:37 +0200 Subject: [ITK-users] itkImageFileWriter + ExtractSliceImageFilter: largest region exception In-Reply-To: References: <165BCE19-D63D-47BF-8BEC-4E41AD7067ED@mail.nih.gov> <58F5C572-190E-4214-924F-08FAAB80300F@mail.nih.gov> Message-ID: Hi, I can't use unsigned char reading files, cause I'm seeing horrible views on my viewer for some files. I'm gonna have to avoid using the itk exporter, and start using the vtk exporter, which doesn't have these problems. 2015-09-09 18:21 GMT+02:00 Marcos : > Ok, finally, I got it. > > I left the duplicated thing, but it wasn't the pipeline. > > I didn't see a warning from compiler, and the exception message didn't > give me that clue: > the pixeltype I was using. > > > A lot of examples are using *unsigned short *or *signed short*, right? So > I was. > Reviewing the source code on the imageio classes: > > "BMPImageIO supports unsigned char only" > "JPEG supports unsigned char/int only" > "PNG supports unsigned char and unsigned short" > > I just changed to *unsigned char*, and everything works fine. > Thanks for all the ideas, I really appreciate it. It's not easy trying to > help without all the info. > I didn't realise the problem was outside my method. Sorry. > > It takes some time to get things working, but it's great when it happens. > > > 2015-09-09 17:36 GMT+02:00 Marcos : > >> Hi, >> >> GetBufferedRegion gives me the same numbers as GetLargestPossibleRegion: >> index: 0, 0, 0 >> size: 512, 512, 12 >> >> I also tried, just after reading the image, using ImageDuplicator: >> >> reader = ReaderType::New(); >> >> reader->SetFileName(fileName); >> >> >> dicomIO = itk::GDCMImageIO::New(); >> >> >> typedef itk::ImageDuplicator< ImageType > DuplicatorType; >> >> DuplicatorType::Pointer duplicator = DuplicatorType::New(); >> >> >> >> reader->SetImageIO(dicomIO); >> >> try >> >> { >> >> reader->Update(); >> >> image = reader->GetOutput(); >> >> >> // duplicar imagen >> >> duplicator->SetInputImage(image); >> >> duplicator->Update(); >> >> imageToSave = duplicator->GetOutput(); >> >> } >> >> catch >> >> ... >> >> >> >> None worked. >> >> I saw the ExtractImageFilter example, so I changed to extracter->SetDirectionCollapseToSubmatrix() instead of SetDirectionCollapseToIdentity(). >> >> The filename is "C:/Users/M/r.png", in Windows. >> Nothing. Same error. >> >> bmp: itkbmpimageio.cxx:727 >> jpg: itkjpegimageio.cxx:454 >> png: itkpngimageio.cxx:521 >> >> By the way, it would be better if the exception messages were captured in my writer's try catch. I have to dive into these sources. >> >> >> 2015-09-08 22:05 GMT+02:00 Bradley Lowekamp : >> >>> Hello, >>> >>> You can use the Image::GetBufferedRegion method and print the resulting >>> ImageRegion. >>> >>> This looks like there is a pipelining issue to me. I'd recommend trying >>> to simplify by not reusing the Image data object. Yes you will need to >>> recompute, but it may help to narrow down the problem. >>> >>> Brad >>> >>> >>> >>> On Sep 8, 2015, at 3:06 PM, Marcos wrote: >>> >>> Hi, >>> >>> I know the input and desired regions, not sure how to look for the >>> buffered region. >>> >>> 1. Reviewing my code I saw I didn't set the input image for the >>> extracter, so I added: >>> extracter->SetInput(image); >>> >>> Good, right? But no. Still the same error. >>> >>> 2. Then I tried switching to itkExtractImageFilter, and I got: >>> Exception at 0x7633c42d, code: 0xe06d7363: C++ exception, flags=0x1 >>> (execution cannot be continued) (first chance) at >>> c:\itk-4.8.0-installed\include\itk-4.8\itkextractimagefilter.hxx:242 >>> >>> So I had to look inside this code (why don't throw me more info in the >>> try catch?) to see what's happening, and I read this: >>> itkExceptionMacro( << "It is required that the strategy for collapsing >>> the direction matrix be explicitly specified. " << "Set with either >>> myfilter->SetDirectionCollapseToIdentity() or >>> myfilter->SetDirectionCollapseToSubmatrix() " << typeid( ImageBase< >>> InputImageDimension > * ).name() ); >>> 3. I also tried to insert a: >>> image->Update(); >>> or >>> image->UpdateOutputData(); >>> with same results. >>> >>> I was thinking about passing the reader, but I'd like to apply changes >>> to my image, so this method would receive a modified copy (no DeepCopy >>> method like in vtk?) >>> >>> >>> Yes, the input image is connected to a pipeline: >>> itk::Image -> itk::ImageToVTKImageFilter -> vtk::vtkImageFlip -> >>> vtkImageData -> vtkImageViewer2 >>> >>> >>> Thanks again for your interest. >>> >>> >>> 2015-09-08 16:16 GMT+02:00 Bradley Lowekamp : >>> >>>> Hello, >>>> >>>> What is the buffered region for the input image? Is the input image >>>> connected to a pipeline? >>>> >>>> Perhaps you just forgot to update the input image before running this >>>> function? >>>> >>>> Brad >>>> >>>> On Sep 7, 2015, at 5:21 PM, Marcos wrote: >>>> >>>> Hi, >>>> >>>> I have a method that was exporting fine one frame from my itk::Image. >>>> >>>> My method: >>>> >>>> void Exporter::exportOriginal(QString fileName, ImageType::Pointer image, int frame) >>>> >>>> { >>>> >>>> typedef itk::ImageFileWriter WriterType; >>>> >>>> WriterType::Pointer writer = WriterType::New(); >>>> >>>> >>>> writer->SetFileName(fileName.toStdString().c_str()); >>>> >>>> >>>> ImageType::RegionType inputRegion = image->GetLargestPossibleRegion(); >>>> >>>> >>>> ImageType::IndexType index = inputRegion.GetIndex(); >>>> >>>> ImageType::SizeType size = inputRegion.GetSize(); >>>> >>>> >>>> index[0] = 0; >>>> >>>> index[1] = 0; >>>> >>>> index[2] = frame; >>>> >>>> >>>> // 3D to 2D >>>> >>>> size[2] = 0; >>>> >>>> >>>> ImageType::RegionType outputRegion; >>>> >>>> outputRegion.SetIndex(index); >>>> >>>> outputRegion.SetSize(size); >>>> >>>> >>>> typedef itk::Testing::ExtractSliceImageFilter ExtractType; >>>> >>>> ExtractType::Pointer extracter = ExtractType::New(); >>>> >>>> extracter->SetExtractionRegion(outputRegion); >>>> >>>> >>>> writer->SetInput(extracter->GetOutput()); >>>> >>>> try >>>> >>>> { >>>> >>>> writer->Update(); >>>> >>>> } >>>> >>>> catch (itk::ExceptionObject &ex) >>>> >>>> { >>>> >>>> std:cerr << ex << std::endl; >>>> >>>> } >>>> >>>> } >>>> >>>> >>>> as inputRegion, I have: >>>> index: [0, 0, 0] >>>> size: [512, 512, 12] >>>> >>>> as outputRegion, I have: >>>> index: [0, 0, 1] # first frame >>>> size: [512, 512, 0] >>>> >>>> >>>> >>>> But I'm not sure what happened, now with every image I got an exception: >>>> itkimagefilewriter.hxx:287: "Largest possible region does not fully >>>> contain requested paste IO region" >>>> >>>> By the way, my try catch is not getting the exception message, I had to >>>> look inside the writer class. >>>> Any ideas? Thank you. >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> >>>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Sun Sep 13 16:38:13 2015 From: fotosentido at gmail.com (Marcos) Date: Sun, 13 Sep 2015 22:38:13 +0200 Subject: [ITK-users] Assertion failed with color Dicom file Message-ID: Hi, opening a file, I get: "Assertion failed!" "Expression: v2.size() < (size_t)std::numeric_limits::max" I can select "ignore", but I don't want this to appear If I use unsigned char I don't get it. Besides, this is a color file, and I see it in grayscale. This is the file: http://www.barre.nom.fr/images/icon/icon-download.gif I'm using unsigned short. Any ideas? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Sun Sep 13 16:55:17 2015 From: lasso at queensu.ca (Andras Lasso) Date: Sun, 13 Sep 2015 20:55:17 +0000 Subject: [ITK-users] [ITK] How to use rotation matrix and translation to perform Rigid 3D transform? In-Reply-To: <1441993634245-36119.post@n7.nabble.com> References: <1441990596887-36114.post@n7.nabble.com> <1441991677614-36115.post@n7.nabble.com> <1441991946044-36116.post@n7.nabble.com> <1441992528633-36117.post@n7.nabble.com> <1441992947423-36118.post@n7.nabble.com> <1441993634245-36119.post@n7.nabble.com> Message-ID: FYI, you can import DICOM SRO objects and volumes into 3D Slicer and you can save the transform as an ITK transform file. You need to install the nightly version of 3D Slicer and the SlicerRT extension. Andras -----Original Message----- From: Community [mailto:community-bounces at itk.org] On Behalf Of Siavash Khallaghi Sent: Friday, September 11, 2015 1:47 PM To: insight-users at itk.org Subject: Re: [ITK] [ITK-users] How to use rotation matrix and translation to perform Rigid 3D transform? paniwani wrote > I have been able to use a 3rd party radiotherapy visualization tool to > verify that the registration works properly. So I don't think the > images are registered to a particular tracker. That should not be a problem. This is because the 3rd party tool has knowledge of the reference or that the transform is already a PET-to-CT transform. I am just telling you this to help you avoid problems in the future. paniwani wrote > I don't have Euler angles; I only have a rotation matrix M as above. You can use the SetMatrix method of itkEuler3DTransform. paniwani wrote > Can I just use the Rigid3DTransform (as I seem to already have all the > input parameters for it and won't require any conversions)? I am not sure, but give it a try, and if it works, post the results here. HTH, Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114p36119.html Sent from the ITK - 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 Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From fotosentido at gmail.com Mon Sep 14 10:39:15 2015 From: fotosentido at gmail.com (Marcos) Date: Mon, 14 Sep 2015 16:39:15 +0200 Subject: [ITK-users] Using PermuteAxesImageFilter to rotate/flip image frames Message-ID: Hi, I'm playing with this filter to rotate an image with frames/slices. With inmediate viewing result on vtk widget. My plan is 1) to rotate all frames 90? each time I push a button. 2) to flip all frames horizontal or vertical each time I push a button. I'm playing with the values of the range: typedef itk::PermuteAxesImageFilter PermuteAxesImageFilterType; itk::FixedArray order; order[0] = 1; order[1] = 0; order[2] = 2; rotateFilter->SetOrder(order); rotateFilter->UpdateLargestPossibleRegion(); With (0,1,2) I get the same image. Ok. If I use (1,0,2), I get all frames rotated 90? AND flipped. Every frame has width != length, of course all frames have the same dimensions. I thought that maintaining the third order value as the last one, it wouldn't affect. Not sure if my idea is the correct. Please, I'd apreciate any help. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From florian.nicolas at ensta-bretagne.org Mon Sep 14 11:11:04 2015 From: florian.nicolas at ensta-bretagne.org (neon29) Date: Mon, 14 Sep 2015 08:11:04 -0700 (MST) Subject: [ITK-users] How to use a binary mask in a registration process ? Message-ID: <1442243464912-7587799.post@n2.nabble.com> Hi everybody! I am currently trying to register sonar images using SimpleITK with Python. As the two images I want to register are geo-projected, I would like to restrict each image to the pixels where I have data (and get rid of the "background" which consists in '0'). I have already computed my two binary masks and I have tried to use it with the SetMetricFixedMask() and SetMetricMovingImage() methods but when I look at the result, it is the same as when I do not use any mask. Indeed, it seems that the registration process tend to overlap my masks. I hope someone could help! Florian -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/How-to-use-a-binary-mask-in-a-registration-process-tp7587799.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From blowekamp at mail.nih.gov Mon Sep 14 11:23:21 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 14 Sep 2015 11:23:21 -0400 Subject: [ITK-users] Using PermuteAxesImageFilter to rotate/flip image frames In-Reply-To: References: Message-ID: Hello Marcus, The PermuteAxesImageFilter does not do a rotation in the physical space. It changes the order of the axis in the memory, and updates the direction cosine matrix so that the physical location of each pixel is maintained. You should also look at the direction cosine of the output image. If your view of the data does not take into consideration the direction cosine, it does not show how the image buffer should be visually interpreted. This filter is available in 3D Slicer in the Simple Filters module. Slicer 3D viewer correctly visualizes the image in physical space. This filter is VERY boring in 3D Slicer because the output appear the same as the inputs. You must look at the meta-data to know that the image has changed. HTH, Brad On Sep 14, 2015, at 10:39 AM, Marcos wrote: > Hi, > > I'm playing with this filter to rotate an image with frames/slices. > With inmediate viewing result on vtk widget. > > My plan is > > 1) to rotate all frames 90? each time I push a button. > 2) to flip all frames horizontal or vertical each time I push a button. > > I'm playing with the values of the range: > > typedef itk::PermuteAxesImageFilter PermuteAxesImageFilterType; > itk::FixedArray order; > order[0] = 1; > order[1] = 0; > order[2] = 2; > > rotateFilter->SetOrder(order); > rotateFilter->UpdateLargestPossibleRegion(); > > With (0,1,2) I get the same image. Ok. > If I use (1,0,2), I get all frames rotated 90? AND flipped. > > Every frame has width != length, of course all frames have the same dimensions. > > I thought that maintaining the third order value as the last one, it wouldn't affect. > > Not sure if my idea is the correct. > Please, I'd apreciate any help. > Thank you. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Mon Sep 14 11:33:56 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 14 Sep 2015 11:33:56 -0400 Subject: [ITK-users] How to use a binary mask in a registration process ? In-Reply-To: <1442243464912-7587799.post@n2.nabble.com> References: <1442243464912-7587799.post@n2.nabble.com> Message-ID: <9A8B80CE-03FC-4B59-97AF-34159FA0B659@mail.nih.gov> Hello, First verify that you are using the correct methods for setting the masks. You wrote "SetMetricMovingImage" where I think you intended "SetMetricMovingMask". Mistakes are easy to make in code and things like this should be double/triple checked. You likely need to perform a morphological erosion on the masks. With smoothing and derivative computation, values outside the mask can effect the metric near the boarder. You need to estimate how big the radius of the erosion need to be based on your smoothing sigmas, and your scale. Without sample code I don't think I can help further. HTH, Brad On Sep 14, 2015, at 11:11 AM, neon29 wrote: > Hi everybody! > > I am currently trying to register sonar images using SimpleITK with Python. > As the two images I want to register are geo-projected, I would like to > restrict each image to the pixels where I have data (and get rid of the > "background" which consists in '0'). > > I have already computed my two binary masks and I have tried to use it with > the SetMetricFixedMask() and SetMetricMovingImage() methods but when I look > at the result, it is the same as when I do not use any mask. Indeed, it > seems that the registration process tend to overlap my masks. > > I hope someone could help! > > Florian > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/How-to-use-a-binary-mask-in-a-registration-process-tp7587799.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From fotosentido at gmail.com Mon Sep 14 14:36:03 2015 From: fotosentido at gmail.com (Marcos) Date: Mon, 14 Sep 2015 20:36:03 +0200 Subject: [ITK-users] [vtkusers] Undo vtkImageFlip effects In-Reply-To: References: Message-ID: Well, I tried with an 3x3 matrix, and, as you said it flipped around the origin I guess. So I guess I have to locate the center or use 4x4 matrix. I was trying to use 4x4 matrix, creating a vtkMatrix4x4, but I don't know what values to insert. I checked the ImageSlicing example but not sure what I have to do. Reviewing related topics I found an answer of yours: "The first three columns are the the direction cosine vectors (for these, the 4th component should be zero). The three direction cosine vectors should be perpendicular to each other. The fourth column (whose 4th component must be 1.0) gives a translation, defined with respect to the coordinate system of the input of vtkImageReslice." So I tried this code: //flipperX->SetResliceAxesDirectionCosines(1,0,0, 0,-1,0, 0,0,1); vtkSmartPointer matriz = vtkSmartPointer::New(); matriz->SetElement(0,0,1); matriz->SetElement(0,1,0); matriz->SetElement(0,2,0); matriz->SetElement(0,3,0); matriz->SetElement(1,0,0); matriz->SetElement(1,1,-1); matriz->SetElement(1,2,0); matriz->SetElement(1,3,0); matriz->SetElement(2,0,0); matriz->SetElement(2,1,0); matriz->SetElement(2,2,1); matriz->SetElement(2,3,0); matriz->SetElement(3,0,0); matriz->SetElement(3,1,0); matriz->SetElement(3,2,0); matriz->SetElement(3,3,0); flipperX->SetResliceAxes(matriz); flipperX->Update(); The image disappeared :( Not sure if I'm doing well. 2015-09-14 19:19 GMT+02:00 David Gobbi : > Hi Marcos, > > It might be more convenient to use vtkImageReslice to flip the images. It > can take a 3x3 or 4x4 matrix that describes the transformation. > > For a 3x3 matrix that flips the Y axis, you would use this: > > reslice->SetResliceAxesDirectionCosines( > 1, 0, 0, > 0, -1, 0, > 0, 0, 1); > > Be careful, though, because this flips the image around the origin, rather > than flipping it around its center. > > For a 4x4 matrix, use reslice->SetResliceAxes(vtkMatrix4x4 *). By using a > 4x4 matrix, you can make sure that the correct center-of-rotation is > applied. > > - David > > > On Mon, Sep 14, 2015 at 11:03 AM, Marcos wrote: > >> Hi, >> >> I attached a vtkImageFlip filter to my pipeline, but I can't find the way >> to "switch off" this filter or revert its effects. >> >> I just want to flip my image when I press a button. >> >> Any suggestions? >> Thank you. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Mon Sep 14 14:55:02 2015 From: fotosentido at gmail.com (Marcos) Date: Mon, 14 Sep 2015 20:55:02 +0200 Subject: [ITK-users] [vtkusers] Undo vtkImageFlip effects In-Reply-To: References: Message-ID: I set the fourth component of the fourth column to 1: matriz->SetElement(3,3,1); ant the rotation is the same as with 3x3. Even with multiframe images, all frames are upside down (good) but not centered. The problem is locating the center of the image, even with multiframe. Any ideas? Thanks. 2015-09-14 20:36 GMT+02:00 Marcos : > Well, I tried with an 3x3 matrix, and, as you said it flipped around the > origin I guess. > > So I guess I have to locate the center or use 4x4 matrix. > > I was trying to use 4x4 matrix, creating a vtkMatrix4x4, but I don't know > what values to insert. > I checked the ImageSlicing example but not sure what I have to do. > > Reviewing related topics I found an answer of yours: > > "The first three columns are the the direction cosine vectors (for these, > the 4th component should be zero). The three direction cosine vectors > should be perpendicular to each other. > > The fourth column (whose 4th component must be 1.0) gives a translation, > defined with respect to the coordinate system of the input of > vtkImageReslice." > > > So I tried this code: > > //flipperX->SetResliceAxesDirectionCosines(1,0,0, 0,-1,0, 0,0,1); > > vtkSmartPointer matriz = vtkSmartPointer::New(); > > matriz->SetElement(0,0,1); > > matriz->SetElement(0,1,0); > > matriz->SetElement(0,2,0); > > matriz->SetElement(0,3,0); > > > matriz->SetElement(1,0,0); > > matriz->SetElement(1,1,-1); > > matriz->SetElement(1,2,0); > > matriz->SetElement(1,3,0); > > > matriz->SetElement(2,0,0); > > matriz->SetElement(2,1,0); > > matriz->SetElement(2,2,1); > > matriz->SetElement(2,3,0); > > > matriz->SetElement(3,0,0); > > matriz->SetElement(3,1,0); > > matriz->SetElement(3,2,0); > > matriz->SetElement(3,3,0); > > flipperX->SetResliceAxes(matriz); > > flipperX->Update(); > > > The image disappeared :( > > > Not sure if I'm doing well. > > > > > 2015-09-14 19:19 GMT+02:00 David Gobbi : > >> Hi Marcos, >> >> It might be more convenient to use vtkImageReslice to flip the images. >> It can take a 3x3 or 4x4 matrix that describes the transformation. >> >> For a 3x3 matrix that flips the Y axis, you would use this: >> >> reslice->SetResliceAxesDirectionCosines( >> 1, 0, 0, >> 0, -1, 0, >> 0, 0, 1); >> >> Be careful, though, because this flips the image around the origin, >> rather than flipping it around its center. >> >> For a 4x4 matrix, use reslice->SetResliceAxes(vtkMatrix4x4 *). By using >> a 4x4 matrix, you can make sure that the correct center-of-rotation is >> applied. >> >> - David >> >> >> On Mon, Sep 14, 2015 at 11:03 AM, Marcos wrote: >> >>> Hi, >>> >>> I attached a vtkImageFlip filter to my pipeline, but I can't find the >>> way to "switch off" this filter or revert its effects. >>> >>> I just want to flip my image when I press a button. >>> >>> Any suggestions? >>> Thank you. >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kolin9105 at gmail.com Mon Sep 14 15:27:01 2015 From: kolin9105 at gmail.com (meikolin saimara) Date: Tue, 15 Sep 2015 02:27:01 +0700 Subject: [ITK-users] (no subject) Message-ID: hi everyone.. I have a MRI Image and I want to know pixsel type value P0 and P1 of image.. anybody can give me the code.. pleass.. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Mon Sep 14 15:53:18 2015 From: fotosentido at gmail.com (Marcos) Date: Mon, 14 Sep 2015 21:53:18 +0200 Subject: [ITK-users] [vtkusers] Undo vtkImageFlip effects In-Reply-To: References: Message-ID: I got it. I was checking vtkImageChangeInformation but it's not necessary. I would explain it, hoping it will be useful for others. I had to look in several pages. flipperX->SetResliceAxesDirectionCosines(1,0,0, 0,change,0, 0,0,1); where change is a -1 or a 1, switching the flip effect. But this flips is around the origin, which is not the center of the image. How to calculate the center: double origin[3]; imageData->GetOrigin(origin); double spacing[3]; imageData->GetSpacing(spacing); int dim[3]; imageData->GetDimensions(dim); double center[3]; for(int i = 0; i < 3; i++) { center[i] = origin[i] + ((dim[i] - 1 ) * spacing[i]) / 2; } Now that we have the center, we set it as the origin: imageData->SetOrigin(center); And we connect the imageData to our filter in the pipeline. flipperX = vtkSmartPointer::New(); flipperX->SetInputData(imageData); flipperX->Update(); After that, every time we want a flip, we just have invoke the first command of this post with the desired change value. And update(). For many people these things are not so obvious, it would be great to have more examples about applying filters like this. Flipping images is a common thing. Thank you for your help, David. 2015-09-14 20:55 GMT+02:00 Marcos : > I set the fourth component of the fourth column to 1: > > > matriz->SetElement(3,3,1); > > > ant the rotation is the same as with 3x3. Even with multiframe images, all frames are upside down (good) but not centered. > > > The problem is locating the center of the image, even with multiframe. > > > Any ideas? Thanks. > > > 2015-09-14 20:36 GMT+02:00 Marcos : > >> Well, I tried with an 3x3 matrix, and, as you said it flipped around the >> origin I guess. >> >> So I guess I have to locate the center or use 4x4 matrix. >> >> I was trying to use 4x4 matrix, creating a vtkMatrix4x4, but I don't know >> what values to insert. >> I checked the ImageSlicing example but not sure what I have to do. >> >> Reviewing related topics I found an answer of yours: >> >> "The first three columns are the the direction cosine vectors (for >> these, the 4th component should be zero). The three direction cosine >> vectors should be perpendicular to each other. >> >> The fourth column (whose 4th component must be 1.0) gives a translation, >> defined with respect to the coordinate system of the input of >> vtkImageReslice." >> >> >> So I tried this code: >> >> //flipperX->SetResliceAxesDirectionCosines(1,0,0, 0,-1,0, 0,0,1); >> >> vtkSmartPointer matriz = vtkSmartPointer::New(); >> >> matriz->SetElement(0,0,1); >> >> matriz->SetElement(0,1,0); >> >> matriz->SetElement(0,2,0); >> >> matriz->SetElement(0,3,0); >> >> >> matriz->SetElement(1,0,0); >> >> matriz->SetElement(1,1,-1); >> >> matriz->SetElement(1,2,0); >> >> matriz->SetElement(1,3,0); >> >> >> matriz->SetElement(2,0,0); >> >> matriz->SetElement(2,1,0); >> >> matriz->SetElement(2,2,1); >> >> matriz->SetElement(2,3,0); >> >> >> matriz->SetElement(3,0,0); >> >> matriz->SetElement(3,1,0); >> >> matriz->SetElement(3,2,0); >> >> matriz->SetElement(3,3,0); >> >> flipperX->SetResliceAxes(matriz); >> >> flipperX->Update(); >> >> >> The image disappeared :( >> >> >> Not sure if I'm doing well. >> >> >> >> >> 2015-09-14 19:19 GMT+02:00 David Gobbi : >> >>> Hi Marcos, >>> >>> It might be more convenient to use vtkImageReslice to flip the images. >>> It can take a 3x3 or 4x4 matrix that describes the transformation. >>> >>> For a 3x3 matrix that flips the Y axis, you would use this: >>> >>> reslice->SetResliceAxesDirectionCosines( >>> 1, 0, 0, >>> 0, -1, 0, >>> 0, 0, 1); >>> >>> Be careful, though, because this flips the image around the origin, >>> rather than flipping it around its center. >>> >>> For a 4x4 matrix, use reslice->SetResliceAxes(vtkMatrix4x4 *). By using >>> a 4x4 matrix, you can make sure that the correct center-of-rotation is >>> applied. >>> >>> - David >>> >>> >>> On Mon, Sep 14, 2015 at 11:03 AM, Marcos wrote: >>> >>>> Hi, >>>> >>>> I attached a vtkImageFlip filter to my pipeline, but I can't find the >>>> way to "switch off" this filter or revert its effects. >>>> >>>> I just want to flip my image when I press a button. >>>> >>>> Any suggestions? >>>> Thank you. >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marina.bendersky at gmail.com Mon Sep 14 18:56:08 2015 From: marina.bendersky at gmail.com (Marina Bendersky) Date: Mon, 14 Sep 2015 15:56:08 -0700 Subject: [ITK-users] What is an accepted duration of a 3D registration? Should I expect the MSE to "converge" to 0? Message-ID: Hello, I'm doing a 3D registration of 2 CT volumes (the fixed one contains 131 dicom images and the moving has 145 dicom images). I first converted each dicom series into one mha volume, using the example DicomSeriesReadImageWrite2.cxx and then, I do the registration following the example imageRegistration20.cxx. Below are the main registration components and parameters (other parameters had their default values): typedef itk::AffineTransform< double, Dimension > TransformType; typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef itk::MeanSquaresImageToImageMetric< FixedImageType, MovingImageType > MetricType; typedef itk::LinearInterpolateImageFunction< MovingImageType, double > InterpolatorType; double translationScale = 1.0 / 1000.0; optimizer->SetMaximumStepLength( 0.05 ); optimizer->SetMinimumStepLength( 0.01 ); This 3D registration runs on a MacBookPro laptop for 5.5 hours, so I was wondering, is this "normal"? How long should a 3D registration take? Also, the MSE metric keeps decreasing (though incrementally) even after 300 iterations (plot attached), and there are oscillations around the iteration 150 (I ran this twice and both times I get this plot!) - why could this be? Should I expect the MSE metric to converge to 0, or something closer to 0 (instead of the current values, in the ninety thousands...)? Thank you for your help, Marina -------------- next part -------------- A non-text attachment was scrubbed... Name: metricMSE300Iters.png Type: image/png Size: 13390 bytes Desc: not available URL: From siavashk at ece.ubc.ca Mon Sep 14 19:54:50 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Mon, 14 Sep 2015 16:54:50 -0700 (MST) Subject: [ITK-users] What is an accepted duration of a 3D registration? Should I expect the MSE to "converge" to 0? In-Reply-To: References: Message-ID: <1442274890463-7587807.post@n2.nabble.com> Hello Marina, I have some registration experience and have been using ITK since 2008, maybe I can help you: Marina Bendersky wrote > Should I expect the MSE metric to converge to 0, or something closer > to 0 (instead of the current values, in the ninety thousands...)? Maybe and maybe not, it depends on the fixed and moving images and the nature of the spatial transformation between the two images. The MSE at the true solution might or might not be zero depending on: 1. If the intensities differ at the true solution. For example, if there is a shift in intensities between fixed and moving images, this would result in a non-zero MSE at the true solution. 2. If local deformations exist between fixed and moving images, but a rigid/affine transformation is used in the registration pipeline. With this said, you can check your data and perform some form of pre-processing to correct them. Marina Bendersky wrote > This 3D registration runs on a MacBookPro laptop for 5.5 hours, so I > was wondering, is this "normal"? How long should a 3D registration > take? There are a number of reasons why a registration would take a long time. One prominent reason is poor initialization. If the optimizer starts fara way from the solution, then it would take a lot of iterations (if it manages to avoid local minima) to converage. A "useful" registration for prototyping/research is one that converges between 1-10 minutes so that you can tune its parameters while maintaining your sanity. HTH, Siavash -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-What-is-an-accepted-duration-of-a-3D-registration-Should-I-expect-the-MSE-to-converge-to-0-tp7587806p7587807.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From paniwani at gmail.com Tue Sep 15 02:06:26 2015 From: paniwani at gmail.com (paniwani) Date: Mon, 14 Sep 2015 23:06:26 -0700 (MST) Subject: [ITK-users] [ITK] How to use rotation matrix and translation to perform Rigid 3D transform? In-Reply-To: References: <1441990596887-36114.post@n7.nabble.com> <1441991677614-36115.post@n7.nabble.com> <1441991946044-36116.post@n7.nabble.com> <1441992528633-36117.post@n7.nabble.com> <1441992947423-36118.post@n7.nabble.com> <1441993634245-36119.post@n7.nabble.com> Message-ID: <1442297186776-36135.post@n7.nabble.com> I was able to import the DICOM SRO object and view the transform in 3D Slicer. I also got the transform working properly in SimpleITK. I used the matrix M and transformation T as above with the AffineTransform. After inverting the transform and applying it, the transform properly aligned my PET image onto the CT. Thanks for all the help! Much appreciated. -- View this message in context: http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114p36135.html Sent from the ITK - Users mailing list archive at Nabble.com. From florian.nicolas at ensta-bretagne.org Tue Sep 15 03:22:02 2015 From: florian.nicolas at ensta-bretagne.org (neon29) Date: Tue, 15 Sep 2015 00:22:02 -0700 (MST) Subject: [ITK-users] How to use a binary mask in a registration process ? In-Reply-To: <9A8B80CE-03FC-4B59-97AF-34159FA0B659@mail.nih.gov> References: <1442243464912-7587799.post@n2.nabble.com> <9A8B80CE-03FC-4B59-97AF-34159FA0B659@mail.nih.gov> Message-ID: <1442301722918-7587809.post@n2.nabble.com> Bradley Lowekamp wrote > Hello, > > First verify that you are using the correct methods for setting the masks. > You wrote "SetMetricMovingImage" where I think you intended > "SetMetricMovingMask". Mistakes are easy to make in code and things like > this should be double/triple checked. > > You likely need to perform a morphological erosion on the masks. With > smoothing and derivative computation, values outside the mask can effect > the metric near the boarder. You need to estimate how big the radius of > the erosion need to be based on your smoothing sigmas, and your scale. > > Without sample code I don't think I can help further. > > HTH, > Brad > > > On Sep 14, 2015, at 11:11 AM, neon29 < > florian.nicolas@ > > wrote: > >> Hi everybody! >> >> I am currently trying to register sonar images using SimpleITK with >> Python. >> As the two images I want to register are geo-projected, I would like to >> restrict each image to the pixels where I have data (and get rid of the >> "background" which consists in '0'). >> >> I have already computed my two binary masks and I have tried to use it >> with >> the SetMetricFixedMask() and SetMetricMovingImage() methods but when I >> look >> at the result, it is the same as when I do not use any mask. Indeed, it >> seems that the registration process tend to overlap my masks. >> >> I hope someone could help! >> >> Florian >> >> >> >> -- >> View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/How-to-use-a-binary-mask-in-a-registration-process-tp7587799.html >> Sent from the ITK Insight 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 >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users Thanks for your reply! Here is the piece of code: fixed = sitk.ReadImage('#######/imgRef.png', sitk.sitkFloat32); moving = sitk.ReadImage('#######/imgRep.png', sitk.sitkFloat32) maskFixed = sitk.ReadImage('#######/maskRef.png', sitk.sitkUInt8) maskMoving= sitk.ReadImage('#######/maskRep.png', sitk.sitkUInt8) # Handle optimizer R = sitk.ImageRegistrationMethod() # Restrict the evaluation of the similarity metric thanks to masks R.SetMetricFixedMask(maskFixed) R.SetMetricMovingMask(maskMoving) # Set metric as mutual information using joint histogram R.SetMetricAsMattesMutualInformation(numberOfHistogramBins=255) # Gradient descent optimizer R.SetOptimizerAsRegularStepGradientDescent(learningRate=0.01, minStep=1e-5, numberOfIterations=100, gradientMagnitudeTolerance=1e-8) #R.SetOptimizerScalesFromPhysicalShift() R.SetMetricSamplingStrategy(R.REGULAR) #R.RANDOM # Define the transformation (Rigid body here) transfo = sitk.CenteredTransformInitializer(fixed, moving, sitk.Euler2DTransform()) R.SetInitialTransform(transfo) # Define interpolation method R.SetInterpolator(sitk.sitkLinear) # Add command to the registration process R.AddCommand(sitk.sitkIterationEvent, lambda: command_iteration(R)) R.AddCommand(sitk.sitkStartEvent, lambda: start_plot()) R.AddCommand(sitk.sitkEndEvent, lambda: end_plot()) R.AddCommand(sitk.sitkIterationEvent, lambda: current_plot(R)) # Perform registration outTx = R.Execute(fixed, moving) print(outTx) print("--------") print("Optimizer stop condition: {0}".format(R.GetOptimizerStopConditionDescription())) print("Number of iterations: {0}".format(R.GetOptimizerIteration())) print("--------") # Perform transformation and resample the moving image # Save transformation as tfm file sitk.WriteTransform(outTx, '/home/egs/f_nicolas/CODES_THESE/transfo_final.tfm') #sitk.Show(transfo.GetDisplacementField(),"Displacement field") # Resample moving image according to the last transformation resampler = sitk.ResampleImageFilter() resampler.SetReferenceImage(fixed) resampler.SetInterpolator(sitk.sitkLinear) #resampler.SetDefaultPixelValue(100) resampler.SetTransform(outTx) out = resampler.Execute(moving) -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/How-to-use-a-binary-mask-in-a-registration-process-tp7587799p7587809.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From blowekamp at mail.nih.gov Tue Sep 15 08:32:28 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 15 Sep 2015 08:32:28 -0400 Subject: [ITK-users] How to use a binary mask in a registration process ? In-Reply-To: <1442301722918-7587809.post@n2.nabble.com> References: <1442243464912-7587799.post@n2.nabble.com> <9A8B80CE-03FC-4B59-97AF-34159FA0B659@mail.nih.gov> <1442301722918-7587809.post@n2.nabble.com> Message-ID: Hello, So why do you think the masks are not working? What is the output with and without masks? Can you share you data? Is the metric value different with and w/o the masks? I'd also recommend setting the SamplingStrategy to None until you have the masks working they way you expect. Brad On Sep 15, 2015, at 3:22 AM, neon29 wrote: > Bradley Lowekamp wrote >> Hello, >> >> First verify that you are using the correct methods for setting the masks. >> You wrote "SetMetricMovingImage" where I think you intended >> "SetMetricMovingMask". Mistakes are easy to make in code and things like >> this should be double/triple checked. >> >> You likely need to perform a morphological erosion on the masks. With >> smoothing and derivative computation, values outside the mask can effect >> the metric near the boarder. You need to estimate how big the radius of >> the erosion need to be based on your smoothing sigmas, and your scale. >> >> Without sample code I don't think I can help further. >> >> HTH, >> Brad >> >> >> On Sep 14, 2015, at 11:11 AM, neon29 < > >> florian.nicolas@ > >> > wrote: >> >>> Hi everybody! >>> >>> I am currently trying to register sonar images using SimpleITK with >>> Python. >>> As the two images I want to register are geo-projected, I would like to >>> restrict each image to the pixels where I have data (and get rid of the >>> "background" which consists in '0'). >>> >>> I have already computed my two binary masks and I have tried to use it >>> with >>> the SetMetricFixedMask() and SetMetricMovingImage() methods but when I >>> look >>> at the result, it is the same as when I do not use any mask. Indeed, it >>> seems that the registration process tend to overlap my masks. >>> >>> I hope someone could help! >>> >>> Florian >>> >>> >>> >>> -- >>> View this message in context: >>> http://itk-insight-users.2283740.n2.nabble.com/How-to-use-a-binary-mask-in-a-registration-process-tp7587799.html >>> Sent from the ITK Insight 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 >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > Thanks for your reply! > > Here is the piece of code: > > fixed = sitk.ReadImage('#######/imgRef.png', sitk.sitkFloat32); > moving = sitk.ReadImage('#######/imgRep.png', sitk.sitkFloat32) > maskFixed = sitk.ReadImage('#######/maskRef.png', sitk.sitkUInt8) > maskMoving= sitk.ReadImage('#######/maskRep.png', sitk.sitkUInt8) > > # Handle optimizer > R = sitk.ImageRegistrationMethod() > > # Restrict the evaluation of the similarity metric thanks to masks > R.SetMetricFixedMask(maskFixed) > R.SetMetricMovingMask(maskMoving) > > # Set metric as mutual information using joint histogram > R.SetMetricAsMattesMutualInformation(numberOfHistogramBins=255) > > # Gradient descent optimizer > R.SetOptimizerAsRegularStepGradientDescent(learningRate=0.01, minStep=1e-5, > numberOfIterations=100, gradientMagnitudeTolerance=1e-8) > > #R.SetOptimizerScalesFromPhysicalShift() > > R.SetMetricSamplingStrategy(R.REGULAR) #R.RANDOM > > # Define the transformation (Rigid body here) > > transfo = sitk.CenteredTransformInitializer(fixed, moving, > sitk.Euler2DTransform()) > > R.SetInitialTransform(transfo) > > # Define interpolation method > R.SetInterpolator(sitk.sitkLinear) > > # Add command to the registration process > R.AddCommand(sitk.sitkIterationEvent, lambda: command_iteration(R)) > R.AddCommand(sitk.sitkStartEvent, lambda: start_plot()) > R.AddCommand(sitk.sitkEndEvent, lambda: end_plot()) > R.AddCommand(sitk.sitkIterationEvent, lambda: current_plot(R)) > # Perform registration > outTx = R.Execute(fixed, moving) > > print(outTx) > print("--------") > print("Optimizer stop condition: > {0}".format(R.GetOptimizerStopConditionDescription())) > print("Number of iterations: {0}".format(R.GetOptimizerIteration())) > print("--------") > > # Perform transformation and resample the moving image > > # Save transformation as tfm file > sitk.WriteTransform(outTx, > '/home/egs/f_nicolas/CODES_THESE/transfo_final.tfm') > #sitk.Show(transfo.GetDisplacementField(),"Displacement field") > > # Resample moving image according to the last transformation > resampler = sitk.ResampleImageFilter() > resampler.SetReferenceImage(fixed) > resampler.SetInterpolator(sitk.sitkLinear) > #resampler.SetDefaultPixelValue(100) > resampler.SetTransform(outTx) > out = resampler.Execute(moving) > > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/How-to-use-a-binary-mask-in-a-registration-process-tp7587799p7587809.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Tue Sep 15 10:41:18 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 15 Sep 2015 10:41:18 -0400 Subject: [ITK-users] [ITK] How to use rotation matrix and translation to perform Rigid 3D transform? In-Reply-To: <1442297186776-36135.post@n7.nabble.com> References: <1441990596887-36114.post@n7.nabble.com> <1441991677614-36115.post@n7.nabble.com> <1441991946044-36116.post@n7.nabble.com> <1441992528633-36117.post@n7.nabble.com> <1441992947423-36118.post@n7.nabble.com> <1441993634245-36119.post@n7.nabble.com> <1442297186776-36135.post@n7.nabble.com> Message-ID: Hi, This article may be of interest, which explains the transforms directions: http://hdl.handle.net/10380/3468 http://insight-journal.org/browse/publication/923 along with the code, which confirms how the parameters are set: https://github.com/InsightSoftwareConsortium/ITKIOTransformDCMTK/blob/master/include/itkDCMTKTransformIO.hxx#L196 HTH, Matt On Tue, Sep 15, 2015 at 2:06 AM, paniwani wrote: > I was able to import the DICOM SRO object and view the transform in 3D > Slicer. > > I also got the transform working properly in SimpleITK. I used the matrix M > and transformation T as above with the AffineTransform. After inverting the > transform and applying it, the transform properly aligned my PET image onto > the CT. > > Thanks for all the help! Much appreciated. > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114p36135.html > Sent from the ITK - 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From noreply at insightsoftwareconsortium.org Tue Sep 15 12:02:49 2015 From: noreply at insightsoftwareconsortium.org (MIDAS Journal) Date: Tue, 15 Sep 2015 12:02:49 -0400 (EDT) Subject: [ITK-users] New Submission: Deformable Registration with Discontinuity Preservation using Multi-Scale MRF Message-ID: <20150915160249.E7A3E3D625D4@insight-journal.org> Hello, A new submission has been added to the MIDAS Journal. Title: Deformable Registration with Discontinuity Preservation using Multi-Scale MRF Authors: Seo D., Van Baar J. Abstract: Deformable (2D or 3D) medical image registration is a challenging problem. Existing approaches assume that the underlying deformation is smooth. This smoothness assumption allows for solving the deformable registration at a coarse resolution and interpolate for finer resolutions. However, sliding of organs and breathing motion, exhibit discontinuities. We propose a discrete optimization approach to preserve these discontinuities. Solving continuous deformations using discrete optimization requires a fine distribution of the discrete labels. Coupled with the typical size of medical image datasets, this poses challenges to compute solutions efficiently. In this paper we present a practical, multi-scale formulation. We describe how discontinuities can be preserved, and how the optimization problem is solved. Results on synthetic 2D, and real 3D data show that we can well approximate the smoothness of continuous optimization, while accurately maintaining discontinuities. Download and review this publication at: http://hdl.handle.net/10380/3495 Generated by the MIDAS Journal You are receiving this email because you asked to be informed by the MIDAS Journal for new submissions. To change your email preference visit http://www.midasjournal.org/ . From siavashk at ece.ubc.ca Tue Sep 15 13:39:15 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Tue, 15 Sep 2015 10:39:15 -0700 (MST) Subject: [ITK-users] What is an accepted duration of a 3D registration? Should I expect the MSE to "converge" to 0? In-Reply-To: <1442274890463-7587807.post@n2.nabble.com> References: <1442274890463-7587807.post@n2.nabble.com> Message-ID: <1442338755967-36140.post@n7.nabble.com> Marina Bendersky wrote > Hi Siavash, > > Thanks again for your reply! I'm a newbie to both registration and ITK > and I really value your help. > > I would like to ask you about the 2 pre-processing points that you > suggest to improve the registration: > > 1- Would it be correct to normalize all images with the same filter > (like NormalizeImageFilter), and then create the volumes and start the > registration? > > 2- You're right, there are probably local deformations and I've only > been trying rigid/affine transforms. I'm comparing two volumes of > different time points and there are likely to be transformations. I > understood, however, that a deformable transformation might change the > images (ie. the lesions), so I completely ruled deformable > transformations out because my objective is to assess how the lesion > changes over time ... > > Is this correct? Or, should I still try a deformable registration? > > In fact, my problem is the following: I have an image (in a fixed > volume) with one or two points (annotated on a lesion) - I'm trying to > identify the respective image in the moving volume (and the new > location of the points). > > Using the ITK outputs (matrix, translation, and center values), I > computed the new coordinates of the points and I hoped that the new > "z" value will determine the "correct" slice of the moving volume > (time 2). Does this sound correct to you? > > > Thanks so much! > Marina -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-What-is-an-accepted-duration-of-a-3D-registration-Should-I-expect-the-MSE-to-converge-to-0-tp36133p36140.html Sent from the ITK - Users mailing list archive at Nabble.com. From siavashk at ece.ubc.ca Tue Sep 15 13:54:21 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Tue, 15 Sep 2015 10:54:21 -0700 (MST) Subject: [ITK-users] What is an accepted duration of a 3D registration? Should I expect the MSE to "converge" to 0? In-Reply-To: <1442338755967-36140.post@n7.nabble.com> References: <1442274890463-7587807.post@n2.nabble.com> <1442338755967-36140.post@n7.nabble.com> Message-ID: <1442339661252-36141.post@n7.nabble.com> Marina Bendersky wrote > 1- Would it be correct to normalize all images with the same filter > (like NormalizeImageFilter), and then create the volumes and start the > registration? 1. You could try using an itk::HistogramMatchingFilter before doing registration. This /should/ ensure that both images occupy the same dynamic range. 2. Alternatively, you can try using a metric that is less sensitive to linear changes in intensities, e.g. NCC . I am assuming that you are doing mono-modality registration. Marina Bendersky wrote > 2- You're right, there are probably local deformations and I've only > been trying rigid/affine transforms. I'm comparing two volumes of > different time points and there are likely to be transformations. I > understood, however, that a deformable transformation might change the > images (ie. the lesions), so I completely ruled deformable > transformations out because my objective is to assess how the lesion > changes over time ... > > Is this correct? Or, should I still try a deformable registration? If your goal is to assess the geometry of the lesion (i.e. how much it has grown/shrunk), then deformable registration is actually what you need. The output of deformable registration is simply a deformation field that maps spatial locations in the fixed volume into the moving. You can interpolate the deformation field on your fiducials (the points on the surface of the lesion) to calculate the amount of change in your lesion between the two volumes. Marina Bendersky wrote > Using the ITK outputs (matrix, translation, and center values), I > computed the new coordinates of the points and I hoped that the new > "z" value will determine the "correct" slice of the moving volume > (time 2). Does this sound correct to you? Seems like you are tyring to use the registration transform to calculate the target registration error using fiducials identified on your lesions. The whole idea is correct and has been the gold standard in registration for years. However, I am not sure whta you mean by the z-slice. Maybe my previous comment is of help to you. HTH, Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-What-is-an-accepted-duration-of-a-3D-registration-Should-I-expect-the-MSE-to-converge-to-0-tp36133p36141.html Sent from the ITK - Users mailing list archive at Nabble.com. From emmasaunders123 at gmail.com Wed Sep 16 06:40:51 2015 From: emmasaunders123 at gmail.com (Emma Saunders) Date: Wed, 16 Sep 2015 11:40:51 +0100 Subject: [ITK-users] Fwd: Metric Distance on Manifold In-Reply-To: References: Message-ID: Is anyone aware of a database where I can obtain an example of a Pre clinincal high resolution mouse CT? Thanks Emma -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmasaunders123 at gmail.com Wed Sep 16 06:43:37 2015 From: emmasaunders123 at gmail.com (Emma Saunders) Date: Wed, 16 Sep 2015 11:43:37 +0100 Subject: [ITK-users] example data Message-ID: Is anyone aware of a database where I can obtain an example of a Pre clinincal high resolution mouse CT? Thanks Emma -------------- next part -------------- An HTML attachment was scrubbed... URL: From florian.nicolas at ensta-bretagne.org Thu Sep 17 03:49:56 2015 From: florian.nicolas at ensta-bretagne.org (neon29) Date: Thu, 17 Sep 2015 00:49:56 -0700 (MST) Subject: [ITK-users] How to use a binary mask in a registration process ? In-Reply-To: References: <1442243464912-7587799.post@n2.nabble.com> <9A8B80CE-03FC-4B59-97AF-34159FA0B659@mail.nih.gov> <1442301722918-7587809.post@n2.nabble.com> Message-ID: <1442476196805-7587817.post@n2.nabble.com> Bradley Lowekamp wrote > Hello, > > So why do you think the masks are not working? What is the output with and > without masks? Can you share you data? Is the metric value different with > and w/o the masks? > > I'd also recommend setting the SamplingStrategy to None until you have the > masks working they way you expect. > > > Brad I have set the SamplingStrategy to None without noticing any change. Here is the results of the two registrations (without and with masks) and links to the resulting image (I only display the masks as I am not sure to be allowed to share my data): without masks : 0 = -0.18317 : (-9.999904028900822e-05, -11.044272032278226, 96.60714639019373) ------------- 1 = -0.18345 : (-0.0001999990022488051, -11.044272084667545, 96.6071464599318) ------------- 2 = -0.18370 : (-0.00029999722853172624, -11.04427252056758, 96.60714686580299) ------------- 3 = -0.18362 : (-0.0002499972558627034, -11.04427247476726, 96.60714684059529) ------------- 4 = -0.18373 : (-0.0002749970826503679, -11.044272417641816, 96.60714676712918) ------------- 5 = -0.18371 : (-0.0002624971035453863, -11.044272397156764, 96.60714675699322) ------------- itk::simple::Transform Euler2DTransform (0x757ad60) RTTI typeinfo: itk::Euler2DTransform Reference Count: 4 Modified Time: 25179210 Debug: Off Object Name: Observers: none Matrix: 1 0.000262497 -0.000262497 1 Offset: [-11.1839, 96.788] Center: [688.994, 531.823] Translation: [-11.0443, 96.6071] Inverse: 1 -0.000262497 0.000262497 1 Singular: 0 Angle = -0.000262497 -------- Optimizer stop condition: RegularStepGradientDescentOptimizerv4: Step too small after 6 iterations. Current step (6.25e-06) is less than minimum step (1e-05). Number of iterations: 7 -------- with masks : 0 = -0.00623 : (9.99985477821897e-05, -11.044271338978085, 96.6071463678905) ------------- 1 = -0.00614 : (4.9999718539333366e-05, -11.044271424621682, 96.60714669916005) ------------- 2 = -0.00618 : (9.97888121303202e-10, -11.044271528245424, 96.60714704149814) ------------- 3 = -0.00623 : (2.500063478804917e-05, -11.044271421099985, 96.60714712319714) ------------- 4 = -0.00621 : (4.978968605942277e-05, -11.044270902597372, 96.6071503222739) ------------- 5 = -0.00618 : (3.729000935970828e-05, -11.044270928466227, 96.60715040837387) ------------- 6 = -0.00619 : (2.4790825641270987e-05, -11.044270949334763, 96.60715054969222) ------------- itk::simple::Transform Euler2DTransform (0x3cce740) RTTI typeinfo: itk::Euler2DTransform Reference Count: 4 Modified Time: 25177171 Debug: Off Object Name: Observers: none Matrix: 1 -2.47908e-05 2.47908e-05 1 Offset: [-11.0311, 96.5901] Center: [688.994, 531.823] Translation: [-11.0443, 96.6072] Inverse: 1 2.47908e-05 -2.47908e-05 1 Singular: 0 Angle = 2.47908e-05 -------- Optimizer stop condition: RegularStepGradientDescentOptimizerv4: Step too small after 7 iterations. Current step (6.25e-06) is less than minimum step (1e-05). Number of iterations: 8 -------- -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/How-to-use-a-binary-mask-in-a-registration-process-tp7587799p7587817.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From p.zaffino at yahoo.it Thu Sep 17 09:57:16 2015 From: p.zaffino at yahoo.it (Paolo Zaffino) Date: Thu, 17 Sep 2015 15:57:16 +0200 Subject: [ITK-users] Registration regularization term Message-ID: <55FAC6BC.6070408@yahoo.it> Dear ITK community, is there a way to set a regularization term (e.g based on vector field second derivative) into a B-spline based registration process? Thank you very much. Best. Paolo From blowekamp at mail.nih.gov Thu Sep 17 09:37:47 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 17 Sep 2015 09:37:47 -0400 Subject: [ITK-users] How to use a binary mask in a registration process ? In-Reply-To: <1442476196805-7587817.post@n2.nabble.com> References: <1442243464912-7587799.post@n2.nabble.com> <9A8B80CE-03FC-4B59-97AF-34159FA0B659@mail.nih.gov> <1442301722918-7587809.post@n2.nabble.com> <1442476196805-7587817.post@n2.nabble.com> Message-ID: Hello, I can see from your output that the metric value is significantly different when the mask is enable. So the mask is having an effect, but your registration is just not working. I can also see that the optimization is not moving much due to being stuck in a local minima. There could be a number of reasons for this such as the data is too noise, the scales of the features it to fine, or just the initialization is poor. For the optimization in the ImageRegistration method, the features need to be relatively close. Scale space and smoothing can help with filtering for the right features at the scale that the optimizer needs to step. I would suggest spending some time with the ExhaustiveOptimizer and the EvaluateMetric method to better understand the metric and the parameter space. Here is an example which uses the ExhaustiveOptimizer for initialization [1]. You can also use the ExhaustiveOptimize or the EvaluateMetric to render the Metric value into an image for visualization. You may also want to simplify your problem to better understand how to successfully setup registration, which can then be applied to the more complicated problem. HTH, Brad [1] http://www.itk.org/SimpleITKDoxygen/html/ImageRegistrationMethodExhaustive_8py-example.html On Sep 17, 2015, at 3:49 AM, neon29 wrote: > Bradley Lowekamp wrote >> Hello, >> >> So why do you think the masks are not working? What is the output with and >> without masks? Can you share you data? Is the metric value different with >> and w/o the masks? >> >> I'd also recommend setting the SamplingStrategy to None until you have the >> masks working they way you expect. >> >> >> Brad > > I have set the SamplingStrategy to None without noticing any change. Here is > the results of the two registrations (without and with masks) and links to > the resulting image (I only display the masks as I am not sure to be allowed > to share my data): > > without masks > > : > > > 0 = -0.18317 : (-9.999904028900822e-05, -11.044272032278226, > 96.60714639019373) > ------------- > 1 = -0.18345 : (-0.0001999990022488051, -11.044272084667545, > 96.6071464599318) > ------------- > 2 = -0.18370 : (-0.00029999722853172624, -11.04427252056758, > 96.60714686580299) > ------------- > 3 = -0.18362 : (-0.0002499972558627034, -11.04427247476726, > 96.60714684059529) > ------------- > 4 = -0.18373 : (-0.0002749970826503679, -11.044272417641816, > 96.60714676712918) > ------------- > 5 = -0.18371 : (-0.0002624971035453863, -11.044272397156764, > 96.60714675699322) > ------------- > itk::simple::Transform > Euler2DTransform (0x757ad60) > RTTI typeinfo: itk::Euler2DTransform > Reference Count: 4 > Modified Time: 25179210 > Debug: Off > Object Name: > Observers: > none > Matrix: > 1 0.000262497 > -0.000262497 1 > Offset: [-11.1839, 96.788] > Center: [688.994, 531.823] > Translation: [-11.0443, 96.6071] > Inverse: > 1 -0.000262497 > 0.000262497 1 > Singular: 0 > Angle = -0.000262497 > > -------- > Optimizer stop condition: RegularStepGradientDescentOptimizerv4: Step too > small after 6 iterations. Current step (6.25e-06) is less than minimum step > (1e-05). > Number of iterations: 7 > -------- > > > with masks > > : > > 0 = -0.00623 : (9.99985477821897e-05, -11.044271338978085, > 96.6071463678905) > ------------- > 1 = -0.00614 : (4.9999718539333366e-05, -11.044271424621682, > 96.60714669916005) > ------------- > 2 = -0.00618 : (9.97888121303202e-10, -11.044271528245424, > 96.60714704149814) > ------------- > 3 = -0.00623 : (2.500063478804917e-05, -11.044271421099985, > 96.60714712319714) > ------------- > 4 = -0.00621 : (4.978968605942277e-05, -11.044270902597372, > 96.6071503222739) > ------------- > 5 = -0.00618 : (3.729000935970828e-05, -11.044270928466227, > 96.60715040837387) > ------------- > 6 = -0.00619 : (2.4790825641270987e-05, -11.044270949334763, > 96.60715054969222) > ------------- > itk::simple::Transform > Euler2DTransform (0x3cce740) > RTTI typeinfo: itk::Euler2DTransform > Reference Count: 4 > Modified Time: 25177171 > Debug: Off > Object Name: > Observers: > none > Matrix: > 1 -2.47908e-05 > 2.47908e-05 1 > Offset: [-11.0311, 96.5901] > Center: [688.994, 531.823] > Translation: [-11.0443, 96.6072] > Inverse: > 1 2.47908e-05 > -2.47908e-05 1 > Singular: 0 > Angle = 2.47908e-05 > > -------- > Optimizer stop condition: RegularStepGradientDescentOptimizerv4: Step too > small after 7 iterations. Current step (6.25e-06) is less than minimum step > (1e-05). > Number of iterations: 8 > -------- > > > > > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/How-to-use-a-binary-mask-in-a-registration-process-tp7587799p7587817.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From paniwani at gmail.com Thu Sep 17 11:06:24 2015 From: paniwani at gmail.com (paniwani) Date: Thu, 17 Sep 2015 08:06:24 -0700 (MST) Subject: [ITK-users] [ITK] How to use rotation matrix and translation to perform Rigid 3D transform? In-Reply-To: References: <1441990596887-36114.post@n7.nabble.com> <1441991677614-36115.post@n7.nabble.com> <1441991946044-36116.post@n7.nabble.com> <1441992528633-36117.post@n7.nabble.com> <1441992947423-36118.post@n7.nabble.com> <1441993634245-36119.post@n7.nabble.com> <1442297186776-36135.post@n7.nabble.com> Message-ID: <1442502384555-36147.post@n7.nabble.com> That was very helpful. Thank you! -- View this message in context: http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114p36147.html Sent from the ITK - Users mailing list archive at Nabble.com. From bakkari.abdelkhalek at hotmail.fr Thu Sep 17 12:18:24 2015 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Thu, 17 Sep 2015 17:18:24 +0100 Subject: [ITK-users] ITK Snap - Add new button- Message-ID: Dear ITK snap Dev & Insight-users, I have a very serious question. I developed my new algorithm using ITK. Can you explain to me how can add a new button to ITK-Snap containing this algorithm ? Regards, Abdelkhalek Bakkari -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntustison at gmail.com Thu Sep 17 12:30:42 2015 From: ntustison at gmail.com (Nicholas Tustison) Date: Thu, 17 Sep 2015 09:30:42 -0700 Subject: [ITK-users] Registration regularization term In-Reply-To: <55FAC6BC.6070408@yahoo.it> References: <55FAC6BC.6070408@yahoo.it> Message-ID: No, but you?re welcome to contribute such an addition. Nick > On Sep 17, 2015, at 6:57 AM, Paolo Zaffino wrote: > > Dear ITK community, > is there a way to set a regularization term (e.g based on vector field second derivative) into a B-spline based registration process? > > Thank you very much. > Best. > > Paolo > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From dzenanz at gmail.com Thu Sep 17 12:53:32 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 17 Sep 2015 12:53:32 -0400 Subject: [ITK-users] What is an accepted duration of a 3D registration? Should I expect the MSE to "converge" to 0? In-Reply-To: References: Message-ID: One possible reason for such slow registration could be compiling you application in debug mode. Release mode is many times faster with ITK, sometimes even hundredfold! On Mon, Sep 14, 2015 at 6:56 PM, Marina Bendersky < marina.bendersky at gmail.com> wrote: > Hello, > > I'm doing a 3D registration of 2 CT volumes (the fixed one contains > 131 dicom images and the moving has 145 dicom images). > > I first converted each dicom series into one mha volume, using the > example DicomSeriesReadImageWrite2.cxx and then, I do the registration > following the example imageRegistration20.cxx. Below are the main > registration components and parameters (other parameters had their > default values): > > typedef itk::AffineTransform< double, Dimension > TransformType; > typedef itk::RegularStepGradientDescentOptimizer OptimizerType; > typedef itk::MeanSquaresImageToImageMetric< FixedImageType, > MovingImageType > MetricType; > typedef itk::LinearInterpolateImageFunction< MovingImageType, double > > InterpolatorType; > > double translationScale = 1.0 / 1000.0; > optimizer->SetMaximumStepLength( 0.05 ); > optimizer->SetMinimumStepLength( 0.01 ); > > > This 3D registration runs on a MacBookPro laptop for 5.5 hours, so I > was wondering, is this "normal"? How long should a 3D registration > take? > > Also, the MSE metric keeps decreasing (though incrementally) even > after 300 iterations (plot attached), and there are oscillations > around the iteration 150 (I ran this twice and both times I get this > plot!) - why could this be? > > Should I expect the MSE metric to converge to 0, or something closer > to 0 (instead of the current values, in the ninety thousands...)? > > Thank you for your help, > Marina > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Thu Sep 17 14:09:36 2015 From: matimontg at gmail.com (Matias Montroull) Date: Thu, 17 Sep 2015 18:09:36 +0000 Subject: [ITK-users] [ITK] How to use rotation matrix and translation to perform Rigid 3D transform? In-Reply-To: <1442502384555-36147.post@n7.nabble.com> References: <1441990596887-36114.post@n7.nabble.com> <1441991677614-36115.post@n7.nabble.com> <1441991946044-36116.post@n7.nabble.com> <1441992528633-36117.post@n7.nabble.com> <1441992947423-36118.post@n7.nabble.com> <1441993634245-36119.post@n7.nabble.com> <1442297186776-36135.post@n7.nabble.com> <1442502384555-36147.post@n7.nabble.com> Message-ID: Ok, this is CSharp (I'm using SimpleITK) but there may be a similar statemnt in C++ What I use to change the tolerance is: ProcessObject.SetGlobalDefaultCoordinateTolerance(0.001); I saw your origins are not equal in the email you sent.. Regards, Matias. El jue., 17 de sept. de 2015 a la(s) 12:40 p. m., paniwani < paniwani at gmail.com> escribi?: > That was very helpful. Thank you! > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114p36147.html > Sent from the ITK - 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Thu Sep 17 14:11:04 2015 From: matimontg at gmail.com (Matias Montroull) Date: Thu, 17 Sep 2015 18:11:04 +0000 Subject: [ITK-users] [ITK] How to use rotation matrix and translation to perform Rigid 3D transform? In-Reply-To: References: <1441990596887-36114.post@n7.nabble.com> <1441991677614-36115.post@n7.nabble.com> <1441991946044-36116.post@n7.nabble.com> <1441992528633-36117.post@n7.nabble.com> <1441992947423-36118.post@n7.nabble.com> <1441993634245-36119.post@n7.nabble.com> <1442297186776-36135.post@n7.nabble.com> <1442502384555-36147.post@n7.nabble.com> Message-ID: Sorry, wrong response, it was for another thread, my bad.. El jue., 17 de sept. de 2015 a la(s) 3:09 p. m., Matias Montroull < matimontg at gmail.com> escribi?: > Ok, this is CSharp (I'm using SimpleITK) but there may be a similar > statemnt in C++ > > What I use to change the tolerance is: > ProcessObject.SetGlobalDefaultCoordinateTolerance(0.001); > > I saw your origins are not equal in the email you sent.. > > Regards, > > Matias. > > El jue., 17 de sept. de 2015 a la(s) 12:40 p. m., paniwani < > paniwani at gmail.com> escribi?: > >> That was very helpful. Thank you! >> >> >> >> -- >> View this message in context: >> http://itk-users.7.n7.nabble.com/How-to-use-rotation-matrix-and-translation-to-perform-Rigid-3D-transform-tp36114p36147.html >> Sent from the ITK - 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 >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > -- > Matias > -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From paniwani at gmail.com Thu Sep 17 17:11:38 2015 From: paniwani at gmail.com (paniwani) Date: Thu, 17 Sep 2015 14:11:38 -0700 (MST) Subject: [ITK-users] example data In-Reply-To: References: Message-ID: <1442524298637-36153.post@n7.nabble.com> Digimouse looks promising: http://neuroimage.usc.edu/neuro/Digimouse_Download -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-example-data-tp36143p36153.html Sent from the ITK - Users mailing list archive at Nabble.com. From paniwani at gmail.com Thu Sep 17 18:23:13 2015 From: paniwani at gmail.com (paniwani) Date: Thu, 17 Sep 2015 15:23:13 -0700 (MST) Subject: [ITK-users] Why is resampling changing my pixel intensity? Message-ID: <1442528593970-36154.post@n7.nabble.com> Hi, I'm using the ResampleImageFilter to resample and transform a PET onto a CT scan, but I'm running into a problem in which my intensity maximum is altered after the resampling. Can someone help offer a clue as to why this is happening? My understanding was that resampling should not effect the pixel intensity. I'm working in python with Simple ITK: The output of the code above: Original PET image - BQML Max: 442102.1941 Resampled PET image - BQML Max: 53450.7726293 I do not understand why my PET image maximum is being adjusted by roughly a factor of 10. Any help would be greatly appreciated! Thanks in advance! Neil -- View this message in context: http://itk-users.7.n7.nabble.com/Why-is-resampling-changing-my-pixel-intensity-tp36154.html Sent from the ITK - Users mailing list archive at Nabble.com. From paniwani at gmail.com Thu Sep 17 18:57:39 2015 From: paniwani at gmail.com (paniwani) Date: Thu, 17 Sep 2015 15:57:39 -0700 (MST) Subject: [ITK-users] Why is resampling changing my pixel intensity? In-Reply-To: <1442528593970-36154.post@n7.nabble.com> References: <1442528593970-36154.post@n7.nabble.com> Message-ID: <1442530659253-36155.post@n7.nabble.com> Nevermind. The resampled region encompassed an area in which the PET maximum was considerably lower. My mistake! Sorry for the trouble. -- View this message in context: http://itk-users.7.n7.nabble.com/Why-is-resampling-changing-my-pixel-intensity-tp36154p36155.html Sent from the ITK - Users mailing list archive at Nabble.com. From nirhal at post.bgu.ac.il Fri Sep 18 10:41:08 2015 From: nirhal at post.bgu.ac.il (nirhal) Date: Fri, 18 Sep 2015 07:41:08 -0700 (MST) Subject: [ITK-users] ITK compiling error with MinGW-w64: "too many sections" Message-ID: <1442587268491-7587861.post@n2.nabble.com> Hi, I'm trying to compile ITK 4.9 (from git) using MinGW-w64. Most of compilation went OK, but at the end (93%) i'm getting this error: C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.2. 0/../../../../x86_64-w64-mingw32/bin/as.exe: CMakeFiles\ITKIOTransformBase.dir\i tkTransformFactoryBase.cxx.obj: too many sections (33245) C:\Users\NirWin7\AppData\Local\Temp\cct05EGF.s: Assembler messages: C:\Users\NirWin7\AppData\Local\Temp\cct05EGF.s: Fatal error: can't write CMakeFi les\ITKIOTransformBase.dir\itkTransformFactoryBase.cxx.obj: File too big C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.2. 0/../../../../x86_64-w64-mingw32/bin/as.exe: CMakeFiles\ITKIOTransformBase.dir\i tkTransformFactoryBase.cxx.obj: too many sections (33245) C:\Users\NirWin7\AppData\Local\Temp\cct05EGF.s: Fatal error: can't close CMakeFi les\ITKIOTransformBase.dir\itkTransformFactoryBase.cxx.obj: File too big Modules\IO\TransformBase\src\CMakeFiles\ITKIOTransformBase.dir\build.make:62: re cipe for target 'Modules/IO/TransformBase/src/CMakeFiles/ITKIOTransformBase.dir/ itkTransformFactoryBase.cxx.obj' failed mingw32-make[2]: *** [Modules/IO/TransformBase/src/CMakeFiles/ITKIOTransformBase .dir/itkTransformFactoryBase.cxx.obj] Error 1 CMakeFiles\Makefile2:10850: recipe for target 'Modules/IO/TransformBase/src/CMak eFiles/ITKIOTransformBase.dir/all' failed mingw32-make[1]: *** [Modules/IO/TransformBase/src/CMakeFiles/ITKIOTransformBase .dir/all] Error 2 makefile:148: recipe for target 'all' failed mingw32-make: *** [all] Error 2 What shuld i do? Thanks. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-compiling-error-with-MinGW-w64-too-many-sections-tp7587861.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Fri Sep 18 10:56:44 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 18 Sep 2015 10:56:44 -0400 Subject: [ITK-users] ITK compiling error with MinGW-w64: "too many sections" In-Reply-To: <1442587268491-7587861.post@n2.nabble.com> References: <1442587268491-7587861.post@n2.nabble.com> Message-ID: Hello, According to this thread: https://stackoverflow.com/questions/16596876/object-file-has-too-many-sections possible workarounds include not compiling with the Debug CMAKE_BUILD_TYPE or adding the flags -Wa,-mbig-obj to your build. Please let us know how it goes. Matt On Fri, Sep 18, 2015 at 10:41 AM, nirhal wrote: > Hi, > > I'm trying to compile ITK 4.9 (from git) using MinGW-w64. > Most of compilation went OK, but at the end (93%) i'm getting this error: > > C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.2. > 0/../../../../x86_64-w64-mingw32/bin/as.exe: > CMakeFiles\ITKIOTransformBase.dir\i > tkTransformFactoryBase.cxx.obj: too many sections (33245) > C:\Users\NirWin7\AppData\Local\Temp\cct05EGF.s: Assembler messages: > C:\Users\NirWin7\AppData\Local\Temp\cct05EGF.s: Fatal error: can't write > CMakeFi > les\ITKIOTransformBase.dir\itkTransformFactoryBase.cxx.obj: File too big > C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.2. > 0/../../../../x86_64-w64-mingw32/bin/as.exe: > CMakeFiles\ITKIOTransformBase.dir\i > tkTransformFactoryBase.cxx.obj: too many sections (33245) > C:\Users\NirWin7\AppData\Local\Temp\cct05EGF.s: Fatal error: can't close > CMakeFi > les\ITKIOTransformBase.dir\itkTransformFactoryBase.cxx.obj: File too big > Modules\IO\TransformBase\src\CMakeFiles\ITKIOTransformBase.dir\build.make:62: > re > cipe for target > 'Modules/IO/TransformBase/src/CMakeFiles/ITKIOTransformBase.dir/ > itkTransformFactoryBase.cxx.obj' failed > mingw32-make[2]: *** > [Modules/IO/TransformBase/src/CMakeFiles/ITKIOTransformBase > .dir/itkTransformFactoryBase.cxx.obj] Error 1 > CMakeFiles\Makefile2:10850: recipe for target > 'Modules/IO/TransformBase/src/CMak > eFiles/ITKIOTransformBase.dir/all' failed > mingw32-make[1]: *** > [Modules/IO/TransformBase/src/CMakeFiles/ITKIOTransformBase > .dir/all] Error 2 > makefile:148: recipe for target 'all' failed > mingw32-make: *** [all] Error 2 > > What shuld i do? > Thanks. > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-compiling-error-with-MinGW-w64-too-many-sections-tp7587861.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From nirhal at post.bgu.ac.il Sat Sep 19 15:41:57 2015 From: nirhal at post.bgu.ac.il (nirhal) Date: Sat, 19 Sep 2015 12:41:57 -0700 (MST) Subject: [ITK-users] ITK compiling error with MinGW-w64: "too many sections" In-Reply-To: References: <1442587268491-7587861.post@n2.nabble.com> Message-ID: <1442691717874-7587863.post@n2.nabble.com> Addig the flags did the trick. But now i have another problem while linking this DLL file: CMakeFiles\ITKIOTransformBase.dir/objects.a(itkTransformFactoryBase.cxx.obj):itk TransformFactoryBase.cxx:(.text$_ZN3itk41BSplineScatteredDataPointSetToImageFilt erINS_8PointSetINS_6VectorIdLj2EEELj2ENS_23DefaultStaticMeshTraitsIS3_Lj2ELj2Eff S3_EEEENS_5ImageIS3_Lj2EEEE26BeforeThreadedGenerateDataEv[_ZN3itk41BSplineScatte redDataPointSetToImageFilterINS_8PointSetINS_6VectorIdLj2EEELj2ENS_23DefaultStat icMeshTraitsIS3_Lj2ELj2EffS3_EEEENS_5ImageIS3_Lj2EEEE26BeforeThreadedGenerateDat aEv]+0x269): undefined reference to `vtable for itk::ImageRegion<2u>' A lot of "undefined reference to vtable" errors. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-compiling-error-with-MinGW-w64-too-many-sections-tp7587861p7587863.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From marina.bendersky at gmail.com Mon Sep 21 01:35:23 2015 From: marina.bendersky at gmail.com (Marina Bendersky) Date: Sun, 20 Sep 2015 22:35:23 -0700 Subject: [ITK-users] What is an accepted duration of a 3D registration? Should I expect the MSE to "converge" to 0? In-Reply-To: References: Message-ID: I'm not sure I understand what you mean ... I'm using the ITK version 4.6.1, compiling and building the example and then running the executable with my images. Is there an alternative/better way to run ITK code? (I apologize if the question is too basic). Thanks, Marina On Thu, Sep 17, 2015 at 9:53 AM, D?enan Zuki? wrote: > One possible reason for such slow registration could be compiling you > application in debug mode. Release mode is many times faster with ITK, > sometimes even hundredfold! > > On Mon, Sep 14, 2015 at 6:56 PM, Marina Bendersky > wrote: >> >> Hello, >> >> I'm doing a 3D registration of 2 CT volumes (the fixed one contains >> 131 dicom images and the moving has 145 dicom images). >> >> I first converted each dicom series into one mha volume, using the >> example DicomSeriesReadImageWrite2.cxx and then, I do the registration >> following the example imageRegistration20.cxx. Below are the main >> registration components and parameters (other parameters had their >> default values): >> >> typedef itk::AffineTransform< double, Dimension > TransformType; >> typedef itk::RegularStepGradientDescentOptimizer OptimizerType; >> typedef itk::MeanSquaresImageToImageMetric< FixedImageType, >> MovingImageType > MetricType; >> typedef itk::LinearInterpolateImageFunction< MovingImageType, double > >> InterpolatorType; >> >> double translationScale = 1.0 / 1000.0; >> optimizer->SetMaximumStepLength( 0.05 ); >> optimizer->SetMinimumStepLength( 0.01 ); >> >> >> This 3D registration runs on a MacBookPro laptop for 5.5 hours, so I >> was wondering, is this "normal"? How long should a 3D registration >> take? >> >> Also, the MSE metric keeps decreasing (though incrementally) even >> after 300 iterations (plot attached), and there are oscillations >> around the iteration 150 (I ran this twice and both times I get this >> plot!) - why could this be? >> >> Should I expect the MSE metric to converge to 0, or something closer >> to 0 (instead of the current values, in the ninety thousands...)? >> >> Thank you for your help, >> Marina >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > From siavashk at ece.ubc.ca Mon Sep 21 02:50:27 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Sun, 20 Sep 2015 23:50:27 -0700 Subject: [ITK-users] What is an accepted duration of a 3D registration? Should I expect the MSE to "converge" to 0? In-Reply-To: References: Message-ID: Marina, for example in Visual Studio, you can compile and run your program in release mode by changing the compilation type from a drop down menu. This makes your program run faster. Siavash Sent from my iPhone > On Sep 20, 2015, at 10:35 PM, Marina Bendersky wrote: > > I'm not sure I understand what you mean ... I'm using the ITK version > 4.6.1, compiling and building the example and then running the > executable with my images. Is there an alternative/better way to run > ITK code? (I apologize if the question is too basic). > > Thanks, > Marina > > >> On Thu, Sep 17, 2015 at 9:53 AM, D?enan Zuki? wrote: >> One possible reason for such slow registration could be compiling you >> application in debug mode. Release mode is many times faster with ITK, >> sometimes even hundredfold! >> >> On Mon, Sep 14, 2015 at 6:56 PM, Marina Bendersky >> wrote: >>> >>> Hello, >>> >>> I'm doing a 3D registration of 2 CT volumes (the fixed one contains >>> 131 dicom images and the moving has 145 dicom images). >>> >>> I first converted each dicom series into one mha volume, using the >>> example DicomSeriesReadImageWrite2.cxx and then, I do the registration >>> following the example imageRegistration20.cxx. Below are the main >>> registration components and parameters (other parameters had their >>> default values): >>> >>> typedef itk::AffineTransform< double, Dimension > TransformType; >>> typedef itk::RegularStepGradientDescentOptimizer OptimizerType; >>> typedef itk::MeanSquaresImageToImageMetric< FixedImageType, >>> MovingImageType > MetricType; >>> typedef itk::LinearInterpolateImageFunction< MovingImageType, double > >>> InterpolatorType; >>> >>> double translationScale = 1.0 / 1000.0; >>> optimizer->SetMaximumStepLength( 0.05 ); >>> optimizer->SetMinimumStepLength( 0.01 ); >>> >>> >>> This 3D registration runs on a MacBookPro laptop for 5.5 hours, so I >>> was wondering, is this "normal"? How long should a 3D registration >>> take? >>> >>> Also, the MSE metric keeps decreasing (though incrementally) even >>> after 300 iterations (plot attached), and there are oscillations >>> around the iteration 150 (I ran this twice and both times I get this >>> plot!) - why could this be? >>> >>> Should I expect the MSE metric to converge to 0, or something closer >>> to 0 (instead of the current values, in the ninety thousands...)? >>> >>> Thank you for your help, >>> Marina >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From franciscolopezdelafranca at gmail.com Mon Sep 21 07:06:45 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Mon, 21 Sep 2015 13:06:45 +0200 Subject: [ITK-users] Vector image saved as NIFTI format? Message-ID: Hi, is it possible to have an image where the pixel type is an array (e.g. std::vector) and save it as NIFITI file? Thanks a lot. -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Mon Sep 21 07:15:19 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Mon, 21 Sep 2015 13:15:19 +0200 Subject: [ITK-users] Texture pixel by pixel Message-ID: Hi, I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter class with the default parameters and everything was OK. But now, I have to calculate the texture features of a 2D scalar image pixel by pixel, I mean, iterate over the whole image and calculate the texture features of every pixel. I guess I've got to use each pixel as the masked region over which to calculate the texture features, but I think this process could be very slow (I have to do it with a lot of 2D images). Is there a faster way to do it or isn't it possible as I've described? Thanks a lot. Kind regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Mon Sep 21 07:53:16 2015 From: matimontg at gmail.com (Matias Montroull) Date: Mon, 21 Sep 2015 08:53:16 -0300 Subject: [ITK-users] What is an accepted duration of a 3D registration? Should I expect the MSE to "converge" to 0? In-Reply-To: References: Message-ID: Hi Marina, Did you compile in release mode or debug? Regards, Matias On Sep 14, 2015 7:56 PM, "Marina Bendersky" wrote: > Hello, > > I'm doing a 3D registration of 2 CT volumes (the fixed one contains > 131 dicom images and the moving has 145 dicom images). > > I first converted each dicom series into one mha volume, using the > example DicomSeriesReadImageWrite2.cxx and then, I do the registration > following the example imageRegistration20.cxx. Below are the main > registration components and parameters (other parameters had their > default values): > > typedef itk::AffineTransform< double, Dimension > TransformType; > typedef itk::RegularStepGradientDescentOptimizer OptimizerType; > typedef itk::MeanSquaresImageToImageMetric< FixedImageType, > MovingImageType > MetricType; > typedef itk::LinearInterpolateImageFunction< MovingImageType, double > > InterpolatorType; > > double translationScale = 1.0 / 1000.0; > optimizer->SetMaximumStepLength( 0.05 ); > optimizer->SetMinimumStepLength( 0.01 ); > > > This 3D registration runs on a MacBookPro laptop for 5.5 hours, so I > was wondering, is this "normal"? How long should a 3D registration > take? > > Also, the MSE metric keeps decreasing (though incrementally) even > after 300 iterations (plot attached), and there are oscillations > around the iteration 150 (I ran this twice and both times I get this > plot!) - why could this be? > > Should I expect the MSE metric to converge to 0, or something closer > to 0 (instead of the current values, in the ninety thousands...)? > > Thank you for your help, > Marina > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Mon Sep 21 08:07:56 2015 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Mon, 21 Sep 2015 14:07:56 +0200 (CEST) Subject: [ITK-users] [ITK] Texture pixel by pixel In-Reply-To: References: Message-ID: <1141839196.4867214.1442837276350.JavaMail.zimbra@enst.fr> Hello Francisco, I'm not sure about what you are trying to do, but computing a feature on a single pixel does not make much sense to me. When you are trying to characterize a texture, you rely on the fact there should be a heterogeneity in an area. The feature computing try to highlight such differences (heterogeneity/homogeneity, constrast, symmetry...) Nevertheless, you may be interested by this example : http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures It shows how to obtain "feature image", i.e. an image where each pixel contain the value of a feature computed on a 3x3x3 neighborhood. You just have to replace the ScalarImageToCooccurrenceMatrixFilter & HistogramToTextureFeaturesFilter by your ScalarImageToTextureFeaturesFilter (which is just the fusion of the two). About your concern for computation time, I'm afraid there is no other easy way than iterating a mask region. You can tune the neighborhood size to get acceptable results in balance with speed. HTH Tim ----- Mail original ----- De: "Francisco Lopez de la Franca" ?: "Insight Users" Envoy?: Lundi 21 Septembre 2015 13:15:19 Objet: [ITK] [ITK-users] Texture pixel by pixel Hi, I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter class with the default parameters and everything was OK. But now, I have to calculate the texture features of a 2D scalar image pixel by pixel, I mean, iterate over the whole image and calculate the texture features of every pixel. I guess I've got to use each pixel as the masked region over which to calculate the texture features, but I think this process could be very slow (I have to do it with a lot of 2D images). Is there a faster way to do it or isn't it possible as I've described? Thanks a lot. Kind regards. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From blowekamp at mail.nih.gov Mon Sep 21 08:30:27 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 21 Sep 2015 08:30:27 -0400 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: Message-ID: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> Hello, I have a external ITK extension you may find useful: https://github.com/blowekamp/itkTextureAnalysis/blob/master/include/itkTextureFeatureImageFilter.h This computed the GLCM, for a neighborhood for every pixel and produces a VectorImage with all the features. Contributions to improving the class and documentation are welcome. HTH, Brad On Sep 21, 2015, at 7:15 AM, Francisco Lopez de la Franca wrote: > Hi, > I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter class with the default parameters and everything was OK. > > But now, I have to calculate the texture features of a 2D scalar image pixel by pixel, I mean, iterate over the whole image and calculate the texture features of every pixel. > > I guess I've got to use each pixel as the masked region over which to calculate the texture features, but I think this process could be very slow (I have to do it with a lot of 2D images). > > Is there a faster way to do it or isn't it possible as I've described? > > Thanks a lot. > Kind regards. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From tevain at telecom-paristech.fr Mon Sep 21 08:38:01 2015 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Mon, 21 Sep 2015 14:38:01 +0200 (CEST) Subject: [ITK-users] [ITK] Texture pixel by pixel In-Reply-To: References: <1141839196.4867214.1442837276350.JavaMail.zimbra@enst.fr> Message-ID: <2048849791.4894102.1442839081332.JavaMail.zimbra@enst.fr> Well, if you do like in the example, you will have as many images as features you have. Of course you can combine them. But I've never work with nifti images, so I can't tell you if you will be able to save it. But since you could consider such a features image as a multi-components image (like RGB one), I think you could maybe find help on writing RGB nifti images? Tim PS: Try to keep posting to the ITK list for future readers :) ----- Mail original ----- De: "Francisco Lopez de la Franca" ?: "Timothee Evain" Envoy?: Lundi 21 Septembre 2015 14:16:00 Objet: Re: [ITK] [ITK-users] Texture pixel by pixel Thank you very much Tim. I think the same, that there is no much sense on calculating the texture feature per pixel, but I think the ITK filters have to do it (of course, by using a neighbourhood region as you mention), because they return the average on each direction. Anyway, I'll have a look at the referenced example. >It shows how to obtain "feature image", i.e. an image where each pixel contain the value of a feature computed on a 3x3x3 neighborhood. This is exactly what I need. One more question, if I store the texture features per pixel, I mean, I'd have a vector image (the pixel type as an array), could I save this kind of feature image as a NIFTI image? Thanks again. 2015-09-21 14:07 GMT+02:00 Timothee Evain : > Hello Francisco, > > I'm not sure about what you are trying to do, but computing a feature on a > single pixel does not make much sense to me. > When you are trying to characterize a texture, you rely on the fact there > should be a heterogeneity in an area. The feature computing try to > highlight such differences (heterogeneity/homogeneity, constrast, > symmetry...) > Nevertheless, you may be interested by this example : > http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures > It shows how to obtain "feature image", i.e. an image where each pixel > contain the value of a feature computed on a 3x3x3 neighborhood. > You just have to replace the ScalarImageToCooccurrenceMatrixFilter & > HistogramToTextureFeaturesFilter by your ScalarImageToTextureFeaturesFilter > (which is just the fusion of the two). > > About your concern for computation time, I'm afraid there is no other easy > way than iterating a mask region. You can tune the neighborhood size to get > acceptable results in balance with speed. > > HTH > > Tim > > ----- Mail original ----- > De: "Francisco Lopez de la Franca" > ?: "Insight Users" > Envoy?: Lundi 21 Septembre 2015 13:15:19 > Objet: [ITK] [ITK-users] Texture pixel by pixel > > Hi, > I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter class > with the default parameters and everything was OK. > > But now, I have to calculate the texture features of a 2D scalar image > pixel by pixel, I mean, iterate over the whole image and calculate the > texture features of every pixel. > > I guess I've got to use each pixel as the masked region over which to > calculate the texture features, but I think this process could be very slow > (I have to do it with a lot of 2D images). > > Is there a faster way to do it or isn't it possible as I've described? > > Thanks a lot. > Kind regards. > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From nexnaru at gmail.com Mon Sep 21 14:54:37 2015 From: nexnaru at gmail.com (Maryana) Date: Mon, 21 Sep 2015 11:54:37 -0700 Subject: [ITK-users] Streamed Read/Write Truncating Data Message-ID: Hi ITK Users/Devs, I'm new to ITK and I need to write a small program to convert Nifti images to MetaIO. However, I need to use the streamed reader/writer because my image volumes can have several gigabytes. I was doing some tests with the following code but I've realized that whenever I use the stream I end up with a truncated volume. I'm using ITK 4.8. I'm sure my volume is of unsigned char type. Also, when I comment out the writer->SetNumberOfStreamDivisions(20); line I works fine. Does anyone knows what is wrong? Thank you! #include #include #include #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkImageRegionIterator.h" #include "itkNiftiImageIO.h" #include "itkMetaImageIO.h" int main(int argc, char const *argv[]){ std::string fileIn = "brain_8bit.nii"; std::string fileOut = "mri2_stream.mha"; typedef itk::Image Image3D; //Reader typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(fileIn); //Writer typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName(fileOut); writer->SetNumberOfStreamDivisions(20); writer->SetInput(reader->GetOutput()); std::cout << "Input: " << fileIn << std::endl; std::cout << "Output: " << fileOut << std::endl; std::cout << "Writing..." << std::endl; try { writer->Update(); } catch( itk::ExceptionObject & err ) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; return EXIT_FAILURE; } std::cout << "Finished." << std::endl; return EXIT_SUCCESS; } -- "Tudo no mundo come?ou com um sim. Uma mol?cula disse sim a outra mol?cula e nasceu a vida" - Clarice Lispector -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Mon Sep 21 14:55:53 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 21 Sep 2015 14:55:53 -0400 Subject: [ITK-users] [ITK-dev] Streamed Read/Write Truncating Data In-Reply-To: References: Message-ID: <191044B9-EE73-479F-89C4-BA7FEA977740@mail.nih.gov> Hello Maryana, What compiler, platform and architecture are you compiling for? Brad On Sep 21, 2015, at 2:54 PM, Maryana wrote: > > Hi ITK Users/Devs, > > I'm new to ITK and I need to write a small program to convert Nifti images to MetaIO. However, I need to use the streamed reader/writer because my image volumes can have several gigabytes. I was doing some tests with the following code but I've realized that whenever I use the stream I end up with a truncated volume. I'm using ITK 4.8. I'm sure my volume is of unsigned char type. Also, when I comment out the writer->SetNumberOfStreamDivisions(20); line I works fine. Does anyone knows what is wrong? > > Thank you! > > #include > #include > #include > > #include "itkImage.h" > #include "itkImageFileReader.h" > #include "itkImageFileWriter.h" > #include "itkImageRegionIterator.h" > #include "itkNiftiImageIO.h" > #include "itkMetaImageIO.h" > > > int main(int argc, char const *argv[]){ > > std::string fileIn = "brain_8bit.nii"; > std::string fileOut = "mri2_stream.mha"; > > typedef itk::Image Image3D; > > //Reader > typedef itk::ImageFileReader ReaderType; > ReaderType::Pointer reader = ReaderType::New(); > reader->SetFileName(fileIn); > > //Writer > typedef itk::ImageFileWriter WriterType; > WriterType::Pointer writer = WriterType::New(); > writer->SetFileName(fileOut); > writer->SetNumberOfStreamDivisions(20); > writer->SetInput(reader->GetOutput()); > > > std::cout << "Input: " << fileIn << std::endl; > std::cout << "Output: " << fileOut << std::endl; > > std::cout << "Writing..." << std::endl; > try > { > writer->Update(); > } > catch( itk::ExceptionObject & err ) > { > std::cerr << "ExceptionObject caught !" << std::endl; > std::cerr << err << std::endl; > return EXIT_FAILURE; > } > std::cout << "Finished." << std::endl; > > > return EXIT_SUCCESS; > } > > > > > > -- > "Tudo no mundo come?ou com um sim. Uma mol?cula disse sim a outra mol?cula e nasceu a vida" - Clarice Lispector > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers From nexnaru at gmail.com Mon Sep 21 15:07:42 2015 From: nexnaru at gmail.com (Maryana) Date: Mon, 21 Sep 2015 12:07:42 -0700 Subject: [ITK-users] [ITK-dev] Streamed Read/Write Truncating Data In-Reply-To: <191044B9-EE73-479F-89C4-BA7FEA977740@mail.nih.gov> References: <191044B9-EE73-479F-89C4-BA7FEA977740@mail.nih.gov> Message-ID: Hi, I use Linux Mint 64bits, GCC 4.8, Cmake 2.8. I'm compiling to this platform. Thank you! On Mon, Sep 21, 2015 at 11:55 AM, Bradley Lowekamp wrote: > Hello Maryana, > > What compiler, platform and architecture are you compiling for? > > Brad > > On Sep 21, 2015, at 2:54 PM, Maryana wrote: > > > > > Hi ITK Users/Devs, > > > > I'm new to ITK and I need to write a small program to convert Nifti > images to MetaIO. However, I need to use the streamed reader/writer because > my image volumes can have several gigabytes. I was doing some tests with > the following code but I've realized that whenever I use the stream I end > up with a truncated volume. I'm using ITK 4.8. I'm sure my volume is of > unsigned char type. Also, when I comment out the > writer->SetNumberOfStreamDivisions(20); line I works fine. Does anyone > knows what is wrong? > > > > Thank you! > > > > #include > > #include > > #include > > > > #include "itkImage.h" > > #include "itkImageFileReader.h" > > #include "itkImageFileWriter.h" > > #include "itkImageRegionIterator.h" > > #include "itkNiftiImageIO.h" > > #include "itkMetaImageIO.h" > > > > > > int main(int argc, char const *argv[]){ > > > > std::string fileIn = "brain_8bit.nii"; > > std::string fileOut = "mri2_stream.mha"; > > > > typedef itk::Image Image3D; > > > > //Reader > > typedef itk::ImageFileReader ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileName(fileIn); > > > > //Writer > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName(fileOut); > > writer->SetNumberOfStreamDivisions(20); > > writer->SetInput(reader->GetOutput()); > > > > > > std::cout << "Input: " << fileIn << std::endl; > > std::cout << "Output: " << fileOut << std::endl; > > > > std::cout << "Writing..." << std::endl; > > try > > { > > writer->Update(); > > } > > catch( itk::ExceptionObject & err ) > > { > > std::cerr << "ExceptionObject caught !" << std::endl; > > std::cerr << err << std::endl; > > return EXIT_FAILURE; > > } > > std::cout << "Finished." << std::endl; > > > > > > return EXIT_SUCCESS; > > } > > > > > > > > > > > > -- > > "Tudo no mundo come?ou com um sim. Uma mol?cula disse sim a outra > mol?cula e nasceu a vida" - Clarice Lispector > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-developers > > -- "Tudo no mundo come?ou com um sim. Uma mol?cula disse sim a outra mol?cula e nasceu a vida" - Clarice Lispector -------------- next part -------------- An HTML attachment was scrubbed... URL: From nexnaru at gmail.com Mon Sep 21 18:32:08 2015 From: nexnaru at gmail.com (Maryana) Date: Mon, 21 Sep 2015 15:32:08 -0700 Subject: [ITK-users] Fwd: [ITK-dev] Streamed Read/Write Truncating Data In-Reply-To: References: <191044B9-EE73-479F-89C4-BA7FEA977740@mail.nih.gov> Message-ID: Hi! If anyone would like to repeat the test, this is my test file: https://www.dropbox.com/s/7hpen46znk1h58l/brain_8bit.nii?dl=0 If I convert that file to MetaIO without streams, and use ExtractImageFilter to read one file perpendicular to Y (as in the code I'm sending bellow) it works fine. However if I convert it to MetaIO using streams and use the same code to read the same slice, I end up with a truncated image. I have the same result when I use Paraview for visualization. By the way, for what I've read from ITK documentation NIfti supposedly supports streamed reading. So I'm guessing that using Nifti in this case would be ok. Is this correct? Would anyone have an idea on what's wrong? Thank you! Code for reading slice: #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkExtractImageFilter.h" #include "itkImage.h" int main( int argc, char ** argv ) { typedef unsigned char InputPixelType; typedef unsigned char OutputPixelType; typedef itk::Image< InputPixelType, 3 > InputImageType; typedef itk::Image< OutputPixelType, 2 > OutputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; typedef itk::ImageFileWriter< OutputImageType > WriterType; std::string fileIn = "mri2_stream.mha"; std::string fileOut = "slice.tif"; const char * inputFilename = fileIn.c_str(); const char * outputFilename = fileOut.c_str(); ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); reader->SetFileName( inputFilename ); writer->SetFileName( outputFilename ); typedef itk::ExtractImageFilter< InputImageType, OutputImageType > FilterType; FilterType::Pointer filter = FilterType::New(); filter->InPlaceOn(); filter->SetDirectionCollapseToSubmatrix(); reader->UpdateOutputInformation(); InputImageType::RegionType inputRegion = reader->GetOutput()->GetLargestPossibleRegion(); InputImageType::SizeType size = inputRegion.GetSize(); std::cout << "Size: " << std::endl; std::cout << size[0] << std::endl; std::cout << size[1] << std::endl; std::cout << size[2] << std::endl; InputImageType::IndexType start = inputRegion.GetIndex(); const unsigned int sliceNumber = 800; std::cout << "Start: " << std::endl; std::cout << start[0] << std::endl; std::cout << start[1] << std::endl; std::cout << start[2] << std::endl; size[1] = 0; start[1] = sliceNumber; InputImageType::RegionType desiredRegion; desiredRegion.SetSize( size ); desiredRegion.SetIndex( start ); filter->SetExtractionRegion( desiredRegion ); filter->SetInput( reader->GetOutput() ); writer->SetInput( filter->GetOutput() ); try { writer->Update(); } catch( itk::ExceptionObject & err ) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; } On Mon, Sep 21, 2015 at 12:07 PM, Maryana wrote: > Hi, > > I use Linux Mint 64bits, GCC 4.8, Cmake 2.8. I'm compiling to this > platform. > > Thank you! > > On Mon, Sep 21, 2015 at 11:55 AM, Bradley Lowekamp > wrote: > >> Hello Maryana, >> >> What compiler, platform and architecture are you compiling for? >> >> Brad >> >> On Sep 21, 2015, at 2:54 PM, Maryana wrote: >> >> > >> > Hi ITK Users/Devs, >> > >> > I'm new to ITK and I need to write a small program to convert Nifti >> images to MetaIO. However, I need to use the streamed reader/writer because >> my image volumes can have several gigabytes. I was doing some tests with >> the following code but I've realized that whenever I use the stream I end >> up with a truncated volume. I'm using ITK 4.8. I'm sure my volume is of >> unsigned char type. Also, when I comment out the >> writer->SetNumberOfStreamDivisions(20); line I works fine. Does anyone >> knows what is wrong? >> > >> > Thank you! >> > >> > #include >> > #include >> > #include >> > >> > #include "itkImage.h" >> > #include "itkImageFileReader.h" >> > #include "itkImageFileWriter.h" >> > #include "itkImageRegionIterator.h" >> > #include "itkNiftiImageIO.h" >> > #include "itkMetaImageIO.h" >> > >> > >> > int main(int argc, char const *argv[]){ >> > >> > std::string fileIn = "brain_8bit.nii"; >> > std::string fileOut = "mri2_stream.mha"; >> > >> > typedef itk::Image Image3D; >> > >> > //Reader >> > typedef itk::ImageFileReader ReaderType; >> > ReaderType::Pointer reader = ReaderType::New(); >> > reader->SetFileName(fileIn); >> > >> > //Writer >> > typedef itk::ImageFileWriter WriterType; >> > WriterType::Pointer writer = WriterType::New(); >> > writer->SetFileName(fileOut); >> > writer->SetNumberOfStreamDivisions(20); >> > writer->SetInput(reader->GetOutput()); >> > >> > >> > std::cout << "Input: " << fileIn << std::endl; >> > std::cout << "Output: " << fileOut << std::endl; >> > >> > std::cout << "Writing..." << std::endl; >> > try >> > { >> > writer->Update(); >> > } >> > catch( itk::ExceptionObject & err ) >> > { >> > std::cerr << "ExceptionObject caught !" << std::endl; >> > std::cerr << err << std::endl; >> > return EXIT_FAILURE; >> > } >> > std::cout << "Finished." << std::endl; >> > >> > >> > return EXIT_SUCCESS; >> > } >> > >> > >> > >> > >> > >> > -- >> > "Tudo no mundo come?ou com um sim. Uma mol?cula disse sim a outra >> mol?cula e nasceu a vida" - Clarice Lispector >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-developers >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Tue Sep 22 08:27:30 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 22 Sep 2015 08:27:30 -0400 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> Message-ID: Hello, Please try to keep this discussion on the mailing list. You can find a basic program here [1]. Which provide a good example for usage. It allows writing to any file format that ITK supports with vector images. I know that mha, nii, and nrrd should support this. Others may and it varies based what modules are compiled into ITK. You can see how the texture information is written into the vector here [2]. Contributions to improve the documentation are welcomed. [1] https://github.com/blowekamp/itkTextureAnalysis/blob/master/test/itkTextureFeatureImageFilterTest.cxx [2] https://github.com/blowekamp/itkTextureAnalysis/blob/b3911a8ab891859c50c7e3c8819d1a9fa0eaf4af/include/itkTextureFeatureImageFilter.hxx#L217-L224 On Sep 22, 2015, at 3:25 AM, Francisco Lopez de la Franca wrote: > Hi Bradley, > I'd like to use your class. A couple of questions: > > - Which format can the vectorimage generated be saved in? Is it possible to save it in Nifti format? > > - Which information does the vector image contain, I mean, what is the info stored for each voxel? How can I access that info? > > I guess the usage of yourclass is in the same way as any ITK filter: > > yourFilter->setInput(inputImage); > yourFilter->setWindowSize(windowSize); > ... // other sets... > yourFilter->update(); > vectorImage = yourFilter->GetOutput(); > > but, how can I read the data of each voxel in the vector image? > > Thank you very much. > Kind regards. > > > 2015-09-21 14:30 GMT+02:00 Bradley Lowekamp : > Hello, > > I have a external ITK extension you may find useful: > https://github.com/blowekamp/itkTextureAnalysis/blob/master/include/itkTextureFeatureImageFilter.h > > This computed the GLCM, for a neighborhood for every pixel and produces a VectorImage with all the features. > > Contributions to improving the class and documentation are welcome. > > HTH, > Brad > > On Sep 21, 2015, at 7:15 AM, Francisco Lopez de la Franca wrote: > > > Hi, > > I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter class with the default parameters and everything was OK. > > > > But now, I have to calculate the texture features of a 2D scalar image pixel by pixel, I mean, iterate over the whole image and calculate the texture features of every pixel. > > > > I guess I've got to use each pixel as the masked region over which to calculate the texture features, but I think this process could be very slow (I have to do it with a lot of 2D images). > > > > Is there a faster way to do it or isn't it possible as I've described? > > > > Thanks a lot. > > Kind regards. > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marina.bendersky at gmail.com Tue Sep 22 12:31:50 2015 From: marina.bendersky at gmail.com (Marina Bendersky) Date: Tue, 22 Sep 2015 09:31:50 -0700 Subject: [ITK-users] What is an accepted duration of a 3D registration? Should I expect the MSE to "converge" to 0? In-Reply-To: References: Message-ID: I guess I'm using the debug mode ... (not using Visual Studio). Thanks so much for your help! Marina On Mon, Sep 21, 2015 at 4:53 AM, Matias Montroull wrote: > Hi Marina, > Did you compile in release mode or debug? > Regards, > > Matias > > On Sep 14, 2015 7:56 PM, "Marina Bendersky" > wrote: >> >> Hello, >> >> I'm doing a 3D registration of 2 CT volumes (the fixed one contains >> 131 dicom images and the moving has 145 dicom images). >> >> I first converted each dicom series into one mha volume, using the >> example DicomSeriesReadImageWrite2.cxx and then, I do the registration >> following the example imageRegistration20.cxx. Below are the main >> registration components and parameters (other parameters had their >> default values): >> >> typedef itk::AffineTransform< double, Dimension > TransformType; >> typedef itk::RegularStepGradientDescentOptimizer OptimizerType; >> typedef itk::MeanSquaresImageToImageMetric< FixedImageType, >> MovingImageType > MetricType; >> typedef itk::LinearInterpolateImageFunction< MovingImageType, double > >> InterpolatorType; >> >> double translationScale = 1.0 / 1000.0; >> optimizer->SetMaximumStepLength( 0.05 ); >> optimizer->SetMinimumStepLength( 0.01 ); >> >> >> This 3D registration runs on a MacBookPro laptop for 5.5 hours, so I >> was wondering, is this "normal"? How long should a 3D registration >> take? >> >> Also, the MSE metric keeps decreasing (though incrementally) even >> after 300 iterations (plot attached), and there are oscillations >> around the iteration 150 (I ran this twice and both times I get this >> plot!) - why could this be? >> >> Should I expect the MSE metric to converge to 0, or something closer >> to 0 (instead of the current values, in the ninety thousands...)? >> >> Thank you for your help, >> Marina >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > From matimontg at gmail.com Tue Sep 22 12:59:41 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 22 Sep 2015 16:59:41 +0000 Subject: [ITK-users] What is an accepted duration of a 3D registration? Should I expect the MSE to "converge" to 0? In-Reply-To: References: Message-ID: It would be good to ensure the exe you're using is in release mode, it works lot faster than a program compiled in debug mode. El mar., 22 de sept. de 2015 a la(s) 1:31 p. m., Marina Bendersky < marina.bendersky at gmail.com> escribi?: > I guess I'm using the debug mode ... (not using Visual Studio). > > Thanks so much for your help! > Marina > > On Mon, Sep 21, 2015 at 4:53 AM, Matias Montroull > wrote: > > Hi Marina, > > Did you compile in release mode or debug? > > Regards, > > > > Matias > > > > On Sep 14, 2015 7:56 PM, "Marina Bendersky" > > wrote: > >> > >> Hello, > >> > >> I'm doing a 3D registration of 2 CT volumes (the fixed one contains > >> 131 dicom images and the moving has 145 dicom images). > >> > >> I first converted each dicom series into one mha volume, using the > >> example DicomSeriesReadImageWrite2.cxx and then, I do the registration > >> following the example imageRegistration20.cxx. Below are the main > >> registration components and parameters (other parameters had their > >> default values): > >> > >> typedef itk::AffineTransform< double, Dimension > TransformType; > >> typedef itk::RegularStepGradientDescentOptimizer OptimizerType; > >> typedef itk::MeanSquaresImageToImageMetric< FixedImageType, > >> MovingImageType > MetricType; > >> typedef itk::LinearInterpolateImageFunction< MovingImageType, double > > >> InterpolatorType; > >> > >> double translationScale = 1.0 / 1000.0; > >> optimizer->SetMaximumStepLength( 0.05 ); > >> optimizer->SetMinimumStepLength( 0.01 ); > >> > >> > >> This 3D registration runs on a MacBookPro laptop for 5.5 hours, so I > >> was wondering, is this "normal"? How long should a 3D registration > >> take? > >> > >> Also, the MSE metric keeps decreasing (though incrementally) even > >> after 300 iterations (plot attached), and there are oscillations > >> around the iteration 150 (I ran this twice and both times I get this > >> plot!) - why could this be? > >> > >> Should I expect the MSE metric to converge to 0, or something closer > >> to 0 (instead of the current values, in the ninety thousands...)? > >> > >> Thank you for your help, > >> Marina > >> > >> _____________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Kitware offers ITK Training Courses, for more information visit: > >> http://www.kitware.com/products/protraining.php > >> > >> Please keep messages on-topic and check the ITK FAQ at: > >> http://www.itk.org/Wiki/ITK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/insight-users > >> > > > -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.serviddio at gmail.com Tue Sep 22 14:04:42 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Tue, 22 Sep 2015 20:04:42 +0200 Subject: [ITK-users] itkHausdorffDistanceImageFilter.h. example Message-ID: HI, Can you help me to find an example of itkHausdorffDistanceImageFilter.h. I try to use it for measure the difference among two dicom image but I have so much error. I would like to set the same origin and spacing for both image but when I run the filter with Update method, visual studio show me an error. thank you for your time. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chvillap at gmail.com Wed Sep 23 09:38:27 2015 From: chvillap at gmail.com (Carlos Henrique Villa Pinto) Date: Wed, 23 Sep 2015 10:38:27 -0300 Subject: [ITK-users] Applying a B-Spline transform to a 3D mesh Message-ID: Hi everyone, I have a 3D MR brain image and a set of 3D meshes of different brain structures aligned to it. I'm trying to write a very simple program in which I create a B-Spline transform (with random parameters) and apply such transform to the image and to the meshes in order to deform them all together. Am I wrong to assume that, if I apply exactly the same transform to an image and to a mesh which is perfectly aligned to a specific brain structure in such image, the resulting deformed mesh should be aligned to the same brain structure in the deformed image? Because that's not what it's happening in practice. The transform deforms the meshes to some extent, but the deformed meshes do not match the brain structures in the deformed image, even though the applied transform is the same for all. So I guess I must be doing something wrong... The source code is below. I'm using ITK 4.8, and the MR image (NIfTI) and meshes (VTK) used in my tests come from the NAC Brain Atlas ( https://www.slicer.org/publications/item/view/2037). Any insight about what is possibly causing these results would be appreciated. Thanks in advance. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char const *argv[]) { if (argc < 3) { std::cerr << "Usage: " << argv[0] << " gridNodesInOneDimension inputImage [inputMesh1, ...]" << std::endl; return EXIT_FAILURE; } srand(time(NULL)); const int splineOrder = 3; const int dimensions = 3; typedef itk::Image ImageType; typedef itk::ImageFileReader ImageReaderType; typedef itk::ImageFileWriter ImageWriterType; typedef itk::Mesh MeshType; typedef itk::MeshFileReader MeshReaderType; typedef itk::MeshFileWriter MeshWriterType; typedef itk::BSplineTransform BSplineTransformType; typedef itk::ResampleImageFilter ResampleImageFilterType; typedef itk::TransformMeshFilter TransformMeshFilterType; typedef itk::LinearInterpolateImageFunction LinearInterpolatorType; // ============================================================================================ // Reading the input image // ============================================================================================ ImageReaderType::Pointer imageReader = ImageReaderType::New(); imageReader->SetFileName(argv[2]); imageReader->Update(); ImageType::Pointer inputImage = imageReader->GetOutput(); // ============================================================================================ // Reading the input meshes // ============================================================================================ std::vector inputMeshVector; for (int i = 3; i < argc; ++i) { MeshReaderType::Pointer meshReader = MeshReaderType::New(); meshReader->SetFileName(argv[i]); meshReader->Update(); MeshType::Pointer inputMesh = meshReader->GetOutput(); inputMeshVector.push_back(inputMesh); } // ============================================================================================ // Generating the parameters of the B-Spline transform // ============================================================================================ const int gridNodesInOneDimension = atoi(argv[1]); BSplineTransformType::Pointer bsplineTransform = BSplineTransformType::New(); BSplineTransformType::PhysicalDimensionsType physicalDimensions; BSplineTransformType::MeshSizeType meshSize; for (int i = 0; i < dimensions; ++i) { physicalDimensions[i] = inputImage->GetSpacing()[i] * static_cast(inputImage->GetLargestPossibleRegion().GetSize()[i] - 1); } meshSize.Fill(gridNodesInOneDimension - splineOrder); bsplineTransform->SetTransformDomainOrigin(inputImage->GetOrigin()); bsplineTransform->SetTransformDomainDirection(inputImage->GetDirection()); bsplineTransform->SetTransformDomainPhysicalDimensions(physicalDimensions); bsplineTransform->SetTransformDomainMeshSize(meshSize); BSplineTransformType::ParametersType parameters(bsplineTransform->GetNumberOfParameters()); double minValue = -20.0; double maxValue = 20.0; for (int i = 0; i < bsplineTransform->GetNumberOfParameters(); ++i) { parameters[i] = (double) rand() / RAND_MAX * (maxValue - minValue) + minValue; std::cout << parameters[i] << " "; } std::cout << std::endl; bsplineTransform->SetParameters(parameters); // ============================================================================================ // Applying the B-Spline transform to the input image // ============================================================================================ LinearInterpolatorType::Pointer linearInterpolator = LinearInterpolatorType::New(); ResampleImageFilterType::Pointer resampleFilter = ResampleImageFilterType::New(); resampleFilter->SetTransform(bsplineTransform); resampleFilter->SetInterpolator(linearInterpolator); resampleFilter->SetInput(inputImage); resampleFilter->SetSize(inputImage->GetLargestPossibleRegion().GetSize()); resampleFilter->SetOutputStartIndex(inputImage->GetLargestPossibleRegion().GetIndex()); resampleFilter->SetOutputOrigin(inputImage->GetOrigin()); resampleFilter->SetOutputSpacing(inputImage->GetSpacing()); resampleFilter->SetOutputDirection(inputImage->GetDirection()); resampleFilter->Update(); // ============================================================================================ // Applying the B-Spline transform to the meshes // ============================================================================================ std::vector outputMeshVector; for (int i = 0; i < inputMeshVector.size(); ++i) { TransformMeshFilterType::Pointer transformFilter = TransformMeshFilterType::New(); transformFilter->SetInput(inputMeshVector[i]); transformFilter->SetTransform(bsplineTransform); transformFilter->Update(); outputMeshVector.push_back(transformFilter->GetOutput()); } // ============================================================================================ // Writing the transformed image // ============================================================================================ char outputImageFileName[256]; int length1 = strlen(argv[2]) - 4; strncpy(outputImageFileName, argv[2], length1); outputImageFileName[length1] = '\0'; strcat(outputImageFileName, "_transformed.nii"); ImageWriterType::Pointer imageWriter = ImageWriterType::New(); imageWriter->SetFileName(outputImageFileName); imageWriter->SetInput(resampleFilter->GetOutput()); imageWriter->Update(); // ============================================================================================ // Writing the transformed meshes // ============================================================================================ for (int i = 0; i < outputMeshVector.size(); ++i) { char outputMeshFilename[256]; int length2 = strlen(argv[i + 3]) - 4; strncpy(outputMeshFilename, argv[i + 3], length2); outputMeshFilename[length2] = '\0'; strcat(outputMeshFilename, "_transformed.vtk"); MeshType::Pointer outputMesh = outputMeshVector[i]; MeshWriterType::Pointer meshWriter = MeshWriterType::New(); meshWriter->SetFileName(outputMeshFilename); meshWriter->SetInput(outputMesh); meshWriter->Update(); } return EXIT_SUCCESS; } []s -- Carlos Henrique Villa Pinto Graduate Student in Computer Science Federal University of S?o Carlos - Brazil XCS -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Wed Sep 23 09:56:55 2015 From: lasso at queensu.ca (Andras Lasso) Date: Wed, 23 Sep 2015 13:56:55 +0000 Subject: [ITK-users] [ITK] Applying a B-Spline transform to a 3D mesh In-Reply-To: References: Message-ID: You need forward transform to deform a mesh and inverse (resampling) transform to transform the corresponding image. Make sure the transform that you generate is invertible: ? Displace control points just so much that there is no ?folding? in the field (two different areas are transformed to the same area) ? Make the grid larger than the image so that the displacements are all zero at the boundary (as ITK transforms cannot extrapolate to have smooth boundary conditions but they just cut the displacement to 0; if there is discontinuity in the field then inverse computation will fail) You can play with non-linear transforms, import/export from ITK, visualize them, invert them, combine them, apply to volumes, surfaces, points, etc. in 3D Slicer, see: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Transforms Andras From: Community [mailto:community-bounces at itk.org] On Behalf Of Carlos Henrique Villa Pinto Sent: September 23, 2015 9:38 AM To: insight-users at itk.org Subject: [ITK] [ITK-users] Applying a B-Spline transform to a 3D mesh Hi everyone, I have a 3D MR brain image and a set of 3D meshes of different brain structures aligned to it. I'm trying to write a very simple program in which I create a B-Spline transform (with random parameters) and apply such transform to the image and to the meshes in order to deform them all together. Am I wrong to assume that, if I apply exactly the same transform to an image and to a mesh which is perfectly aligned to a specific brain structure in such image, the resulting deformed mesh should be aligned to the same brain structure in the deformed image? Because that's not what it's happening in practice. The transform deforms the meshes to some extent, but the deformed meshes do not match the brain structures in the deformed image, even though the applied transform is the same for all. So I guess I must be doing something wrong... The source code is below. I'm using ITK 4.8, and the MR image (NIfTI) and meshes (VTK) used in my tests come from the NAC Brain Atlas (https://www.slicer.org/publications/item/view/2037). Any insight about what is possibly causing these results would be appreciated. Thanks in advance. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char const *argv[]) { if (argc < 3) { std::cerr << "Usage: " << argv[0] << " gridNodesInOneDimension inputImage [inputMesh1, ...]" << std::endl; return EXIT_FAILURE; } srand(time(NULL)); const int splineOrder = 3; const int dimensions = 3; typedef itk::Image ImageType; typedef itk::ImageFileReader ImageReaderType; typedef itk::ImageFileWriter ImageWriterType; typedef itk::Mesh MeshType; typedef itk::MeshFileReader MeshReaderType; typedef itk::MeshFileWriter MeshWriterType; typedef itk::BSplineTransform BSplineTransformType; typedef itk::ResampleImageFilter ResampleImageFilterType; typedef itk::TransformMeshFilter TransformMeshFilterType; typedef itk::LinearInterpolateImageFunction LinearInterpolatorType; // ============================================================================================ // Reading the input image // ============================================================================================ ImageReaderType::Pointer imageReader = ImageReaderType::New(); imageReader->SetFileName(argv[2]); imageReader->Update(); ImageType::Pointer inputImage = imageReader->GetOutput(); // ============================================================================================ // Reading the input meshes // ============================================================================================ std::vector inputMeshVector; for (int i = 3; i < argc; ++i) { MeshReaderType::Pointer meshReader = MeshReaderType::New(); meshReader->SetFileName(argv[i]); meshReader->Update(); MeshType::Pointer inputMesh = meshReader->GetOutput(); inputMeshVector.push_back(inputMesh); } // ============================================================================================ // Generating the parameters of the B-Spline transform // ============================================================================================ const int gridNodesInOneDimension = atoi(argv[1]); BSplineTransformType::Pointer bsplineTransform = BSplineTransformType::New(); BSplineTransformType::PhysicalDimensionsType physicalDimensions; BSplineTransformType::MeshSizeType meshSize; for (int i = 0; i < dimensions; ++i) { physicalDimensions[i] = inputImage->GetSpacing()[i] * static_cast(inputImage->GetLargestPossibleRegion().GetSize()[i] - 1); } meshSize.Fill(gridNodesInOneDimension - splineOrder); bsplineTransform->SetTransformDomainOrigin(inputImage->GetOrigin()); bsplineTransform->SetTransformDomainDirection(inputImage->GetDirection()); bsplineTransform->SetTransformDomainPhysicalDimensions(physicalDimensions); bsplineTransform->SetTransformDomainMeshSize(meshSize); BSplineTransformType::ParametersType parameters(bsplineTransform->GetNumberOfParameters()); double minValue = -20.0; double maxValue = 20.0; for (int i = 0; i < bsplineTransform->GetNumberOfParameters(); ++i) { parameters[i] = (double) rand() / RAND_MAX * (maxValue - minValue) + minValue; std::cout << parameters[i] << " "; } std::cout << std::endl; bsplineTransform->SetParameters(parameters); // ============================================================================================ // Applying the B-Spline transform to the input image // ============================================================================================ LinearInterpolatorType::Pointer linearInterpolator = LinearInterpolatorType::New(); ResampleImageFilterType::Pointer resampleFilter = ResampleImageFilterType::New(); resampleFilter->SetTransform(bsplineTransform); resampleFilter->SetInterpolator(linearInterpolator); resampleFilter->SetInput(inputImage); resampleFilter->SetSize(inputImage->GetLargestPossibleRegion().GetSize()); resampleFilter->SetOutputStartIndex(inputImage->GetLargestPossibleRegion().GetIndex()); resampleFilter->SetOutputOrigin(inputImage->GetOrigin()); resampleFilter->SetOutputSpacing(inputImage->GetSpacing()); resampleFilter->SetOutputDirection(inputImage->GetDirection()); resampleFilter->Update(); // ============================================================================================ // Applying the B-Spline transform to the meshes // ============================================================================================ std::vector outputMeshVector; for (int i = 0; i < inputMeshVector.size(); ++i) { TransformMeshFilterType::Pointer transformFilter = TransformMeshFilterType::New(); transformFilter->SetInput(inputMeshVector[i]); transformFilter->SetTransform(bsplineTransform); transformFilter->Update(); outputMeshVector.push_back(transformFilter->GetOutput()); } // ============================================================================================ // Writing the transformed image // ============================================================================================ char outputImageFileName[256]; int length1 = strlen(argv[2]) - 4; strncpy(outputImageFileName, argv[2], length1); outputImageFileName[length1] = '\0'; strcat(outputImageFileName, "_transformed.nii"); ImageWriterType::Pointer imageWriter = ImageWriterType::New(); imageWriter->SetFileName(outputImageFileName); imageWriter->SetInput(resampleFilter->GetOutput()); imageWriter->Update(); // ============================================================================================ // Writing the transformed meshes // ============================================================================================ for (int i = 0; i < outputMeshVector.size(); ++i) { char outputMeshFilename[256]; int length2 = strlen(argv[i + 3]) - 4; strncpy(outputMeshFilename, argv[i + 3], length2); outputMeshFilename[length2] = '\0'; strcat(outputMeshFilename, "_transformed.vtk"); MeshType::Pointer outputMesh = outputMeshVector[i]; MeshWriterType::Pointer meshWriter = MeshWriterType::New(); meshWriter->SetFileName(outputMeshFilename); meshWriter->SetInput(outputMesh); meshWriter->Update(); } return EXIT_SUCCESS; } []s -- Carlos Henrique Villa Pinto Graduate Student in Computer Science Federal University of S?o Carlos - Brazil XCS -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhuangming.shen at sphic.org.cn Wed Sep 23 20:50:50 2015 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Thu, 24 Sep 2015 00:50:50 +0000 Subject: [ITK-users] Errors on warping ITK with JAVA Message-ID: <1443055847183.25635@sphic.org.cn> ?Hi all, I would like to warp ITK with Java. So I complied CastXML and downloaded SWIGwin first. When I used them to compile ITK source code, I successfully compiled most of the source code and got some .jar such as org.itk.itkcommon.jar, but I still met some errors in Visual Studio 2013. 1. In ${ITK_Build}\Wrapping\Modules\ITKImageFunction\itkInterpolateImageFunctionJava.cpp(884): error C2440: '=' : cannot convert from 'itkInterpolateImageFunctionIVF22D *' to 'itkImageFunctionIVF22DD *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast In ${ITK_Build}\Wrapping\Modules\ITKImageFunction\itkInterpolateImageFunctionJava.cpp(892): error C2440: '=' : cannot convert from 'itkInterpolateImageFunctionIVF33D *' to 'itkImageFunctionIVF33DD *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 2. The aforementioned errors may be cause the following errors. Unable to open file ${ITK_Build}\Wrapping\Generators\Java\Proxies\src\org\itk\itkmesh\SWIGTYPE_p_itk_MapContainerT_unsigned_long_itk_CellInterfaceT_double_itk_CellTraitsInfoT_2_double_float_unsigned_long_unsigned_long_unsigned_long_itk__PointT_double_2_t_itk__MapContainerT_unsigned_long_itk__PointT_double_2_t_t_std__setT_unsigned_long_std__lessT_unsigned_long_t_t_t_t_p_t.java: No such file or directory C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1. 3. And more errors shows ${ITK_Build}\Wrapping\Generators\Java\Proxies\src\org\itk\itkquadedgemesh\itkBoundingBoxUL2FMCULQEMPF2.java:11: error: package org.itk.itkmesh does not exist import org.itk.itkmesh.*;;import org.itk.itkcommon.*;;import org.itk.itkimagefilterbase.*;;import org.itk.itkstatistics.*;;import org.itk.itktransform.*;;import org.itk.itkjavabase.*; So, how can I fix those errors? Thanks! p.s. I use ITK 4.8.0, SWIGwin 3.0.7, and latest CastXML. Regards, Zhuangming Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Sep 23 21:48:53 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 23 Sep 2015 21:48:53 -0400 Subject: [ITK-users] Errors on warping ITK with JAVA In-Reply-To: <1443055847183.25635@sphic.org.cn> References: <1443055847183.25635@sphic.org.cn> Message-ID: Hi Zhuangming, There have been many improvements in the wrapping infrastructure, but ITK's Java wrapping is not yet well tested. For problem 1), you may need to dig into the generated code to understand what is happening. Regarding problems 2) and 3), some very long filepaths are being generated, which Windows has difficulty handling and that can result in confusing errors. It may be worthwhile attempting a build on Linux or Mac to isolate the problem. Limit the path length of your build folder so it is as short as possible. Ultimately, a strategy to limit the path lengths may be required. Matt On Wed, Sep 23, 2015 at 8:50 PM, ??? wrote: > Hi all, > > > I would like to warp ITK with Java. So I complied CastXML and downloaded > SWIGwin first. When I used them to compile ITK source code, I successfully > compiled most of the source code and got some .jar such as > org.itk.itkcommon.jar, but I still met some errors in Visual Studio 2013. > > > 1. In > ${ITK_Build}\Wrapping\Modules\ITKImageFunction\itkInterpolateImageFunctionJava.cpp(884): > error C2440: '=' : cannot convert from 'itkInterpolateImageFunctionIVF22D *' > to 'itkImageFunctionIVF22DD *' > > Types pointed to are unrelated; conversion requires > reinterpret_cast, C-style cast or function-style cast > > In > ${ITK_Build}\Wrapping\Modules\ITKImageFunction\itkInterpolateImageFunctionJava.cpp(892): > error C2440: '=' : cannot convert from 'itkInterpolateImageFunctionIVF33D *' > to 'itkImageFunctionIVF33DD *' > > Types pointed to are unrelated; conversion requires > reinterpret_cast, C-style cast or function-style cast > > > > 2. The aforementioned errors may be cause the following errors. > > Unable to open file > ${ITK_Build}\Wrapping\Generators\Java\Proxies\src\org\itk\itkmesh\SWIGTYPE_p_itk_MapContainerT_unsigned_long_itk_CellInterfaceT_double_itk_CellTraitsInfoT_2_double_float_unsigned_long_unsigned_long_unsigned_long_itk__PointT_double_2_t_itk__MapContainerT_unsigned_long_itk__PointT_double_2_t_t_std__setT_unsigned_long_std__lessT_unsigned_long_t_t_t_t_p_t.java: > No such file or directory > > C:\Program Files > (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): > error MSB6006: "cmd.exe" exited with code 1. > > > 3. And more errors shows > > > ${ITK_Build}\Wrapping\Generators\Java\Proxies\src\org\itk\itkquadedgemesh\itkBoundingBoxUL2FMCULQEMPF2.java:11: > error: package org.itk.itkmesh does not exist > > import org.itk.itkmesh.*;;import org.itk.itkcommon.*;;import > org.itk.itkimagefilterbase.*;;import org.itk.itkstatistics.*;;import > org.itk.itktransform.*;;import org.itk.itkjavabase.*; > > > > So, how can I fix those errors? Thanks! > > > p.s. I use ITK 4.8.0, SWIGwin 3.0.7, and latest CastXML. > > > > > Regards, > > > Zhuangming Shen > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From s.serviddio at gmail.com Thu Sep 24 07:36:27 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Thu, 24 Sep 2015 13:36:27 +0200 Subject: [ITK-users] itk vector Image pixel value Message-ID: I have found this itk vector image example, I don't understand the meaning of each component of Vector Pixel type. For example the code line pixelValue[0] = 1.345; component X refers to a grayscale value or distance from next pixel inside the matrix of Image??? #include "itkVector.h" // Software Guide : EndCodeSnippet #include "itkImage.h" int main(int, char *[]) { // Software Guide : BeginLatex // // The Vector class is templated over the type used to represent // the coordinate in space and over the dimension of the space. In this example, // we want the vector dimension to match the image dimension, but this is by // no means a requirement. We could have defined a four-dimensional image // with three-dimensional vectors as pixels. // // \index{itk::Vector!Instantiation} // \index{itk::Vector!itk::Image} // \index{itk::Image!Vector pixel} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet typedef itk::Vector< float, 3 > PixelType; typedef itk::Image< PixelType, 3 > ImageType; // Software Guide : EndCodeSnippet // Then the image object can be created ImageType::Pointer image = ImageType::New(); // The image region should be initialized const ImageType::IndexType start = {{0,0,0}}; //First index at {X,Y,Z} const ImageType::SizeType size = {{200,200,200}}; //Size of {X,Y,Z} ImageType::RegionType region; region.SetSize( size ); region.SetIndex( start ); // Pixel data is allocated image->SetRegions( region ); image->Allocate(); // The image buffer is initialized to a particular value ImageType::PixelType initialValue; // A vector can initialize all its components to the // same value by using the Fill() method. initialValue.Fill( 0.0 ); // Now the image buffer can be initialized with this // vector value. image->FillBuffer( initialValue ); const ImageType::IndexType pixelIndex = {{27,29,37}}; //Position {X,Y,Z} // Software Guide : BeginLatex // // The Vector class inherits the operator \code{[]} from the // \doxygen{FixedArray} class. This makes it possible to access the // Vector's components using index notation. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet ImageType::PixelType pixelValue; pixelValue[0] = 1.345; // x component pixelValue[1] = 6.841; // y component pixelValue[2] = 3.295; // x component // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // We can now store this vector in one of the image pixels by defining an // index and invoking the \code{SetPixel()} method. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet image->SetPixel( pixelIndex, pixelValue ); // Software Guide : EndCodeSnippet // The GetPixel method can also be used to read Vectors // pixels from the image ImageType::PixelType value = image->GetPixel( pixelIndex ); std::cout << value << std::endl; // Lets repeat that both \code{SetPixel()} and \code{GetPixel()} are // inefficient and should only be used for debugging purposes or for // implementing interactions with a graphical user interface such as // querying pixel value by clicking with the mouse. return EXIT_SUCCESS; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Thu Sep 24 08:12:58 2015 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Thu, 24 Sep 2015 14:12:58 +0200 (CEST) Subject: [ITK-users] [ITK] itk vector Image pixel value In-Reply-To: References: Message-ID: <704957709.7223194.1443096778426.JavaMail.zimbra@enst.fr> Hello Stefano In this case, each pixel have multiples values, not only one, so to represent this, each pixel have for value a vector with multiples components. Each component of the vector is an individual value. Maybe an example is easier to understand. Think of a RGB image. You have three colors to represent, namely Red/Green/Blue. You could represent it with 3 differents images, each with the value of Red, Green or Blue channel, or you could do it with only one image, where each pixel contain a vector. In this vector you will set the value of the Red/Green/Blue channel for the pixel. So you will have the "Red" component, the "Green" one, and the "Blue" at last. A vector image is just the generalization of this. HTH Tim ----- Mail original ----- De: "stefano serviddio" ?: insight-users at itk.org Envoy?: Jeudi 24 Septembre 2015 13:36:27 Objet: [ITK] [ITK-users] itk vector Image pixel value I have found this itk vector image example, I don't understand the meaning of each component of Vector Pixel type. For example the code line pixelValue[0] = 1.345; component X refers to a grayscale value or distance from next pixel inside the matrix of Image??? #include "itkVector.h" // Software Guide : EndCodeSnippet #include "itkImage.h" int main(int, char *[]) { // Software Guide : BeginLatex // // The Vector class is templated over the type used to represent // the coordinate in space and over the dimension of the space. In this example, // we want the vector dimension to match the image dimension, but this is by // no means a requirement. We could have defined a four-dimensional image // with three-dimensional vectors as pixels. // // \index{itk::Vector!Instantiation} // \index{itk::Vector!itk::Image} // \index{itk::Image!Vector pixel} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet typedef itk::Vector< float, 3 > PixelType; typedef itk::Image< PixelType, 3 > ImageType; // Software Guide : EndCodeSnippet // Then the image object can be created ImageType::Pointer image = ImageType::New(); // The image region should be initialized const ImageType::IndexType start = {{0,0,0}}; //First index at {X,Y,Z} const ImageType::SizeType size = {{200,200,200}}; //Size of {X,Y,Z} ImageType::RegionType region; region.SetSize( size ); region.SetIndex( start ); // Pixel data is allocated image->SetRegions( region ); image->Allocate(); // The image buffer is initialized to a particular value ImageType::PixelType initialValue; // A vector can initialize all its components to the // same value by using the Fill() method. initialValue.Fill( 0.0 ); // Now the image buffer can be initialized with this // vector value. image->FillBuffer( initialValue ); const ImageType::IndexType pixelIndex = {{27,29,37}}; //Position {X,Y,Z} // Software Guide : BeginLatex // // The Vector class inherits the operator \code{[]} from the // \doxygen{FixedArray} class. This makes it possible to access the // Vector's components using index notation. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet ImageType::PixelType pixelValue; pixelValue[0] = 1.345; // x component pixelValue[1] = 6.841; // y component pixelValue[2] = 3.295; // x component // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // We can now store this vector in one of the image pixels by defining an // index and invoking the \code{SetPixel()} method. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet image->SetPixel( pixelIndex, pixelValue ); // Software Guide : EndCodeSnippet // The GetPixel method can also be used to read Vectors // pixels from the image ImageType::PixelType value = image->GetPixel( pixelIndex ); std::cout << value << std::endl; // Lets repeat that both \code{SetPixel()} and \code{GetPixel()} are // inefficient and should only be used for debugging purposes or for // implementing interactions with a graphical user interface such as // querying pixel value by clicking with the mouse. return EXIT_SUCCESS; } _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From s.serviddio at gmail.com Thu Sep 24 08:46:25 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Thu, 24 Sep 2015 14:46:25 +0200 Subject: [ITK-users] Fwd: [ITK] itk vector Image pixel value In-Reply-To: References: <704957709.7223194.1443096778426.JavaMail.zimbra@enst.fr> Message-ID: ---------- Forwarded message ---------- From: stefano serviddio Date: 2015-09-24 14:46 GMT+02:00 Subject: Re: [ITK] [ITK-users] itk vector Image pixel value To: Timothee Evain Hi Tim, First of all thank you for you time, Secondly I try to execute a deformation registration between PET and TC image. I have seen DeformableRegistration2.cxx where Warp Filter execute a particular trasnformation that modifie the space of movingImage. In this case what is the role of vector pixel type??? #include "itkDemonsRegistrationFilter.h " #include "itkHistogramMatchingImageFilter.h " #include "itkCastImageFilter.h " #include "itkWarpImageFilter.h " int main( int argc, char *argv[] ) { if( argc < 4 ) { std::cerr << "Missing Parameters " << std::endl; std::cerr << "Usage: " << argv[0]; std::cerr << " fixedImageFile movingImageFile "; std::cerr << " outputImageFile " << std::endl; std::cerr << " [outputDisplacementFieldFile] " << std::endl; return EXIT_FAILURE; } // Software Guide : BeginLatex // // Second, we declare the types of the images. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; typedef unsigned short PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; // Software Guide : EndCodeSnippet // Set up the file readers typedef itk::ImageFileReader< FixedImageType > FixedImageReaderType; typedef itk::ImageFileReader< MovingImageType > MovingImageReaderType; FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName( argv[1] ); movingImageReader->SetFileName( argv[2] ); // Software Guide : BeginLatex // // Image file readers are set up in a similar fashion to previous examples. // To support the re-mapping of the moving image intensity, we declare an // internal image type with a floating point pixel type and cast the input // images to the internal image type. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet typedef float InternalPixelType; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; typedef itk::CastImageFilter < FixedImageType, InternalImageType > FixedImageCasterType; typedef itk::CastImageFilter < MovingImageType, InternalImageType > MovingImageCasterType; FixedImageCasterType::Pointer fixedImageCaster = FixedImageCasterType::New(); MovingImageCasterType::Pointer movingImageCaster = MovingImageCasterType::New(); fixedImageCaster->SetInput( fixedImageReader->GetOutput() ); movingImageCaster->SetInput( movingImageReader->GetOutput() ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // The demons algorithm relies on the assumption that pixels representing the // same homologous point on an object have the same intensity on both the // fixed and moving images to be registered. In this example, we will // preprocess the moving image to match the intensity between the images // using the \doxygen{HistogramMatchingImageFilter}. // // \index{itk::HistogramMatchingImageFilter} // // The basic idea is to match the histograms of the two images at a // user-specified number of quantile values. For robustness, the histograms // are matched so that the background pixels are excluded from both // histograms. For MR images, a simple procedure is to exclude all gray // values that are smaller than the mean gray value of the image. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet typedef itk::HistogramMatchingImageFilter < InternalImageType, InternalImageType > MatchingFilterType; MatchingFilterType::Pointer matcher = MatchingFilterType::New(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // For this example, we set the moving image as the source or input image and // the fixed image as the reference image. // // \index{itk::HistogramMatchingImageFilter!SetInput()} // \index{itk::HistogramMatchingImageFilter!SetSourceImage()} // \index{itk::HistogramMatchingImageFilter!SetReferenceImage()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet matcher->SetInput( movingImageCaster->GetOutput() ); matcher->SetReferenceImage( fixedImageCaster->GetOutput() ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // We then select the number of bins to represent the histograms and the // number of points or quantile values where the histogram is to be // matched. // // \index{itk::HistogramMatchingImageFilter!SetNumberOfHistogramLevels()} // \index{itk::HistogramMatchingImageFilter!SetNumberOfMatchPoints()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet matcher->SetNumberOfHistogramLevels( 1024 ); matcher->SetNumberOfMatchPoints( 7 ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // Simple background extraction is done by thresholding at the mean // intensity. // // \index{itk::HistogramMatchingImageFilter!ThresholdAtMeanIntensityOn()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet matcher->ThresholdAtMeanIntensityOn(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // In the \doxygen{DemonsRegistrationFilter}, the deformation field is // represented as an image whose pixels are floating point vectors. // // \index{itk::DemonsRegistrationFilter} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet typedef itk::Vector< float, Dimension > VectorPixelType; typedef itk::Image< VectorPixelType, Dimension > DisplacementFieldType; typedef itk::DemonsRegistrationFilter < InternalImageType, InternalImageType, DisplacementFieldType> RegistrationFilterType; RegistrationFilterType::Pointer filter = RegistrationFilterType::New(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // The input fixed image is simply the output of the fixed image casting // filter. The input moving image is the output of the histogram matching // filter. // // \index{itk::DemonsRegistrationFilter!SetFixedImage()} // \index{itk::DemonsRegistrationFilter!SetMovingImage()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet filter->SetFixedImage( fixedImageCaster->GetOutput() ); filter->SetMovingImage( matcher->GetOutput() ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // The demons registration filter has two parameters: the number of // iterations to be performed and the standard deviation of the Gaussian // smoothing kernel to be applied to the deformation field after each // iteration. // \index{itk::DemonsRegistrationFilter!SetNumberOfIterations()} // \index{itk::DemonsRegistrationFilter!SetStandardDeviations()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet filter->SetNumberOfIterations( 50 ); filter->SetStandardDeviations( 1.0 ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // The registration algorithm is triggered by updating the filter. The // filter output is the computed deformation field. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet filter->Update(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // The \doxygen{WarpImageFilter} can be used to warp the moving image with // the output deformation field. Like the \doxygen{ResampleImageFilter}, // the WarpImageFilter requires the specification of the input image to be // resampled, an input image interpolator, and the output image spacing and // origin. // // \index{itk::WarpImageFilter} // \index{itk::WarpImageFilter!SetInput()} // \index{itk::WarpImageFilter!SetInterpolator()} // \index{itk::WarpImageFilter!SetOutputSpacing()} // \index{itk::WarpImageFilter!SetOutputOrigin()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet typedef itk::WarpImageFilter < MovingImageType, MovingImageType, DisplacementFieldType > WarperType; typedef itk::LinearInterpolateImageFunction < MovingImageType, double > InterpolatorType; WarperType::Pointer warper = WarperType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); warper->SetInput( movingImageReader->GetOutput() ); warper->SetInterpolator( interpolator ); warper->SetOutputSpacing( fixedImage->GetSpacing() ); warper->SetOutputOrigin( fixedImage->GetOrigin() ); warper->SetOutputDirection( fixedImage->GetDirection() ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // Unlike the ResampleImageFilter, the WarpImageFilter // warps or transform the input image with respect to the deformation field // represented by an image of vectors. The resulting warped or resampled // image is written to file as per previous examples. // // \index{itk::WarpImageFilter!SetDisplacementField()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet warper->SetDisplacementField( filter->GetOutput() ); // Software Guide : EndCodeSnippet // Write warped image out to file typedef unsigned char OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter < MovingImageType, OutputImageType > CastFilterType; typedef itk::ImageFileWriter< OutputImageType > WriterType; WriterType::Pointer writer = WriterType::New(); CastFilterType::Pointer caster = CastFilterType::New(); writer->SetFileName( argv[3] ); caster->SetInput( warper->GetOutput() ); writer->SetInput( caster->GetOutput() ); writer->Update(); } 2015-09-24 14:12 GMT+02:00 Timothee Evain : > Hello Stefano > > In this case, each pixel have multiples values, not only one, so to > represent this, each pixel have for value a vector with multiples > components. > Each component of the vector is an individual value. > > Maybe an example is easier to understand. Think of a RGB image. You have > three colors to represent, namely Red/Green/Blue. > You could represent it with 3 differents images, each with the value of > Red, Green or Blue channel, or you could do it with only one image, where > each pixel contain a vector. In this vector you will set the value of the > Red/Green/Blue channel for the pixel. So you will have the "Red" component, > the "Green" one, and the "Blue" at last. > > A vector image is just the generalization of this. > > HTH > > Tim > > ----- Mail original ----- > De: "stefano serviddio" > ?: insight-users at itk.org > Envoy?: Jeudi 24 Septembre 2015 13:36:27 > Objet: [ITK] [ITK-users] itk vector Image pixel value > > I have found this itk vector image example, I don't understand the meaning > of each component of Vector Pixel type. > For example the code line pixelValue[0] = 1.345; component X refers to a > grayscale value or distance from next pixel inside the matrix of Image??? > > > #include "itkVector.h" > // Software Guide : EndCodeSnippet > #include "itkImage.h" > int main(int, char *[]) > { > // Software Guide : BeginLatex > // > // The Vector class is templated over the type used to represent > // the coordinate in space and over the dimension of the space. In this > example, > // we want the vector dimension to match the image dimension, but this > is by > // no means a requirement. We could have defined a four-dimensional image > // with three-dimensional vectors as pixels. > // > // \index{itk::Vector!Instantiation} > // \index{itk::Vector!itk::Image} > // \index{itk::Image!Vector pixel} > // > // Software Guide : EndLatex > // Software Guide : BeginCodeSnippet > typedef itk::Vector< float, 3 > PixelType; > typedef itk::Image< PixelType, 3 > ImageType; > // Software Guide : EndCodeSnippet > // Then the image object can be created > ImageType::Pointer image = ImageType::New(); > // The image region should be initialized > const ImageType::IndexType start = {{0,0,0}}; //First index at {X,Y,Z} > const ImageType::SizeType size = {{200,200,200}}; //Size of {X,Y,Z} > ImageType::RegionType region; > region.SetSize( size ); > region.SetIndex( start ); > // Pixel data is allocated > image->SetRegions( region ); > image->Allocate(); > // The image buffer is initialized to a particular value > ImageType::PixelType initialValue; > // A vector can initialize all its components to the > // same value by using the Fill() method. > initialValue.Fill( 0.0 ); > // Now the image buffer can be initialized with this > // vector value. > image->FillBuffer( initialValue ); > const ImageType::IndexType pixelIndex = {{27,29,37}}; //Position {X,Y,Z} > // Software Guide : BeginLatex > // > // The Vector class inherits the operator \code{[]} from the > // \doxygen{FixedArray} class. This makes it possible to access the > // Vector's components using index notation. > // > // Software Guide : EndLatex > // Software Guide : BeginCodeSnippet > ImageType::PixelType pixelValue; > pixelValue[0] = 1.345; // x component > pixelValue[1] = 6.841; // y component > pixelValue[2] = 3.295; // x component > // Software Guide : EndCodeSnippet > // Software Guide : BeginLatex > // > // We can now store this vector in one of the image pixels by defining an > // index and invoking the \code{SetPixel()} method. > // > // Software Guide : EndLatex > // Software Guide : BeginCodeSnippet > image->SetPixel( pixelIndex, pixelValue ); > // Software Guide : EndCodeSnippet > // The GetPixel method can also be used to read Vectors > // pixels from the image > ImageType::PixelType value = image->GetPixel( pixelIndex ); > std::cout << value << std::endl; > // Lets repeat that both \code{SetPixel()} and \code{GetPixel()} are > // inefficient and should only be used for debugging purposes or for > // implementing interactions with a graphical user interface such as > // querying pixel value by clicking with the mouse. > return EXIT_SUCCESS; > } > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chvillap at gmail.com Thu Sep 24 09:43:09 2015 From: chvillap at gmail.com (Carlos Henrique Villa Pinto) Date: Thu, 24 Sep 2015 10:43:09 -0300 Subject: [ITK-users] [ITK] Applying a B-Spline transform to a 3D mesh In-Reply-To: References: Message-ID: Hi, Andras. Thank you very much for your answer. I'm not very experienced with B-Spline transforms and 3D meshes, so maybe this is a silly question, but... why exactly do I need inverse transforms (forward for the mesh, inverse for the image), considering that I want to deform both the same way? Could you elaborate, or perhaps give me some links with explanations, please? By the way, I generated a deformation field from the transform I created, and visualized/played with it in 3D Slicer. As expected, applying such transform to the original MR image in 3D Slicer results in the same deformed image that I get using my ITK code. However, when I apply the same transform to the original mesh (again in 3D Slicer), the result is a deformed mesh that is neither the same result that I obtain with my ITK code (using the itk::TransformMeshFilter class) nor the expected result (a mesh aligned to the brain structure in the deformed image). And applying the inverse transform (also calculated in 3D Slicer) doesn't give me better results at all. So now I'm even more confused. Any other insights would be greatly appreciated. Thanks. []s 2015-09-23 10:56 GMT-03:00 Andras Lasso : > You need forward transform to deform a mesh and inverse (resampling) > transform to transform the corresponding image. Make sure the transform > that you generate is invertible: > > ? Displace control points just so much that there is no ?folding? > in the field (two different areas are transformed to the same area) > > ? Make the grid larger than the image so that the displacements are > all zero at the boundary (as ITK transforms cannot extrapolate to have > smooth boundary conditions but they just cut the displacement to 0; if > there is discontinuity in the field then inverse computation will fail) > > > > You can play with non-linear transforms, import/export from ITK, visualize > them, invert them, combine them, apply to volumes, surfaces, points, etc. > in 3D Slicer, see: > > > http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Transforms > > > > Andras > > > > *From:* Community [mailto:community-bounces at itk.org] *On Behalf Of *Carlos > Henrique Villa Pinto > *Sent:* September 23, 2015 9:38 AM > *To:* insight-users at itk.org > *Subject:* [ITK] [ITK-users] Applying a B-Spline transform to a 3D mesh > > > > Hi everyone, > > > > I have a 3D MR brain image and a set of 3D meshes of different brain > structures aligned to it. I'm trying to write a very simple program in > which I create a B-Spline transform (with random parameters) and apply such > transform to the image and to the meshes in order to deform them all > together. > > > > Am I wrong to assume that, if I apply exactly the same transform to an > image and to a mesh which is perfectly aligned to a specific brain > structure in such image, the resulting deformed mesh should be aligned to > the same brain structure in the deformed image? Because that's not what > it's happening in practice. The transform deforms the meshes to some > extent, but the deformed meshes do not match the brain structures in the > deformed image, even though the applied transform is the same for all. So I > guess I must be doing something wrong... > > > > The source code is below. I'm using ITK 4.8, and the MR image (NIfTI) and > meshes (VTK) used in my tests come from the NAC Brain Atlas ( > https://www.slicer.org/publications/item/view/2037). > > > > Any insight about what is possibly causing these results would be > appreciated. Thanks in advance. > > > > > > #include > > #include > > #include > > #include > > #include > > #include > > > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > > > int main(int argc, char const *argv[]) > > { > > if (argc < 3) > > { > > std::cerr << "Usage: " << argv[0] > > << " gridNodesInOneDimension inputImage [inputMesh1, > ...]" > > << std::endl; > > > > return EXIT_FAILURE; > > } > > > > srand(time(NULL)); > > > > const int splineOrder = 3; > > const int dimensions = 3; > > > > typedef itk::Image ImageType; > > typedef itk::ImageFileReader ImageReaderType; > > typedef itk::ImageFileWriter ImageWriterType; > > > > typedef itk::Mesh MeshType; > > typedef itk::MeshFileReader MeshReaderType; > > typedef itk::MeshFileWriter MeshWriterType; > > > > typedef itk::BSplineTransform > > BSplineTransformType; > > typedef itk::ResampleImageFilter > > ResampleImageFilterType; > > typedef itk::TransformMeshFilter BSplineTransformType> > > TransformMeshFilterType; > > typedef itk::LinearInterpolateImageFunction > > LinearInterpolatorType; > > > > // > ============================================================================================ > > // Reading the input image > > // > ============================================================================================ > > > > ImageReaderType::Pointer imageReader = ImageReaderType::New(); > > imageReader->SetFileName(argv[2]); > > imageReader->Update(); > > > > ImageType::Pointer inputImage = imageReader->GetOutput(); > > > > // > ============================================================================================ > > // Reading the input meshes > > // > ============================================================================================ > > > > std::vector inputMeshVector; > > > > for (int i = 3; i < argc; ++i) > > { > > MeshReaderType::Pointer meshReader = MeshReaderType::New(); > > meshReader->SetFileName(argv[i]); > > meshReader->Update(); > > > > MeshType::Pointer inputMesh = meshReader->GetOutput(); > > inputMeshVector.push_back(inputMesh); > > } > > > > // > ============================================================================================ > > // Generating the parameters of the B-Spline transform > > // > ============================================================================================ > > > > const int gridNodesInOneDimension = atoi(argv[1]); > > > > BSplineTransformType::Pointer bsplineTransform = > BSplineTransformType::New(); > > BSplineTransformType::PhysicalDimensionsType physicalDimensions; > > BSplineTransformType::MeshSizeType meshSize; > > > > for (int i = 0; i < dimensions; ++i) > > { > > physicalDimensions[i] = inputImage->GetSpacing()[i] * > > > static_cast(inputImage->GetLargestPossibleRegion().GetSize()[i] - > 1); > > } > > meshSize.Fill(gridNodesInOneDimension - splineOrder); > > > > bsplineTransform->SetTransformDomainOrigin(inputImage->GetOrigin()); > > > bsplineTransform->SetTransformDomainDirection(inputImage->GetDirection()); > > > bsplineTransform->SetTransformDomainPhysicalDimensions(physicalDimensions); > > bsplineTransform->SetTransformDomainMeshSize(meshSize); > > > > BSplineTransformType::ParametersType > parameters(bsplineTransform->GetNumberOfParameters()); > > > > double minValue = -20.0; > > double maxValue = 20.0; > > for (int i = 0; i < bsplineTransform->GetNumberOfParameters(); ++i) > > { > > parameters[i] = (double) rand() / RAND_MAX * (maxValue - minValue) > + minValue; > > std::cout << parameters[i] << " "; > > } > > std::cout << std::endl; > > > > bsplineTransform->SetParameters(parameters); > > > > // > ============================================================================================ > > // Applying the B-Spline transform to the input image > > // > ============================================================================================ > > > > LinearInterpolatorType::Pointer linearInterpolator = > LinearInterpolatorType::New(); > > > > ResampleImageFilterType::Pointer resampleFilter = > ResampleImageFilterType::New(); > > resampleFilter->SetTransform(bsplineTransform); > > resampleFilter->SetInterpolator(linearInterpolator); > > resampleFilter->SetInput(inputImage); > > > resampleFilter->SetSize(inputImage->GetLargestPossibleRegion().GetSize()); > > > resampleFilter->SetOutputStartIndex(inputImage->GetLargestPossibleRegion().GetIndex()); > > resampleFilter->SetOutputOrigin(inputImage->GetOrigin()); > > resampleFilter->SetOutputSpacing(inputImage->GetSpacing()); > > resampleFilter->SetOutputDirection(inputImage->GetDirection()); > > resampleFilter->Update(); > > > > // > ============================================================================================ > > // Applying the B-Spline transform to the meshes > > // > ============================================================================================ > > > > std::vector outputMeshVector; > > > > for (int i = 0; i < inputMeshVector.size(); ++i) > > { > > TransformMeshFilterType::Pointer transformFilter = > TransformMeshFilterType::New(); > > transformFilter->SetInput(inputMeshVector[i]); > > transformFilter->SetTransform(bsplineTransform); > > transformFilter->Update(); > > > > outputMeshVector.push_back(transformFilter->GetOutput()); > > } > > > > // > ============================================================================================ > > // Writing the transformed image > > // > ============================================================================================ > > > > char outputImageFileName[256]; > > int length1 = strlen(argv[2]) - 4; > > > > strncpy(outputImageFileName, argv[2], length1); > > outputImageFileName[length1] = '\0'; > > strcat(outputImageFileName, "_transformed.nii"); > > > > ImageWriterType::Pointer imageWriter = ImageWriterType::New(); > > imageWriter->SetFileName(outputImageFileName); > > imageWriter->SetInput(resampleFilter->GetOutput()); > > imageWriter->Update(); > > > > // > ============================================================================================ > > // Writing the transformed meshes > > // > ============================================================================================ > > > > for (int i = 0; i < outputMeshVector.size(); ++i) > > { > > char outputMeshFilename[256]; > > int length2 = strlen(argv[i + 3]) - 4; > > > > strncpy(outputMeshFilename, argv[i + 3], length2); > > outputMeshFilename[length2] = '\0'; > > strcat(outputMeshFilename, "_transformed.vtk"); > > > > MeshType::Pointer outputMesh = outputMeshVector[i]; > > > > MeshWriterType::Pointer meshWriter = MeshWriterType::New(); > > meshWriter->SetFileName(outputMeshFilename); > > meshWriter->SetInput(outputMesh); > > meshWriter->Update(); > > } > > > > return EXIT_SUCCESS; > > } > > > > > > []s > > > > -- > > Carlos Henrique Villa Pinto > > Graduate Student in Computer Science > > Federal University of S?o Carlos - Brazil > > XCS > -- Carlos Henrique Villa Pinto Graduate Student in Computer Science Federal University of S?o Carlos - Brazil XCS -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Sep 24 09:57:17 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 24 Sep 2015 09:57:17 -0400 Subject: [ITK-users] [ITK] Applying a B-Spline transform to a 3D mesh In-Reply-To: References: Message-ID: Hello Carlos, The reason the transform needs to be inverted is the way the transform is applied to meshes vs resampling for images. For resampling images the transform is used to map from the physical space of the output image domain to the physical space of the input image domain. Where as for meshes it's directly applied to the input physical points. Please checkout section 2.9 of the ITK software guide[1] for more information on Geometric Transforms and the ResampleImageFilter. HTH, Brad [1] http://www.itk.org/ITK/help/documentation.html On Sep 24, 2015, at 9:43 AM, Carlos Henrique Villa Pinto wrote: > Hi, Andras. Thank you very much for your answer. > > I'm not very experienced with B-Spline transforms and 3D meshes, so maybe this is a silly question, but... why exactly do I need inverse transforms (forward for the mesh, inverse for the image), considering that I want to deform both the same way? Could you elaborate, or perhaps give me some links with explanations, please? > > By the way, I generated a deformation field from the transform I created, and visualized/played with it in 3D Slicer. As expected, applying such transform to the original MR image in 3D Slicer results in the same deformed image that I get using my ITK code. However, when I apply the same transform to the original mesh (again in 3D Slicer), the result is a deformed mesh that is neither the same result that I obtain with my ITK code (using the itk::TransformMeshFilter class) nor the expected result (a mesh aligned to the brain structure in the deformed image). And applying the inverse transform (also calculated in 3D Slicer) doesn't give me better results at all. So now I'm even more confused. > > Any other insights would be greatly appreciated. > > Thanks. > []s > > 2015-09-23 10:56 GMT-03:00 Andras Lasso : > You need forward transform to deform a mesh and inverse (resampling) transform to transform the corresponding image. Make sure the transform that you generate is invertible: > > ? Displace control points just so much that there is no ?folding? in the field (two different areas are transformed to the same area) > > ? Make the grid larger than the image so that the displacements are all zero at the boundary (as ITK transforms cannot extrapolate to have smooth boundary conditions but they just cut the displacement to 0; if there is discontinuity in the field then inverse computation will fail) > > > > You can play with non-linear transforms, import/export from ITK, visualize them, invert them, combine them, apply to volumes, surfaces, points, etc. in 3D Slicer, see: > > http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Transforms > > > > Andras > > > > From: Community [mailto:community-bounces at itk.org] On Behalf Of Carlos Henrique Villa Pinto > Sent: September 23, 2015 9:38 AM > To: insight-users at itk.org > Subject: [ITK] [ITK-users] Applying a B-Spline transform to a 3D mesh > > > > Hi everyone, > > > > I have a 3D MR brain image and a set of 3D meshes of different brain structures aligned to it. I'm trying to write a very simple program in which I create a B-Spline transform (with random parameters) and apply such transform to the image and to the meshes in order to deform them all together. > > > > Am I wrong to assume that, if I apply exactly the same transform to an image and to a mesh which is perfectly aligned to a specific brain structure in such image, the resulting deformed mesh should be aligned to the same brain structure in the deformed image? Because that's not what it's happening in practice. The transform deforms the meshes to some extent, but the deformed meshes do not match the brain structures in the deformed image, even though the applied transform is the same for all. So I guess I must be doing something wrong... > > > > The source code is below. I'm using ITK 4.8, and the MR image (NIfTI) and meshes (VTK) used in my tests come from the NAC Brain Atlas (https://www.slicer.org/publications/item/view/2037). > > > > Any insight about what is possibly causing these results would be appreciated. Thanks in advance. > > > > > > #include > > #include > > #include > > #include > > #include > > #include > > > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > > > int main(int argc, char const *argv[]) > > { > > if (argc < 3) > > { > > std::cerr << "Usage: " << argv[0] > > << " gridNodesInOneDimension inputImage [inputMesh1, ...]" > > << std::endl; > > > > return EXIT_FAILURE; > > } > > > > srand(time(NULL)); > > > > const int splineOrder = 3; > > const int dimensions = 3; > > > > typedef itk::Image ImageType; > > typedef itk::ImageFileReader ImageReaderType; > > typedef itk::ImageFileWriter ImageWriterType; > > > > typedef itk::Mesh MeshType; > > typedef itk::MeshFileReader MeshReaderType; > > typedef itk::MeshFileWriter MeshWriterType; > > > > typedef itk::BSplineTransform > > BSplineTransformType; > > typedef itk::ResampleImageFilter > > ResampleImageFilterType; > > typedef itk::TransformMeshFilter > > TransformMeshFilterType; > > typedef itk::LinearInterpolateImageFunction > > LinearInterpolatorType; > > > > // ============================================================================================ > > // Reading the input image > > // ============================================================================================ > > > > ImageReaderType::Pointer imageReader = ImageReaderType::New(); > > imageReader->SetFileName(argv[2]); > > imageReader->Update(); > > > > ImageType::Pointer inputImage = imageReader->GetOutput(); > > > > // ============================================================================================ > > // Reading the input meshes > > // ============================================================================================ > > > > std::vector inputMeshVector; > > > > for (int i = 3; i < argc; ++i) > > { > > MeshReaderType::Pointer meshReader = MeshReaderType::New(); > > meshReader->SetFileName(argv[i]); > > meshReader->Update(); > > > > MeshType::Pointer inputMesh = meshReader->GetOutput(); > > inputMeshVector.push_back(inputMesh); > > } > > > > // ============================================================================================ > > // Generating the parameters of the B-Spline transform > > // ============================================================================================ > > > > const int gridNodesInOneDimension = atoi(argv[1]); > > > > BSplineTransformType::Pointer bsplineTransform = BSplineTransformType::New(); > > BSplineTransformType::PhysicalDimensionsType physicalDimensions; > > BSplineTransformType::MeshSizeType meshSize; > > > > for (int i = 0; i < dimensions; ++i) > > { > > physicalDimensions[i] = inputImage->GetSpacing()[i] * > > static_cast(inputImage->GetLargestPossibleRegion().GetSize()[i] - 1); > > } > > meshSize.Fill(gridNodesInOneDimension - splineOrder); > > > > bsplineTransform->SetTransformDomainOrigin(inputImage->GetOrigin()); > > bsplineTransform->SetTransformDomainDirection(inputImage->GetDirection()); > > bsplineTransform->SetTransformDomainPhysicalDimensions(physicalDimensions); > > bsplineTransform->SetTransformDomainMeshSize(meshSize); > > > > BSplineTransformType::ParametersType parameters(bsplineTransform->GetNumberOfParameters()); > > > > double minValue = -20.0; > > double maxValue = 20.0; > > for (int i = 0; i < bsplineTransform->GetNumberOfParameters(); ++i) > > { > > parameters[i] = (double) rand() / RAND_MAX * (maxValue - minValue) + minValue; > > std::cout << parameters[i] << " "; > > } > > std::cout << std::endl; > > > > bsplineTransform->SetParameters(parameters); > > > > // ============================================================================================ > > // Applying the B-Spline transform to the input image > > // ============================================================================================ > > > > LinearInterpolatorType::Pointer linearInterpolator = LinearInterpolatorType::New(); > > > > ResampleImageFilterType::Pointer resampleFilter = ResampleImageFilterType::New(); > > resampleFilter->SetTransform(bsplineTransform); > > resampleFilter->SetInterpolator(linearInterpolator); > > resampleFilter->SetInput(inputImage); > > resampleFilter->SetSize(inputImage->GetLargestPossibleRegion().GetSize()); > > resampleFilter->SetOutputStartIndex(inputImage->GetLargestPossibleRegion().GetIndex()); > > resampleFilter->SetOutputOrigin(inputImage->GetOrigin()); > > resampleFilter->SetOutputSpacing(inputImage->GetSpacing()); > > resampleFilter->SetOutputDirection(inputImage->GetDirection()); > > resampleFilter->Update(); > > > > // ============================================================================================ > > // Applying the B-Spline transform to the meshes > > // ============================================================================================ > > > > std::vector outputMeshVector; > > > > for (int i = 0; i < inputMeshVector.size(); ++i) > > { > > TransformMeshFilterType::Pointer transformFilter = TransformMeshFilterType::New(); > > transformFilter->SetInput(inputMeshVector[i]); > > transformFilter->SetTransform(bsplineTransform); > > transformFilter->Update(); > > > > outputMeshVector.push_back(transformFilter->GetOutput()); > > } > > > > // ============================================================================================ > > // Writing the transformed image > > // ============================================================================================ > > > > char outputImageFileName[256]; > > int length1 = strlen(argv[2]) - 4; > > > > strncpy(outputImageFileName, argv[2], length1); > > outputImageFileName[length1] = '\0'; > > strcat(outputImageFileName, "_transformed.nii"); > > > > ImageWriterType::Pointer imageWriter = ImageWriterType::New(); > > imageWriter->SetFileName(outputImageFileName); > > imageWriter->SetInput(resampleFilter->GetOutput()); > > imageWriter->Update(); > > > > // ============================================================================================ > > // Writing the transformed meshes > > // ============================================================================================ > > > > for (int i = 0; i < outputMeshVector.size(); ++i) > > { > > char outputMeshFilename[256]; > > int length2 = strlen(argv[i + 3]) - 4; > > > > strncpy(outputMeshFilename, argv[i + 3], length2); > > outputMeshFilename[length2] = '\0'; > > strcat(outputMeshFilename, "_transformed.vtk"); > > > > MeshType::Pointer outputMesh = outputMeshVector[i]; > > > > MeshWriterType::Pointer meshWriter = MeshWriterType::New(); > > meshWriter->SetFileName(outputMeshFilename); > > meshWriter->SetInput(outputMesh); > > meshWriter->Update(); > > } > > > > return EXIT_SUCCESS; > > } > > > > > > []s > > > > -- > > Carlos Henrique Villa Pinto > > Graduate Student in Computer Science > > Federal University of S?o Carlos - Brazil > > XCS > > > > > -- > Carlos Henrique Villa Pinto > Graduate Student in Computer Science > Federal University of S?o Carlos - Brazil > XCS > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Sep 24 10:53:29 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 24 Sep 2015 10:53:29 -0400 Subject: [ITK-users] [ITK-dev] Streamed Read/Write Truncating Data In-Reply-To: References: <191044B9-EE73-479F-89C4-BA7FEA977740@mail.nih.gov> Message-ID: <39B1F2E5-9445-473B-95BE-AC2647B8AB51@mail.nih.gov> Hello, I was able to reproduced a truncated volume with clang on OSX. This looks like a 32-bit truncation issue. I also created the following pipeline: ImageFilterReader->StreamingImageFilter->ImageFileWriter I set the NumberofStreamDivisions to 20 on the StreamingImageFIlter, to make the reader stream, but I didn't use streaming in the writer. The volume still appears truncated. This narrows the problem to the Nifti reading. Hopefully, there is a problem in the itk ImageIO[1], and not in the Nifti library. Contributions to fix the problem are welcome. Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx On Sep 21, 2015, at 6:32 PM, Maryana wrote: > > > > Hi! > > If anyone would like to repeat the test, this is my test file: https://www.dropbox.com/s/7hpen46znk1h58l/brain_8bit.nii?dl=0 > If I convert that file to MetaIO without streams, and use ExtractImageFilter to read one file perpendicular to Y (as in the code I'm sending bellow) it works fine. However if I convert it to MetaIO using streams and use the same code to read the same slice, I end up with a truncated image. I have the same result when I use Paraview for visualization. By the way, for what I've read from ITK documentation NIfti supposedly supports streamed reading. So I'm guessing that using Nifti in this case would be ok. Is this correct? Would anyone have an idea on what's wrong? > > Thank you! > > > > Code for reading slice: > > > > #include "itkImageFileReader.h" > #include "itkImageFileWriter.h" > #include "itkExtractImageFilter.h" > #include "itkImage.h" > > > int main( int argc, char ** argv ) > { > > typedef unsigned char InputPixelType; > typedef unsigned char OutputPixelType; > > typedef itk::Image< InputPixelType, 3 > InputImageType; > typedef itk::Image< OutputPixelType, 2 > OutputImageType; > > typedef itk::ImageFileReader< InputImageType > ReaderType; > typedef itk::ImageFileWriter< OutputImageType > WriterType; > > std::string fileIn = "mri2_stream.mha"; > std::string fileOut = "slice.tif"; > const char * inputFilename = fileIn.c_str(); > const char * outputFilename = fileOut.c_str(); > > ReaderType::Pointer reader = ReaderType::New(); > WriterType::Pointer writer = WriterType::New(); > > reader->SetFileName( inputFilename ); > writer->SetFileName( outputFilename ); > > typedef itk::ExtractImageFilter< InputImageType, OutputImageType > FilterType; > FilterType::Pointer filter = FilterType::New(); > filter->InPlaceOn(); > filter->SetDirectionCollapseToSubmatrix(); > > reader->UpdateOutputInformation(); > InputImageType::RegionType inputRegion = reader->GetOutput()->GetLargestPossibleRegion(); > > InputImageType::SizeType size = inputRegion.GetSize(); > > std::cout << "Size: " << std::endl; > std::cout << size[0] << std::endl; > std::cout << size[1] << std::endl; > std::cout << size[2] << std::endl; > > > InputImageType::IndexType start = inputRegion.GetIndex(); > const unsigned int sliceNumber = 800; > > std::cout << "Start: " << std::endl; > std::cout << start[0] << std::endl; > std::cout << start[1] << std::endl; > std::cout << start[2] << std::endl; > > size[1] = 0; > start[1] = sliceNumber; > > InputImageType::RegionType desiredRegion; > desiredRegion.SetSize( size ); > desiredRegion.SetIndex( start ); > > filter->SetExtractionRegion( desiredRegion ); > > filter->SetInput( reader->GetOutput() ); > writer->SetInput( filter->GetOutput() ); > > try > { > writer->Update(); > } > catch( itk::ExceptionObject & err ) > { > std::cerr << "ExceptionObject caught !" << std::endl; > std::cerr << err << std::endl; > return EXIT_FAILURE; > } > > > return EXIT_SUCCESS; > } > > > > On Mon, Sep 21, 2015 at 12:07 PM, Maryana wrote: > Hi, > > I use Linux Mint 64bits, GCC 4.8, Cmake 2.8. I'm compiling to this platform. > > Thank you! > > On Mon, Sep 21, 2015 at 11:55 AM, Bradley Lowekamp wrote: > Hello Maryana, > > What compiler, platform and architecture are you compiling for? > > Brad > > On Sep 21, 2015, at 2:54 PM, Maryana wrote: > > > > > Hi ITK Users/Devs, > > > > I'm new to ITK and I need to write a small program to convert Nifti images to MetaIO. However, I need to use the streamed reader/writer because my image volumes can have several gigabytes. I was doing some tests with the following code but I've realized that whenever I use the stream I end up with a truncated volume. I'm using ITK 4.8. I'm sure my volume is of unsigned char type. Also, when I comment out the writer->SetNumberOfStreamDivisions(20); line I works fine. Does anyone knows what is wrong? > > > > Thank you! > > > > #include > > #include > > #include > > > > #include "itkImage.h" > > #include "itkImageFileReader.h" > > #include "itkImageFileWriter.h" > > #include "itkImageRegionIterator.h" > > #include "itkNiftiImageIO.h" > > #include "itkMetaImageIO.h" > > > > > > int main(int argc, char const *argv[]){ > > > > std::string fileIn = "brain_8bit.nii"; > > std::string fileOut = "mri2_stream.mha"; > > > > typedef itk::Image Image3D; > > > > //Reader > > typedef itk::ImageFileReader ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileName(fileIn); > > > > //Writer > > typedef itk::ImageFileWriter WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName(fileOut); > > writer->SetNumberOfStreamDivisions(20); > > writer->SetInput(reader->GetOutput()); > > > > > > std::cout << "Input: " << fileIn << std::endl; > > std::cout << "Output: " << fileOut << std::endl; > > > > std::cout << "Writing..." << std::endl; > > try > > { > > writer->Update(); > > } > > catch( itk::ExceptionObject & err ) > > { > > std::cerr << "ExceptionObject caught !" << std::endl; > > std::cerr << err << std::endl; > > return EXIT_FAILURE; > > } > > std::cout << "Finished." << std::endl; > > > > > > return EXIT_SUCCESS; > > } > > > > > > > > > > > > -- > > "Tudo no mundo come?ou com um sim. Uma mol?cula disse sim a outra mol?cula e nasceu a vida" - Clarice Lispector > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-developers > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Thu Sep 24 11:21:09 2015 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Thu, 24 Sep 2015 17:21:09 +0200 (CEST) Subject: [ITK-users] [ITK] Fwd: itk vector Image pixel value In-Reply-To: References: <704957709.7223194.1443096778426.JavaMail.zimbra@enst.fr> Message-ID: <1216885496.7413806.1443108069141.JavaMail.zimbra@enst.fr> Well I'm no specialist in registration, but from what I see with your example and with http://www.itk.org/Doxygen/html/classitk_1_1WarpImageFilter.html , it seems that the vector pixel type is here to define an displacement field. Since the doc indicates that each vector represent the distance between a point in the input space and a point in the output space, and that the vectors have to be of N elements where N is the dimension of input image, I guess it maps the distance on each dimension. So basically if you map 3D data, your displacement field will have vector with 3 components corresponding to X,Y and Z displacement. Tim ----- Mail original ----- De: "stefano serviddio" ?: insight-users at itk.org Envoy?: Jeudi 24 Septembre 2015 14:46:25 Objet: [ITK] [ITK-users] Fwd: itk vector Image pixel value ---------- Forwarded message ---------- From: stefano serviddio < s.serviddio at gmail.com > Date: 2015-09-24 14:46 GMT+02:00 Subject: Re: [ITK] [ITK-users] itk vector Image pixel value To: Timothee Evain < tevain at telecom-paristech.fr > Hi Tim, First of all thank you for you time, Secondly I try to execute a deformation registration between PET and TC image. I have seen DeformableRegistration2.cxx where Warp Filter execute a particular trasnformation that modifie the space of movingImage. In this case what is the role of vector pixel type??? #include " itkDemonsRegistrationFilter.h " #include " itkHistogramMatchingImageFilter.h " #include " itkCastImageFilter.h " #include " itkWarpImageFilter.h " int main( int argc, char *argv[] ) { if ( argc < 4 ) { std::cerr << "Missing Parameters " << std::endl; std::cerr << "Usage: " << argv[0]; std::cerr << " fixedImageFile movingImageFile " ; std::cerr << " outputImageFile " << std::endl; std::cerr << " [outputDisplacementFieldFile] " << std::endl; return EXIT_FAILURE; } // Software Guide : BeginLatex // // Second, we declare the types of the images. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet const unsigned int Dimension = 2; typedef unsigned short PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; // Software Guide : EndCodeSnippet // Set up the file readers typedef itk::ImageFileReader< FixedImageType > FixedImageReaderType; typedef itk::ImageFileReader< MovingImageType > MovingImageReaderType; FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); fixedImageReader->SetFileName( argv[1] ); movingImageReader->SetFileName( argv[2] ); // Software Guide : BeginLatex // // Image file readers are set up in a similar fashion to previous examples. // To support the re-mapping of the moving image intensity, we declare an // internal image type with a floating point pixel type and cast the input // images to the internal image type. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet typedef float InternalPixelType; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; typedef itk::CastImageFilter < FixedImageType, InternalImageType > FixedImageCasterType; typedef itk::CastImageFilter < MovingImageType, InternalImageType > MovingImageCasterType; FixedImageCasterType::Pointer fixedImageCaster = FixedImageCasterType::New(); MovingImageCasterType::Pointer movingImageCaster = MovingImageCasterType::New(); fixedImageCaster->SetInput( fixedImageReader->GetOutput() ); movingImageCaster->SetInput( movingImageReader->GetOutput() ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // The demons algorithm relies on the assumption that pixels representing the // same homologous point on an object have the same intensity on both the // fixed and moving images to be registered. In this example, we will // preprocess the moving image to match the intensity between the images // using the \doxygen{HistogramMatchingImageFilter}. // // \index{itk::HistogramMatchingImageFilter} // // The basic idea is to match the histograms of the two images at a // user-specified number of quantile values. For robustness, the histograms // are matched so that the background pixels are excluded from both // histograms. For MR images, a simple procedure is to exclude all gray // values that are smaller than the mean gray value of the image. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet typedef itk::HistogramMatchingImageFilter < InternalImageType, InternalImageType > MatchingFilterType; MatchingFilterType::Pointer matcher = MatchingFilterType::New(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // For this example, we set the moving image as the source or input image and // the fixed image as the reference image. // // \index{itk::HistogramMatchingImageFilter!SetInput()} // \index{itk::HistogramMatchingImageFilter!SetSourceImage()} // \index{itk::HistogramMatchingImageFilter!SetReferenceImage()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet matcher->SetInput( movingImageCaster->GetOutput() ); matcher->SetReferenceImage( fixedImageCaster->GetOutput() ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // We then select the number of bins to represent the histograms and the // number of points or quantile values where the histogram is to be // matched. // // \index{itk::HistogramMatchingImageFilter!SetNumberOfHistogramLevels()} // \index{itk::HistogramMatchingImageFilter!SetNumberOfMatchPoints()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet matcher->SetNumberOfHistogramLevels( 1024 ); matcher->SetNumberOfMatchPoints( 7 ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // Simple background extraction is done by thresholding at the mean // intensity. // // \index{itk::HistogramMatchingImageFilter!ThresholdAtMeanIntensityOn()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet matcher->ThresholdAtMeanIntensityOn(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // In the \doxygen{DemonsRegistrationFilter}, the deformation field is // represented as an image whose pixels are floating point vectors. // // \index{itk::DemonsRegistrationFilter} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet typedef itk::Vector< float, Dimension > VectorPixelType; typedef itk::Image< VectorPixelType, Dimension > DisplacementFieldType; typedef itk::DemonsRegistrationFilter < InternalImageType, InternalImageType, DisplacementFieldType> RegistrationFilterType; RegistrationFilterType::Pointer filter = RegistrationFilterType::New(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // The input fixed image is simply the output of the fixed image casting // filter. The input moving image is the output of the histogram matching // filter. // // \index{itk::DemonsRegistrationFilter!SetFixedImage()} // \index{itk::DemonsRegistrationFilter!SetMovingImage()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet filter->SetFixedImage( fixedImageCaster->GetOutput() ); filter->SetMovingImage( matcher->GetOutput() ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // The demons registration filter has two parameters: the number of // iterations to be performed and the standard deviation of the Gaussian // smoothing kernel to be applied to the deformation field after each // iteration. // \index{itk::DemonsRegistrationFilter!SetNumberOfIterations()} // \index{itk::DemonsRegistrationFilter!SetStandardDeviations()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet filter->SetNumberOfIterations( 50 ); filter->SetStandardDeviations( 1.0 ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // The registration algorithm is triggered by updating the filter. The // filter output is the computed deformation field. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet filter->Update(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // The \doxygen{WarpImageFilter} can be used to warp the moving image with // the output deformation field. Like the \doxygen{ResampleImageFilter}, // the WarpImageFilter requires the specification of the input image to be // resampled, an input image interpolator, and the output image spacing and // origin. // // \index{itk::WarpImageFilter} // \index{itk::WarpImageFilter!SetInput()} // \index{itk::WarpImageFilter!SetInterpolator()} // \index{itk::WarpImageFilter!SetOutputSpacing()} // \index{itk::WarpImageFilter!SetOutputOrigin()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet typedef itk::WarpImageFilter < MovingImageType, MovingImageType, DisplacementFieldType > WarperType; typedef itk::LinearInterpolateImageFunction < MovingImageType, double > InterpolatorType; WarperType::Pointer warper = WarperType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); warper->SetInput( movingImageReader->GetOutput() ); warper->SetInterpolator( interpolator ); warper->SetOutputSpacing( fixedImage->GetSpacing() ); warper->SetOutputOrigin( fixedImage->GetOrigin() ); warper->SetOutputDirection( fixedImage->GetDirection() ); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // Unlike the ResampleImageFilter, the WarpImageFilter // warps or transform the input image with respect to the deformation field // represented by an image of vectors. The resulting warped or resampled // image is written to file as per previous examples. // // \index{itk::WarpImageFilter!SetDisplacementField()} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet warper->SetDisplacementField( filter->GetOutput() ); // Software Guide : EndCodeSnippet // Write warped image out to file typedef unsigned char OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter < MovingImageType, OutputImageType > CastFilterType; typedef itk::ImageFileWriter< OutputImageType > WriterType; WriterType::Pointer writer = WriterType::New(); CastFilterType::Pointer caster = CastFilterType::New(); writer->SetFileName( argv[3] ); caster->SetInput( warper->GetOutput() ); writer->SetInput( caster->GetOutput() ); writer->Update(); } 2015-09-24 14:12 GMT+02:00 Timothee Evain < tevain at telecom-paristech.fr > : Hello Stefano In this case, each pixel have multiples values, not only one, so to represent this, each pixel have for value a vector with multiples components. Each component of the vector is an individual value. Maybe an example is easier to understand. Think of a RGB image. You have three colors to represent, namely Red/Green/Blue. You could represent it with 3 differents images, each with the value of Red, Green or Blue channel, or you could do it with only one image, where each pixel contain a vector. In this vector you will set the value of the Red/Green/Blue channel for the pixel. So you will have the "Red" component, the "Green" one, and the "Blue" at last. A vector image is just the generalization of this. HTH Tim ----- Mail original ----- De: "stefano serviddio" < s.serviddio at gmail.com > ?: insight-users at itk.org Envoy?: Jeudi 24 Septembre 2015 13:36:27 Objet: [ITK] [ITK-users] itk vector Image pixel value I have found this itk vector image example, I don't understand the meaning of each component of Vector Pixel type. For example the code line pixelValue[0] = 1.345; component X refers to a grayscale value or distance from next pixel inside the matrix of Image??? #include "itkVector.h" // Software Guide : EndCodeSnippet #include "itkImage.h" int main(int, char *[]) { // Software Guide : BeginLatex // // The Vector class is templated over the type used to represent // the coordinate in space and over the dimension of the space. In this example, // we want the vector dimension to match the image dimension, but this is by // no means a requirement. We could have defined a four-dimensional image // with three-dimensional vectors as pixels. // // \index{itk::Vector!Instantiation} // \index{itk::Vector!itk::Image} // \index{itk::Image!Vector pixel} // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet typedef itk::Vector< float, 3 > PixelType; typedef itk::Image< PixelType, 3 > ImageType; // Software Guide : EndCodeSnippet // Then the image object can be created ImageType::Pointer image = ImageType::New(); // The image region should be initialized const ImageType::IndexType start = {{0,0,0}}; //First index at {X,Y,Z} const ImageType::SizeType size = {{200,200,200}}; //Size of {X,Y,Z} ImageType::RegionType region; region.SetSize( size ); region.SetIndex( start ); // Pixel data is allocated image->SetRegions( region ); image->Allocate(); // The image buffer is initialized to a particular value ImageType::PixelType initialValue; // A vector can initialize all its components to the // same value by using the Fill() method. initialValue.Fill( 0.0 ); // Now the image buffer can be initialized with this // vector value. image->FillBuffer( initialValue ); const ImageType::IndexType pixelIndex = {{27,29,37}}; //Position {X,Y,Z} // Software Guide : BeginLatex // // The Vector class inherits the operator \code{[]} from the // \doxygen{FixedArray} class. This makes it possible to access the // Vector's components using index notation. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet ImageType::PixelType pixelValue; pixelValue[0] = 1.345; // x component pixelValue[1] = 6.841; // y component pixelValue[2] = 3.295; // x component // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // We can now store this vector in one of the image pixels by defining an // index and invoking the \code{SetPixel()} method. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet image->SetPixel( pixelIndex, pixelValue ); // Software Guide : EndCodeSnippet // The GetPixel method can also be used to read Vectors // pixels from the image ImageType::PixelType value = image->GetPixel( pixelIndex ); std::cout << value << std::endl; // Lets repeat that both \code{SetPixel()} and \code{GetPixel()} are // inefficient and should only be used for debugging purposes or for // implementing interactions with a graphical user interface such as // querying pixel value by clicking with the mouse. return EXIT_SUCCESS; } _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From itkhelpacc at gmail.com Fri Sep 25 03:28:58 2015 From: itkhelpacc at gmail.com (vishal k) Date: Fri, 25 Sep 2015 12:58:58 +0530 Subject: [ITK-users] Bone structure segmentation Message-ID: hey, im working on an image processing project in which Im trying to segment the spine region in an chest xray...i plan on doing it in the following steps... in the first step i have managed to use region growing algorithm to produce an binary mask such that white part of the mask is more or less around the ROI (the spine).. in the next step i have masked the original image and the binary mask image such that wherever the white region overlaps the original pixel value of the image is retained and the rest is made black this is done in order to narrow down the ROI... next apply active contours technique to this image.. how do I restrict the algorithm such that it acts only within the masked region... i tried to find the solution on the net but the solutions for the regular shaped mask such as rectangle area available but since spine is IRREGULAR, the mask also tends to b irregular.. please help me out..!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Fri Sep 25 05:12:56 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Fri, 25 Sep 2015 11:12:56 +0200 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> Message-ID: Hi again, For 3D images, what should I use as default offset vector if I use your class? I've been using itk::ScalarImageToTextureFeaturesFilter for 3D images and I've also done some tests on 3D NIFTI images but its description talks only about the default 2D image offsets ({(-1, 0), (-1, -1), (0, -1), (1, -1)}) but not for 3D. Besides, the 2D default is missing some offsets. I'd like to use your class and test it with the same default values as with the ScalarIm.... class. Thank you very much. My best regards. 2015-09-22 14:27 GMT+02:00 Bradley Lowekamp : > Hello, > > Please try to keep this discussion on the mailing list. > > You can find a basic program here [1]. Which provide a good example for > usage. > > It allows writing to any file format that ITK supports with vector > images. I know that mha, nii, and nrrd should support this. Others may and > it varies based what modules are compiled into ITK. > > You can see how the texture information is written into the vector here > [2]. Contributions to improve the documentation are welcomed. > > > > [1] > https://github.com/blowekamp/itkTextureAnalysis/blob/master/test/itkTextureFeatureImageFilterTest.cxx > [2] > https://github.com/blowekamp/itkTextureAnalysis/blob/b3911a8ab891859c50c7e3c8819d1a9fa0eaf4af/include/itkTextureFeatureImageFilter.hxx#L217-L224 > > On Sep 22, 2015, at 3:25 AM, Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com> wrote: > > Hi Bradley, > I'd like to use your class. A couple of questions: > > - Which format can the vectorimage generated be saved in? Is it possible > to save it in Nifti format? > > - Which information does the vector image contain, I mean, what is the > info stored for each voxel? How can I access that info? > > I guess the usage of yourclass is in the same way as any ITK filter: > > yourFilter->setInput(inputImage); > yourFilter->setWindowSize(windowSize); > ... // other sets... > yourFilter->update(); > vectorImage = yourFilter->GetOutput(); > > but, how can I read the data of each voxel in the vector image? > > Thank you very much. > Kind regards. > > > 2015-09-21 14:30 GMT+02:00 Bradley Lowekamp : > >> Hello, >> >> I have a external ITK extension you may find useful: >> >> https://github.com/blowekamp/itkTextureAnalysis/blob/master/include/itkTextureFeatureImageFilter.h >> >> This computed the GLCM, for a neighborhood for every pixel and produces a >> VectorImage with all the features. >> >> Contributions to improving the class and documentation are welcome. >> >> HTH, >> Brad >> >> On Sep 21, 2015, at 7:15 AM, Francisco Lopez de la Franca < >> franciscolopezdelafranca at gmail.com> wrote: >> >> > Hi, >> > I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter class >> with the default parameters and everything was OK. >> > >> > But now, I have to calculate the texture features of a 2D scalar image >> pixel by pixel, I mean, iterate over the whole image and calculate the >> texture features of every pixel. >> > >> > I guess I've got to use each pixel as the masked region over which to >> calculate the texture features, but I think this process could be very slow >> (I have to do it with a lot of 2D images). >> > >> > Is there a faster way to do it or isn't it possible as I've described? >> > >> > Thanks a lot. >> > Kind regards. >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Fri Sep 25 06:37:34 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Fri, 25 Sep 2015 12:37:34 +0200 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> Message-ID: Which directions (for 3D images) will your filter use if I donot specify any offset? 2015-09-25 11:12 GMT+02:00 Francisco Lopez de la Franca < franciscolopezdelafranca at gmail.com>: > Hi again, > > For 3D images, what should I use as default offset vector if I use your > class? > > I've been using itk::ScalarImageToTextureFeaturesFilter for 3D images and > I've also done some tests on 3D NIFTI images but its description talks only > about the default 2D image offsets ({(-1, 0), (-1, -1), (0, -1), (1, -1)}) > but not for 3D. Besides, the 2D default is missing some offsets. > > I'd like to use your class and test it with the same default values as > with the ScalarIm.... class. > > Thank you very much. > My best regards. > > > 2015-09-22 14:27 GMT+02:00 Bradley Lowekamp : > >> Hello, >> >> Please try to keep this discussion on the mailing list. >> >> You can find a basic program here [1]. Which provide a good example for >> usage. >> >> It allows writing to any file format that ITK supports with vector >> images. I know that mha, nii, and nrrd should support this. Others may and >> it varies based what modules are compiled into ITK. >> >> You can see how the texture information is written into the vector here >> [2]. Contributions to improve the documentation are welcomed. >> >> >> >> [1] >> https://github.com/blowekamp/itkTextureAnalysis/blob/master/test/itkTextureFeatureImageFilterTest.cxx >> [2] >> https://github.com/blowekamp/itkTextureAnalysis/blob/b3911a8ab891859c50c7e3c8819d1a9fa0eaf4af/include/itkTextureFeatureImageFilter.hxx#L217-L224 >> >> On Sep 22, 2015, at 3:25 AM, Francisco Lopez de la Franca < >> franciscolopezdelafranca at gmail.com> wrote: >> >> Hi Bradley, >> I'd like to use your class. A couple of questions: >> >> - Which format can the vectorimage generated be saved in? Is it possible >> to save it in Nifti format? >> >> - Which information does the vector image contain, I mean, what is the >> info stored for each voxel? How can I access that info? >> >> I guess the usage of yourclass is in the same way as any ITK filter: >> >> yourFilter->setInput(inputImage); >> yourFilter->setWindowSize(windowSize); >> ... // other sets... >> yourFilter->update(); >> vectorImage = yourFilter->GetOutput(); >> >> but, how can I read the data of each voxel in the vector image? >> >> Thank you very much. >> Kind regards. >> >> >> 2015-09-21 14:30 GMT+02:00 Bradley Lowekamp : >> >>> Hello, >>> >>> I have a external ITK extension you may find useful: >>> >>> https://github.com/blowekamp/itkTextureAnalysis/blob/master/include/itkTextureFeatureImageFilter.h >>> >>> This computed the GLCM, for a neighborhood for every pixel and produces >>> a VectorImage with all the features. >>> >>> Contributions to improving the class and documentation are welcome. >>> >>> HTH, >>> Brad >>> >>> On Sep 21, 2015, at 7:15 AM, Francisco Lopez de la Franca < >>> franciscolopezdelafranca at gmail.com> wrote: >>> >>> > Hi, >>> > I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter >>> class with the default parameters and everything was OK. >>> > >>> > But now, I have to calculate the texture features of a 2D scalar image >>> pixel by pixel, I mean, iterate over the whole image and calculate the >>> texture features of every pixel. >>> > >>> > I guess I've got to use each pixel as the masked region over which to >>> calculate the texture features, but I think this process could be very slow >>> (I have to do it with a lot of 2D images). >>> > >>> > Is there a faster way to do it or isn't it possible as I've described? >>> > >>> > Thanks a lot. >>> > Kind regards. >>> > _____________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Kitware offers ITK Training Courses, for more information visit: >>> > http://www.kitware.com/products/protraining.php >>> > >>> > Please keep messages on-topic and check the ITK FAQ at: >>> > http://www.itk.org/Wiki/ITK_FAQ >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Sep 25 09:10:06 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 25 Sep 2015 09:10:06 -0400 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> Message-ID: Hello, For my itkTextureFeatureImageFilter, the default for the OffsetVector is an empty list. So it is required to set this member to get meaningful results. ITK is an OpenSource project. When you don't know how something is implemented you can open the hood and find out [1]. HTH, Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx#L66-L76 On Sep 25, 2015, at 6:37 AM, Francisco Lopez de la Franca wrote: > Which directions (for 3D images) will your filter use if I donot specify any offset? > > 2015-09-25 11:12 GMT+02:00 Francisco Lopez de la Franca : > Hi again, > > For 3D images, what should I use as default offset vector if I use your class? > > I've been using itk::ScalarImageToTextureFeaturesFilter for 3D images and I've also done some tests on 3D NIFTI images but its description talks only about the default 2D image offsets ({(-1, 0), (-1, -1), (0, -1), (1, -1)}) but not for 3D. Besides, the 2D default is missing some offsets. > > I'd like to use your class and test it with the same default values as with the ScalarIm.... class. > > Thank you very much. > My best regards. > > > 2015-09-22 14:27 GMT+02:00 Bradley Lowekamp : > Hello, > > Please try to keep this discussion on the mailing list. > > You can find a basic program here [1]. Which provide a good example for usage. > > It allows writing to any file format that ITK supports with vector images. I know that mha, nii, and nrrd should support this. Others may and it varies based what modules are compiled into ITK. > > You can see how the texture information is written into the vector here [2]. Contributions to improve the documentation are welcomed. > > > > [1] https://github.com/blowekamp/itkTextureAnalysis/blob/master/test/itkTextureFeatureImageFilterTest.cxx > [2] https://github.com/blowekamp/itkTextureAnalysis/blob/b3911a8ab891859c50c7e3c8819d1a9fa0eaf4af/include/itkTextureFeatureImageFilter.hxx#L217-L224 > > On Sep 22, 2015, at 3:25 AM, Francisco Lopez de la Franca wrote: > >> Hi Bradley, >> I'd like to use your class. A couple of questions: >> >> - Which format can the vectorimage generated be saved in? Is it possible to save it in Nifti format? >> >> - Which information does the vector image contain, I mean, what is the info stored for each voxel? How can I access that info? >> >> I guess the usage of yourclass is in the same way as any ITK filter: >> >> yourFilter->setInput(inputImage); >> yourFilter->setWindowSize(windowSize); >> ... // other sets... >> yourFilter->update(); >> vectorImage = yourFilter->GetOutput(); >> >> but, how can I read the data of each voxel in the vector image? >> >> Thank you very much. >> Kind regards. >> >> >> 2015-09-21 14:30 GMT+02:00 Bradley Lowekamp : >> Hello, >> >> I have a external ITK extension you may find useful: >> https://github.com/blowekamp/itkTextureAnalysis/blob/master/include/itkTextureFeatureImageFilter.h >> >> This computed the GLCM, for a neighborhood for every pixel and produces a VectorImage with all the features. >> >> Contributions to improving the class and documentation are welcome. >> >> HTH, >> Brad >> >> On Sep 21, 2015, at 7:15 AM, Francisco Lopez de la Franca wrote: >> >> > Hi, >> > I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter class with the default parameters and everything was OK. >> > >> > But now, I have to calculate the texture features of a 2D scalar image pixel by pixel, I mean, iterate over the whole image and calculate the texture features of every pixel. >> > >> > I guess I've got to use each pixel as the masked region over which to calculate the texture features, but I think this process could be very slow (I have to do it with a lot of 2D images). >> > >> > Is there a faster way to do it or isn't it possible as I've described? >> > >> > Thanks a lot. >> > Kind regards. >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Sep 25 10:22:33 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 25 Sep 2015 10:22:33 -0400 Subject: [ITK-users] Errors on warping ITK with JAVA In-Reply-To: References: <1443055847183.25635@sphic.org.cn> Message-ID: <2CC219B7-D610-4386-8E03-330D04F02D86@mail.nih.gov> Hello, If a simpler interface to ITK may meet your immediate needs. You may want to look into the SimpleITK Java binaries [1]. Brad [1] http://www.itk.org/Wiki/SimpleITK/GettingStarted#Java_binary_files On Sep 23, 2015, at 9:48 PM, Matt McCormick wrote: > Hi Zhuangming, > > There have been many improvements in the wrapping infrastructure, but > ITK's Java wrapping is not yet well tested. > > For problem 1), you may need to dig into the generated code to > understand what is happening. > > Regarding problems 2) and 3), some very long filepaths are being > generated, which Windows has difficulty handling and that can result > in confusing errors. It may be worthwhile attempting a build on Linux > or Mac to isolate the problem. Limit the path length of your build > folder so it is as short as possible. Ultimately, a strategy to limit > the path lengths may be required. > > Matt > > On Wed, Sep 23, 2015 at 8:50 PM, ??? wrote: >> Hi all, >> >> >> I would like to warp ITK with Java. So I complied CastXML and downloaded >> SWIGwin first. When I used them to compile ITK source code, I successfully >> compiled most of the source code and got some .jar such as >> org.itk.itkcommon.jar, but I still met some errors in Visual Studio 2013. >> >> >> 1. In >> ${ITK_Build}\Wrapping\Modules\ITKImageFunction\itkInterpolateImageFunctionJava.cpp(884): >> error C2440: '=' : cannot convert from 'itkInterpolateImageFunctionIVF22D *' >> to 'itkImageFunctionIVF22DD *' >> >> Types pointed to are unrelated; conversion requires >> reinterpret_cast, C-style cast or function-style cast >> >> In >> ${ITK_Build}\Wrapping\Modules\ITKImageFunction\itkInterpolateImageFunctionJava.cpp(892): >> error C2440: '=' : cannot convert from 'itkInterpolateImageFunctionIVF33D *' >> to 'itkImageFunctionIVF33DD *' >> >> Types pointed to are unrelated; conversion requires >> reinterpret_cast, C-style cast or function-style cast >> >> >> >> 2. The aforementioned errors may be cause the following errors. >> >> Unable to open file >> ${ITK_Build}\Wrapping\Generators\Java\Proxies\src\org\itk\itkmesh\SWIGTYPE_p_itk_MapContainerT_unsigned_long_itk_CellInterfaceT_double_itk_CellTraitsInfoT_2_double_float_unsigned_long_unsigned_long_unsigned_long_itk__PointT_double_2_t_itk__MapContainerT_unsigned_long_itk__PointT_double_2_t_t_std__setT_unsigned_long_std__lessT_unsigned_long_t_t_t_t_p_t.java: >> No such file or directory >> >> C:\Program Files >> (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): >> error MSB6006: "cmd.exe" exited with code 1. >> >> >> 3. And more errors shows >> >> >> ${ITK_Build}\Wrapping\Generators\Java\Proxies\src\org\itk\itkquadedgemesh\itkBoundingBoxUL2FMCULQEMPF2.java:11: >> error: package org.itk.itkmesh does not exist >> >> import org.itk.itkmesh.*;;import org.itk.itkcommon.*;;import >> org.itk.itkimagefilterbase.*;;import org.itk.itkstatistics.*;;import >> org.itk.itktransform.*;;import org.itk.itkjavabase.*; >> >> >> >> So, how can I fix those errors? Thanks! >> >> >> p.s. I use ITK 4.8.0, SWIGwin 3.0.7, and latest CastXML. >> >> >> >> >> Regards, >> >> >> Zhuangming Shen >> >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From s.serviddio at gmail.com Fri Sep 25 10:26:03 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Fri, 25 Sep 2015 16:26:03 +0200 Subject: [ITK-users] c++ implementation algorithm Message-ID: Hi, I wish modify demons metrc v4 algorithm because I want to add the mutua information to each iteration of my optimizer. in which directory or url Can I find c++ code of itkDemonsImaeToImageMetricv4.hxx ??? -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Fri Sep 25 10:32:28 2015 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Fri, 25 Sep 2015 16:32:28 +0200 (CEST) Subject: [ITK-users] [ITK] c++ implementation algorithm In-Reply-To: References: Message-ID: <724638863.8169476.1443191548812.JavaMail.zimbra@enst.fr> Hello, As any other file I think, on itk Github : https://github.com/InsightSoftwareConsortium/ITK/blob/cee10e3a21c77ecf3b1487ab991c1880da84bb69/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.hxx HTH Tim ----- Mail original ----- De: "stefano serviddio" ?: insight-users at itk.org Envoy?: Vendredi 25 Septembre 2015 16:26:03 Objet: [ITK] [ITK-users] c++ implementation algorithm Hi, I wish modify demons metrc v4 algorithm because I want to add the mutua information to each iteration of my optimizer. in which directory or url Can I find c++ code of itkDemonsImaeToImageMetricv4.hxx ??? _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From sorench at gmail.com Sun Sep 27 15:06:37 2015 From: sorench at gmail.com (Soren Christensen) Date: Sun, 27 Sep 2015 12:06:37 -0700 Subject: [ITK-users] ImageIOFactory problem Message-ID: Hi, I gave problems getting ImageIOFactory to return a valid pointer. I am trying this: itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO( testfile, itk::ImageIOFactory::ReadMode); if( !imageIO ) { std::cerr << "Could not CreateImageIO for: " << fn.toStdString().c_str() << std::endl; return 1; } I get: Could not CreateImageIO for: /tmp/itk1_014_000.mhd I can open this file with ITK snap without issues. When I do this: RegisteredObjectsContainerType registeredIOs = itk::ObjectFactoryBase::CreateAllInstance( "itkImageIOBase" ); << registeredIOs.size() << " IO objects available to the ImageFileReader.\n" << std::endl; I get: 16 IO objects available to the ImageFileReader. I build with Qt/CMake So what am I missing here? Thanks in advance! Soren -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sun Sep 27 15:46:44 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 27 Sep 2015 15:46:44 -0400 Subject: [ITK-users] ImageIOFactory problem In-Reply-To: References: Message-ID: Hi Soren, When the registered IO's are printed, do they include MetaIO? Thanks, Matt On Sun, Sep 27, 2015 at 3:06 PM, Soren Christensen wrote: > Hi, > > I gave problems getting ImageIOFactory to return a valid pointer. > > > I am trying this: > > > itk::ImageIOBase::Pointer imageIO = > > itk::ImageIOFactory::CreateImageIO( > > testfile, itk::ImageIOFactory::ReadMode); > > > if( !imageIO ) > > { > > std::cerr << "Could not CreateImageIO for: " << > fn.toStdString().c_str() << std::endl; > > return 1; > > } > > > > I get: > > Could not CreateImageIO for: /tmp/itk1_014_000.mhd > > > I can open this file with ITK snap without issues. > > > When I do this: > > > RegisteredObjectsContainerType registeredIOs = > > itk::ObjectFactoryBase::CreateAllInstance( "itkImageIOBase" ); > > << registeredIOs.size() > > << " IO objects available to the ImageFileReader.\n" << > std::endl; > > > I get: > > 16 IO objects available to the ImageFileReader. > > > I build with Qt/CMake > > > So what am I missing here? > > Thanks in advance! > > Soren > > > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From s.serviddio at gmail.com Sun Sep 27 17:56:27 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Sun, 27 Sep 2015 23:56:27 +0200 Subject: [ITK-users] Symmetric Demons registration Message-ID: HI, I have always the same issue with my demons registration code, "Inputs do not occupy the same physical space". the fixed image is a Ct 512x512 dicom and the second one is a Pet 256x256 dicom. May you help me to find out what is the problem? Thank you very much. #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include #include #include "itkSymmetricForcesDemonsRegistrationFilter.h" #include "itkHistogramMatchingImageFilter.h" #include "itkCastImageFilter.h" #include "itkWarpImageFilter.h" #include "itkGDCMImageIO.h" #include "itkShrinkImageFilter.h" class CommandIterationUpdate : public itk::Command { public: typedef CommandIterationUpdate Self; typedef itk::Command Superclass; typedef itk::SmartPointer Pointer; itkNewMacro( CommandIterationUpdate ); protected: CommandIterationUpdate() {}; typedef itk::Image< double, 2 > InternalImageType; typedef itk::Vector< double, 2 > VectorPixelType; typedef itk::Image< VectorPixelType, 2 > DisplacementFieldType; typedef itk::SymmetricForcesDemonsRegistrationFilter< InternalImageType, InternalImageType, DisplacementFieldType> RegistrationFilterType; public: void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE { Execute( (const itk::Object *)caller, event); } void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE { const RegistrationFilterType * filter = static_cast< const RegistrationFilterType * >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) { return; } std::cout << filter->GetMetric() << std::endl; } }; int main( int argc, char *argv[] ) { /*if( argc < 4 ) { std::cerr << "Missing Parameters " << std::endl; std::cerr << "Usage: " << argv[0]; std::cerr << " fixedImageFile movingImageFile "; std::cerr << " outputImageFile " << std::endl; std::cerr << " [outputDisplacementFieldFile] " << std::endl; return EXIT_FAILURE; }*/ time_t now = time(0); struct tm tstruct; char buf[80]; tstruct = *localtime(&now); strftime(buf, sizeof(buf), "%Y-%m-%d %X", &tstruct); std::ofstream resultfile; char Risultati[] = "D:/Images/MetricResultDeformaion.txt"; resultfile.open(Risultati, std::ios::app); if (resultfile.is_open()) { std::cout << "File Open exists\n"; } resultfile<<"Data :"< FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; typedef itk::ImageFileReader< FixedImageType > FixedImageReaderType; typedef itk::ImageFileReader< MovingImageType > MovingImageReaderType; typedef itk::GDCMImageIO GDCMType; GDCMType::Pointer gdcm=GDCMType::New(); FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); char* filename1="D:/Images/def00001.dcm"; char* filename2="D:/Images/def100001.dcm"; fixedImageReader->SetFileName( filename1 ); movingImageReader->SetFileName( filename2 ); fixedImageReader->SetImageIO(gdcm); movingImageReader->SetImageIO(gdcm); resultfile<Update(); movingImageReader->Update(); typedef itk::ShrinkImageFilter ShrinkFilterType; ShrinkFilterType::Pointer shrinkFilter = ShrinkFilterType::New(); shrinkFilter->SetShrinkFactors( 2 ); shrinkFilter->SetInput( fixedImageReader->GetOutput() ); shrinkFilter->Update(); typedef double InternalPixelType; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; typedef itk::CastImageFilter< FixedImageType, InternalImageType > FixedImageCasterType; typedef itk::CastImageFilter< MovingImageType, InternalImageType > MovingImageCasterType; FixedImageCasterType::Pointer fixedImageCaster = FixedImageCasterType::New(); MovingImageCasterType::Pointer movingImageCaster= MovingImageCasterType::New(); fixedImageCaster->SetInput( shrinkFilter->GetOutput() ); movingImageCaster->SetInput( fixedImageReader->GetOutput() ); fixedImageCaster->Update(); movingImageCaster->Update(); typedef itk::HistogramMatchingImageFilter< InternalImageType,InternalImageType > MatchingFilterType; MatchingFilterType::Pointer matcher = MatchingFilterType::New(); matcher->SetInput( movingImageCaster->GetOutput() ); matcher->SetReferenceImage( fixedImageCaster->GetOutput() ); matcher->SetNumberOfHistogramLevels(1024); matcher->SetNumberOfMatchPoints(7 ); matcher->ThresholdAtMeanIntensityOn(); typedef itk::Vector< double, Dimension > VectorPixelType; typedef itk::Image< VectorPixelType, Dimension > DisplacementFieldType; typedef itk::SymmetricForcesDemonsRegistrationFilter RegistrationFilterType; RegistrationFilterType::Pointer filter = RegistrationFilterType::New(); CommandIterationUpdate::Pointer observer = CommandIterationUpdate::New(); filter->AddObserver( itk::IterationEvent(), observer ); filter->SetFixedImage( fixedImageCaster->GetOutput() ); filter->SetMovingImage( matcher->GetOutput()); filter->SetNumberOfIterations( 256 ); filter->SetStandardDeviations( 4.0 ); try { filter->Update(); } catch( itk::ExceptionObject & err ) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; return EXIT_FAILURE; } typedef itk::WarpImageFilter< MovingImageType, MovingImageType, DisplacementFieldType > WarperType; typedef itk::LinearInterpolateImageFunction< MovingImageType, double > InterpolatorType; WarperType::Pointer warper = WarperType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); warper->SetInput( movingImageReader->GetOutput() ); warper->SetInterpolator( interpolator ); warper->SetOutputSpacing( fixedImage->GetSpacing() ); warper->SetOutputOrigin( fixedImage->GetOrigin() ); warper->SetOutputDirection( fixedImage->GetDirection() ); warper->SetDisplacementField( filter->GetOutput() ); warper->Update(); typedef unsigned char OutputPixelType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::CastImageFilter< MovingImageType, OutputImageType > CastFilterType; typedef itk::ImageFileWriter< OutputImageType > WriterType; WriterType::Pointer writer = WriterType::New(); CastFilterType::Pointer caster = CastFilterType::New(); std::cout<<"last metric value "<GetMetric()<GetMetric()<SetFileName( "D:/Images/new.dcm" ); caster->SetInput( warper->GetOutput() ); caster->Update(); writer->SetInput( caster->GetOutput() ); writer->SetImageIO(gdcm); writer->Update(); return EXIT_SUCCESS; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sun Sep 27 18:10:17 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 27 Sep 2015 18:10:17 -0400 Subject: [ITK-users] Symmetric Demons registration In-Reply-To: References: Message-ID: Hi Stefano, The means that the images must occupy the same spatial domain. The domain is determined by the Origin, Spacing, Direction, and ImageRegion Size of the Image's. This is explained more in the ITK Software Guide: http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch4.html#x40-430004 HTH, Matt On Sun, Sep 27, 2015 at 5:56 PM, stefano serviddio wrote: > HI, > I have always the same issue with my demons registration code, "Inputs do > not occupy the same physical space". > the fixed image is a Ct 512x512 dicom and the second one is a Pet 256x256 > dicom. > May you help me to find out what is the problem? > Thank you very much. > > > > #include "itkImageFileReader.h" > #include "itkImageFileWriter.h" > #include > #include > #include "itkSymmetricForcesDemonsRegistrationFilter.h" > #include "itkHistogramMatchingImageFilter.h" > #include "itkCastImageFilter.h" > #include "itkWarpImageFilter.h" > > #include "itkGDCMImageIO.h" > #include "itkShrinkImageFilter.h" > > > > class CommandIterationUpdate : public itk::Command > { > public: > typedef CommandIterationUpdate Self; > typedef itk::Command Superclass; > typedef itk::SmartPointer Pointer; > itkNewMacro( CommandIterationUpdate ); > protected: > CommandIterationUpdate() {}; > > typedef itk::Image< double, 2 > InternalImageType; > typedef itk::Vector< double, 2 > VectorPixelType; > typedef itk::Image< VectorPixelType, 2 > DisplacementFieldType; > > typedef itk::SymmetricForcesDemonsRegistrationFilter< > InternalImageType, > InternalImageType, > DisplacementFieldType> > RegistrationFilterType; > > public: > > void Execute(itk::Object *caller, const itk::EventObject & event) > ITK_OVERRIDE > { > Execute( (const itk::Object *)caller, event); > } > > void Execute(const itk::Object * object, const itk::EventObject & event) > ITK_OVERRIDE > { > const RegistrationFilterType * filter = static_cast< const > RegistrationFilterType * >( object ); > if( !(itk::IterationEvent().CheckEvent( &event )) ) > { > return; > } > std::cout << filter->GetMetric() << std::endl; > } > }; > > > int main( int argc, char *argv[] ) > { > /*if( argc < 4 ) > { > std::cerr << "Missing Parameters " << std::endl; > std::cerr << "Usage: " << argv[0]; > std::cerr << " fixedImageFile movingImageFile "; > std::cerr << " outputImageFile " << std::endl; > std::cerr << " [outputDisplacementFieldFile] " << std::endl; > return EXIT_FAILURE; > }*/ > > > time_t now = time(0); > struct tm tstruct; > char buf[80]; > tstruct = *localtime(&now); > strftime(buf, sizeof(buf), "%Y-%m-%d %X", &tstruct); > > std::ofstream resultfile; > char Risultati[] = "D:/Images/MetricResultDeformaion.txt"; > > resultfile.open(Risultati, std::ios::app); > if (resultfile.is_open()) > { > std::cout << "File Open exists\n"; > > } > > resultfile<<"Data :"< > > > > const unsigned int Dimension = 2; > typedef unsigned int PixelType; > > typedef itk::Image< PixelType, Dimension > FixedImageType; > typedef itk::Image< PixelType, Dimension > MovingImageType; > > > > > typedef itk::ImageFileReader< FixedImageType > FixedImageReaderType; > typedef itk::ImageFileReader< MovingImageType > MovingImageReaderType; > typedef itk::GDCMImageIO GDCMType; > GDCMType::Pointer gdcm=GDCMType::New(); > FixedImageReaderType::Pointer fixedImageReader = > FixedImageReaderType::New(); > MovingImageReaderType::Pointer movingImageReader = > MovingImageReaderType::New(); > > char* filename1="D:/Images/def00001.dcm"; > char* filename2="D:/Images/def100001.dcm"; > fixedImageReader->SetFileName( filename1 ); > movingImageReader->SetFileName( filename2 ); > fixedImageReader->SetImageIO(gdcm); > movingImageReader->SetImageIO(gdcm); > > resultfile< resultfile< > fixedImageReader->Update(); > movingImageReader->Update(); > > typedef itk::ShrinkImageFilter > ShrinkFilterType; > ShrinkFilterType::Pointer shrinkFilter = ShrinkFilterType::New(); > shrinkFilter->SetShrinkFactors( 2 ); > shrinkFilter->SetInput( fixedImageReader->GetOutput() ); > shrinkFilter->Update(); > > typedef double InternalPixelType; > typedef itk::Image< InternalPixelType, Dimension > InternalImageType; > typedef itk::CastImageFilter< FixedImageType, InternalImageType > > FixedImageCasterType; > typedef itk::CastImageFilter< MovingImageType, InternalImageType > > MovingImageCasterType; > > FixedImageCasterType::Pointer fixedImageCaster = > FixedImageCasterType::New(); > MovingImageCasterType::Pointer movingImageCaster= > MovingImageCasterType::New(); > > fixedImageCaster->SetInput( shrinkFilter->GetOutput() ); > movingImageCaster->SetInput( fixedImageReader->GetOutput() ); > > fixedImageCaster->Update(); > movingImageCaster->Update(); > > typedef itk::HistogramMatchingImageFilter< > InternalImageType,InternalImageType > MatchingFilterType; > MatchingFilterType::Pointer matcher = MatchingFilterType::New(); > > matcher->SetInput( movingImageCaster->GetOutput() ); > > matcher->SetReferenceImage( fixedImageCaster->GetOutput() ); > > > matcher->SetNumberOfHistogramLevels(1024); > matcher->SetNumberOfMatchPoints(7 ); > > > matcher->ThresholdAtMeanIntensityOn(); > > typedef itk::Vector< double, Dimension > VectorPixelType; > typedef itk::Image< VectorPixelType, Dimension > DisplacementFieldType; > > > > typedef > itk::SymmetricForcesDemonsRegistrationFilter DisplacementFieldType> RegistrationFilterType; > RegistrationFilterType::Pointer filter = RegistrationFilterType::New(); > > > > CommandIterationUpdate::Pointer observer = CommandIterationUpdate::New(); > filter->AddObserver( itk::IterationEvent(), observer ); > > > > filter->SetFixedImage( fixedImageCaster->GetOutput() ); > filter->SetMovingImage( matcher->GetOutput()); > filter->SetNumberOfIterations( 256 ); > filter->SetStandardDeviations( 4.0 ); > > > > try > { > filter->Update(); > } > catch( itk::ExceptionObject & err ) > { > std::cerr << "ExceptionObject caught !" << std::endl; > std::cerr << err << std::endl; > return EXIT_FAILURE; > } > > > typedef itk::WarpImageFilter< MovingImageType, MovingImageType, > DisplacementFieldType > WarperType; > typedef itk::LinearInterpolateImageFunction< MovingImageType, double > > InterpolatorType; > WarperType::Pointer warper = WarperType::New(); > InterpolatorType::Pointer interpolator = InterpolatorType::New(); > FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); > > warper->SetInput( movingImageReader->GetOutput() ); > warper->SetInterpolator( interpolator ); > warper->SetOutputSpacing( fixedImage->GetSpacing() ); > warper->SetOutputOrigin( fixedImage->GetOrigin() ); > warper->SetOutputDirection( fixedImage->GetDirection() ); > > warper->SetDisplacementField( filter->GetOutput() ); > > warper->Update(); > > > > typedef unsigned char OutputPixelType; > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > typedef itk::CastImageFilter< > MovingImageType, > OutputImageType > CastFilterType; > typedef itk::ImageFileWriter< OutputImageType > WriterType; > > WriterType::Pointer writer = WriterType::New(); > CastFilterType::Pointer caster = CastFilterType::New(); > > > > > > > > std::cout<<"last metric value "<GetMetric()< resultfile<<"last metric value "<GetMetric()< writer->SetFileName( "D:/Images/new.dcm" ); > > caster->SetInput( warper->GetOutput() ); > caster->Update(); > writer->SetInput( caster->GetOutput() ); > writer->SetImageIO(gdcm); > writer->Update(); > > > return EXIT_SUCCESS; > } > > > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From s.serviddio at gmail.com Sun Sep 27 18:56:00 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Mon, 28 Sep 2015 00:56:00 +0200 Subject: [ITK-users] Symmetric Demons registration In-Reply-To: References: Message-ID: Hi Matt, I have added this code: " Image2->SetOrigin(Image1->GetOrigin()); Image2->SetSpacing(Image1->GetSpacing()); Image2->SetDirection(Image1->GetDirection());" but the problem remain the same. 2015-09-28 0:10 GMT+02:00 Matt McCormick : > Hi Stefano, > > The means that the images must occupy the same spatial domain. The > domain is determined by the Origin, Spacing, Direction, and > ImageRegion Size of the Image's. This is explained more in the ITK > Software Guide: > > > http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch4.html#x40-430004 > > HTH, > Matt > > On Sun, Sep 27, 2015 at 5:56 PM, stefano serviddio > wrote: > > HI, > > I have always the same issue with my demons registration code, "Inputs do > > not occupy the same physical space". > > the fixed image is a Ct 512x512 dicom and the second one is a Pet > 256x256 > > dicom. > > May you help me to find out what is the problem? > > Thank you very much. > > > > > > > > #include "itkImageFileReader.h" > > #include "itkImageFileWriter.h" > > #include > > #include > > #include "itkSymmetricForcesDemonsRegistrationFilter.h" > > #include "itkHistogramMatchingImageFilter.h" > > #include "itkCastImageFilter.h" > > #include "itkWarpImageFilter.h" > > > > #include "itkGDCMImageIO.h" > > #include "itkShrinkImageFilter.h" > > > > > > > > class CommandIterationUpdate : public itk::Command > > { > > public: > > typedef CommandIterationUpdate Self; > > typedef itk::Command Superclass; > > typedef itk::SmartPointer Pointer; > > itkNewMacro( CommandIterationUpdate ); > > protected: > > CommandIterationUpdate() {}; > > > > typedef itk::Image< double, 2 > InternalImageType; > > typedef itk::Vector< double, 2 > VectorPixelType; > > typedef itk::Image< VectorPixelType, 2 > DisplacementFieldType; > > > > typedef itk::SymmetricForcesDemonsRegistrationFilter< > > InternalImageType, > > InternalImageType, > > DisplacementFieldType> > > RegistrationFilterType; > > > > public: > > > > void Execute(itk::Object *caller, const itk::EventObject & event) > > ITK_OVERRIDE > > { > > Execute( (const itk::Object *)caller, event); > > } > > > > void Execute(const itk::Object * object, const itk::EventObject & > event) > > ITK_OVERRIDE > > { > > const RegistrationFilterType * filter = static_cast< const > > RegistrationFilterType * >( object ); > > if( !(itk::IterationEvent().CheckEvent( &event )) ) > > { > > return; > > } > > std::cout << filter->GetMetric() << std::endl; > > } > > }; > > > > > > int main( int argc, char *argv[] ) > > { > > /*if( argc < 4 ) > > { > > std::cerr << "Missing Parameters " << std::endl; > > std::cerr << "Usage: " << argv[0]; > > std::cerr << " fixedImageFile movingImageFile "; > > std::cerr << " outputImageFile " << std::endl; > > std::cerr << " [outputDisplacementFieldFile] " << std::endl; > > return EXIT_FAILURE; > > }*/ > > > > > > time_t now = time(0); > > struct tm tstruct; > > char buf[80]; > > tstruct = *localtime(&now); > > strftime(buf, sizeof(buf), "%Y-%m-%d %X", &tstruct); > > > > std::ofstream resultfile; > > char Risultati[] = "D:/Images/MetricResultDeformaion.txt"; > > > > resultfile.open(Risultati, std::ios::app); > > if (resultfile.is_open()) > > { > > std::cout << "File Open exists\n"; > > > > } > > > > resultfile<<"Data :"< > > > > > > > > > const unsigned int Dimension = 2; > > typedef unsigned int PixelType; > > > > typedef itk::Image< PixelType, Dimension > FixedImageType; > > typedef itk::Image< PixelType, Dimension > MovingImageType; > > > > > > > > > > typedef itk::ImageFileReader< FixedImageType > FixedImageReaderType; > > typedef itk::ImageFileReader< MovingImageType > MovingImageReaderType; > > typedef itk::GDCMImageIO GDCMType; > > GDCMType::Pointer gdcm=GDCMType::New(); > > FixedImageReaderType::Pointer fixedImageReader = > > FixedImageReaderType::New(); > > MovingImageReaderType::Pointer movingImageReader = > > MovingImageReaderType::New(); > > > > char* filename1="D:/Images/def00001.dcm"; > > char* filename2="D:/Images/def100001.dcm"; > > fixedImageReader->SetFileName( filename1 ); > > movingImageReader->SetFileName( filename2 ); > > fixedImageReader->SetImageIO(gdcm); > > movingImageReader->SetImageIO(gdcm); > > > > resultfile< > resultfile< > > > fixedImageReader->Update(); > > movingImageReader->Update(); > > > > typedef itk::ShrinkImageFilter > > ShrinkFilterType; > > ShrinkFilterType::Pointer shrinkFilter = ShrinkFilterType::New(); > > shrinkFilter->SetShrinkFactors( 2 ); > > shrinkFilter->SetInput( fixedImageReader->GetOutput() ); > > shrinkFilter->Update(); > > > > typedef double InternalPixelType; > > typedef itk::Image< InternalPixelType, Dimension > InternalImageType; > > typedef itk::CastImageFilter< FixedImageType, InternalImageType > > > FixedImageCasterType; > > typedef itk::CastImageFilter< MovingImageType, InternalImageType > > > MovingImageCasterType; > > > > FixedImageCasterType::Pointer fixedImageCaster = > > FixedImageCasterType::New(); > > MovingImageCasterType::Pointer movingImageCaster= > > MovingImageCasterType::New(); > > > > fixedImageCaster->SetInput( shrinkFilter->GetOutput() ); > > movingImageCaster->SetInput( fixedImageReader->GetOutput() ); > > > > fixedImageCaster->Update(); > > movingImageCaster->Update(); > > > > typedef itk::HistogramMatchingImageFilter< > > InternalImageType,InternalImageType > MatchingFilterType; > > MatchingFilterType::Pointer matcher = MatchingFilterType::New(); > > > > matcher->SetInput( movingImageCaster->GetOutput() ); > > > > matcher->SetReferenceImage( fixedImageCaster->GetOutput() ); > > > > > > matcher->SetNumberOfHistogramLevels(1024); > > matcher->SetNumberOfMatchPoints(7 ); > > > > > > matcher->ThresholdAtMeanIntensityOn(); > > > > typedef itk::Vector< double, Dimension > VectorPixelType; > > typedef itk::Image< VectorPixelType, Dimension > > DisplacementFieldType; > > > > > > > > typedef > > > itk::SymmetricForcesDemonsRegistrationFilter > DisplacementFieldType> RegistrationFilterType; > > RegistrationFilterType::Pointer filter = RegistrationFilterType::New(); > > > > > > > > CommandIterationUpdate::Pointer observer = > CommandIterationUpdate::New(); > > filter->AddObserver( itk::IterationEvent(), observer ); > > > > > > > > filter->SetFixedImage( fixedImageCaster->GetOutput() ); > > filter->SetMovingImage( matcher->GetOutput()); > > filter->SetNumberOfIterations( 256 ); > > filter->SetStandardDeviations( 4.0 ); > > > > > > > > try > > { > > filter->Update(); > > } > > catch( itk::ExceptionObject & err ) > > { > > std::cerr << "ExceptionObject caught !" << std::endl; > > std::cerr << err << std::endl; > > return EXIT_FAILURE; > > } > > > > > > typedef itk::WarpImageFilter< MovingImageType, MovingImageType, > > DisplacementFieldType > WarperType; > > typedef itk::LinearInterpolateImageFunction< MovingImageType, double > > > > InterpolatorType; > > WarperType::Pointer warper = WarperType::New(); > > InterpolatorType::Pointer interpolator = InterpolatorType::New(); > > FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); > > > > warper->SetInput( movingImageReader->GetOutput() ); > > warper->SetInterpolator( interpolator ); > > warper->SetOutputSpacing( fixedImage->GetSpacing() ); > > warper->SetOutputOrigin( fixedImage->GetOrigin() ); > > warper->SetOutputDirection( fixedImage->GetDirection() ); > > > > warper->SetDisplacementField( filter->GetOutput() ); > > > > warper->Update(); > > > > > > > > typedef unsigned char OutputPixelType; > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > typedef itk::CastImageFilter< > > MovingImageType, > > OutputImageType > CastFilterType; > > typedef itk::ImageFileWriter< OutputImageType > WriterType; > > > > WriterType::Pointer writer = WriterType::New(); > > CastFilterType::Pointer caster = CastFilterType::New(); > > > > > > > > > > > > > > > > std::cout<<"last metric value "<GetMetric()< > resultfile<<"last metric value "<GetMetric()< > writer->SetFileName( "D:/Images/new.dcm" ); > > > > caster->SetInput( warper->GetOutput() ); > > caster->Update(); > > writer->SetInput( caster->GetOutput() ); > > writer->SetImageIO(gdcm); > > writer->Update(); > > > > > > return EXIT_SUCCESS; > > } > > > > > > > > > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sun Sep 27 19:16:19 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 27 Sep 2015 19:16:19 -0400 Subject: [ITK-users] Symmetric Demons registration In-Reply-To: References: Message-ID: During the pipeline updates, these may be reset. But, the Size's have to be the same, too. One of the images may have to be resampled with the ResampleImageFilter. HTH, Matt On Sun, Sep 27, 2015 at 6:56 PM, stefano serviddio wrote: > Hi Matt, > I have added this code: > " > Image2->SetOrigin(Image1->GetOrigin()); > Image2->SetSpacing(Image1->GetSpacing()); > Image2->SetDirection(Image1->GetDirection());" > but the problem remain the same. > > 2015-09-28 0:10 GMT+02:00 Matt McCormick : >> >> Hi Stefano, >> >> The means that the images must occupy the same spatial domain. The >> domain is determined by the Origin, Spacing, Direction, and >> ImageRegion Size of the Image's. This is explained more in the ITK >> Software Guide: >> >> >> http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch4.html#x40-430004 >> >> HTH, >> Matt >> >> On Sun, Sep 27, 2015 at 5:56 PM, stefano serviddio >> wrote: >> > HI, >> > I have always the same issue with my demons registration code, "Inputs >> > do >> > not occupy the same physical space". >> > the fixed image is a Ct 512x512 dicom and the second one is a Pet >> > 256x256 >> > dicom. >> > May you help me to find out what is the problem? >> > Thank you very much. >> > >> > >> > >> > #include "itkImageFileReader.h" >> > #include "itkImageFileWriter.h" >> > #include >> > #include >> > #include "itkSymmetricForcesDemonsRegistrationFilter.h" >> > #include "itkHistogramMatchingImageFilter.h" >> > #include "itkCastImageFilter.h" >> > #include "itkWarpImageFilter.h" >> > >> > #include "itkGDCMImageIO.h" >> > #include "itkShrinkImageFilter.h" >> > >> > >> > >> > class CommandIterationUpdate : public itk::Command >> > { >> > public: >> > typedef CommandIterationUpdate Self; >> > typedef itk::Command Superclass; >> > typedef itk::SmartPointer Pointer; >> > itkNewMacro( CommandIterationUpdate ); >> > protected: >> > CommandIterationUpdate() {}; >> > >> > typedef itk::Image< double, 2 > InternalImageType; >> > typedef itk::Vector< double, 2 > VectorPixelType; >> > typedef itk::Image< VectorPixelType, 2 > DisplacementFieldType; >> > >> > typedef itk::SymmetricForcesDemonsRegistrationFilter< >> > InternalImageType, >> > InternalImageType, >> > DisplacementFieldType> >> > RegistrationFilterType; >> > >> > public: >> > >> > void Execute(itk::Object *caller, const itk::EventObject & event) >> > ITK_OVERRIDE >> > { >> > Execute( (const itk::Object *)caller, event); >> > } >> > >> > void Execute(const itk::Object * object, const itk::EventObject & >> > event) >> > ITK_OVERRIDE >> > { >> > const RegistrationFilterType * filter = static_cast< const >> > RegistrationFilterType * >( object ); >> > if( !(itk::IterationEvent().CheckEvent( &event )) ) >> > { >> > return; >> > } >> > std::cout << filter->GetMetric() << std::endl; >> > } >> > }; >> > >> > >> > int main( int argc, char *argv[] ) >> > { >> > /*if( argc < 4 ) >> > { >> > std::cerr << "Missing Parameters " << std::endl; >> > std::cerr << "Usage: " << argv[0]; >> > std::cerr << " fixedImageFile movingImageFile "; >> > std::cerr << " outputImageFile " << std::endl; >> > std::cerr << " [outputDisplacementFieldFile] " << std::endl; >> > return EXIT_FAILURE; >> > }*/ >> > >> > >> > time_t now = time(0); >> > struct tm tstruct; >> > char buf[80]; >> > tstruct = *localtime(&now); >> > strftime(buf, sizeof(buf), "%Y-%m-%d %X", &tstruct); >> > >> > std::ofstream resultfile; >> > char Risultati[] = "D:/Images/MetricResultDeformaion.txt"; >> > >> > resultfile.open(Risultati, std::ios::app); >> > if (resultfile.is_open()) >> > { >> > std::cout << "File Open exists\n"; >> > >> > } >> > >> > resultfile<<"Data :"<> > >> > >> > >> > >> > const unsigned int Dimension = 2; >> > typedef unsigned int PixelType; >> > >> > typedef itk::Image< PixelType, Dimension > FixedImageType; >> > typedef itk::Image< PixelType, Dimension > MovingImageType; >> > >> > >> > >> > >> > typedef itk::ImageFileReader< FixedImageType > FixedImageReaderType; >> > typedef itk::ImageFileReader< MovingImageType > MovingImageReaderType; >> > typedef itk::GDCMImageIO GDCMType; >> > GDCMType::Pointer gdcm=GDCMType::New(); >> > FixedImageReaderType::Pointer fixedImageReader = >> > FixedImageReaderType::New(); >> > MovingImageReaderType::Pointer movingImageReader = >> > MovingImageReaderType::New(); >> > >> > char* filename1="D:/Images/def00001.dcm"; >> > char* filename2="D:/Images/def100001.dcm"; >> > fixedImageReader->SetFileName( filename1 ); >> > movingImageReader->SetFileName( filename2 ); >> > fixedImageReader->SetImageIO(gdcm); >> > movingImageReader->SetImageIO(gdcm); >> > >> > resultfile<> > resultfile<> > >> > fixedImageReader->Update(); >> > movingImageReader->Update(); >> > >> > typedef itk::ShrinkImageFilter >> > ShrinkFilterType; >> > ShrinkFilterType::Pointer shrinkFilter = ShrinkFilterType::New(); >> > shrinkFilter->SetShrinkFactors( 2 ); >> > shrinkFilter->SetInput( fixedImageReader->GetOutput() ); >> > shrinkFilter->Update(); >> > >> > typedef double InternalPixelType; >> > typedef itk::Image< InternalPixelType, Dimension > InternalImageType; >> > typedef itk::CastImageFilter< FixedImageType, InternalImageType > >> > FixedImageCasterType; >> > typedef itk::CastImageFilter< MovingImageType, InternalImageType > >> > MovingImageCasterType; >> > >> > FixedImageCasterType::Pointer fixedImageCaster = >> > FixedImageCasterType::New(); >> > MovingImageCasterType::Pointer movingImageCaster= >> > MovingImageCasterType::New(); >> > >> > fixedImageCaster->SetInput( shrinkFilter->GetOutput() ); >> > movingImageCaster->SetInput( fixedImageReader->GetOutput() ); >> > >> > fixedImageCaster->Update(); >> > movingImageCaster->Update(); >> > >> > typedef itk::HistogramMatchingImageFilter< >> > InternalImageType,InternalImageType > MatchingFilterType; >> > MatchingFilterType::Pointer matcher = MatchingFilterType::New(); >> > >> > matcher->SetInput( movingImageCaster->GetOutput() ); >> > >> > matcher->SetReferenceImage( fixedImageCaster->GetOutput() ); >> > >> > >> > matcher->SetNumberOfHistogramLevels(1024); >> > matcher->SetNumberOfMatchPoints(7 ); >> > >> > >> > matcher->ThresholdAtMeanIntensityOn(); >> > >> > typedef itk::Vector< double, Dimension > VectorPixelType; >> > typedef itk::Image< VectorPixelType, Dimension > >> > DisplacementFieldType; >> > >> > >> > >> > typedef >> > >> > itk::SymmetricForcesDemonsRegistrationFilter> > DisplacementFieldType> RegistrationFilterType; >> > RegistrationFilterType::Pointer filter = >> > RegistrationFilterType::New(); >> > >> > >> > >> > CommandIterationUpdate::Pointer observer = >> > CommandIterationUpdate::New(); >> > filter->AddObserver( itk::IterationEvent(), observer ); >> > >> > >> > >> > filter->SetFixedImage( fixedImageCaster->GetOutput() ); >> > filter->SetMovingImage( matcher->GetOutput()); >> > filter->SetNumberOfIterations( 256 ); >> > filter->SetStandardDeviations( 4.0 ); >> > >> > >> > >> > try >> > { >> > filter->Update(); >> > } >> > catch( itk::ExceptionObject & err ) >> > { >> > std::cerr << "ExceptionObject caught !" << std::endl; >> > std::cerr << err << std::endl; >> > return EXIT_FAILURE; >> > } >> > >> > >> > typedef itk::WarpImageFilter< MovingImageType, MovingImageType, >> > DisplacementFieldType > WarperType; >> > typedef itk::LinearInterpolateImageFunction< MovingImageType, double >> > > >> > InterpolatorType; >> > WarperType::Pointer warper = WarperType::New(); >> > InterpolatorType::Pointer interpolator = InterpolatorType::New(); >> > FixedImageType::Pointer fixedImage = fixedImageReader->GetOutput(); >> > >> > warper->SetInput( movingImageReader->GetOutput() ); >> > warper->SetInterpolator( interpolator ); >> > warper->SetOutputSpacing( fixedImage->GetSpacing() ); >> > warper->SetOutputOrigin( fixedImage->GetOrigin() ); >> > warper->SetOutputDirection( fixedImage->GetDirection() ); >> > >> > warper->SetDisplacementField( filter->GetOutput() ); >> > >> > warper->Update(); >> > >> > >> > >> > typedef unsigned char OutputPixelType; >> > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> > typedef itk::CastImageFilter< >> > MovingImageType, >> > OutputImageType > CastFilterType; >> > typedef itk::ImageFileWriter< OutputImageType > WriterType; >> > >> > WriterType::Pointer writer = WriterType::New(); >> > CastFilterType::Pointer caster = CastFilterType::New(); >> > >> > >> > >> > >> > >> > >> > >> > std::cout<<"last metric value "<GetMetric()<> > resultfile<<"last metric value "<GetMetric()<> > writer->SetFileName( "D:/Images/new.dcm" ); >> > >> > caster->SetInput( warper->GetOutput() ); >> > caster->Update(); >> > writer->SetInput( caster->GetOutput() ); >> > writer->SetImageIO(gdcm); >> > writer->Update(); >> > >> > >> > return EXIT_SUCCESS; >> > } >> > >> > >> > >> > >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > > > From s120049 at e.ntu.edu.sg Mon Sep 28 00:56:51 2015 From: s120049 at e.ntu.edu.sg (geetha) Date: Sun, 27 Sep 2015 21:56:51 -0700 (MST) Subject: [ITK-users] Saving deformation field in vector container Message-ID: <1443416211303-7587905.post@n2.nabble.com> Hi, I am registering images through diffeomorphic demons filter and tying to save the deformation field in vector containers. I saved registration transforms of other rigid registrations in vector containers and it was successful. However, trying to save deformation field in container always result in abrupt crashing of program. I was able to save deformation field, only transferring it into container is a problem. Unfortunately, even with catch I couldn't get any specifics of error. What am I missing? (My code for displacement field vector container and updating in container) const unsigned int Dimension = 3; typedef itk::Vector< float, Dimension > VectorType; typedef itk::Image< VectorType, Dimension > DisplacementFieldType; typedef itk::VectorContainerDFTransformContainerType; DFTransformContainerType::Pointer DeffieldContainer = DFTransformContainerType::New() ; //My output from registration stored in 'deffield' defField = ddfilter->GetDeformationField(); DeffieldContainer->SetElement( inputId++ , defField ); -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Saving-deformation-field-in-vector-container-tp7587905.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From itkhelpacc at gmail.com Mon Sep 28 01:37:37 2015 From: itkhelpacc at gmail.com (vis) Date: Sun, 27 Sep 2015 22:37:37 -0700 (MST) Subject: [ITK-users] what is the function of BinaryImageToLevelSetImageAdaptor? Message-ID: <1443418657675-7587906.post@n2.nabble.com> hey all, i was working on a project and came across something called "BinaryImageToLevelSetImageAdaptor" can anyone please tell me what does this do?? regards vis -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/what-is-the-function-of-BinaryImageToLevelSetImageAdaptor-tp7587906.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From itkhelpacc at gmail.com Mon Sep 28 02:10:21 2015 From: itkhelpacc at gmail.com (vis) Date: Sun, 27 Sep 2015 23:10:21 -0700 (MST) Subject: [ITK-users] Entropy Feature image and Active contour for bone segmentation Message-ID: <1443420621809-7587907.post@n2.nabble.com> hey all, Im working on a project wherein I have segment out the bone structures in the Xray images... during my literature survey i came across this paper "Entropy-Based Automatic Segmentation of Bones in Digital X-ray Images by Oishila Bandyopadhyay", here they replace every pixel in the input image by the entropy value of 3x3 neighbouring pixels and a feature image is produced.. and then this feature image is threshold using Otsu technique... my question can we give this feature image as an input to geodesic active contour filter for segmentation? pls advice... regards vis -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Entropy-Feature-image-and-Active-contour-for-bone-segmentation-tp7587907.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From arnaudgelas at gmail.com Mon Sep 28 03:04:22 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Mon, 28 Sep 2015 09:04:22 +0200 Subject: [ITK-users] what is the function of BinaryImageToLevelSetImageAdaptor? In-Reply-To: <1443418657675-7587906.post@n2.nabble.com> References: <1443418657675-7587906.post@n2.nabble.com> Message-ID: Hi vis, This class converts one binary image into one level-set. Note that the level set type should inherits from itk::LevelSetImage... I have just submitted a patch here: http://review.source.kitware.com/#/c/20233/ HTH Arnaud On Mon, Sep 28, 2015 at 7:37 AM, vis wrote: > hey all, > i was working on a project and came across something called > "BinaryImageToLevelSetImageAdaptor" can anyone please tell me what does > this > do?? > regards > vis > > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/what-is-the-function-of-BinaryImageToLevelSetImageAdaptor-tp7587906.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Mon Sep 28 05:53:56 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Mon, 28 Sep 2015 11:53:56 +0200 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> Message-ID: Hi Bradley, I'm using your filter for a 3D image and the following is happpening: I store in a vector the offset list. When I print it, the list contains just 13 offsets (I've used the same code as in the itk::ScalarImageToTextureImageFilter). The problem comes when I call your SetOffsets(myOffsetList) method, my application starts printing a lot of offsets, I guess all the possible combinations for three dimensions. Do you know this "problem"? Then, what is the real offsets your filter use? Thank you so much. Kind regards. /Francisco 2015-09-25 15:10 GMT+02:00 Bradley Lowekamp : > Hello, > > For my itkTextureFeatureImageFilter, the default for the OffsetVector is > an empty list. So it is required to set this member to get meaningful > results. > > ITK is an OpenSource project. When you don't know how something is > implemented you can open the hood and find out [1]. > > HTH, > Brad > > [1] > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx#L66-L76 > > On Sep 25, 2015, at 6:37 AM, Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com> wrote: > > Which directions (for 3D images) will your filter use if I donot specify > any offset? > > 2015-09-25 11:12 GMT+02:00 Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com>: > >> Hi again, >> >> For 3D images, what should I use as default offset vector if I use your >> class? >> >> I've been using itk::ScalarImageToTextureFeaturesFilter for 3D images and >> I've also done some tests on 3D NIFTI images but its description talks only >> about the default 2D image offsets ({(-1, 0), (-1, -1), (0, -1), (1, -1)}) >> but not for 3D. Besides, the 2D default is missing some offsets. >> >> I'd like to use your class and test it with the same default values as >> with the ScalarIm.... class. >> >> Thank you very much. >> My best regards. >> >> >> 2015-09-22 14:27 GMT+02:00 Bradley Lowekamp : >> >>> Hello, >>> >>> Please try to keep this discussion on the mailing list. >>> >>> You can find a basic program here [1]. Which provide a good example for >>> usage. >>> >>> It allows writing to any file format that ITK supports with vector >>> images. I know that mha, nii, and nrrd should support this. Others may and >>> it varies based what modules are compiled into ITK. >>> >>> You can see how the texture information is written into the vector here >>> [2]. Contributions to improve the documentation are welcomed. >>> >>> >>> >>> [1] >>> https://github.com/blowekamp/itkTextureAnalysis/blob/master/test/itkTextureFeatureImageFilterTest.cxx >>> [2] >>> https://github.com/blowekamp/itkTextureAnalysis/blob/b3911a8ab891859c50c7e3c8819d1a9fa0eaf4af/include/itkTextureFeatureImageFilter.hxx#L217-L224 >>> >>> On Sep 22, 2015, at 3:25 AM, Francisco Lopez de la Franca < >>> franciscolopezdelafranca at gmail.com> wrote: >>> >>> Hi Bradley, >>> I'd like to use your class. A couple of questions: >>> >>> - Which format can the vectorimage generated be saved in? Is it possible >>> to save it in Nifti format? >>> >>> - Which information does the vector image contain, I mean, what is the >>> info stored for each voxel? How can I access that info? >>> >>> I guess the usage of yourclass is in the same way as any ITK filter: >>> >>> yourFilter->setInput(inputImage); >>> yourFilter->setWindowSize(windowSize); >>> ... // other sets... >>> yourFilter->update(); >>> vectorImage = yourFilter->GetOutput(); >>> >>> but, how can I read the data of each voxel in the vector image? >>> >>> Thank you very much. >>> Kind regards. >>> >>> >>> 2015-09-21 14:30 GMT+02:00 Bradley Lowekamp : >>> >>>> Hello, >>>> >>>> I have a external ITK extension you may find useful: >>>> >>>> https://github.com/blowekamp/itkTextureAnalysis/blob/master/include/itkTextureFeatureImageFilter.h >>>> >>>> This computed the GLCM, for a neighborhood for every pixel and produces >>>> a VectorImage with all the features. >>>> >>>> Contributions to improving the class and documentation are welcome. >>>> >>>> HTH, >>>> Brad >>>> >>>> On Sep 21, 2015, at 7:15 AM, Francisco Lopez de la Franca < >>>> franciscolopezdelafranca at gmail.com> wrote: >>>> >>>> > Hi, >>>> > I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter >>>> class with the default parameters and everything was OK. >>>> > >>>> > But now, I have to calculate the texture features of a 2D scalar >>>> image pixel by pixel, I mean, iterate over the whole image and calculate >>>> the texture features of every pixel. >>>> > >>>> > I guess I've got to use each pixel as the masked region over which to >>>> calculate the texture features, but I think this process could be very slow >>>> (I have to do it with a lot of 2D images). >>>> > >>>> > Is there a faster way to do it or isn't it possible as I've described? >>>> > >>>> > Thanks a lot. >>>> > Kind regards. >>>> > _____________________________________ >>>> > Powered by www.kitware.com >>>> > >>>> > Visit other Kitware open-source projects at >>>> > http://www.kitware.com/opensource/opensource.html >>>> > >>>> > Kitware offers ITK Training Courses, for more information visit: >>>> > http://www.kitware.com/products/protraining.php >>>> > >>>> > Please keep messages on-topic and check the ITK FAQ at: >>>> > http://www.itk.org/Wiki/ITK_FAQ >>>> > >>>> > Follow this link to subscribe/unsubscribe: >>>> > http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> >>> >>> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Mon Sep 28 08:19:07 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 28 Sep 2015 08:19:07 -0400 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> Message-ID: <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> Hello, Use the source [1]! It's just a little debugging information, which should be changed to itkDebugMacro. Pull requests are welcomed. The real offsets used relative to each pixel are the ones provided by "Offsets". What's printed out is all pairs used to generate the histogram in a neighborhood. HTH, Brad [1] https://github.com/blowekamp/itkTextureAnalysis/blob/b3911a8ab891859c50c7e3c8819d1a9fa0eaf4af/include/itkTextureFeatureImageFilter.hxx#L129 On Sep 28, 2015, at 5:53 AM, Francisco Lopez de la Franca wrote: > Hi Bradley, > I'm using your filter for a 3D image and the following is happpening: I store in a vector the offset list. When I print it, the list contains just 13 offsets (I've used the same code as in the itk::ScalarImageToTextureImageFilter). The problem comes when I call your SetOffsets(myOffsetList) method, my application starts printing a lot of offsets, I guess all the possible combinations for three dimensions. > Do you know this "problem"? Then, what is the real offsets your filter use? > > Thank you so much. > Kind regards. > /Francisco > > 2015-09-25 15:10 GMT+02:00 Bradley Lowekamp : > Hello, > > For my itkTextureFeatureImageFilter, the default for the OffsetVector is an empty list. So it is required to set this member to get meaningful results. > > ITK is an OpenSource project. When you don't know how something is implemented you can open the hood and find out [1]. > > HTH, > Brad > > [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx#L66-L76 > > On Sep 25, 2015, at 6:37 AM, Francisco Lopez de la Franca wrote: > >> Which directions (for 3D images) will your filter use if I donot specify any offset? >> >> 2015-09-25 11:12 GMT+02:00 Francisco Lopez de la Franca : >> Hi again, >> >> For 3D images, what should I use as default offset vector if I use your class? >> >> I've been using itk::ScalarImageToTextureFeaturesFilter for 3D images and I've also done some tests on 3D NIFTI images but its description talks only about the default 2D image offsets ({(-1, 0), (-1, -1), (0, -1), (1, -1)}) but not for 3D. Besides, the 2D default is missing some offsets. >> >> I'd like to use your class and test it with the same default values as with the ScalarIm.... class. >> >> Thank you very much. >> My best regards. >> >> >> 2015-09-22 14:27 GMT+02:00 Bradley Lowekamp : >> Hello, >> >> Please try to keep this discussion on the mailing list. >> >> You can find a basic program here [1]. Which provide a good example for usage. >> >> It allows writing to any file format that ITK supports with vector images. I know that mha, nii, and nrrd should support this. Others may and it varies based what modules are compiled into ITK. >> >> You can see how the texture information is written into the vector here [2]. Contributions to improve the documentation are welcomed. >> >> >> >> [1] https://github.com/blowekamp/itkTextureAnalysis/blob/master/test/itkTextureFeatureImageFilterTest.cxx >> [2] https://github.com/blowekamp/itkTextureAnalysis/blob/b3911a8ab891859c50c7e3c8819d1a9fa0eaf4af/include/itkTextureFeatureImageFilter.hxx#L217-L224 >> >> On Sep 22, 2015, at 3:25 AM, Francisco Lopez de la Franca wrote: >> >>> Hi Bradley, >>> I'd like to use your class. A couple of questions: >>> >>> - Which format can the vectorimage generated be saved in? Is it possible to save it in Nifti format? >>> >>> - Which information does the vector image contain, I mean, what is the info stored for each voxel? How can I access that info? >>> >>> I guess the usage of yourclass is in the same way as any ITK filter: >>> >>> yourFilter->setInput(inputImage); >>> yourFilter->setWindowSize(windowSize); >>> ... // other sets... >>> yourFilter->update(); >>> vectorImage = yourFilter->GetOutput(); >>> >>> but, how can I read the data of each voxel in the vector image? >>> >>> Thank you very much. >>> Kind regards. >>> >>> >>> 2015-09-21 14:30 GMT+02:00 Bradley Lowekamp : >>> Hello, >>> >>> I have a external ITK extension you may find useful: >>> https://github.com/blowekamp/itkTextureAnalysis/blob/master/include/itkTextureFeatureImageFilter.h >>> >>> This computed the GLCM, for a neighborhood for every pixel and produces a VectorImage with all the features. >>> >>> Contributions to improving the class and documentation are welcome. >>> >>> HTH, >>> Brad >>> >>> On Sep 21, 2015, at 7:15 AM, Francisco Lopez de la Franca wrote: >>> >>> > Hi, >>> > I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter class with the default parameters and everything was OK. >>> > >>> > But now, I have to calculate the texture features of a 2D scalar image pixel by pixel, I mean, iterate over the whole image and calculate the texture features of every pixel. >>> > >>> > I guess I've got to use each pixel as the masked region over which to calculate the texture features, but I think this process could be very slow (I have to do it with a lot of 2D images). >>> > >>> > Is there a faster way to do it or isn't it possible as I've described? >>> > >>> > Thanks a lot. >>> > Kind regards. >>> > _____________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Kitware offers ITK Training Courses, for more information visit: >>> > http://www.kitware.com/products/protraining.php >>> > >>> > Please keep messages on-topic and check the ITK FAQ at: >>> > http://www.itk.org/Wiki/ITK_FAQ >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drcjaudet at gmail.com Mon Sep 28 09:16:40 2015 From: drcjaudet at gmail.com (Cyril Jaudet) Date: Mon, 28 Sep 2015 15:16:40 +0200 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> Message-ID: Hello, if you want here some code to implement the offset values depending of the maximal radius (neighborhood_radius) between the center voxel and his neighbors. NeighborhoodType neighborhood; neighborhood.SetRadius(Neighborhood_Radius); unsigned int centerIndex = neighborhood.GetCenterNeighborhoodIndex(); OffsetType offset; int Nd=0; const OffsetVectorType::Pointer list_offset=OffsetVectorType::New(); //list_offset->reserve(1000);//memory mamagement for ( unsigned int d = 0; d < centerIndex; d++ ) //limit the direction to 13 if you want the 26 standard one go to centerindex*2 { offset = neighborhood.GetOffset(d); //std::cout << "test Offset"<push_back(offset); } //std::cout<<"Number of offset: "<: > Hello, > > Use the source [1]! It's just a little debugging information, which should > be changed to itkDebugMacro. Pull requests are welcomed. > > The real offsets used relative to each pixel are the ones provided by > "Offsets". What's printed out is all pairs used to generate the histogram > in a neighborhood. > > HTH, > Brad > > [1] > https://github.com/blowekamp/itkTextureAnalysis/blob/b3911a8ab891859c50c7e3c8819d1a9fa0eaf4af/include/itkTextureFeatureImageFilter.hxx#L129 > > > On Sep 28, 2015, at 5:53 AM, Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com> wrote: > > Hi Bradley, > I'm using your filter for a 3D image and the following is happpening: I > store in a vector the offset list. When I print it, the list contains just > 13 offsets (I've used the same code as in the > itk::ScalarImageToTextureImageFilter). The problem comes when I call your > SetOffsets(myOffsetList) method, my application starts printing a lot of > offsets, I guess all the possible combinations for three dimensions. > Do you know this "problem"? Then, what is the real offsets your filter use? > > Thank you so much. > Kind regards. > /Francisco > > 2015-09-25 15:10 GMT+02:00 Bradley Lowekamp : > >> Hello, >> >> For my itkTextureFeatureImageFilter, the default for the OffsetVector is >> an empty list. So it is required to set this member to get meaningful >> results. >> >> ITK is an OpenSource project. When you don't know how something is >> implemented you can open the hood and find out [1]. >> >> HTH, >> Brad >> >> [1] >> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx#L66-L76 >> >> On Sep 25, 2015, at 6:37 AM, Francisco Lopez de la Franca < >> franciscolopezdelafranca at gmail.com> wrote: >> >> Which directions (for 3D images) will your filter use if I donot specify >> any offset? >> >> 2015-09-25 11:12 GMT+02:00 Francisco Lopez de la Franca < >> franciscolopezdelafranca at gmail.com>: >> >>> Hi again, >>> >>> For 3D images, what should I use as default offset vector if I use your >>> class? >>> >>> I've been using itk::ScalarImageToTextureFeaturesFilter for 3D images >>> and I've also done some tests on 3D NIFTI images but its description talks >>> only about the default 2D image offsets ({(-1, 0), (-1, -1), (0, -1), (1, >>> -1)}) but not for 3D. Besides, the 2D default is missing some offsets. >>> >>> I'd like to use your class and test it with the same default values as >>> with the ScalarIm.... class. >>> >>> Thank you very much. >>> My best regards. >>> >>> >>> 2015-09-22 14:27 GMT+02:00 Bradley Lowekamp : >>> >>>> Hello, >>>> >>>> Please try to keep this discussion on the mailing list. >>>> >>>> You can find a basic program here [1]. Which provide a good example >>>> for usage. >>>> >>>> It allows writing to any file format that ITK supports with vector >>>> images. I know that mha, nii, and nrrd should support this. Others may and >>>> it varies based what modules are compiled into ITK. >>>> >>>> You can see how the texture information is written into the vector here >>>> [2]. Contributions to improve the documentation are welcomed. >>>> >>>> >>>> >>>> [1] >>>> https://github.com/blowekamp/itkTextureAnalysis/blob/master/test/itkTextureFeatureImageFilterTest.cxx >>>> [2] >>>> https://github.com/blowekamp/itkTextureAnalysis/blob/b3911a8ab891859c50c7e3c8819d1a9fa0eaf4af/include/itkTextureFeatureImageFilter.hxx#L217-L224 >>>> >>>> On Sep 22, 2015, at 3:25 AM, Francisco Lopez de la Franca < >>>> franciscolopezdelafranca at gmail.com> wrote: >>>> >>>> Hi Bradley, >>>> I'd like to use your class. A couple of questions: >>>> >>>> - Which format can the vectorimage generated be saved in? Is it >>>> possible to save it in Nifti format? >>>> >>>> - Which information does the vector image contain, I mean, what is the >>>> info stored for each voxel? How can I access that info? >>>> >>>> I guess the usage of yourclass is in the same way as any ITK filter: >>>> >>>> yourFilter->setInput(inputImage); >>>> yourFilter->setWindowSize(windowSize); >>>> ... // other sets... >>>> yourFilter->update(); >>>> vectorImage = yourFilter->GetOutput(); >>>> >>>> but, how can I read the data of each voxel in the vector image? >>>> >>>> Thank you very much. >>>> Kind regards. >>>> >>>> >>>> 2015-09-21 14:30 GMT+02:00 Bradley Lowekamp : >>>> >>>>> Hello, >>>>> >>>>> I have a external ITK extension you may find useful: >>>>> >>>>> https://github.com/blowekamp/itkTextureAnalysis/blob/master/include/itkTextureFeatureImageFilter.h >>>>> >>>>> This computed the GLCM, for a neighborhood for every pixel and >>>>> produces a VectorImage with all the features. >>>>> >>>>> Contributions to improving the class and documentation are welcome. >>>>> >>>>> HTH, >>>>> Brad >>>>> >>>>> On Sep 21, 2015, at 7:15 AM, Francisco Lopez de la Franca < >>>>> franciscolopezdelafranca at gmail.com> wrote: >>>>> >>>>> > Hi, >>>>> > I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter >>>>> class with the default parameters and everything was OK. >>>>> > >>>>> > But now, I have to calculate the texture features of a 2D scalar >>>>> image pixel by pixel, I mean, iterate over the whole image and calculate >>>>> the texture features of every pixel. >>>>> > >>>>> > I guess I've got to use each pixel as the masked region over which >>>>> to calculate the texture features, but I think this process could be very >>>>> slow (I have to do it with a lot of 2D images). >>>>> > >>>>> > Is there a faster way to do it or isn't it possible as I've >>>>> described? >>>>> > >>>>> > Thanks a lot. >>>>> > Kind regards. >>>>> > _____________________________________ >>>>> > Powered by www.kitware.com >>>>> > >>>>> > Visit other Kitware open-source projects at >>>>> > http://www.kitware.com/opensource/opensource.html >>>>> > >>>>> > Kitware offers ITK Training Courses, for more information visit: >>>>> > http://www.kitware.com/products/protraining.php >>>>> > >>>>> > Please keep messages on-topic and check the ITK FAQ at: >>>>> > http://www.itk.org/Wiki/ITK_FAQ >>>>> > >>>>> > Follow this link to subscribe/unsubscribe: >>>>> > http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>>>> >>>> >>>> >>> >> >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.serviddio at gmail.com Mon Sep 28 09:34:07 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Mon, 28 Sep 2015 15:34:07 +0200 Subject: [ITK-users] Connect itk to vtk Message-ID: Hi, is there a fast way to connect itk reader to vtk libary for visualizing image on my screen? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bakkari.abdelkhalek at hotmail.fr Mon Sep 28 09:37:30 2015 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Mon, 28 Sep 2015 14:37:30 +0100 Subject: [ITK-users] Pre-processing (Window/Level) for DICOM images Message-ID: Dear ITK users & community; I would like to ask about How to do the pre-processing (Window/Level) for a serie of DICOM images using ITK.I want to add it to a bottom for my project written in Microsoft Visual Studio 2010. Thank you in advance.Best regards, Abdelkhalek BakkariPh.D candidate in Computer ScienceInstitute of Applied Computer ScienceLodz University of Technology, Poland -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Mon Sep 28 10:08:16 2015 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Mon, 28 Sep 2015 16:08:16 +0200 (CEST) Subject: [ITK-users] [ITK] Connect itk to vtk In-Reply-To: References: Message-ID: <746957165.9525829.1443449296564.JavaMail.zimbra@enst.fr> Hello, You might be interested by the itk::ImageToVTKImageFilter from the ITKVtkGlue module. http://www.itk.org/Doxygen/html/classitk_1_1ImageToVTKImageFilter.html It's an easy-to-use connector between an itk::Image and vtkImageData. You can then use this ImageData in any VTK visualization setup you want. HTH Tim ----- Mail original ----- De: "stefano serviddio" ?: insight-users at itk.org Envoy?: Lundi 28 Septembre 2015 15:34:07 Objet: [ITK] [ITK-users] Connect itk to vtk Hi, is there a fast way to connect itk reader to vtk libary for visualizing image on my screen? _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From matt.mccormick at kitware.com Mon Sep 28 11:29:31 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 28 Sep 2015 11:29:31 -0400 Subject: [ITK-users] Saving deformation field in vector container In-Reply-To: <1443416211303-7587905.post@n2.nabble.com> References: <1443416211303-7587905.post@n2.nabble.com> Message-ID: Hello, There does not seem to be enough information on the code that is causing the problem or what the problem is. A short, self-contained, compilable, example could help [1]. Thanks, Matt [1] http://www.sscce.org/ On Mon, Sep 28, 2015 at 12:56 AM, geetha wrote: > Hi, > > I am registering images through diffeomorphic demons filter and tying to > save the deformation field in vector containers. I saved registration > transforms of other rigid registrations in vector containers and it was > successful. However, trying to save deformation field in container always > result in abrupt crashing of program. I was able to save deformation field, > only transferring it into container is a problem. Unfortunately, even with > catch I couldn't get any specifics of error. What am I missing? > > (My code for displacement field vector container and updating in container) > > const unsigned int Dimension = 3; > typedef itk::Vector< float, Dimension > VectorType; > typedef itk::Image< VectorType, Dimension > DisplacementFieldType; > typedef > itk::VectorContainerDFTransformContainerType; > DFTransformContainerType::Pointer DeffieldContainer = > DFTransformContainerType::New() ; > > //My output from registration stored in 'deffield' > defField = ddfilter->GetDeformationField(); > > DeffieldContainer->SetElement( inputId++ , defField ); > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Saving-deformation-field-in-vector-container-tp7587905.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Mon Sep 28 11:34:50 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 28 Sep 2015 11:34:50 -0400 Subject: [ITK-users] Entropy Feature image and Active contour for bone segmentation In-Reply-To: <1443420621809-7587907.post@n2.nabble.com> References: <1443420621809-7587907.post@n2.nabble.com> Message-ID: Hi vis, Yes, that seems like a reasonable approach. The feature image may need to be processed so it has the desired properties. See the file ITK/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx for an example. HTH, Matt On Mon, Sep 28, 2015 at 2:10 AM, vis wrote: > hey all, > Im working on a project wherein I have segment out the bone structures in > the Xray images... during my literature survey i came across this paper > "Entropy-Based Automatic Segmentation of Bones in > Digital X-ray Images by Oishila Bandyopadhyay", here they replace every > pixel in the input image by the entropy value of 3x3 neighbouring pixels > and a feature image is produced.. and then this feature image is threshold > using Otsu technique... my question can we give this feature image as an > input to geodesic active contour filter for segmentation? pls advice... > regards > vis > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Entropy-Feature-image-and-Active-contour-for-bone-segmentation-tp7587907.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Mon Sep 28 11:42:42 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 28 Sep 2015 11:42:42 -0400 Subject: [ITK-users] [ITK] Pre-processing (Window/Level) for DICOM images In-Reply-To: References: Message-ID: Hi Abdelkhalek, After getting the desired Window / Level DICOM tags [1], the windowing can be applied with the IntensityWindowingImageFilter [2] or the RescaleIntensityImageFilter [3]. HTH, Matt [1] http://www.itk.org/Doxygen/html/Examples_2IO_2DicomImageReadPrintTags_8cxx-example.html [2] http://www.itk.org/Doxygen/html/classitk_1_1IntensityWindowingImageFilter.html [3] http://www.itk.org/Doxygen/html/classitk_1_1RescaleIntensityImageFilter.html On Mon, Sep 28, 2015 at 9:37 AM, Abdelkhalek Bakkari wrote: > > Dear ITK users & community; > > I would like to ask about How to do the pre-processing (Window/Level) for a > serie of DICOM images using ITK. > I want to add it to a bottom for my project written in Microsoft Visual > Studio 2010. > > Thank you in advance. > Best regards, > > Abdelkhalek Bakkari > Ph.D candidate in Computer Science > Institute of Applied Computer Science > Lodz University of Technology, Poland > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From s.serviddio at gmail.com Mon Sep 28 12:37:45 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Mon, 28 Sep 2015 18:37:45 +0200 Subject: [ITK-users] VTk image Screen Message-ID: Hi, It's possible to visualize three images in the same window with VTK , after load them by itk reader. I try this code but I visulize only an image: const unsigned int Dimension = 2; typedef double PixelType; typedef Image< PixelType, Dimension > FixedImageType; typedef Image< PixelType, Dimension > MovingImageType; typedef ImageFileReader< FixedImageType > FixedImageReaderType; typedef ImageFileReader< MovingImageType > MovingImageReaderType; typedef GDCMImageIO GDCMType; GDCMType::Pointer gdcm=GDCMType::New(); FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New(); MovingImageReaderType::Pointer movingImageReader = MovingImageReaderType::New(); typedef itk::ImageToVTKImageFilter ConnectorType; ConnectorType::Pointer originalConnector1 = ConnectorType::New(); ConnectorType::Pointer originalConnector2 = ConnectorType::New(); char* filename1="D:/Images/def00001.dcm"; char* filename2="D:/Images/def100001.dcm"; fixedImageReader->SetFileName( filename1 ); movingImageReader->SetFileName( filename2 ); fixedImageReader->SetImageIO(gdcm); movingImageReader->SetImageIO(gdcm); resultfile<Update(); movingImageReader->Update(); FixedImageType::Pointer Image1=fixedImageReader->GetOutput(); MovingImageType::Pointer Image2=movingImageReader->GetOutput(); originalConnector1->SetInput(Image1); originalConnector1->SetInput(Image2); vtkSmartPointer originalActor1 = vtkSmartPointer::New(); vtkSmartPointer originalActor2 = vtkSmartPointer::New(); originalConnector1->Update(); originalConnector2->Update(); originalActor1->GetMapper()->SetInputData(originalConnector1->GetOutput()); originalActor2->GetMapper()->SetInputData(originalConnector2->GetOutput()); vtkSmartPointer renderer1 = vtkSmartPointer::New(); renderer1->AddActor(originalActor1); //enderer1->AddActor(originalActor2); renderer1->ResetCamera(); vtkSmartPointer renderWindow1 = vtkSmartPointer::New(); vtkSmartPointer renderWindowInteractor1 = vtkSmartPointer::New(); vtkSmartPointer style = vtkSmartPointer::New(); renderWindow1->AddRenderer(renderer1); renderWindowInteractor1->SetInteractorStyle(style); renderWindowInteractor1->SetRenderWindow(renderWindow1); renderWindowInteractor1->Initialize(); renderWindowInteractor1->Start(); -------------- next part -------------- An HTML attachment was scrubbed... URL: From sorench at gmail.com Mon Sep 28 14:27:10 2015 From: sorench at gmail.com (Soren Christensen) Date: Mon, 28 Sep 2015 11:27:10 -0700 Subject: [ITK-users] ImageIOFactory problem In-Reply-To: References: Message-ID: Hi Matt, Thanks for the reply! Yes MetaImageIO seems to be on the list third-last below. Let me know what I can do to trouble shoot! Thanks! Soren NiftiImageIO (0x2892ed0) NrrdImageIO (0x2893420) GiplImageIO (0x2893e70) HDF5ImageIO (0x28944c0) JPEGImageIO (0x28946c0) GDCMImageIO (0x2894bc0) BMPImageIO (0x2894f90) LSMImageIO (0x2895840) PNGImageIO (0x2895ed0) TIFFImageIO (0x28961b0) VTKImageIO (0x2896740) StimulateImageIO (0x2896ac0) BioRadImageIO (0x28970c0) MetaImageIO (0x2897490) MRCImageIO (0x28984c0) MINCImageIO (0x28988f0) On Sun, Sep 27, 2015 at 12:46 PM, Matt McCormick wrote: > Hi Soren, > > When the registered IO's are printed, do they include MetaIO? > > Thanks, > Matt > > On Sun, Sep 27, 2015 at 3:06 PM, Soren Christensen > wrote: > > Hi, > > > > I gave problems getting ImageIOFactory to return a valid pointer. > > > > > > I am trying this: > > > > > > itk::ImageIOBase::Pointer imageIO = > > > > itk::ImageIOFactory::CreateImageIO( > > > > testfile, itk::ImageIOFactory::ReadMode); > > > > > > if( !imageIO ) > > > > { > > > > std::cerr << "Could not CreateImageIO for: " << > > fn.toStdString().c_str() << std::endl; > > > > return 1; > > > > } > > > > > > > > I get: > > > > Could not CreateImageIO for: /tmp/itk1_014_000.mhd > > > > > > I can open this file with ITK snap without issues. > > > > > > When I do this: > > > > > > RegisteredObjectsContainerType registeredIOs = > > > > itk::ObjectFactoryBase::CreateAllInstance( "itkImageIOBase" ); > > > > << registeredIOs.size() > > > > << " IO objects available to the ImageFileReader.\n" << > > std::endl; > > > > > > I get: > > > > 16 IO objects available to the ImageFileReader. > > > > > > I build with Qt/CMake > > > > > > So what am I missing here? > > > > Thanks in advance! > > > > Soren > > > > > > > > > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Sep 28 14:33:05 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 28 Sep 2015 14:33:05 -0400 Subject: [ITK-users] ImageIOFactory problem In-Reply-To: References: Message-ID: Can you change your output to: std::cerr << "Could not CreateImageIO for: " << "|" << fn.toStdString().c_str() << "|" << std::endl; Perhaps there is a leading or trailing space in the filename? On Mon, Sep 28, 2015 at 2:27 PM, Soren Christensen wrote: > Hi Matt, > Thanks for the reply! > Yes MetaImageIO seems to be on the list third-last below. > Let me know what I can do to trouble shoot! > > Thanks! > Soren > > > NiftiImageIO (0x2892ed0) > NrrdImageIO (0x2893420) > GiplImageIO (0x2893e70) > HDF5ImageIO (0x28944c0) > JPEGImageIO (0x28946c0) > GDCMImageIO (0x2894bc0) > BMPImageIO (0x2894f90) > LSMImageIO (0x2895840) > PNGImageIO (0x2895ed0) > TIFFImageIO (0x28961b0) > VTKImageIO (0x2896740) > StimulateImageIO (0x2896ac0) > BioRadImageIO (0x28970c0) > MetaImageIO (0x2897490) > MRCImageIO (0x28984c0) > MINCImageIO (0x28988f0) > > On Sun, Sep 27, 2015 at 12:46 PM, Matt McCormick < > matt.mccormick at kitware.com> wrote: > >> Hi Soren, >> >> When the registered IO's are printed, do they include MetaIO? >> >> Thanks, >> Matt >> >> On Sun, Sep 27, 2015 at 3:06 PM, Soren Christensen >> wrote: >> > Hi, >> > >> > I gave problems getting ImageIOFactory to return a valid pointer. >> > >> > >> > I am trying this: >> > >> > >> > itk::ImageIOBase::Pointer imageIO = >> > >> > itk::ImageIOFactory::CreateImageIO( >> > >> > testfile, itk::ImageIOFactory::ReadMode); >> > >> > >> > if( !imageIO ) >> > >> > { >> > >> > std::cerr << "Could not CreateImageIO for: " << >> > fn.toStdString().c_str() << std::endl; >> > >> > return 1; >> > >> > } >> > >> > >> > >> > I get: >> > >> > Could not CreateImageIO for: /tmp/itk1_014_000.mhd >> > >> > >> > I can open this file with ITK snap without issues. >> > >> > >> > When I do this: >> > >> > >> > RegisteredObjectsContainerType registeredIOs = >> > >> > itk::ObjectFactoryBase::CreateAllInstance( "itkImageIOBase" ); >> > >> > << registeredIOs.size() >> > >> > << " IO objects available to the ImageFileReader.\n" << >> > std::endl; >> > >> > >> > I get: >> > >> > 16 IO objects available to the ImageFileReader. >> > >> > >> > I build with Qt/CMake >> > >> > >> > So what am I missing here? >> > >> > Thanks in advance! >> > >> > Soren >> > >> > >> > >> > >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jerome.velut at kitware.com Mon Sep 28 15:07:20 2015 From: jerome.velut at kitware.com (Jerome Velut) Date: Mon, 28 Sep 2015 21:07:20 +0200 Subject: [ITK-users] ANN: ITK Training Courses in Lyon, France, November 5, 2015 Message-ID: Kitware will be holding an ITK course on November 5, 2015 in Lyon, France. Please visit our web site for more information and registration details at either: http://training.kitware.fr/browse/98 or in French: http://formations.kitware.fr/browse/98 Note that the course could be taught in English. If you have any question, please contact us at formations at http://www.kitware.fr Thank you, -- J?r?me Velut Research and Development Kitware SAS 26 rue Louis Gu?rin 69100 Villeurbanne, France F: +33 (0)4.37.45.04.15 http://www.kitware.fr http://www.kitware.com/company/team/velut.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From sorench at gmail.com Mon Sep 28 16:04:12 2015 From: sorench at gmail.com (Soren Christensen) Date: Mon, 28 Sep 2015 13:04:12 -0700 Subject: [ITK-users] ImageIOFactory problem In-Reply-To: References: Message-ID: Thanks again! I used std:cout << "Could not CreateImageIO for: " << "|" << fn.toStdString().c_str() << "|" << std::endl; and get: Could not CreateImageIO for: |/home/sorenc/test/itk1_014_000.mhd| This is a direct copy paste and you will see there is no leading or trailing characters there. itksnap /home/sorenc/test/itk1_014_000.mhd shows the file. Any ideas appreciated! Thanks, Soren On Mon, Sep 28, 2015 at 11:33 AM, Bill Lorensen wrote: > Can you change your output to: > > std::cerr << "Could not CreateImageIO for: " << "|" << fn.toStdString().c_str() << "|" << std::endl; > > > Perhaps there is a leading or trailing space in the filename? > > > On Mon, Sep 28, 2015 at 2:27 PM, Soren Christensen > wrote: > >> Hi Matt, >> Thanks for the reply! >> Yes MetaImageIO seems to be on the list third-last below. >> Let me know what I can do to trouble shoot! >> >> Thanks! >> Soren >> >> >> NiftiImageIO (0x2892ed0) >> NrrdImageIO (0x2893420) >> GiplImageIO (0x2893e70) >> HDF5ImageIO (0x28944c0) >> JPEGImageIO (0x28946c0) >> GDCMImageIO (0x2894bc0) >> BMPImageIO (0x2894f90) >> LSMImageIO (0x2895840) >> PNGImageIO (0x2895ed0) >> TIFFImageIO (0x28961b0) >> VTKImageIO (0x2896740) >> StimulateImageIO (0x2896ac0) >> BioRadImageIO (0x28970c0) >> MetaImageIO (0x2897490) >> MRCImageIO (0x28984c0) >> MINCImageIO (0x28988f0) >> >> On Sun, Sep 27, 2015 at 12:46 PM, Matt McCormick < >> matt.mccormick at kitware.com> wrote: >> >>> Hi Soren, >>> >>> When the registered IO's are printed, do they include MetaIO? >>> >>> Thanks, >>> Matt >>> >>> On Sun, Sep 27, 2015 at 3:06 PM, Soren Christensen >>> wrote: >>> > Hi, >>> > >>> > I gave problems getting ImageIOFactory to return a valid pointer. >>> > >>> > >>> > I am trying this: >>> > >>> > >>> > itk::ImageIOBase::Pointer imageIO = >>> > >>> > itk::ImageIOFactory::CreateImageIO( >>> > >>> > testfile, itk::ImageIOFactory::ReadMode); >>> > >>> > >>> > if( !imageIO ) >>> > >>> > { >>> > >>> > std::cerr << "Could not CreateImageIO for: " << >>> > fn.toStdString().c_str() << std::endl; >>> > >>> > return 1; >>> > >>> > } >>> > >>> > >>> > >>> > I get: >>> > >>> > Could not CreateImageIO for: /tmp/itk1_014_000.mhd >>> > >>> > >>> > I can open this file with ITK snap without issues. >>> > >>> > >>> > When I do this: >>> > >>> > >>> > RegisteredObjectsContainerType registeredIOs = >>> > >>> > itk::ObjectFactoryBase::CreateAllInstance( "itkImageIOBase" ); >>> > >>> > << registeredIOs.size() >>> > >>> > << " IO objects available to the ImageFileReader.\n" << >>> > std::endl; >>> > >>> > >>> > I get: >>> > >>> > 16 IO objects available to the ImageFileReader. >>> > >>> > >>> > I build with Qt/CMake >>> > >>> > >>> > So what am I missing here? >>> > >>> > Thanks in advance! >>> > >>> > Soren >>> > >>> > >>> > >>> > >>> > >>> > >>> > _____________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Kitware offers ITK Training Courses, for more information visit: >>> > http://www.kitware.com/products/protraining.php >>> > >>> > Please keep messages on-topic and check the ITK FAQ at: >>> > http://www.itk.org/Wiki/ITK_FAQ >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/insight-users >>> > >>> >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Sep 28 16:22:36 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 28 Sep 2015 16:22:36 -0400 Subject: [ITK-users] ImageIOFactory problem In-Reply-To: References: Message-ID: Strange, can you share the file? On Mon, Sep 28, 2015 at 4:04 PM, Soren Christensen wrote: > Thanks again! > I used std:cout << "Could not CreateImageIO for: " << "|" << > fn.toStdString().c_str() << "|" << std::endl; > and get: > > Could not CreateImageIO for: |/home/sorenc/test/itk1_014_000.mhd| > > This is a direct copy paste and you will see there is no leading or > trailing characters there. > > itksnap /home/sorenc/test/itk1_014_000.mhd > shows the file. > > Any ideas appreciated! > Thanks, > Soren > > > On Mon, Sep 28, 2015 at 11:33 AM, Bill Lorensen > wrote: > >> Can you change your output to: >> >> std::cerr << "Could not CreateImageIO for: " << "|" << fn.toStdString().c_str() << "|" << std::endl; >> >> >> Perhaps there is a leading or trailing space in the filename? >> >> >> On Mon, Sep 28, 2015 at 2:27 PM, Soren Christensen >> wrote: >> >>> Hi Matt, >>> Thanks for the reply! >>> Yes MetaImageIO seems to be on the list third-last below. >>> Let me know what I can do to trouble shoot! >>> >>> Thanks! >>> Soren >>> >>> >>> NiftiImageIO (0x2892ed0) >>> NrrdImageIO (0x2893420) >>> GiplImageIO (0x2893e70) >>> HDF5ImageIO (0x28944c0) >>> JPEGImageIO (0x28946c0) >>> GDCMImageIO (0x2894bc0) >>> BMPImageIO (0x2894f90) >>> LSMImageIO (0x2895840) >>> PNGImageIO (0x2895ed0) >>> TIFFImageIO (0x28961b0) >>> VTKImageIO (0x2896740) >>> StimulateImageIO (0x2896ac0) >>> BioRadImageIO (0x28970c0) >>> MetaImageIO (0x2897490) >>> MRCImageIO (0x28984c0) >>> MINCImageIO (0x28988f0) >>> >>> On Sun, Sep 27, 2015 at 12:46 PM, Matt McCormick < >>> matt.mccormick at kitware.com> wrote: >>> >>>> Hi Soren, >>>> >>>> When the registered IO's are printed, do they include MetaIO? >>>> >>>> Thanks, >>>> Matt >>>> >>>> On Sun, Sep 27, 2015 at 3:06 PM, Soren Christensen >>>> wrote: >>>> > Hi, >>>> > >>>> > I gave problems getting ImageIOFactory to return a valid pointer. >>>> > >>>> > >>>> > I am trying this: >>>> > >>>> > >>>> > itk::ImageIOBase::Pointer imageIO = >>>> > >>>> > itk::ImageIOFactory::CreateImageIO( >>>> > >>>> > testfile, itk::ImageIOFactory::ReadMode); >>>> > >>>> > >>>> > if( !imageIO ) >>>> > >>>> > { >>>> > >>>> > std::cerr << "Could not CreateImageIO for: " << >>>> > fn.toStdString().c_str() << std::endl; >>>> > >>>> > return 1; >>>> > >>>> > } >>>> > >>>> > >>>> > >>>> > I get: >>>> > >>>> > Could not CreateImageIO for: /tmp/itk1_014_000.mhd >>>> > >>>> > >>>> > I can open this file with ITK snap without issues. >>>> > >>>> > >>>> > When I do this: >>>> > >>>> > >>>> > RegisteredObjectsContainerType registeredIOs = >>>> > >>>> > itk::ObjectFactoryBase::CreateAllInstance( "itkImageIOBase" ); >>>> > >>>> > << registeredIOs.size() >>>> > >>>> > << " IO objects available to the ImageFileReader.\n" << >>>> > std::endl; >>>> > >>>> > >>>> > I get: >>>> > >>>> > 16 IO objects available to the ImageFileReader. >>>> > >>>> > >>>> > I build with Qt/CMake >>>> > >>>> > >>>> > So what am I missing here? >>>> > >>>> > Thanks in advance! >>>> > >>>> > Soren >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > _____________________________________ >>>> > Powered by www.kitware.com >>>> > >>>> > Visit other Kitware open-source projects at >>>> > http://www.kitware.com/opensource/opensource.html >>>> > >>>> > Kitware offers ITK Training Courses, for more information visit: >>>> > http://www.kitware.com/products/protraining.php >>>> > >>>> > Please keep messages on-topic and check the ITK FAQ at: >>>> > http://www.itk.org/Wiki/ITK_FAQ >>>> > >>>> > Follow this link to subscribe/unsubscribe: >>>> > http://public.kitware.com/mailman/listinfo/insight-users >>>> > >>>> >>> >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> > > -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bakkari.abdelkhalek at hotmail.fr Mon Sep 28 16:28:40 2015 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Mon, 28 Sep 2015 21:28:40 +0100 Subject: [ITK-users] Include ITK and VTK libraries compiled into a project C ++ Visual Studio 2010 Message-ID: Hello everyone, I'm trying to debug a C ++ project with a source and a binary file (containing the Makefile). This project compiles perfectly in the terminal, but when I try to compile in Visual Studio 2010, it emphasizes all my .h saying they are not found.Even by adding my libraries compiled into my project, I have the same result. Do you know how it can be configured to recognize Include ITK and VTK libraries compiled into a project C ++ Visual Studio 2010 with ITK and VTK libraries? Thanks you in advance, Best regards, Abdelkhalek BakkariPh.D candidate in Computer ScienceInstitute of Applied Computer ScienceLodz University of Technology, Poland -------------- next part -------------- An HTML attachment was scrubbed... URL: From sorench at gmail.com Mon Sep 28 16:31:06 2015 From: sorench at gmail.com (Soren Christensen) Date: Mon, 28 Sep 2015 13:31:06 -0700 Subject: [ITK-users] ImageIOFactory problem In-Reply-To: References: Message-ID: Of course - sending it to your email in a second. Thanks! On Mon, Sep 28, 2015 at 1:22 PM, Bill Lorensen wrote: > Strange, can you share the file? > > On Mon, Sep 28, 2015 at 4:04 PM, Soren Christensen > wrote: > >> Thanks again! >> I used std:cout << "Could not CreateImageIO for: " << "|" << >> fn.toStdString().c_str() << "|" << std::endl; >> and get: >> >> Could not CreateImageIO for: |/home/sorenc/test/itk1_014_000.mhd| >> >> This is a direct copy paste and you will see there is no leading or >> trailing characters there. >> >> itksnap /home/sorenc/test/itk1_014_000.mhd >> shows the file. >> >> Any ideas appreciated! >> Thanks, >> Soren >> >> >> On Mon, Sep 28, 2015 at 11:33 AM, Bill Lorensen >> wrote: >> >>> Can you change your output to: >>> >>> std::cerr << "Could not CreateImageIO for: " << "|" << fn.toStdString().c_str() << "|" << std::endl; >>> >>> >>> Perhaps there is a leading or trailing space in the filename? >>> >>> >>> On Mon, Sep 28, 2015 at 2:27 PM, Soren Christensen >>> wrote: >>> >>>> Hi Matt, >>>> Thanks for the reply! >>>> Yes MetaImageIO seems to be on the list third-last below. >>>> Let me know what I can do to trouble shoot! >>>> >>>> Thanks! >>>> Soren >>>> >>>> >>>> NiftiImageIO (0x2892ed0) >>>> NrrdImageIO (0x2893420) >>>> GiplImageIO (0x2893e70) >>>> HDF5ImageIO (0x28944c0) >>>> JPEGImageIO (0x28946c0) >>>> GDCMImageIO (0x2894bc0) >>>> BMPImageIO (0x2894f90) >>>> LSMImageIO (0x2895840) >>>> PNGImageIO (0x2895ed0) >>>> TIFFImageIO (0x28961b0) >>>> VTKImageIO (0x2896740) >>>> StimulateImageIO (0x2896ac0) >>>> BioRadImageIO (0x28970c0) >>>> MetaImageIO (0x2897490) >>>> MRCImageIO (0x28984c0) >>>> MINCImageIO (0x28988f0) >>>> >>>> On Sun, Sep 27, 2015 at 12:46 PM, Matt McCormick < >>>> matt.mccormick at kitware.com> wrote: >>>> >>>>> Hi Soren, >>>>> >>>>> When the registered IO's are printed, do they include MetaIO? >>>>> >>>>> Thanks, >>>>> Matt >>>>> >>>>> On Sun, Sep 27, 2015 at 3:06 PM, Soren Christensen >>>>> wrote: >>>>> > Hi, >>>>> > >>>>> > I gave problems getting ImageIOFactory to return a valid pointer. >>>>> > >>>>> > >>>>> > I am trying this: >>>>> > >>>>> > >>>>> > itk::ImageIOBase::Pointer imageIO = >>>>> > >>>>> > itk::ImageIOFactory::CreateImageIO( >>>>> > >>>>> > testfile, itk::ImageIOFactory::ReadMode); >>>>> > >>>>> > >>>>> > if( !imageIO ) >>>>> > >>>>> > { >>>>> > >>>>> > std::cerr << "Could not CreateImageIO for: " << >>>>> > fn.toStdString().c_str() << std::endl; >>>>> > >>>>> > return 1; >>>>> > >>>>> > } >>>>> > >>>>> > >>>>> > >>>>> > I get: >>>>> > >>>>> > Could not CreateImageIO for: /tmp/itk1_014_000.mhd >>>>> > >>>>> > >>>>> > I can open this file with ITK snap without issues. >>>>> > >>>>> > >>>>> > When I do this: >>>>> > >>>>> > >>>>> > RegisteredObjectsContainerType registeredIOs = >>>>> > >>>>> > itk::ObjectFactoryBase::CreateAllInstance( "itkImageIOBase" ); >>>>> > >>>>> > << registeredIOs.size() >>>>> > >>>>> > << " IO objects available to the ImageFileReader.\n" << >>>>> > std::endl; >>>>> > >>>>> > >>>>> > I get: >>>>> > >>>>> > 16 IO objects available to the ImageFileReader. >>>>> > >>>>> > >>>>> > I build with Qt/CMake >>>>> > >>>>> > >>>>> > So what am I missing here? >>>>> > >>>>> > Thanks in advance! >>>>> > >>>>> > Soren >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > _____________________________________ >>>>> > Powered by www.kitware.com >>>>> > >>>>> > Visit other Kitware open-source projects at >>>>> > http://www.kitware.com/opensource/opensource.html >>>>> > >>>>> > Kitware offers ITK Training Courses, for more information visit: >>>>> > http://www.kitware.com/products/protraining.php >>>>> > >>>>> > Please keep messages on-topic and check the ITK FAQ at: >>>>> > http://www.itk.org/Wiki/ITK_FAQ >>>>> > >>>>> > Follow this link to subscribe/unsubscribe: >>>>> > http://public.kitware.com/mailman/listinfo/insight-users >>>>> > >>>>> >>>> >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> >> >> > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.serviddio at gmail.com Mon Sep 28 17:52:11 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Mon, 28 Sep 2015 23:52:11 +0200 Subject: [ITK-users] husdorff distance measure Message-ID: Hi, I'm trying to measure Husdorff distance between two dicom/png image for evaluating the difference before and after registration, but I have a weird result because, also I see that the images are exactly aligned the husdroff distance increases instead decreases. This is my code, probably I have done some mistakes. #include #include #include "itkImageRegionIterator.h" #include "itkImageFileReader.h" #include "itkGDCMImageIO.h" #include "itkPNGImageIO.h" #include "itkDirectedHausdorffDistanceImageFilter.h" #include "itkHausdorffDistanceImageFilter.h" int main() { typedef unsigned short PixelType1; typedef unsigned short PixelType2; const unsigned int Dimension=2; time_t now = time(0); struct tm tstruct; char buf[80]; tstruct = *localtime(&now); strftime(buf, sizeof(buf), "%Y-%m-%d %X", &tstruct); std::ofstream resultfile; char Risultati[] = "D:/Immagini/HusdorffResul.txt"; resultfile.open(Risultati, std::ios::app); if (resultfile.is_open()) { std::cout << "File Open exists\n"; } resultfile<<"Data :"< Image1Type; typedef itk::Image Image2Type; typedef itk::ImageFileReader FileReaderType1; typedef itk::ImageFileReader FileReaderType2; FileReaderType1::Pointer reader1=FileReaderType1::New(); FileReaderType2::Pointer reader2=FileReaderType2::New(); reader1->SetFileName("D:/Images/12.png"); reader1->SetImageIO(itk::PNGImageIO::New()); reader2->SetFileName("D:/Images/240.png"); reader2->SetImageIO(itk::PNGImageIO::New()); typedef itk::GDCMImageIO GDCMType; GDCMType::Pointer gdcm=GDCMType::New(); /*reader1->SetImageIO(gdcm); reader2->SetImageIO(gdcm);*/ reader1->Update(); reader2->Update(); std::cout<<"Image Loading Complete!!!"<GetOutput(); Image2Type::Pointer image2 = reader2->GetOutput(); image1->Allocate(); image2->Allocate(); Image1Type::PointType origin1; Image1Type::PointType origin2; Image1Type::SpacingType spacing; origin1.Fill(0.0); spacing.Fill(1.0); image1->SetOrigin(origin1); image1->SetSpacing(spacing); std::cout<<"Immagini allocate in memoria"<GetLargestPossibleRegion().GetSize() << std::endl; resultfile << "Dim Immagine Mov: " << image2->GetLargestPossibleRegion().GetSize() << std::endl; image2->SetOrigin(image1->GetOrigin()); image2->SetSpacing(image1->GetSpacing()); resultfile<<"Nuova Origine Mov: "<GetOutput()->GetOrigin()<GetOutput()->GetSpacing()<GetOutput()->GetOrigin()<GetOutput()->GetSpacing()< DirectHausdType; DirectHausdType::Pointer filter1=DirectHausdType::New(); filter1->SetInput1(image1); filter1->SetInput2(image2); filter1->SetUseImageSpacing(true); try { filter1->Update(); DirectHausdType::RealType distance=filter1->GetDirectedHausdorffDistance(); resultfile<<"Distanza h(a,b) Immagini: "<<(double)distance<<" mm "<GetAverageHausdorffDistance()<<" mm"<GetAverageHausdorffDistance()<<" mm "< DirectHausdType2; DirectHausdType2::Pointer filter=DirectHausdType2::New(); filter->SetInput1(image2); filter->SetInput2(image1); try { filter->SetUseImageSpacing(true); filter->Update(); DirectHausdType2::RealType distance=filter->GetDirectedHausdorffDistance(); resultfile<<"Distanza h(b,a) Immagini: "<<(double)distance<<" mm "<GetAverageHausdorffDistance()<<" mm"<GetAverageHausdorffDistance()< FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput1( image1 ); filter->SetInput2( image2 ); try{ filter->SetUseImageSpacing(true); filter->Update(); FilterType::RealType distance = filter->GetHausdorffDistance(); resultfile << " H(a,b) Distanza Hausdorff " << (double)distance <<" mm "<< std::endl; resultfile << " H(a,b) Distanza Hausdorff Media " << filter->GetAverageHausdorffDistance() << " mm "<< std::endl; std::cout << " H(a,b) Distanza Hausdorff " << (double)distance << std::endl; std::cout << " H(a,b) Distanza Hausdorff Media " << filter->GetAverageHausdorffDistance() << std::endl; }catch( itk::ExceptionObject & err ) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; return EXIT_FAILURE; } } // Hausdorff distance H(image2,image1) { typedef itk::HausdorffDistanceImageFilter FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput1( image2 ); filter->SetInput2( image1 ); try{ filter->SetUseImageSpacing(true); filter->Update(); FilterType::RealType distance = filter->GetHausdorffDistance(); resultfile << " H(b,a) Distanza Hausdorff " << (double)distance <<" mm "<< std::endl; resultfile << " H(b,a) Distanza Hausdorff Media " << (double)filter->GetAverageHausdorffDistance() <<" mm "<< std::endl; std::cout << " H(b,a) Distanza Hausdorff " << (double)distance << std::endl; std::cout << " H(b,a) Distanza Hausdorff Media " << (double) filter->GetAverageHausdorffDistance() << std::endl; } catch( itk::ExceptionObject & err ) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; return EXIT_FAILURE; } } resultfile.close(); return EXIT_SUCCESS; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Mon Sep 28 18:06:12 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Tue, 29 Sep 2015 00:06:12 +0200 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> Message-ID: Hi again, One more thing. Ive tested the filter against a 3D image (224x224x300) and it is too slow, that is, its been several hours processing and I had to interrupt the process because it wasnot able to finish. This is not acceptable for the job Iam in charged of, so I think I will use the ScalarImageToTextureFeaturesFilter instead. Ill try with this because I didnt think the former would last so much. Anyway, thank you so much to everybody that has helped me. Ive learnt a lot of things. Kind regards. El lunes, 28 de septiembre de 2015, Bradley Lowekamp escribi?: > Hello, > > Use the source [1]! It's just a little debugging information, which should > be changed to itkDebugMacro. Pull requests are welcomed. > > The real offsets used relative to each pixel are the ones provided by > "Offsets". What's printed out is all pairs used to generate the histogram > in a neighborhood. > > HTH, > Brad > > [1] > https://github.com/blowekamp/itkTextureAnalysis/blob/b3911a8ab891859c50c7e3c8819d1a9fa0eaf4af/include/itkTextureFeatureImageFilter.hxx#L129 > > > On Sep 28, 2015, at 5:53 AM, Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com > > > wrote: > > Hi Bradley, > I'm using your filter for a 3D image and the following is happpening: I > store in a vector the offset list. When I print it, the list contains just > 13 offsets (I've used the same code as in the > itk::ScalarImageToTextureImageFilter). The problem comes when I call your > SetOffsets(myOffsetList) method, my application starts printing a lot of > offsets, I guess all the possible combinations for three dimensions. > Do you know this "problem"? Then, what is the real offsets your filter use? > > Thank you so much. > Kind regards. > /Francisco > > 2015-09-25 15:10 GMT+02:00 Bradley Lowekamp >: > >> Hello, >> >> For my itkTextureFeatureImageFilter, the default for the OffsetVector is >> an empty list. So it is required to set this member to get meaningful >> results. >> >> ITK is an OpenSource project. When you don't know how something is >> implemented you can open the hood and find out [1]. >> >> HTH, >> Brad >> >> [1] >> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx#L66-L76 >> >> On Sep 25, 2015, at 6:37 AM, Francisco Lopez de la Franca < >> franciscolopezdelafranca at gmail.com >> > >> wrote: >> >> Which directions (for 3D images) will your filter use if I donot specify >> any offset? >> >> 2015-09-25 11:12 GMT+02:00 Francisco Lopez de la Franca < >> franciscolopezdelafranca at gmail.com >> >: >> >>> Hi again, >>> >>> For 3D images, what should I use as default offset vector if I use your >>> class? >>> >>> I've been using itk::ScalarImageToTextureFeaturesFilter for 3D images >>> and I've also done some tests on 3D NIFTI images but its description talks >>> only about the default 2D image offsets ({(-1, 0), (-1, -1), (0, -1), (1, >>> -1)}) but not for 3D. Besides, the 2D default is missing some offsets. >>> >>> I'd like to use your class and test it with the same default values as >>> with the ScalarIm.... class. >>> >>> Thank you very much. >>> My best regards. >>> >>> >>> 2015-09-22 14:27 GMT+02:00 Bradley Lowekamp >> >: >>> >>>> Hello, >>>> >>>> Please try to keep this discussion on the mailing list. >>>> >>>> You can find a basic program here [1]. Which provide a good example >>>> for usage. >>>> >>>> It allows writing to any file format that ITK supports with vector >>>> images. I know that mha, nii, and nrrd should support this. Others may and >>>> it varies based what modules are compiled into ITK. >>>> >>>> You can see how the texture information is written into the vector here >>>> [2]. Contributions to improve the documentation are welcomed. >>>> >>>> >>>> >>>> [1] >>>> https://github.com/blowekamp/itkTextureAnalysis/blob/master/test/itkTextureFeatureImageFilterTest.cxx >>>> [2] >>>> https://github.com/blowekamp/itkTextureAnalysis/blob/b3911a8ab891859c50c7e3c8819d1a9fa0eaf4af/include/itkTextureFeatureImageFilter.hxx#L217-L224 >>>> >>>> On Sep 22, 2015, at 3:25 AM, Francisco Lopez de la Franca < >>>> franciscolopezdelafranca at gmail.com >>>> > >>>> wrote: >>>> >>>> Hi Bradley, >>>> I'd like to use your class. A couple of questions: >>>> >>>> - Which format can the vectorimage generated be saved in? Is it >>>> possible to save it in Nifti format? >>>> >>>> - Which information does the vector image contain, I mean, what is the >>>> info stored for each voxel? How can I access that info? >>>> >>>> I guess the usage of yourclass is in the same way as any ITK filter: >>>> >>>> yourFilter->setInput(inputImage); >>>> yourFilter->setWindowSize(windowSize); >>>> ... // other sets... >>>> yourFilter->update(); >>>> vectorImage = yourFilter->GetOutput(); >>>> >>>> but, how can I read the data of each voxel in the vector image? >>>> >>>> Thank you very much. >>>> Kind regards. >>>> >>>> >>>> 2015-09-21 14:30 GMT+02:00 Bradley Lowekamp >>> >: >>>> >>>>> Hello, >>>>> >>>>> I have a external ITK extension you may find useful: >>>>> >>>>> https://github.com/blowekamp/itkTextureAnalysis/blob/master/include/itkTextureFeatureImageFilter.h >>>>> >>>>> This computed the GLCM, for a neighborhood for every pixel and >>>>> produces a VectorImage with all the features. >>>>> >>>>> Contributions to improving the class and documentation are welcome. >>>>> >>>>> HTH, >>>>> Brad >>>>> >>>>> On Sep 21, 2015, at 7:15 AM, Francisco Lopez de la Franca < >>>>> franciscolopezdelafranca at gmail.com >>>>> > >>>>> wrote: >>>>> >>>>> > Hi, >>>>> > I've used the itk::Statistics::ScalarImageToTextureFeaturesFilter >>>>> class with the default parameters and everything was OK. >>>>> > >>>>> > But now, I have to calculate the texture features of a 2D scalar >>>>> image pixel by pixel, I mean, iterate over the whole image and calculate >>>>> the texture features of every pixel. >>>>> > >>>>> > I guess I've got to use each pixel as the masked region over which >>>>> to calculate the texture features, but I think this process could be very >>>>> slow (I have to do it with a lot of 2D images). >>>>> > >>>>> > Is there a faster way to do it or isn't it possible as I've >>>>> described? >>>>> > >>>>> > Thanks a lot. >>>>> > Kind regards. >>>>> > _____________________________________ >>>>> > Powered by www.kitware.com >>>>> > >>>>> > Visit other Kitware open-source projects at >>>>> > http://www.kitware.com/opensource/opensource.html >>>>> > >>>>> > Kitware offers ITK Training Courses, for more information visit: >>>>> > http://www.kitware.com/products/protraining.php >>>>> > >>>>> > Please keep messages on-topic and check the ITK FAQ at: >>>>> > http://www.itk.org/Wiki/ITK_FAQ >>>>> > >>>>> > Follow this link to subscribe/unsubscribe: >>>>> > http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>>>> >>>> >>>> >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Tue Sep 29 01:27:28 2015 From: itkhelpacc at gmail.com (vis) Date: Mon, 28 Sep 2015 22:27:28 -0700 (MST) Subject: [ITK-users] Feature image Message-ID: <1443504448943-7587928.post@n2.nabble.com> hey itk users i was trying to learn itk and I came across a code in [1]. it takes an 3d image as input and produces an feature image as an output.. i want to use it for 2d image... could anyone please tell me how? regards vis [1] http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Feature-image-tp7587928.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From s120049 at e.ntu.edu.sg Tue Sep 29 01:52:23 2015 From: s120049 at e.ntu.edu.sg (geetha) Date: Mon, 28 Sep 2015 22:52:23 -0700 (MST) Subject: [ITK-users] Saving deformation field in vector container In-Reply-To: References: <1443416211303-7587905.post@n2.nabble.com> Message-ID: Hi Matt, Here's a short compilable code for it. The deformation field I'm using can be accessed from here. It fails when updating the container. #include #include "itkImage.h" #include "itkImageFileReader.h" const unsigned int Dimension = 3; typedef double CoordinateRepType; typedef itk::Vector< float, Dimension > VectorType; typedef itk::Image< VectorType, Dimension > DisplacementFieldType; typedef itk::VectorContainerDFTransformContainerType; int main( int argc, char *argv[] ) { int inputId = 1; typedef itk::ImageFileReader< DisplacementFieldType > fieldReaderType; DFTransformContainerType::Pointer DeffieldContainer = DFTransformContainerType::New() ; fieldReaderType::Pointer deffield = fieldReaderType::New(); deffield->SetFileName( argv[1]); deffield->Update(); std::cout<<"Updating container!"<SetElement( inputId++ , deffield->GetOutput() ); //Fails here } catch (itk::ExceptionObject &excp) { std::cerr << "Exception thrown while updating container" << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } std::cout<<"DONE!"<> wrote: > Hi, > > I am registering images through diffeomorphic demons filter and tying to > save the deformation field in vector containers. I saved registration > transforms of other rigid registrations in vector containers and it was > successful. However, trying to save deformation field in container always > result in abrupt crashing of program. I was able to save deformation field, > only transferring it into container is a problem. Unfortunately, even with > catch I couldn't get any specifics of error. What am I missing? > > (My code for displacement field vector container and updating in container) > > const unsigned int Dimension = 3; > typedef itk::Vector< float, Dimension > VectorType; > typedef itk::Image< VectorType, Dimension > DisplacementFieldType; > typedef > itk::VectorContainerDFTransformContainerType; > DFTransformContainerType::Pointer DeffieldContainer = > DFTransformContainerType::New() ; > > //My output from registration stored in 'deffield' > defField = ddfilter->GetDeformationField(); > > DeffieldContainer->SetElement( inputId++ , defField ); > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Saving-deformation-field-in-vector-container-tp7587905.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users ________________________________ If you reply to this email, your message will be added to the discussion below: http://itk-insight-users.2283740.n2.nabble.com/Saving-deformation-field-in-vector-container-tp7587905p7587915.html To unsubscribe from Saving deformation field in vector container, click here. NAML ----- Thanks, Geetha -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Saving-deformation-field-in-vector-container-tp7587905p7587929.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From franciscolopezdelafranca at gmail.com Tue Sep 29 02:29:21 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Tue, 29 Sep 2015 08:29:21 +0200 Subject: [ITK-users] Feature image In-Reply-To: <1443504448943-7587928.post@n2.nabble.com> References: <1443504448943-7587928.post@n2.nabble.com> Message-ID: Hi, Use 2 as dimension for the image type, neighbour, and loop only for x and y axis, not z. I hope this helps. Regards. 2015-09-29 7:27 GMT+02:00 vis : > hey itk users > i was trying to learn itk and I came across a code in [1]. it takes an 3d > image as input and produces an feature image as an output.. i want to use > it > for 2d image... could anyone please tell me how? > regards > vis > [1] http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures > > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Feature-image-tp7587928.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From s120049 at e.ntu.edu.sg Tue Sep 29 02:31:50 2015 From: s120049 at e.ntu.edu.sg (geetha) Date: Mon, 28 Sep 2015 23:31:50 -0700 (MST) Subject: [ITK-users] Saving deformation field in vector container In-Reply-To: References: <1443416211303-7587905.post@n2.nabble.com> Message-ID: Hi Matt, Here's a short compilable code for it. The deformation field I'm using can be accessed from here. It fails when updating the container. #include #include "itkImage.h" #include "itkImageFileReader.h" const unsigned int Dimension = 3; typedef double CoordinateRepType; typedef itk::Vector< float, Dimension > VectorType; typedef itk::Image< VectorType, Dimension > DisplacementFieldType; typedef itk::VectorContainerDFTransformContainerType; int main( int argc, char *argv[] ) { int inputId = 1; typedef itk::ImageFileReader< DisplacementFieldType > fieldReaderType; DFTransformContainerType::Pointer DeffieldContainer = DFTransformContainerType::New() ; fieldReaderType::Pointer deffield = fieldReaderType::New(); deffield->SetFileName( argv[1]); deffield->Update(); std::cout<<"Updating container!"<SetElement( inputId++ , deffield->GetOutput() ); //Fails here } catch (itk::ExceptionObject &excp) { std::cerr << "Exception thrown while updating container" << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } std::cout<<"DONE!"< Hi there ITK community , I am working on a task to calculate the minimum distance to multiple regions of an organ in 3D. Basically I have an image containing 20 connected regions indicated by integers from 1 to 20. My task is to assign to each voxel in the 3D volume, the label (i.e. the integer) corresponding to the closest region to that voxel. I have checked the Danielsson filter and it seems suitable to my task, however I tried it and it did not really work. To my understanding it assumes that the regions are disconnected and are indicated by "one's'" (page 127 of ITK manual 4.8) so it is not suitable for connected regions. Maybe someone has a better solution to solve my task? One solution that came to my mind is run the Danielsson filter on each region separately and then search for the minimum distance for each pixel and fetch the corresponding label. I wrote some code (see attachment) but I get a crash when I try to access the result of the Danielsson filter with an iterator. I admit that I do not have much experience so it might be some syntax errors in coding or in handling the ITK objects etc. Any help is appreciated. Regards, Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ComputeMinDistanceLabels.cpp Type: text/x-c++src Size: 5961 bytes Desc: not available URL: From s.serviddio at gmail.com Tue Sep 29 05:38:40 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Tue, 29 Sep 2015 11:38:40 +0200 Subject: [ITK-users] Husdorff Distance Message-ID: Hi, I'm trying to measure Husdorff distance between two dicom/png image for evaluating the difference before and after registration, but I have a weird result because, also I see that the images are exactly aligned the husdroff distance increases instead decreases. This is my code, probably I have done some mistakes. #include #include #include "itkImageRegionIterator.h" #include "itkImageFileReader.h" #include "itkGDCMImageIO.h" #include "itkPNGImageIO.h" #include "itkDirectedHausdorffDistanceImageFilter.h" #include "itkHausdorffDistanceImageFilter.h" int main() { typedef unsigned short PixelType1; typedef unsigned short PixelType2; const unsigned int Dimension=2; time_t now = time(0); struct tm tstruct; char buf[80]; tstruct = *localtime(&now); strftime(buf, sizeof(buf), "%Y-%m-%d %X", &tstruct); std::ofstream resultfile; char Risultati[] = "D:/Immagini/HusdorffResul.txt"; resultfile.open(Risultati, std::ios::app); if (resultfile.is_open()) { std::cout << "File Open exists\n"; } resultfile<<"Data :"< Image1Type; typedef itk::Image Image2Type; typedef itk::ImageFileReader FileReaderType1; typedef itk::ImageFileReader FileReaderType2; FileReaderType1::Pointer reader1=FileReaderType1::New(); FileReaderType2::Pointer reader2=FileReaderType2::New(); reader1->SetFileName("D:/Images/12.png"); reader1->SetImageIO(itk::PNGImageIO::New()); reader2->SetFileName("D:/Images/240.png"); reader2->SetImageIO(itk::PNGImageIO::New()); typedef itk::GDCMImageIO GDCMType; GDCMType::Pointer gdcm=GDCMType::New(); /*reader1->SetImageIO(gdcm); reader2->SetImageIO(gdcm);*/ reader1->Update(); reader2->Update(); std::cout<<"Image Loading Complete!!!"<GetOutput(); Image2Type::Pointer image2 = reader2->GetOutput(); image1->Allocate(); image2->Allocate(); Image1Type::PointType origin1; Image1Type::PointType origin2; Image1Type::SpacingType spacing; origin1.Fill(0.0); spacing.Fill(1.0); image1->SetOrigin(origin1); image1->SetSpacing(spacing); std::cout<<"Immagini allocate in memoria"<GetLargestPossibleRegion().GetSize() << std::endl; resultfile << "Dim Immagine Mov: " << image2->GetLargestPossibleRegion().GetSize() << std::endl; image2->SetOrigin(image1->GetOrigin()); image2->SetSpacing(image1->GetSpacing()); resultfile<<"Nuova Origine Mov: "<GetOutput()->GetOrigin()<GetOutput()->GetSpacing()<GetOutput()->GetOrigin()<GetOutput()->GetSpacing()< DirectHausdType; DirectHausdType::Pointer filter1=DirectHausdType::New(); filter1->SetInput1(image1); filter1->SetInput2(image2); filter1->SetUseImageSpacing(true); try { filter1->Update(); DirectHausdType::RealType distance=filter1->GetDirectedHausdorffDistance(); resultfile<<"Distanza h(a,b) Immagini: "<<(double)distance<<" mm "<GetAverageHausdorffDistance()<<" mm"<GetAverageHausdorffDistance()<<" mm "< DirectHausdType2; DirectHausdType2::Pointer filter=DirectHausdType2::New(); filter->SetInput1(image2); filter->SetInput2(image1); try { filter->SetUseImageSpacing(true); filter->Update(); DirectHausdType2::RealType distance=filter->GetDirectedHausdorffDistance(); resultfile<<"Distanza h(b,a) Immagini: "<<(double)distance<<" mm "<GetAverageHausdorffDistance()<<" mm"<GetAverageHausdorffDistance()< FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput1( image1 ); filter->SetInput2( image2 ); try{ filter->SetUseImageSpacing(true); filter->Update(); FilterType::RealType distance = filter->GetHausdorffDistance(); resultfile << " H(a,b) Distanza Hausdorff " << (double)distance <<" mm "<< std::endl; resultfile << " H(a,b) Distanza Hausdorff Media " << filter->GetAverageHausdorffDistance() << " mm "<< std::endl; std::cout << " H(a,b) Distanza Hausdorff " << (double)distance << std::endl; std::cout << " H(a,b) Distanza Hausdorff Media " << filter->GetAverageHausdorffDistance() << std::endl; }catch( itk::ExceptionObject & err ) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; return EXIT_FAILURE; } } // Hausdorff distance H(image2,image1) { typedef itk::HausdorffDistanceImageFilter FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput1( image2 ); filter->SetInput2( image1 ); try{ filter->SetUseImageSpacing(true); filter->Update(); FilterType::RealType distance = filter->GetHausdorffDistance(); resultfile << " H(b,a) Distanza Hausdorff " << (double)distance <<" mm "<< std::endl; resultfile << " H(b,a) Distanza Hausdorff Media " << (double)filter->GetAverageHausdorffDistance() <<" mm "<< std::endl; std::cout << " H(b,a) Distanza Hausdorff " << (double)distance << std::endl; std::cout << " H(b,a) Distanza Hausdorff Media " << (double) filter->GetAverageHausdorffDistance() << std::endl; } catch( itk::ExceptionObject & err ) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl; return EXIT_FAILURE; } } resultfile.close(); return EXIT_SUCCESS; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Tue Sep 29 05:54:00 2015 From: itkhelpacc at gmail.com (vis) Date: Tue, 29 Sep 2015 02:54:00 -0700 (MST) Subject: [ITK-users] Texture pixel by pixel In-Reply-To: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> Message-ID: <1443520440291-7587934.post@n2.nabble.com> hi, could u please explain me wat does itkTextureFeatureImageFilterTest.cxx and itkTextureMovingHistogramImageFilter.cxx do?wat is the difference?? regards vis -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587934.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From itkhelpacc at gmail.com Tue Sep 29 06:08:40 2015 From: itkhelpacc at gmail.com (vis) Date: Tue, 29 Sep 2015 03:08:40 -0700 (MST) Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> Message-ID: <1443521320260-7587935.post@n2.nabble.com> hi all, im trying to build the itkTextureFeatureImageFilterTest.cxx code but im not able to it is showing the following error 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug x64 ------ 1> Checking Build System 1> CMake does not need to re-run because D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/CMakeFiles/generate.stamp is up-to-date. 2>------ Rebuild All started: Project: itkTextureFeatureImageFilterTest, Configuration: Debug x64 ------ 2> Building Custom Rule D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt 2> CMake does not need to re-run because D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp is up-to-date. 2> itkTextureFeatureImageFilterTest.cxx 2>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2176): warning C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' 2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' 2> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(439) : see reference to function template instantiation '_OutIt std::copy(_InIt,_InIt,_OutIt)' being compiled 2> with 2> [ 2> _OutIt=unsigned char *, 2> _InIt=const unsigned char * 2> ] 2> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(353) : while compiling class template member function 'void itk::ImageFileReader::GenerateData(void)' 2> with 2> [ 2> TOutputImage=InputImageType 2> ] 2> D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\itkTextureFeatureImageFilterTest.cxx(47) : see reference to class template instantiation 'itk::ImageFileReader' being compiled 2> with 2> [ 2> TOutputImage=InputImageType 2> ] 2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' 2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' 2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' 2> Creating library D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.lib and object D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.exp 2>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol main referenced in function __tmainCRTStartup 2>D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\Debug\itkTextureFeatureImageFilterTest.exe : fatal error LNK1120: 1 unresolved externals 3>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug x64 ------ 3> Building Custom Rule D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt 3> CMake does not need to re-run because D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp is up-to-date. ========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ========== im using the follwing CMakeList.txt # This is the root ITK CMakeLists file. cmake_minimum_required(VERSION 2.4) if(COMMAND CMAKE_POLICY) cmake_policy(SET CMP0003 NEW) endif() # This project is designed to be built outside the Insight source tree. project(HelloWorld) # Find ITK. find_package(ITK REQUIRED) include(${ITK_USE_FILE}) add_executable(itkTextureFeatureImageFilterTest itkTextureFeatureImageFilterTest.cxx ) target_link_libraries(itkTextureFeatureImageFilterTest ${ITK_LIBRARIES}) please tel me wat the error is?? -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587935.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From mlt.khawla at gmail.com Tue Sep 29 05:38:32 2015 From: mlt.khawla at gmail.com (Daoued23) Date: Tue, 29 Sep 2015 02:38:32 -0700 (MST) Subject: [ITK-users] Spatially variant morphological closing Message-ID: <1443519512512-36230.post@n7.nabble.com> Hi everyone, I want to implement a spatially variant morphological closing, which its structuring element is estimated for every pixel. I work on binary images. So to apply the aspatially variant morphological closing, we estimate the structuring element for every pixel surrounded by its neighborhood, apply the dilation on every neighbouring window with the corresponding estimated structring element. Then we get the dilated image as the union of all the dilated windows. Now, we apply the erosion on every neighbouring window of the dilated image with the transposed of the structuring element already estimated. The adaptively closed image will be the union of the eroded windows of the dilated image. Now the problem is that, we find background windows (all pixels are black) in the image, so we cannot estimate a structuring element. when it's the phase of the dilation we don't apply anything, but some pixels can appear in this windows as the result of the union of the surrounding windows that have been dilated. When applying the erosion on these new pixels which structuring element should we consider knowing that we can't estimate one based on the original image (backgrounf window)??? Thank you Best regards -- View this message in context: http://itk-users.7.n7.nabble.com/Spatially-variant-morphological-closing-tp36230.html Sent from the ITK - Users mailing list archive at Nabble.com. From itkhelpacc at gmail.com Tue Sep 29 06:59:46 2015 From: itkhelpacc at gmail.com (vis) Date: Tue, 29 Sep 2015 03:59:46 -0700 (MST) Subject: [ITK-users] Doubt on .mha file? Message-ID: <1443524386201-7587937.post@n2.nabble.com> hi all, i came across a file with .mha extension.. i tried to read it with ImageJ but it is not reading can anyone pls tell me how can i read and display this type of file format using ITK?.... regards vis -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Doubt-on-mha-file-tp7587937.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From lluna.nova at gmail.com Tue Sep 29 07:10:51 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Tue, 29 Sep 2015 13:10:51 +0200 Subject: [ITK-users] Doubt on .mha file? In-Reply-To: <1443524386201-7587937.post@n2.nabble.com> References: <1443524386201-7587937.post@n2.nabble.com> Message-ID: You have to install a plugin to ImageJ. I believe it was this one: http://ij-plugins.sourceforge.net/plugins/3d-io/ On Tue, Sep 29, 2015 at 12:59 PM, vis wrote: > hi all, > i came across a file with .mha extension.. i tried to read it with ImageJ > but it is not reading can anyone pls tell me how can i read and display > this > type of file format using ITK?.... > regards > vis > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Doubt-on-mha-file-tp7587937.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.serviddio at gmail.com Tue Sep 29 07:15:29 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Tue, 29 Sep 2015 13:15:29 +0200 Subject: [ITK-users] Set initial demons registration dispalcement transform Message-ID: Hi, Do you know if there is a way to set initial displacement transform for symmetric demons registration? I have done a rigidal registration with mutua information and I want use the final parameters of composite transform to set Demons Registration starting points. I no found a demons registration filter method to set the initial displacement value. -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Tue Sep 29 07:17:37 2015 From: itkhelpacc at gmail.com (vis) Date: Tue, 29 Sep 2015 04:17:37 -0700 (MST) Subject: [ITK-users] Feature image In-Reply-To: References: <1443504448943-7587928.post@n2.nabble.com> Message-ID: hey Francisco, i tried to do as u said.. i could build the code as well .. i ran it for itkBrainSliceComplex.mha successfully... i need this to run for 2d .png file.... the code run for only one iteration.. then it throws an Abort error... pls help me out... #include "itkImage.h" //from http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include #include "itkHistogramToTextureFeaturesFilter.h" #include "itkScalarImageToCooccurrenceMatrixFilter.h" #include "itkVectorContainer.h" #include "itkAddImageFilter.h" #include "itkMultiplyImageFilter.h" #include "itkRegionOfInterestImageFilter.h" //definitions of used types typedef itk::Image InternalImageType; //change from 3 typedef itk::Image VisualizingImageType; //change to 3 typedef itk::Neighborhood NeighborhoodType; //change to 3 typedef itk::Statistics::ScalarImageToCooccurrenceMatrixFilter Image2CoOccuranceType; typedef Image2CoOccuranceType::HistogramType HistogramType; typedef itk::Statistics::HistogramToTextureFeaturesFilter Hist2FeaturesType; typedef InternalImageType::OffsetType OffsetType; typedef itk::AddImageFilter AddImageFilterType; typedef itk::MultiplyImageFilter MultiplyImageFilterType; //calculate features for one offset void calcTextureFeatureImage (OffsetType offset, InternalImageType::Pointer inputImage, InternalImageType::Pointer outInertia, InternalImageType::Pointer outCorrelation, InternalImageType::Pointer outEnergy) { //allocate output images outInertia->CopyInformation(inputImage); outInertia->SetRegions(inputImage->GetLargestPossibleRegion()); outInertia->Allocate(); outInertia->FillBuffer(0); outCorrelation->CopyInformation(inputImage); outCorrelation->SetRegions(inputImage->GetLargestPossibleRegion()); outCorrelation->Allocate(); outCorrelation->FillBuffer(0); outEnergy->CopyInformation(inputImage); outEnergy->SetRegions(inputImage->GetLargestPossibleRegion()); outEnergy->Allocate(); outEnergy->FillBuffer(0); Image2CoOccuranceType::Pointer glcmGenerator=Image2CoOccuranceType::New(); glcmGenerator->SetOffset(offset); glcmGenerator->SetNumberOfBinsPerAxis(16); //reasonable number of bins glcmGenerator->SetPixelValueMinMax(0, 255); //for input UCHAR pixel type Hist2FeaturesType::Pointer featureCalc=Hist2FeaturesType::New(); typedef itk::RegionOfInterestImageFilter roiType; roiType::Pointer roi=roiType::New(); roi->SetInput(inputImage); InternalImageType::RegionType window; InternalImageType::RegionType::SizeType size; // size.Fill(3); //window size=3x3x3 size.Fill(2); window.SetSize(size); InternalImageType::IndexType pi; //pixel index //slide window over the entire image for (unsigned x=1; xGetLargestPossibleRegion().GetSize(0)-1; x++) { pi.SetElement(0,x); window.SetIndex(0,x-1); for (unsigned y=1; yGetLargestPossibleRegion().GetSize(1)-1; y++) { pi.SetElement(1,y); window.SetIndex(1,y-1); /* for (unsigned z=1; zGetLargestPossibleRegion().GetSize(2)-1; z++) { pi.SetElement(2,z); window.SetIndex(2,z-1);*/ roi->SetRegionOfInterest(window); roi->Update(); glcmGenerator->SetInput(roi->GetOutput()); glcmGenerator->Update(); featureCalc->SetInput( glcmGenerator->GetOutput() ); featureCalc->Update(); outInertia->SetPixel(pi, featureCalc->GetFeature(Hist2FeaturesType::Inertia)); outCorrelation->SetPixel(pi, featureCalc->GetFeature(Hist2FeaturesType::Correlation)); outEnergy->SetPixel(pi, featureCalc->GetFeature(Hist2FeaturesType::Energy)); // } } std::cout<<'.'; } } int main(int argc, char*argv[]) { if(argc < 2) { std::cerr << "Usage: " << argv[0] << " Required image.dcm" << std::endl; return EXIT_FAILURE; } std::string fileName = argv[1]; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader=ReaderType::New(); reader->SetFileName(fileName); reader->Update(); InternalImageType::Pointer image=reader->GetOutput(); NeighborhoodType neighborhood; neighborhood.SetRadius(1); unsigned int centerIndex = neighborhood.GetCenterNeighborhoodIndex(); OffsetType offset; typedef itk::ImageFileWriter WriterType; WriterType::Pointer writer=WriterType::New(); for ( unsigned int d = 0; d < centerIndex; d++ ) { offset = neighborhood.GetOffset(d); InternalImageType::Pointer inertia=InternalImageType::New(); InternalImageType::Pointer correlation=InternalImageType::New(); InternalImageType::Pointer energy=InternalImageType::New(); calcTextureFeatureImage(offset, image, inertia, correlation, energy); writer->SetInput(inertia); // snprintf(buf, 100, "Inertia%u.mha", d); // Warning: call to int __builtin___snprintf_chk will always overflow destination buffer std::stringstream ssInertia; // ssInertia << "Inertia" << d << ".mha"; ssInertia << "Inertia" << d << ".dcm"; writer->SetFileName(ssInertia.str()); writer->Update(); writer->SetInput(correlation); std::stringstream ssCorrelation; // ssCorrelation << "Correlation" << d << ".mha"; ssCorrelation << "Correlation" << d << ".dcm"; writer->SetFileName(ssCorrelation.str()); writer->Update(); writer->SetInput(energy); std::stringstream ssEnergy; // ssEnergy << "Energy" << d << ".mha"; ssEnergy << "Energy" << d << ".dcm"; writer->SetFileName(ssEnergy.str()); writer->Update(); std::cout<<'\n'; } return EXIT_SUCCESS; } On Tue, Sep 29, 2015 at 11:59 AM, Francisco L?pez-Franca [via ITK Insight Users] wrote: > Hi, > Use 2 as dimension for the image type, neighbour, and loop only for x and > y axis, not z. > I hope this helps. > Regards. > > 2015-09-29 7:27 GMT+02:00 vis <[hidden email] > >: > >> hey itk users >> i was trying to learn itk and I came across a code in [1]. it takes an 3d >> image as input and produces an feature image as an output.. i want to use >> it >> for 2d image... could anyone please tell me how? >> regards >> vis >> [1] http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures >> >> >> >> >> -- >> View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/Feature-image-tp7587928.html >> Sent from the ITK Insight 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 >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://itk-insight-users.2283740.n2.nabble.com/Feature-image-tp7587928p7587930.html > To unsubscribe from Feature image, click here > > . > NAML > > -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Feature-image-tp7587928p7587940.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matimontg at gmail.com Tue Sep 29 08:13:32 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 29 Sep 2015 09:13:32 -0300 Subject: [ITK-users] Doubt on .mha file? In-Reply-To: <1443524386201-7587937.post@n2.nabble.com> References: <1443524386201-7587937.post@n2.nabble.com> Message-ID: I read mha images using ITK, you may need to set the dimensions to 3 since mha files are usually dicom series, can you share the code you have so far? Matias On Sep 29, 2015 7:59 AM, "vis" wrote: > hi all, > i came across a file with .mha extension.. i tried to read it with ImageJ > but it is not reading can anyone pls tell me how can i read and display > this > type of file format using ITK?.... > regards > vis > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Doubt-on-mha-file-tp7587937.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Tue Sep 29 08:21:08 2015 From: itkhelpacc at gmail.com (vis) Date: Tue, 29 Sep 2015 05:21:08 -0700 (MST) Subject: [ITK-users] Doubt on .mha file? In-Reply-To: References: <1443524386201-7587937.post@n2.nabble.com> Message-ID: hi, thanks for ur answers... im working on a project that requires me to calculate Entropy feature image from the input 2d dicom image...basically i need to go pixel to pixel of the input image and replace it by the entropy value of its 3x3 neighbouring pixels... i came across this code [1].. this code works well for .mha file and i was trying to modify it to work for 2d dicom image but i cant ... i think im going crazy...pls help me out of this problem... [1]http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures regards vishal On Tue, Sep 29, 2015 at 5:43 PM, Matias Montroull [via ITK Insight Users] < ml-node+s2283740n7587941h27 at n2.nabble.com> wrote: > I read mha images using ITK, you may need to set the dimensions to 3 since > mha files are usually dicom series, can you share the code you have so far? > > Matias > On Sep 29, 2015 7:59 AM, "vis" <[hidden email] > > wrote: > >> hi all, >> i came across a file with .mha extension.. i tried to read it with ImageJ >> but it is not reading can anyone pls tell me how can i read and display >> this >> type of file format using ITK?.... >> regards >> vis >> >> >> >> -- >> View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/Doubt-on-mha-file-tp7587937.html >> Sent from the ITK Insight 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 >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://itk-insight-users.2283740.n2.nabble.com/Doubt-on-mha-file-tp7587937p7587941.html > To unsubscribe from Doubt on .mha file?, click here > > . > NAML > > -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Doubt-on-mha-file-tp7587937p7587942.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From blowekamp at mail.nih.gov Tue Sep 29 08:25:53 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 29 Sep 2015 08:25:53 -0400 Subject: [ITK-users] Minimum Distance to multiple connected regions In-Reply-To: References: Message-ID: Hello, I would look into the MorphologicalWatershedFromMarkersImageFilter [1]. Brad [1] http://www.itk.org/Doxygen/html/classitk_1_1MorphologicalWatershedFromMarkersImageFilter.html On Sep 29, 2015, at 4:57 AM, marco giordano wrote: > Hi there ITK community , > > I am working on a task to calculate the minimum distance to multiple regions of an organ in 3D. Basically I have an image containing 20 connected regions indicated by integers from 1 to 20. > My task is to assign to each voxel in the 3D volume, the label (i.e. the integer) corresponding to the closest region to that voxel. I have checked the Danielsson filter and it seems suitable to my task, however I tried it and it did not really work. To my understanding it assumes that the regions are disconnected and are indicated by "one's'" (page 127 of ITK manual 4.8) so it is not suitable for connected regions. Maybe someone has a better solution to solve my task? > > One solution that came to my mind is run the Danielsson filter on each region separately and then search for the minimum distance for each pixel and fetch the corresponding label. > I wrote some code (see attachment) but I get a crash when I try to access the result of the Danielsson filter with an iterator. I admit that I do not have much experience so it might be some syntax errors in coding or in handling the ITK objects etc. > > Any help is appreciated. > > Regards, > Marco > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Tue Sep 29 10:21:27 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 29 Sep 2015 10:21:27 -0400 Subject: [ITK-users] ITK 4.8.1 has been released! Message-ID: On behalf of the Insight Toolkit Community, we are happy to announce the release of ITK 4.8.1! Release files can be downloaded from: http://itk.org/ITK/resources/software.html This is a patch release that fixes critical issues, regressions, important documentation, and compiler support. Most importantly, the 4.8.1 release completes fixes for Python 3 wrapping! A number of other Python-related fixes are included, such as NumPy bridge support for Visual Studio, and Python library binary compatibility improvements for system / HomeBrew / Anaconda Python on Mac OSX. There are also a number of other various fixes, described in the log below. The next feature release, 4.9.0, is scheduled for December, and it will feature many exciting enhancements! Enjoy ITK! Changes from v4.8.0 to v4.8.1: Abhishek Tiwari (1): BUG: "tmpImageIndex" not initialized to 0. Davis Vigneault (1): DOC: Expanded TreeContainer Example Matthew McCormick (11): BUG: Implement UpdateLargestPossibleRegion for ImageToVTKImageFilter. BUG: Initialize mutex for 32 bit AtomicInt. COMP: Disable the gold linker for static builds on Ubuntu 14.04. BUG: Build BridgeNumPy with Visual Studio. BUG: Support Python 3 wrapping module initialization. BUG: Update itkTemplate.py for Python 3. BUG: Update itkExtras.py for Python 3. BUG: Prevent Python callback addition recursion. BUG: Fix test scripts for Python 3. BUG: Replace __GCCXML__ with CABLE_CONFIGURATION. ENH: Bump CMakeLists.txt version to 4.8.1. Michka Popoff (1): ENH: Do not link against specific Python library on OS X Shawn Waldon (1): COMP: Set target OS X version in environment for tools using compiler Tobias Wood (2): BUG: LBFGSB was printing messages even with debug switched off. BUG: Removed an unguarded print statement. Vladimir S. FONOV (2): BUG: Missing ITKIOMINC_EXPORT on __Private() COMP: Changing the order of HDF5 library components From ribaluigi at gmail.com Tue Sep 29 10:46:05 2015 From: ribaluigi at gmail.com (Luigi Riba) Date: Tue, 29 Sep 2015 16:46:05 +0200 Subject: [ITK-users] [ITK] FEM registration algorithm Message-ID: Hello ITK community, I am now working on ITK since a couple of months and I am getting interested in FEM registration method. I have read the manual and the Kitware presentation about the method. Anyhow, I still need some clarifications. Could you direct me to a publication describing the FEM registration algorithm implemented in ITK? Best, Luigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Tue Sep 29 13:42:43 2015 From: itkhelpacc at gmail.com (vis) Date: Tue, 29 Sep 2015 10:42:43 -0700 (MST) Subject: [ITK-users] More Details About ITK-SNAP?? Message-ID: <1443548563634-7587946.post@n2.nabble.com> hi, Im working on an application that should allow the user to select two Xray images and perform bone segmentation on them and then register these two images.. since i want to learn more about registration algorithm i do not want to spend more time one developing the GUI and the segmentation code... I came across this open source software called ITK-SNAP that has good segmentation techniques....Is there any way i can use this segmentation algo and GUI code from ITK-SNAP and add my registration code to it...if it not possible using ITK-SNAP are there any other such open source software available so that i can avoid spending time in coming up with an efficient segmentation algorithm and GUI.. and spend more time experimenting with registration algo.....please advice....thank you.. regards vis -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/More-Details-About-ITK-SNAP-tp7587946.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From alex.med.marco at gmail.com Tue Sep 29 14:28:32 2015 From: alex.med.marco at gmail.com (Alex Med) Date: Tue, 29 Sep 2015 21:58:32 +0330 Subject: [ITK-users] Adding two images Message-ID: HI, in blending two images what do we do for FIXING background whole 0-1 value range this->blend = vtkSmartPointer::New(); blend->SetOpacity( 0, 1.0 ); blend->SetOpacity( 1, 0.6 ); blend->AddInputConnection( firstColorMapper->GetOutputPort() ); blend->AddInputConnection( secondColorMapper->GetOutputPort() ); blend->Update(); in this case fixed images is port : 0 but in during change foreground and background will be changed is there any setting for blending (0-1) background be Fixed Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From davis.vigneault at gmail.com Tue Sep 29 16:24:55 2015 From: davis.vigneault at gmail.com (DVigneault) Date: Tue, 29 Sep 2015 13:24:55 -0700 (MST) Subject: [ITK-users] Procedure for Submitting Patches to Remote Modules/Third Party Libraries Message-ID: <1443558295701-7587948.post@n2.nabble.com> All-- Is the procedure for submitting a patch for (a) a remote module or (b) a third party library different from the typical procedure [1]? I'm wondering whether the patch is submitted as usual and then forwarded, or if the patch should be submitted directly to the original repository. (Specifically I'm thinking of GDCM [2] and the Subdivision module [3].) Best, and thanks, --Davis [1] http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html [2] https://github.com/malaterre/GDCM [3] https://github.com/InsightSoftwareConsortium/itkSubdivisionQuadEdgeMeshFilter -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Procedure-for-Submitting-Patches-to-Remote-Modules-Third-Party-Libraries-tp7587948.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From richard.beare at gmail.com Tue Sep 29 16:26:26 2015 From: richard.beare at gmail.com (Richard Beare) Date: Wed, 30 Sep 2015 05:56:26 +0930 Subject: [ITK-users] Minimum Distance to multiple connected regions In-Reply-To: References: Message-ID: I'd also check out the labelerodedilate module (available via the Remote module system in the new versions of ITK). I've found that using watershed to create a label-based tessellation can be a problem as the distances get larger. If you use the label dilate facilities you would use a large dilation and then use the resulting label image to mask a distance transform. I also have a vague memory that the Maurer distance transform filter returns some form of tesselation image, which may be useful On Tue, Sep 29, 2015 at 9:55 PM, Bradley Lowekamp wrote: > Hello, > > I would look into the MorphologicalWatershedFromMarkersImageFilter [1]. > > Brad > > [1] > http://www.itk.org/Doxygen/html/classitk_1_1MorphologicalWatershedFromMarkersImageFilter.html > > On Sep 29, 2015, at 4:57 AM, marco giordano wrote: > > > Hi there ITK community , > > > > I am working on a task to calculate the minimum distance to multiple > regions of an organ in 3D. Basically I have an image containing 20 > connected regions indicated by integers from 1 to 20. > > My task is to assign to each voxel in the 3D volume, the label (i.e. the > integer) corresponding to the closest region to that voxel. I have checked > the Danielsson filter and it seems suitable to my task, however I tried it > and it did not really work. To my understanding it assumes that the regions > are disconnected and are indicated by "one's'" (page 127 of ITK manual 4.8) > so it is not suitable for connected regions. Maybe someone has a better > solution to solve my task? > > > > One solution that came to my mind is run the Danielsson filter on each > region separately and then search for the minimum distance for each pixel > and fetch the corresponding label. > > I wrote some code (see attachment) but I get a crash when I try to > access the result of the Danielsson filter with an iterator. I admit that I > do not have much experience so it might be some syntax errors in coding or > in handling the ITK objects etc. > > > > Any help is appreciated. > > > > Regards, > > Marco > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Tue Sep 29 16:50:11 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 29 Sep 2015 16:50:11 -0400 Subject: [ITK-users] Procedure for Submitting Patches to Remote Modules/Third Party Libraries In-Reply-To: <1443558295701-7587948.post@n2.nabble.com> References: <1443558295701-7587948.post@n2.nabble.com> Message-ID: Hi Davis, Thanks for contributing fixes to these projects! For GDCM, if you make a change to the source code in the ITK tree, it will give instructions on how to submit the patch upstream [1]. For the remote module, please create a pull request on the InsightSoftwareConsortium GitHub repository. In the pull request, make a comment that pings authors in the history of the repository, like "please review @thewtex" so that reviewers are notified of the change. After the change has been made, the Remote Module in ITK can be updated by changing the sha in Modules/Remote/*.remote.cmake. Thanks, Matt [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/Hooks/post-commit On Tue, Sep 29, 2015 at 4:24 PM, DVigneault wrote: > All-- > > Is the procedure for submitting a patch for (a) a remote module or (b) a > third party library different from the typical procedure [1]? I'm wondering > whether the patch is submitted as usual and then forwarded, or if the patch > should be submitted directly to the original repository. (Specifically I'm > thinking of GDCM [2] and the Subdivision module [3].) > > Best, and thanks, > > --Davis > > [1] > http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html > [2] https://github.com/malaterre/GDCM > [3] > https://github.com/InsightSoftwareConsortium/itkSubdivisionQuadEdgeMeshFilter > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Procedure-for-Submitting-Patches-to-Remote-Modules-Third-Party-Libraries-tp7587948.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Tue Sep 29 17:23:11 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 29 Sep 2015 17:23:11 -0400 Subject: [ITK-users] Saving deformation field in vector container In-Reply-To: References: <1443416211303-7587905.post@n2.nabble.com> Message-ID: Hi geetha, ->Reserve() [1] must be called on the VectorContainer, and the index should start from 0. Here is a working example: https://gist.github.com/2e475ad1e05c2a2a7ffb HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1VectorContainer.html#a0a8c1d4d56c47166f012caa0269aa0a0 On Tue, Sep 29, 2015 at 2:31 AM, geetha wrote: > Hi Matt, > > Here's a short compilable code for it. The deformation field I'm using can be accessed from here. It fails when updating the container. > > > #include > #include "itkImage.h" > #include "itkImageFileReader.h" > > const unsigned int Dimension = 3; > typedef double CoordinateRepType; > typedef itk::Vector< float, Dimension > VectorType; > typedef itk::Image< VectorType, Dimension > DisplacementFieldType; > typedef itk::VectorContainerDFTransformContainerType; > > int main( int argc, char *argv[] ) > { > int inputId = 1; > typedef itk::ImageFileReader< DisplacementFieldType > fieldReaderType; > DFTransformContainerType::Pointer DeffieldContainer = DFTransformContainerType::New() ; > fieldReaderType::Pointer deffield = fieldReaderType::New(); > deffield->SetFileName( argv[1]); > deffield->Update(); > > std::cout<<"Updating container!"< try > { > DeffieldContainer->SetElement( inputId++ , deffield->GetOutput() ); //Fails here > } > catch (itk::ExceptionObject &excp) > { > std::cerr << "Exception thrown while updating container" << std::endl; > std::cerr << excp << std::endl; > return EXIT_FAILURE; > } > std::cout<<"DONE!"< > } > > > Best Regards, > Geetha Soujanya > > > > > > ----- > Thanks, > Geetha > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Saving-deformation-field-in-vector-container-tp7587905p7587931.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Tue Sep 29 17:26:11 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 29 Sep 2015 17:26:11 -0400 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: <1443521320260-7587935.post@n2.nabble.com> References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> <1443521320260-7587935.post@n2.nabble.com> Message-ID: Hi, The function: itkTextureFeatureImageFilterTest(int argc, char *argv[]) must be renamed to main(int argc, char* argv[]) HTH, Matt On Tue, Sep 29, 2015 at 6:08 AM, vis wrote: > hi all, > im trying to build the itkTextureFeatureImageFilterTest.cxx code but im not > able to it is showing the following error > 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug x64 > ------ > 1> Checking Build System > 1> CMake does not need to re-run because > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/CMakeFiles/generate.stamp is > up-to-date. > 2>------ Rebuild All started: Project: itkTextureFeatureImageFilterTest, > Configuration: Debug x64 ------ > 2> Building Custom Rule > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt > 2> CMake does not need to re-run because > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp is > up-to-date. > 2> itkTextureFeatureImageFilterTest.cxx > 2>C:\Program Files (x86)\Microsoft Visual Studio > 11.0\VC\include\xutility(2176): warning C4996: 'std::_Copy_impl': Function > call with parameters that may be unsafe - this call relies on the caller to > check that the passed values are correct. To disable this warning, use > -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ > 'Checked Iterators' > 2> C:\Program Files (x86)\Microsoft Visual Studio > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > 2> > c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(439) : see > reference to function template instantiation '_OutIt std::copy unsigned char*,unsigned char*>(_InIt,_InIt,_OutIt)' being compiled > 2> with > 2> [ > 2> _OutIt=unsigned char *, > 2> _InIt=const unsigned char * > 2> ] > 2> > c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(353) : > while compiling class template member function 'void > itk::ImageFileReader::GenerateData(void)' > 2> with > 2> [ > 2> TOutputImage=InputImageType > 2> ] > 2> > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\itkTextureFeatureImageFilterTest.cxx(47) > : see reference to class template instantiation > 'itk::ImageFileReader' being compiled > 2> with > 2> [ > 2> TOutputImage=InputImageType > 2> ] > 2> C:\Program Files (x86)\Microsoft Visual Studio > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > 2> C:\Program Files (x86)\Microsoft Visual Studio > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > 2> C:\Program Files (x86)\Microsoft Visual Studio > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > 2> Creating library > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.lib > and object > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.exp > 2>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol main > referenced in function __tmainCRTStartup > 2>D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\Debug\itkTextureFeatureImageFilterTest.exe > : fatal error LNK1120: 1 unresolved externals > 3>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug x64 > ------ > 3> Building Custom Rule > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt > 3> CMake does not need to re-run because > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp is > up-to-date. > ========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ========== > im using the follwing CMakeList.txt > # This is the root ITK CMakeLists file. > cmake_minimum_required(VERSION 2.4) > if(COMMAND CMAKE_POLICY) > cmake_policy(SET CMP0003 NEW) > endif() > > > # This project is designed to be built outside the Insight source tree. > project(HelloWorld) > > # Find ITK. > find_package(ITK REQUIRED) > include(${ITK_USE_FILE}) > > add_executable(itkTextureFeatureImageFilterTest > itkTextureFeatureImageFilterTest.cxx ) > > target_link_libraries(itkTextureFeatureImageFilterTest ${ITK_LIBRARIES}) > > please tel me wat the error is?? > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587935.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Tue Sep 29 17:29:08 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 29 Sep 2015 17:29:08 -0400 Subject: [ITK-users] Set initial demons registration dispalcement transform In-Reply-To: References: Message-ID: Hi stefano, If there is not a method, contributions would be welcome to add this functionality. Thanks, Matt On Tue, Sep 29, 2015 at 7:15 AM, stefano serviddio wrote: > Hi, > Do you know if there is a way to set initial displacement transform for > symmetric demons registration? > I have done a rigidal registration with mutua information and I want use the > final parameters of composite transform to set Demons Registration starting > points. > I no found a demons registration filter method to set the initial > displacement value. > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Tue Sep 29 17:31:17 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 29 Sep 2015 17:31:17 -0400 Subject: [ITK-users] Doubt on .mha file? In-Reply-To: References: <1443524386201-7587937.post@n2.nabble.com> Message-ID: Hi, Another worthwhile note: ImageJ2 / Fiji comes packages with MetaImage support. HTH, Matt On Tue, Sep 29, 2015 at 7:10 AM, Pol Mons? Purt? wrote: > You have to install a plugin to ImageJ. I believe it was this one: > http://ij-plugins.sourceforge.net/plugins/3d-io/ > > On Tue, Sep 29, 2015 at 12:59 PM, vis wrote: >> >> hi all, >> i came across a file with .mha extension.. i tried to read it with ImageJ >> but it is not reading can anyone pls tell me how can i read and display >> this >> type of file format using ITK?.... >> regards >> vis >> >> >> >> -- >> View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/Doubt-on-mha-file-tp7587937.html >> Sent from the ITK Insight 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 >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Tue Sep 29 17:37:44 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 29 Sep 2015 17:37:44 -0400 Subject: [ITK-users] More Details About ITK-SNAP?? In-Reply-To: <1443548563634-7587946.post@n2.nabble.com> References: <1443548563634-7587946.post@n2.nabble.com> Message-ID: Hi vis, You may find a way to extend ITK-SNAP. The 3D Slicer project [1] also provides a GUI, and it focuses on extensibility. Both are based on ITK and work well with ITK. There are also other options out there. HTH, Matt [1] http://slicer.org/ On Tue, Sep 29, 2015 at 1:42 PM, vis wrote: > hi, > Im working on an application that should allow the user to select two Xray > images and perform bone segmentation on them and then register these two > images.. since i want to learn more about registration algorithm i do not > want to spend more time one developing the GUI and the segmentation code... > I came across this open source software called ITK-SNAP that has good > segmentation techniques....Is there any way i can use this segmentation algo > and GUI code from ITK-SNAP and add my registration code to it...if it not > possible using ITK-SNAP are there any other such open source software > available so that i can avoid spending time in coming up with an efficient > segmentation algorithm and GUI.. and spend more time experimenting with > registration algo.....please advice....thank you.. > regards > vis > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/More-Details-About-ITK-SNAP-tp7587946.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From siavashk at ece.ubc.ca Tue Sep 29 18:09:09 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Tue, 29 Sep 2015 15:09:09 -0700 (MST) Subject: [ITK-users] Visual Studio Intellisense for ITK Python Wrapper Message-ID: <1443564549287-36250.post@n7.nabble.com> I have been waiting for the Python wrapper to work for such a long time and it is finally fixed. I am really happy about this. I can confirm that it works on my machine: Visual Studio 12, CMake 3.2.1, Python 3.4. Something that does not quite work for me is the intellisense. Even if I refresh the Python Database, I still can't get the intellisense to work properly. For example, this (attached image) is all I get for the intellisense if press ctrl+space in visual studio. Does anyone have the same issue with intellisense in VS? If you figured out a fix, can you let me know about it? Thanks, Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/Visual-Studio-Intellisense-for-ITK-Python-Wrapper-tp36250.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Tue Sep 29 22:35:57 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 29 Sep 2015 22:35:57 -0400 Subject: [ITK-users] Visual Studio Intellisense for ITK Python Wrapper In-Reply-To: <1443564549287-36250.post@n7.nabble.com> References: <1443564549287-36250.post@n7.nabble.com> Message-ID: Hi Siavash, Great to hear your feedback and that it is working for you! ITK uses lazy loading [1] to speed up import times, which may be confusing the Visual Studio Intellisense. Perhaps setting itkConfig.LazyLoading = False will help? HTH, Matt [1] http://itk.org/gitweb?p=ITK.git;a=blob;f=Wrapping/Generators/Python/itk.py;h=1e1cec0cdfd4061b1825ec42fa87edc717bccf29;hb=HEAD On Tue, Sep 29, 2015 at 6:09 PM, Siavash Khallaghi wrote: > I have been waiting for the Python wrapper to work for such a long time and > it is finally fixed. I am really happy about this. I can confirm that it > works on my machine: Visual Studio 12, CMake 3.2.1, Python 3.4. > > Something that does not quite work for me is the intellisense. Even if I > refresh the Python Database, I still can't get the intellisense to work > properly. For example, this (attached image) is all I get for the > intellisense if press ctrl+space in visual studio. > > Does anyone have the same issue with intellisense in VS? If you figured out > a fix, can you let me know about it? > > Thanks, > > Siavash > > > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Visual-Studio-Intellisense-for-ITK-Python-Wrapper-tp36250.html > Sent from the ITK - 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From bakkari.abdelkhalek at hotmail.fr Wed Sep 30 01:11:15 2015 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Wed, 30 Sep 2015 06:11:15 +0100 Subject: [ITK-users] ITK in Visual Studio Message-ID: Hi ! I would like to add some ITK instructions to an existing C++ code in Visual Studio 2010.Can anybody send me the details step by step. Kind regards, Abdelkhalek BakkariPh.D candidate in Computer ScienceInstitute of Applied Computer ScienceLodz University of Technology, Poland -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Wed Sep 30 01:52:01 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Wed, 30 Sep 2015 05:52:01 +0000 Subject: [ITK-users] ITK in Visual Studio In-Reply-To: References: Message-ID: The first crucial piece of advice is to use cmake to create the VS project file. The best way to start is to choose an ITK example from the many online, build it with cmake and the supplied CMakeLists.txt file, then use that as a guide to how to build ITK functions into your program. Needless to say you must install ITK first. ________________________________ From: Insight-users [insight-users-bounces at itk.org] on behalf of Abdelkhalek Bakkari [bakkari.abdelkhalek at hotmail.fr] Sent: Wednesday, 30 September 2015 6:11 p.m. To: insight-users Subject: [ITK-users] ITK in Visual Studio Hi ! I would like to add some ITK instructions to an existing C++ code in Visual Studio 2010. Can anybody send me the details step by step. Kind regards, Abdelkhalek Bakkari Ph.D candidate in Computer Science Institute of Applied Computer Science Lodz University of Technology, Poland -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Wed Sep 30 02:26:28 2015 From: itkhelpacc at gmail.com (vis) Date: Tue, 29 Sep 2015 23:26:28 -0700 (MST) Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> <1443521320260-7587935.post@n2.nabble.com> Message-ID: hey Matt, thanks for ur advice.. it did build successfully... but im not able to run the code for 2D png image... i tried to change the dimension to 2 and build it which it did.. but when i run the code using the command line itkTextureFeatureImageFilterTest.exe cthead.png putput.png 1... i see this output offset: [-1, -1] [0, -1] offset: [0, -1] [1, -1] offset: [-1, 0] [0, 0] offset: [0, 0] [1, 0] offset: [-1, 1] [0, 1] offset: [0, 1] [1, 1] and it asks for abort the program... if pls tel me how can i modify this code to work wid 2d image... forgive me if my ques are really silly im trying to learn something.. regards Vis On Wed, Sep 30, 2015 at 2:56 AM, Matt McCormick-2 [via ITK Insight Users] < ml-node+s2283740n7587952h68 at n2.nabble.com> wrote: > Hi, > > The function: > > itkTextureFeatureImageFilterTest(int argc, char *argv[]) > > must be renamed to > > main(int argc, char* argv[]) > > HTH, > Matt > > On Tue, Sep 29, 2015 at 6:08 AM, vis <[hidden email] > > wrote: > > > hi all, > > im trying to build the itkTextureFeatureImageFilterTest.cxx code but im > not > > able to it is showing the following error > > 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug > x64 > > ------ > > 1> Checking Build System > > 1> CMake does not need to re-run because > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/CMakeFiles/generate.stamp > is > > up-to-date. > > 2>------ Rebuild All started: Project: itkTextureFeatureImageFilterTest, > > Configuration: Debug x64 ------ > > 2> Building Custom Rule > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt > > 2> CMake does not need to re-run because > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp > is > > up-to-date. > > 2> itkTextureFeatureImageFilterTest.cxx > > 2>C:\Program Files (x86)\Microsoft Visual Studio > > 11.0\VC\include\xutility(2176): warning C4996: 'std::_Copy_impl': > Function > > call with parameters that may be unsafe - this call relies on the caller > to > > check that the passed values are correct. To disable this warning, use > > -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ > > 'Checked Iterators' > > 2> C:\Program Files (x86)\Microsoft Visual Studio > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > > 2> > > c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(439) : > see > > reference to function template instantiation '_OutIt std::copy > unsigned char*,unsigned char*>(_InIt,_InIt,_OutIt)' being compiled > > 2> with > > 2> [ > > 2> _OutIt=unsigned char *, > > 2> _InIt=const unsigned char * > > 2> ] > > 2> > > c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(353) : > > while compiling class template member function 'void > > itk::ImageFileReader::GenerateData(void)' > > 2> with > > 2> [ > > 2> TOutputImage=InputImageType > > 2> ] > > 2> > > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\itkTextureFeatureImageFilterTest.cxx(47) > > > : see reference to class template instantiation > > 'itk::ImageFileReader' being compiled > > 2> with > > 2> [ > > 2> TOutputImage=InputImageType > > 2> ] > > 2> C:\Program Files (x86)\Microsoft Visual Studio > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > > 2> C:\Program Files (x86)\Microsoft Visual Studio > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > > 2> C:\Program Files (x86)\Microsoft Visual Studio > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > > 2> Creating library > > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.lib > > > and object > > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.exp > > > 2>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol > main > > referenced in function __tmainCRTStartup > > > 2>D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\Debug\itkTextureFeatureImageFilterTest.exe > > > : fatal error LNK1120: 1 unresolved externals > > 3>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug > x64 > > ------ > > 3> Building Custom Rule > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt > > 3> CMake does not need to re-run because > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp > is > > up-to-date. > > ========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ========== > > im using the follwing CMakeList.txt > > # This is the root ITK CMakeLists file. > > cmake_minimum_required(VERSION 2.4) > > if(COMMAND CMAKE_POLICY) > > cmake_policy(SET CMP0003 NEW) > > endif() > > > > > > # This project is designed to be built outside the Insight source tree. > > project(HelloWorld) > > > > # Find ITK. > > find_package(ITK REQUIRED) > > include(${ITK_USE_FILE}) > > > > add_executable(itkTextureFeatureImageFilterTest > > itkTextureFeatureImageFilterTest.cxx ) > > > > target_link_libraries(itkTextureFeatureImageFilterTest ${ITK_LIBRARIES}) > > > > please tel me wat the error is?? > > > > > > > > -- > > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587935.html > > Sent from the ITK Insight 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 > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587952.html > To unsubscribe from [ITK-users] Texture pixel by pixel, click here > > . > NAML > > -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587960.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From franciscolopezdelafranca at gmail.com Wed Sep 30 02:35:56 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Wed, 30 Sep 2015 08:35:56 +0200 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <9325E4A3-0E51-4C77-A7BA-D72317F6192F@mail.nih.gov> <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> <1443521320260-7587935.post@n2.nabble.com> Message-ID: Have you tried with a radius of 3 instead of 1? 2015-09-30 8:26 GMT+02:00 vis : > hey Matt, > thanks for ur advice.. it did build successfully... but im not able to run > the code for 2D png image... i tried to change the dimension to 2 and build > it which it did.. but when i run the code using the command > line itkTextureFeatureImageFilterTest.exe cthead.png putput.png 1... i see > this output > > offset: [-1, -1] [0, -1] > offset: [0, -1] [1, -1] > offset: [-1, 0] [0, 0] > offset: [0, 0] [1, 0] > offset: [-1, 1] [0, 1] > offset: [0, 1] [1, 1] and it asks for abort the program... if pls tel me > how can i modify this code to work wid 2d image... forgive me if my ques > are really silly im trying to learn something.. > regards > Vis > > On Wed, Sep 30, 2015 at 2:56 AM, Matt McCormick-2 [via ITK Insight Users] < > ml-node+s2283740n7587952h68 at n2.nabble.com> wrote: > > > Hi, > > > > The function: > > > > itkTextureFeatureImageFilterTest(int argc, char *argv[]) > > > > must be renamed to > > > > main(int argc, char* argv[]) > > > > HTH, > > Matt > > > > On Tue, Sep 29, 2015 at 6:08 AM, vis <[hidden email] > > > wrote: > > > > > hi all, > > > im trying to build the itkTextureFeatureImageFilterTest.cxx code but im > > not > > > able to it is showing the following error > > > 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug > > x64 > > > ------ > > > 1> Checking Build System > > > 1> CMake does not need to re-run because > > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/CMakeFiles/generate.stamp > > is > > > up-to-date. > > > 2>------ Rebuild All started: Project: > itkTextureFeatureImageFilterTest, > > > Configuration: Debug x64 ------ > > > 2> Building Custom Rule > > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt > > > 2> CMake does not need to re-run because > > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp > > is > > > up-to-date. > > > 2> itkTextureFeatureImageFilterTest.cxx > > > 2>C:\Program Files (x86)\Microsoft Visual Studio > > > 11.0\VC\include\xutility(2176): warning C4996: 'std::_Copy_impl': > > Function > > > call with parameters that may be unsafe - this call relies on the > caller > > to > > > check that the passed values are correct. To disable this warning, use > > > -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ > > > 'Checked Iterators' > > > 2> C:\Program Files (x86)\Microsoft Visual Studio > > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > > > 2> > > > c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(439) > : > > see > > > reference to function template instantiation '_OutIt std::copy > > unsigned char*,unsigned char*>(_InIt,_InIt,_OutIt)' being compiled > > > 2> with > > > 2> [ > > > 2> _OutIt=unsigned char *, > > > 2> _InIt=const unsigned char * > > > 2> ] > > > 2> > > > c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(353) > : > > > while compiling class template member function 'void > > > itk::ImageFileReader::GenerateData(void)' > > > 2> with > > > 2> [ > > > 2> TOutputImage=InputImageType > > > 2> ] > > > 2> > > > > > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\itkTextureFeatureImageFilterTest.cxx(47) > > > > > : see reference to class template instantiation > > > 'itk::ImageFileReader' being compiled > > > 2> with > > > 2> [ > > > 2> TOutputImage=InputImageType > > > 2> ] > > > 2> C:\Program Files (x86)\Microsoft Visual Studio > > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > > > 2> C:\Program Files (x86)\Microsoft Visual Studio > > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > > > 2> C:\Program Files (x86)\Microsoft Visual Studio > > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > > > 2> Creating library > > > > > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.lib > > > > > and object > > > > > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.exp > > > > > 2>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol > > main > > > referenced in function __tmainCRTStartup > > > > > > 2>D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\Debug\itkTextureFeatureImageFilterTest.exe > > > > > : fatal error LNK1120: 1 unresolved externals > > > 3>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug > > x64 > > > ------ > > > 3> Building Custom Rule > > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt > > > 3> CMake does not need to re-run because > > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp > > is > > > up-to-date. > > > ========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ========== > > > im using the follwing CMakeList.txt > > > # This is the root ITK CMakeLists file. > > > cmake_minimum_required(VERSION 2.4) > > > if(COMMAND CMAKE_POLICY) > > > cmake_policy(SET CMP0003 NEW) > > > endif() > > > > > > > > > # This project is designed to be built outside the Insight source tree. > > > project(HelloWorld) > > > > > > # Find ITK. > > > find_package(ITK REQUIRED) > > > include(${ITK_USE_FILE}) > > > > > > add_executable(itkTextureFeatureImageFilterTest > > > itkTextureFeatureImageFilterTest.cxx ) > > > > > > target_link_libraries(itkTextureFeatureImageFilterTest > ${ITK_LIBRARIES}) > > > > > > please tel me wat the error is?? > > > > > > > > > > > > -- > > > View this message in context: > > > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587935.html > > > Sent from the ITK Insight 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 > > > > > > Kitware offers ITK Training Courses, for more information visit: > > > http://www.kitware.com/products/protraining.php > > > > > > Please keep messages on-topic and check the ITK FAQ at: > > > http://www.itk.org/Wiki/ITK_FAQ > > > > > > Follow this link to subscribe/unsubscribe: > > > http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > > > > ------------------------------ > > If you reply to this email, your message will be added to the discussion > > below: > > > > > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587952.html > > To unsubscribe from [ITK-users] Texture pixel by pixel, click here > > < > http://itk-insight-users.2283740.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7587867&code=aXRraGVscGFjY0BnbWFpbC5jb218NzU4Nzg2N3wzNzEzNjYzNzk= > > > > . > > NAML > > < > http://itk-insight-users.2283740.n2.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.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://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587960.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex.med.marco at gmail.com Wed Sep 30 02:38:28 2015 From: alex.med.marco at gmail.com (Alex Med) Date: Wed, 30 Sep 2015 10:08:28 +0330 Subject: [ITK-users] convert coordinate system Message-ID: Hi, for translation world coordinate system to image coordinate system how to use IndexToPointMatrixand PointToIndexMatrix is work ? I want to convert world system coordinate to ijk coordinate system waht do we need to this work ? THanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Wed Sep 30 02:46:52 2015 From: itkhelpacc at gmail.com (vis) Date: Tue, 29 Sep 2015 23:46:52 -0700 (MST) Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> <1443521320260-7587935.post@n2.nabble.com> Message-ID: i yes i have tried radius = 3; still no luck On Wed, Sep 30, 2015 at 12:06 PM, Francisco L?pez-Franca [via ITK Insight Users] wrote: > Have you tried with a radius of 3 instead of 1? > > 2015-09-30 8:26 GMT+02:00 vis <[hidden email] > >: > >> hey Matt, >> thanks for ur advice.. it did build successfully... but im not able to run >> the code for 2D png image... i tried to change the dimension to 2 and >> build >> it which it did.. but when i run the code using the command >> line itkTextureFeatureImageFilterTest.exe cthead.png putput.png 1... i see >> this output >> >> offset: [-1, -1] [0, -1] >> offset: [0, -1] [1, -1] >> offset: [-1, 0] [0, 0] >> offset: [0, 0] [1, 0] >> offset: [-1, 1] [0, 1] >> offset: [0, 1] [1, 1] and it asks for abort the program... if pls tel me >> how can i modify this code to work wid 2d image... forgive me if my ques >> are really silly im trying to learn something.. >> regards >> Vis >> >> On Wed, Sep 30, 2015 at 2:56 AM, Matt McCormick-2 [via ITK Insight Users] >> < >> [hidden email] > >> wrote: >> >> > Hi, >> > >> > The function: >> > >> > itkTextureFeatureImageFilterTest(int argc, char *argv[]) >> > >> > must be renamed to >> > >> > main(int argc, char* argv[]) >> > >> > HTH, >> > Matt >> > >> > On Tue, Sep 29, 2015 at 6:08 AM, vis <[hidden email] >> > > wrote: >> > >> > > hi all, >> > > im trying to build the itkTextureFeatureImageFilterTest.cxx code but >> im >> > not >> > > able to it is showing the following error >> > > 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: >> Debug >> > x64 >> > > ------ >> > > 1> Checking Build System >> > > 1> CMake does not need to re-run because >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/CMakeFiles/generate.stamp >> > is >> > > up-to-date. >> > > 2>------ Rebuild All started: Project: >> itkTextureFeatureImageFilterTest, >> > > Configuration: Debug x64 ------ >> > > 2> Building Custom Rule >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt >> > > 2> CMake does not need to re-run because >> > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp >> > is >> > > up-to-date. >> > > 2> itkTextureFeatureImageFilterTest.cxx >> > > 2>C:\Program Files (x86)\Microsoft Visual Studio >> > > 11.0\VC\include\xutility(2176): warning C4996: 'std::_Copy_impl': >> > Function >> > > call with parameters that may be unsafe - this call relies on the >> caller >> > to >> > > check that the passed values are correct. To disable this warning, use >> > > -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ >> > > 'Checked Iterators' >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' >> > > 2> >> > > >> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(439) : >> > see >> > > reference to function template instantiation '_OutIt std::copy> > > unsigned char*,unsigned char*>(_InIt,_InIt,_OutIt)' being compiled >> > > 2> with >> > > 2> [ >> > > 2> _OutIt=unsigned char *, >> > > 2> _InIt=const unsigned char * >> > > 2> ] >> > > 2> >> > > >> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(353) : >> > > while compiling class template member function 'void >> > > itk::ImageFileReader::GenerateData(void)' >> > > 2> with >> > > 2> [ >> > > 2> TOutputImage=InputImageType >> > > 2> ] >> > > 2> >> > > >> > >> D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\itkTextureFeatureImageFilterTest.cxx(47) >> > >> > > : see reference to class template instantiation >> > > 'itk::ImageFileReader' being compiled >> > > 2> with >> > > 2> [ >> > > 2> TOutputImage=InputImageType >> > > 2> ] >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' >> > > 2> Creating library >> > > >> > >> D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.lib >> > >> > > and object >> > > >> > >> D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.exp >> > >> > > 2>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol >> > main >> > > referenced in function __tmainCRTStartup >> > > >> > >> 2>D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\Debug\itkTextureFeatureImageFilterTest.exe >> > >> > > : fatal error LNK1120: 1 unresolved externals >> > > 3>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug >> > x64 >> > > ------ >> > > 3> Building Custom Rule >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt >> > > 3> CMake does not need to re-run because >> > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp >> > is >> > > up-to-date. >> > > ========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ========== >> > > im using the follwing CMakeList.txt >> > > # This is the root ITK CMakeLists file. >> > > cmake_minimum_required(VERSION 2.4) >> > > if(COMMAND CMAKE_POLICY) >> > > cmake_policy(SET CMP0003 NEW) >> > > endif() >> > > >> > > >> > > # This project is designed to be built outside the Insight source >> tree. >> > > project(HelloWorld) >> > > >> > > # Find ITK. >> > > find_package(ITK REQUIRED) >> > > include(${ITK_USE_FILE}) >> > > >> > > add_executable(itkTextureFeatureImageFilterTest >> > > itkTextureFeatureImageFilterTest.cxx ) >> > > >> > > target_link_libraries(itkTextureFeatureImageFilterTest >> ${ITK_LIBRARIES}) >> > > >> > > please tel me wat the error is?? >> > > >> > > >> > > >> > > -- >> > > View this message in context: >> > >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587935.html >> > > Sent from the ITK Insight 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 >> > > >> > > Kitware offers ITK Training Courses, for more information visit: >> > > http://www.kitware.com/products/protraining.php >> > > >> > > Please keep messages on-topic and check the ITK FAQ at: >> > > http://www.itk.org/Wiki/ITK_FAQ >> > > >> > > Follow this link to subscribe/unsubscribe: >> > > http://public.kitware.com/mailman/listinfo/insight-users >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > >> > >> > ------------------------------ >> > If you reply to this email, your message will be added to the discussion >> > below: >> > >> > >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587952.html >> > To unsubscribe from [ITK-users] Texture pixel by pixel, click here >> > < > . >> > NAML >> > < >> http://itk-insight-users.2283740.n2.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.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://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587960.html >> Sent from the ITK Insight 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 >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587961.html > To unsubscribe from [ITK-users] Texture pixel by pixel, click here > > . > NAML > > -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587963.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From davis.vigneault at gmail.com Wed Sep 30 03:10:02 2015 From: davis.vigneault at gmail.com (DVigneault) Date: Wed, 30 Sep 2015 00:10:02 -0700 (MST) Subject: [ITK-users] Procedure for Submitting Patches to Remote Modules/Third Party Libraries In-Reply-To: References: <1443558295701-7587948.post@n2.nabble.com> Message-ID: <1443597002027-7587964.post@n2.nabble.com> Thanks very much, Matt! Pull requests are here [1] and here [2]. I hope I've followed the instructions correctly--please let me know if I've gone wrong anywhere. Best, and thanks, --Davis [1] https://github.com/InsightSoftwareConsortium/itkSubdivisionQuadEdgeMeshFilter/pull/5 [2] https://github.com/malaterre/GDCM/pull/16 -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Procedure-for-Submitting-Patches-to-Remote-Modules-Third-Party-Libraries-tp7587948p7587964.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From franciscolopezdelafranca at gmail.com Wed Sep 30 03:28:48 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Wed, 30 Sep 2015 09:28:48 +0200 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> <1443521320260-7587935.post@n2.nabble.com> Message-ID: I've tested with itkTextureFeatureImageFilter, with itk::ScalarImageToTextureFeaturesFilter and also with the http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures example, for a 3D image and here are my comments: 1. I had to interrupt the test after several hours and it kept on calculating. And this is for only a 3D image (224x224x300). I need to process around 35 images. 2. The result (texture features: entropy, energy, correlation, LH, inertia, CS and CP) for every voxel was: [1, 0, 1, 0, 0, 0, 7.83083e+247]. These values were not what I expected based on my experience on another application I developed, but in that case, I calculated the texture features for an image as a whole, not voxel by voxel. Regards. 2015-09-30 8:46 GMT+02:00 vis : > i yes i have tried radius = 3; > still no luck > > On Wed, Sep 30, 2015 at 12:06 PM, Francisco L?pez-Franca [via ITK Insight > Users] wrote: > > > Have you tried with a radius of 3 instead of 1? > > > > 2015-09-30 8:26 GMT+02:00 vis <[hidden email] > > >: > > > >> hey Matt, > >> thanks for ur advice.. it did build successfully... but im not able to > run > >> the code for 2D png image... i tried to change the dimension to 2 and > >> build > >> it which it did.. but when i run the code using the command > >> line itkTextureFeatureImageFilterTest.exe cthead.png putput.png 1... i > see > >> this output > >> > >> offset: [-1, -1] [0, -1] > >> offset: [0, -1] [1, -1] > >> offset: [-1, 0] [0, 0] > >> offset: [0, 0] [1, 0] > >> offset: [-1, 1] [0, 1] > >> offset: [0, 1] [1, 1] and it asks for abort the program... if pls tel me > >> how can i modify this code to work wid 2d image... forgive me if my ques > >> are really silly im trying to learn something.. > >> regards > >> Vis > >> > >> On Wed, Sep 30, 2015 at 2:56 AM, Matt McCormick-2 [via ITK Insight > Users] > >> < > >> [hidden email] > > >> wrote: > >> > >> > Hi, > >> > > >> > The function: > >> > > >> > itkTextureFeatureImageFilterTest(int argc, char *argv[]) > >> > > >> > must be renamed to > >> > > >> > main(int argc, char* argv[]) > >> > > >> > HTH, > >> > Matt > >> > > >> > On Tue, Sep 29, 2015 at 6:08 AM, vis <[hidden email] > >> > > wrote: > >> > > >> > > hi all, > >> > > im trying to build the itkTextureFeatureImageFilterTest.cxx code but > >> im > >> > not > >> > > able to it is showing the following error > >> > > 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: > >> Debug > >> > x64 > >> > > ------ > >> > > 1> Checking Build System > >> > > 1> CMake does not need to re-run because > >> > > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/CMakeFiles/generate.stamp > >> > is > >> > > up-to-date. > >> > > 2>------ Rebuild All started: Project: > >> itkTextureFeatureImageFilterTest, > >> > > Configuration: Debug x64 ------ > >> > > 2> Building Custom Rule > >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt > >> > > 2> CMake does not need to re-run because > >> > > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp > >> > is > >> > > up-to-date. > >> > > 2> itkTextureFeatureImageFilterTest.cxx > >> > > 2>C:\Program Files (x86)\Microsoft Visual Studio > >> > > 11.0\VC\include\xutility(2176): warning C4996: 'std::_Copy_impl': > >> > Function > >> > > call with parameters that may be unsafe - this call relies on the > >> caller > >> > to > >> > > check that the passed values are correct. To disable this warning, > use > >> > > -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual > C++ > >> > > 'Checked Iterators' > >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio > >> > > 11.0\VC\include\xutility(2157) : see declaration of > 'std::_Copy_impl' > >> > > 2> > >> > > > >> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(439) : > >> > see > >> > > reference to function template instantiation '_OutIt std::copy >> > > unsigned char*,unsigned char*>(_InIt,_InIt,_OutIt)' being compiled > >> > > 2> with > >> > > 2> [ > >> > > 2> _OutIt=unsigned char *, > >> > > 2> _InIt=const unsigned char * > >> > > 2> ] > >> > > 2> > >> > > > >> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(353) : > >> > > while compiling class template member function 'void > >> > > itk::ImageFileReader::GenerateData(void)' > >> > > 2> with > >> > > 2> [ > >> > > 2> TOutputImage=InputImageType > >> > > 2> ] > >> > > 2> > >> > > > >> > > >> > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\itkTextureFeatureImageFilterTest.cxx(47) > >> > > >> > > : see reference to class template instantiation > >> > > 'itk::ImageFileReader' being compiled > >> > > 2> with > >> > > 2> [ > >> > > 2> TOutputImage=InputImageType > >> > > 2> ] > >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio > >> > > 11.0\VC\include\xutility(2157) : see declaration of > 'std::_Copy_impl' > >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio > >> > > 11.0\VC\include\xutility(2157) : see declaration of > 'std::_Copy_impl' > >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio > >> > > 11.0\VC\include\xutility(2157) : see declaration of > 'std::_Copy_impl' > >> > > 2> Creating library > >> > > > >> > > >> > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.lib > >> > > >> > > and object > >> > > > >> > > >> > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.exp > >> > > >> > > 2>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external > symbol > >> > main > >> > > referenced in function __tmainCRTStartup > >> > > > >> > > >> > 2>D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\Debug\itkTextureFeatureImageFilterTest.exe > >> > > >> > > : fatal error LNK1120: 1 unresolved externals > >> > > 3>------ Rebuild All started: Project: ALL_BUILD, Configuration: > Debug > >> > x64 > >> > > ------ > >> > > 3> Building Custom Rule > >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt > >> > > 3> CMake does not need to re-run because > >> > > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp > >> > is > >> > > up-to-date. > >> > > ========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ========== > >> > > im using the follwing CMakeList.txt > >> > > # This is the root ITK CMakeLists file. > >> > > cmake_minimum_required(VERSION 2.4) > >> > > if(COMMAND CMAKE_POLICY) > >> > > cmake_policy(SET CMP0003 NEW) > >> > > endif() > >> > > > >> > > > >> > > # This project is designed to be built outside the Insight source > >> tree. > >> > > project(HelloWorld) > >> > > > >> > > # Find ITK. > >> > > find_package(ITK REQUIRED) > >> > > include(${ITK_USE_FILE}) > >> > > > >> > > add_executable(itkTextureFeatureImageFilterTest > >> > > itkTextureFeatureImageFilterTest.cxx ) > >> > > > >> > > target_link_libraries(itkTextureFeatureImageFilterTest > >> ${ITK_LIBRARIES}) > >> > > > >> > > please tel me wat the error is?? > >> > > > >> > > > >> > > > >> > > -- > >> > > View this message in context: > >> > > >> > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587935.html > >> > > Sent from the ITK Insight 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 > >> > > > >> > > Kitware offers ITK Training Courses, for more information visit: > >> > > http://www.kitware.com/products/protraining.php > >> > > > >> > > Please keep messages on-topic and check the ITK FAQ at: > >> > > http://www.itk.org/Wiki/ITK_FAQ > >> > > > >> > > Follow this link to subscribe/unsubscribe: > >> > > http://public.kitware.com/mailman/listinfo/insight-users > >> > _____________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Kitware offers ITK Training Courses, for more information visit: > >> > http://www.kitware.com/products/protraining.php > >> > > >> > Please keep messages on-topic and check the ITK FAQ at: > >> > http://www.itk.org/Wiki/ITK_FAQ > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://public.kitware.com/mailman/listinfo/insight-users > >> > > >> > > >> > ------------------------------ > >> > If you reply to this email, your message will be added to the > discussion > >> > below: > >> > > >> > > >> > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587952.html > >> > To unsubscribe from [ITK-users] Texture pixel by pixel, click here > >> > < > . > >> > NAML > >> > < > >> > http://itk-insight-users.2283740.n2.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.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://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587960.html > >> Sent from the ITK Insight 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 > >> > >> Kitware offers ITK Training Courses, for more information visit: > >> http://www.kitware.com/products/protraining.php > >> > >> Please keep messages on-topic and check the ITK FAQ at: > >> http://www.itk.org/Wiki/ITK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/insight-users > >> > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > > > > ------------------------------ > > If you reply to this email, your message will be added to the discussion > > below: > > > > > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587961.html > > To unsubscribe from [ITK-users] Texture pixel by pixel, click here > > < > http://itk-insight-users.2283740.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7587867&code=aXRraGVscGFjY0BnbWFpbC5jb218NzU4Nzg2N3wzNzEzNjYzNzk= > > > > . > > NAML > > < > http://itk-insight-users.2283740.n2.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.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://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587963.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Wed Sep 30 05:52:14 2015 From: itkhelpacc at gmail.com (vis) Date: Wed, 30 Sep 2015 02:52:14 -0700 (MST) Subject: [ITK-users] Local texture Features In-Reply-To: <90915059-9531-4023-9852-B248E8EB2721@gmail.com> References: <4DB99271.1040404@lanl.gov> <24D8AA23EC0DCB4498C35EC60401E761028B4F@MAIL-MB3.lumcnet.prod.intern> <4DBA8371.1010302@c-s.fr> <90915059-9531-4023-9852-B248E8EB2721@gmail.com> Message-ID: <1443606734344-7587966.post@n2.nabble.com> hi, i tried building itkScalarToFractalImageFilterTest.cxx but it is showing the following error.. pls advice regards vis 1>------ Build started: Project: itkScalarToFractalImageFilterTest, Configuration: Debug x64 ------ 1> itkScalarToFractalImageFilterTest.cxx 1>d:\itk_vtk_ex\my_itk_ex\seg\entropyconversion\source\h\itkScalarToFractalImageFilter.h(29): error C2039: 'GetImageDimension' : is not a member of 'itk' 1> D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(239) : see reference to function template instantiation 'int itkScalarToFractalImageFilterTest<2>(int,char *[])' being compiled 1>d:\itk_vtk_ex\my_itk_ex\seg\entropyconversion\source\h\itkScalarToFractalImageFilter.h(29): error C2065: 'GetImageDimension' : undeclared identifier 1>d:\itk_vtk_ex\my_itk_ex\seg\entropyconversion\source\h\itkScalarToFractalImageFilter.h(29): error C2275: 'TInputImage' : illegal use of this type as an expression 1> D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(149) : see declaration of 'TInputImage' 1>d:\itk_vtk_ex\my_itk_ex\seg\entropyconversion\source\h\itkScalarToFractalImageFilter.h(29): error C2974: 'itk::ScalarToFractalImageFilter' : invalid template argument for 'TMaskImage', type expected 1> d:\itk_vtk_ex\my_itk_ex\seg\entropyconversion\source\h\itkScalarToFractalImageFilter.h(32) : see declaration of 'itk::ScalarToFractalImageFilter' 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(149): warning C4091: 'typedef ' : ignored on left of 'itk::ScalarToFractalImageFilter' when no variable is declared 1> with 1> [ 1> TInputImage=ImageType 1> ] 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(149): error C2143: syntax error : missing ';' before '>' 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(150): error C2653: 'FractalFilterType' : is not a class or namespace name 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(150): error C2065: 'Pointer' : undeclared identifier 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(150): error C2146: syntax error : missing ';' before identifier 'fractal' 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(150): error C2065: 'fractal' : undeclared identifier 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(150): error C3861: 'New': identifier not found 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(151): error C2065: 'fractal' : undeclared identifier 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(151): error C2227: left of '->SetInput' must point to class/struct/union/generic type 1> type is ''unknown-type'' 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(155): error C2653: 'FractalFilterType' : is not a class or namespace name 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(155): error C2065: 'RadiusType' : undeclared identifier 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(155): error C2146: syntax error : missing ';' before identifier 'radius' 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(155): error C2065: 'radius' : undeclared identifier 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(156): error C2065: 'radius' : undeclared identifier 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(156): error C2228: left of '.Fill' must have class/struct/union 1> type is ''unknown-type'' 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(157): error C2065: 'fractal' : undeclared identifier 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(157): error C2227: left of '->SetNeighborhoodRadius' must point to class/struct/union/generic type 1> type is ''unknown-type'' 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(157): error C2065: 'radius' : undeclared identifier 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(171): error C2653: 'FractalFilterType' : is not a class or namespace name 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(171): error C2146: syntax error : missing ';' before identifier 'MaskImageType' 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(171): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(171): warning C4091: '' : ignored on left of 'int' when no variable is declared 1>c:\itk\source\modules\filtering\thresholding\include\itkBinaryThresholdImageFilter.h(128): error C2825: 'TOutputImage': must be a class or namespace when followed by '::' 1> D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(175) : see reference to class template instantiation 'itk::BinaryThresholdImageFilter' being compiled 1> with 1> [ 1> TInputImage=ImageType, 1> TOutputImage=MaskImageType 1> ] 1>c:\itk\source\modules\filtering\thresholding\include\itkBinaryThresholdImageFilter.h(128): error C2039: 'PixelType' : is not a member of '`global namespace'' 1>c:\itk\source\modules\filtering\thresholding\include\itkBinaryThresholdImageFilter.h(128): error C2146: syntax error : missing ',' before identifier 'PixelType' 1>c:\itk\source\modules\filtering\thresholding\include\itkBinaryThresholdImageFilter.h(128): error C2065: 'PixelType' : undeclared identifier 1>c:\itk\source\modules\filtering\thresholding\include\itkBinaryThresholdImageFilter.h(128): error C3203: 'BinaryThreshold' : unspecialized class template can't be used as a template argument for template parameter 'TFunction', expected a real type -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Local-Texture-Features-tp6311109p7587966.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From lluna.nova at gmail.com Wed Sep 30 06:21:17 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Wed, 30 Sep 2015 12:21:17 +0200 Subject: [ITK-users] Local texture Features In-Reply-To: <1443606734344-7587966.post@n2.nabble.com> References: <4DB99271.1040404@lanl.gov> <24D8AA23EC0DCB4498C35EC60401E761028B4F@MAIL-MB3.lumcnet.prod.intern> <4DBA8371.1010302@c-s.fr> <90915059-9531-4023-9852-B248E8EB2721@gmail.com> <1443606734344-7587966.post@n2.nabble.com> Message-ID: You're using a mismatching itk version. I believe GetImageDimension was renamed to something else after itkv3. Here is an example of what you have to change to link to newer ITK versions: https://github.com/ITKTools/ITKTools/commit/84ed056b6ea335bc825e6a3ad9d128498a1217eb On Wed, Sep 30, 2015 at 11:52 AM, vis wrote: > hi, > i tried building itkScalarToFractalImageFilterTest.cxx but it is showing > the > following error.. pls advice > regards > vis > > 1>------ Build started: Project: itkScalarToFractalImageFilterTest, > Configuration: Debug x64 ------ > 1> itkScalarToFractalImageFilterTest.cxx > > 1>d:\itk_vtk_ex\my_itk_ex\seg\entropyconversion\source\h\itkScalarToFractalImageFilter.h(29): > error C2039: 'GetImageDimension' : is not a member of 'itk' > 1> > > D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(239) > : see reference to function template instantiation 'int > itkScalarToFractalImageFilterTest<2>(int,char *[])' being compiled > > 1>d:\itk_vtk_ex\my_itk_ex\seg\entropyconversion\source\h\itkScalarToFractalImageFilter.h(29): > error C2065: 'GetImageDimension' : undeclared identifier > > 1>d:\itk_vtk_ex\my_itk_ex\seg\entropyconversion\source\h\itkScalarToFractalImageFilter.h(29): > error C2275: 'TInputImage' : illegal use of this type as an expression > 1> > > D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(149) > : see declaration of 'TInputImage' > > 1>d:\itk_vtk_ex\my_itk_ex\seg\entropyconversion\source\h\itkScalarToFractalImageFilter.h(29): > error C2974: 'itk::ScalarToFractalImageFilter' : invalid template argument > for 'TMaskImage', type expected > 1> > > d:\itk_vtk_ex\my_itk_ex\seg\entropyconversion\source\h\itkScalarToFractalImageFilter.h(32) > : see declaration of 'itk::ScalarToFractalImageFilter' > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(149): > warning C4091: 'typedef ' : ignored on left of > 'itk::ScalarToFractalImageFilter' when no variable is declared > 1> with > 1> [ > 1> TInputImage=ImageType > 1> ] > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(149): > error C2143: syntax error : missing ';' before '>' > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(150): > error C2653: 'FractalFilterType' : is not a class or namespace name > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(150): > error C2065: 'Pointer' : undeclared identifier > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(150): > error C2146: syntax error : missing ';' before identifier 'fractal' > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(150): > error C2065: 'fractal' : undeclared identifier > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(150): > error C3861: 'New': identifier not found > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(151): > error C2065: 'fractal' : undeclared identifier > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(151): > error C2227: left of '->SetInput' must point to class/struct/union/generic > type > 1> type is ''unknown-type'' > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(155): > error C2653: 'FractalFilterType' : is not a class or namespace name > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(155): > error C2065: 'RadiusType' : undeclared identifier > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(155): > error C2146: syntax error : missing ';' before identifier 'radius' > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(155): > error C2065: 'radius' : undeclared identifier > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(156): > error C2065: 'radius' : undeclared identifier > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(156): > error C2228: left of '.Fill' must have class/struct/union > 1> type is ''unknown-type'' > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(157): > error C2065: 'fractal' : undeclared identifier > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(157): > error C2227: left of '->SetNeighborhoodRadius' must point to > class/struct/union/generic type > 1> type is ''unknown-type'' > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(157): > error C2065: 'radius' : undeclared identifier > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(171): > error C2653: 'FractalFilterType' : is not a class or namespace name > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(171): > error C2146: syntax error : missing ';' before identifier 'MaskImageType' > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(171): > error C4430: missing type specifier - int assumed. Note: C++ does not > support default-int > > 1>D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(171): > warning C4091: '' : ignored on left of 'int' when no variable is declared > > 1>c:\itk\source\modules\filtering\thresholding\include\itkBinaryThresholdImageFilter.h(128): > error C2825: 'TOutputImage': must be a class or namespace when followed by > '::' > 1> > > D:\ITK_VTK_EX\My_ITK_Ex\seg\EntropyConversion\Source\itkScalarToFractalImageFilterTest.cxx(175) > : see reference to class template instantiation > 'itk::BinaryThresholdImageFilter' being compiled > 1> with > 1> [ > 1> TInputImage=ImageType, > 1> TOutputImage=MaskImageType > 1> ] > > 1>c:\itk\source\modules\filtering\thresholding\include\itkBinaryThresholdImageFilter.h(128): > error C2039: 'PixelType' : is not a member of '`global namespace'' > > 1>c:\itk\source\modules\filtering\thresholding\include\itkBinaryThresholdImageFilter.h(128): > error C2146: syntax error : missing ',' before identifier 'PixelType' > > 1>c:\itk\source\modules\filtering\thresholding\include\itkBinaryThresholdImageFilter.h(128): > error C2065: 'PixelType' : undeclared identifier > > 1>c:\itk\source\modules\filtering\thresholding\include\itkBinaryThresholdImageFilter.h(128): > error C3203: 'BinaryThreshold' : unspecialized class template can't be used > as a template argument for template parameter 'TFunction', expected a real > type > > > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Local-Texture-Features-tp6311109p7587966.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed Sep 30 08:55:39 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 30 Sep 2015 08:55:39 -0400 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: References: <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> <1443521320260-7587935.post@n2.nabble.com> Message-ID: <84A225AE-400C-4FBA-97FA-6A027CB17208@mail.nih.gov> Hello, Did you compile TextureFeatureImage in Release mode? 1) The filter does not scale well with a large radius. And given by your initial report of print a very large number of offset you, it sounds like you are using a large radius with many offsets. I created a 224x224x300 unsigned short image and ran with the default offset and a radius of 2 in 5 minutes on my laptop. When I wrote this filter is was ~10x faster than this example... things change though... 2) I sounds like the boundaries/limits of the histogram may be clipping you values. I would inspect the co-occurance matrix. HTH, Brad On Sep 30, 2015, at 3:28 AM, Francisco Lopez de la Franca wrote: > I've tested with itkTextureFeatureImageFilter, with itk::ScalarImageToTextureFeaturesFilter and also with the http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures example, for a 3D image and here are my comments: > > > 1. I had to interrupt the test after several hours and it kept on calculating. And this is for only a 3D image (224x224x300). I need to process around 35 images. > 2. The result (texture features: entropy, energy, correlation, LH, inertia, CS and CP) for every voxel was: [1, 0, 1, 0, 0, 0, 7.83083e+247]. These values were not what I expected based on my experience on another application I developed, but in that case, I calculated the texture features for an image as a whole, not voxel by voxel. > > Regards. > > 2015-09-30 8:46 GMT+02:00 vis : > i yes i have tried radius = 3; > still no luck > > On Wed, Sep 30, 2015 at 12:06 PM, Francisco L?pez-Franca [via ITK Insight > Users] wrote: > > > Have you tried with a radius of 3 instead of 1? > > > > 2015-09-30 8:26 GMT+02:00 vis <[hidden email] > > >: > > > >> hey Matt, > >> thanks for ur advice.. it did build successfully... but im not able to run > >> the code for 2D png image... i tried to change the dimension to 2 and > >> build > >> it which it did.. but when i run the code using the command > >> line itkTextureFeatureImageFilterTest.exe cthead.png putput.png 1... i see > >> this output > >> > >> offset: [-1, -1] [0, -1] > >> offset: [0, -1] [1, -1] > >> offset: [-1, 0] [0, 0] > >> offset: [0, 0] [1, 0] > >> offset: [-1, 1] [0, 1] > >> offset: [0, 1] [1, 1] and it asks for abort the program... if pls tel me > >> how can i modify this code to work wid 2d image... forgive me if my ques > >> are really silly im trying to learn something.. > >> regards > >> Vis > >> > >> On Wed, Sep 30, 2015 at 2:56 AM, Matt McCormick-2 [via ITK Insight Users] > >> < > >> [hidden email] > > >> wrote: > >> > >> > Hi, > >> > > >> > The function: > >> > > >> > itkTextureFeatureImageFilterTest(int argc, char *argv[]) > >> > > >> > must be renamed to > >> > > >> > main(int argc, char* argv[]) > >> > > >> > HTH, > >> > Matt > >> > > >> > On Tue, Sep 29, 2015 at 6:08 AM, vis <[hidden email] > >> > > wrote: > >> > > >> > > hi all, > >> > > im trying to build the itkTextureFeatureImageFilterTest.cxx code but > >> im > >> > not > >> > > able to it is showing the following error > >> > > 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: > >> Debug > >> > x64 > >> > > ------ > >> > > 1> Checking Build System > >> > > 1> CMake does not need to re-run because > >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/CMakeFiles/generate.stamp > >> > is > >> > > up-to-date. > >> > > 2>------ Rebuild All started: Project: > >> itkTextureFeatureImageFilterTest, > >> > > Configuration: Debug x64 ------ > >> > > 2> Building Custom Rule > >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt > >> > > 2> CMake does not need to re-run because > >> > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp > >> > is > >> > > up-to-date. > >> > > 2> itkTextureFeatureImageFilterTest.cxx > >> > > 2>C:\Program Files (x86)\Microsoft Visual Studio > >> > > 11.0\VC\include\xutility(2176): warning C4996: 'std::_Copy_impl': > >> > Function > >> > > call with parameters that may be unsafe - this call relies on the > >> caller > >> > to > >> > > check that the passed values are correct. To disable this warning, use > >> > > -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ > >> > > 'Checked Iterators' > >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio > >> > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > >> > > 2> > >> > > > >> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(439) : > >> > see > >> > > reference to function template instantiation '_OutIt std::copy >> > > unsigned char*,unsigned char*>(_InIt,_InIt,_OutIt)' being compiled > >> > > 2> with > >> > > 2> [ > >> > > 2> _OutIt=unsigned char *, > >> > > 2> _InIt=const unsigned char * > >> > > 2> ] > >> > > 2> > >> > > > >> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(353) : > >> > > while compiling class template member function 'void > >> > > itk::ImageFileReader::GenerateData(void)' > >> > > 2> with > >> > > 2> [ > >> > > 2> TOutputImage=InputImageType > >> > > 2> ] > >> > > 2> > >> > > > >> > > >> D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\itkTextureFeatureImageFilterTest.cxx(47) > >> > > >> > > : see reference to class template instantiation > >> > > 'itk::ImageFileReader' being compiled > >> > > 2> with > >> > > 2> [ > >> > > 2> TOutputImage=InputImageType > >> > > 2> ] > >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio > >> > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio > >> > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio > >> > > 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl' > >> > > 2> Creating library > >> > > > >> > > >> D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.lib > >> > > >> > > and object > >> > > > >> > > >> D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.exp > >> > > >> > > 2>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol > >> > main > >> > > referenced in function __tmainCRTStartup > >> > > > >> > > >> 2>D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\Debug\itkTextureFeatureImageFilterTest.exe > >> > > >> > > : fatal error LNK1120: 1 unresolved externals > >> > > 3>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug > >> > x64 > >> > > ------ > >> > > 3> Building Custom Rule > >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt > >> > > 3> CMake does not need to re-run because > >> > > D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp > >> > is > >> > > up-to-date. > >> > > ========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ========== > >> > > im using the follwing CMakeList.txt > >> > > # This is the root ITK CMakeLists file. > >> > > cmake_minimum_required(VERSION 2.4) > >> > > if(COMMAND CMAKE_POLICY) > >> > > cmake_policy(SET CMP0003 NEW) > >> > > endif() > >> > > > >> > > > >> > > # This project is designed to be built outside the Insight source > >> tree. > >> > > project(HelloWorld) > >> > > > >> > > # Find ITK. > >> > > find_package(ITK REQUIRED) > >> > > include(${ITK_USE_FILE}) > >> > > > >> > > add_executable(itkTextureFeatureImageFilterTest > >> > > itkTextureFeatureImageFilterTest.cxx ) > >> > > > >> > > target_link_libraries(itkTextureFeatureImageFilterTest > >> ${ITK_LIBRARIES}) > >> > > > >> > > please tel me wat the error is?? > >> > > > >> > > > >> > > > >> > > -- > >> > > View this message in context: > >> > > >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587935.html > >> > > Sent from the ITK Insight 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 > >> > > > >> > > Kitware offers ITK Training Courses, for more information visit: > >> > > http://www.kitware.com/products/protraining.php > >> > > > >> > > Please keep messages on-topic and check the ITK FAQ at: > >> > > http://www.itk.org/Wiki/ITK_FAQ > >> > > > >> > > Follow this link to subscribe/unsubscribe: > >> > > http://public.kitware.com/mailman/listinfo/insight-users > >> > _____________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Kitware offers ITK Training Courses, for more information visit: > >> > http://www.kitware.com/products/protraining.php > >> > > >> > Please keep messages on-topic and check the ITK FAQ at: > >> > http://www.itk.org/Wiki/ITK_FAQ > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://public.kitware.com/mailman/listinfo/insight-users > >> > > >> > > >> > ------------------------------ > >> > If you reply to this email, your message will be added to the discussion > >> > below: > >> > > >> > > >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587952.html > >> > To unsubscribe from [ITK-users] Texture pixel by pixel, click here > >> > < > . > >> > NAML > >> > < > >> http://itk-insight-users.2283740.n2.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.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://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587960.html > >> Sent from the ITK Insight 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 > >> > >> Kitware offers ITK Training Courses, for more information visit: > >> http://www.kitware.com/products/protraining.php > >> > >> Please keep messages on-topic and check the ITK FAQ at: > >> http://www.itk.org/Wiki/ITK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/insight-users > >> > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > > > > ------------------------------ > > If you reply to this email, your message will be added to the discussion > > below: > > > > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587961.html > > To unsubscribe from [ITK-users] Texture pixel by pixel, click here > > > > . > > NAML > > > > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587963.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlt.khawla at gmail.com Wed Sep 30 09:35:46 2015 From: mlt.khawla at gmail.com (Daoued23) Date: Wed, 30 Sep 2015 06:35:46 -0700 (MST) Subject: [ITK-users] Spatially variant morphological closing Message-ID: <1443620146273-36263.post@n7.nabble.com> Hi everyone, I want to implement a spatially variant morphological closing, which its structuring element is estimated for every pixel. I work on binary images. So to apply the aspatially variant morphological closing, we estimate the structuring element for every pixel surrounded by its neighborhood, apply the dilation on every neighbouring window with the corresponding estimated structring element. Then we get the dilated image as the union of all the dilated windows. Now, we apply the erosion on every neighbouring window of the dilated image with the transposed of the structuring element already estimated. The adaptively closed image will be the union of the eroded windows of the dilated image. Now the problem is that, we find background windows (all pixels are black) in the image, so we cannot estimate a structuring element. when it's the phase of the dilation we don't apply anything, but some pixels can appear in this windows as the result of the union of the surrounding windows that have been dilated. When applying the erosion on these new pixels which structuring element should we consider knowing that we can't estimate one based on the original image (background window)??? Thank you Best regards -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Spatially-variant-morphological-closing-tp36263.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Wed Sep 30 10:34:26 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 30 Sep 2015 10:34:26 -0400 Subject: [ITK-users] convert coordinate system In-Reply-To: References: Message-ID: Hi Alex, Image and Index coordinate system relationships are explained in the ITK Software Guide [1]. Typically, IndexToPointMatrix and PointToIndexMatrix are not used directly. HTH, Matt [1] http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch4.html#x40-440004.1 On Wed, Sep 30, 2015 at 2:38 AM, Alex Med wrote: > Hi, > > for translation world coordinate system to image coordinate system how to > use IndexToPointMatrixand > > PointToIndexMatrix is work ? > > I want to convert world system coordinate to ijk coordinate system waht do > we need to this work ? > > THanks > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Wed Sep 30 10:37:43 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 30 Sep 2015 10:37:43 -0400 Subject: [ITK-users] Procedure for Submitting Patches to Remote Modules/Third Party Libraries In-Reply-To: <1443597002027-7587964.post@n2.nabble.com> References: <1443558295701-7587948.post@n2.nabble.com> <1443597002027-7587964.post@n2.nabble.com> Message-ID: Hi Davis, Looks great! Now that the SubdivisionQuadEdgeMeshFilter patch is in the Remote Module version [1] can be updated. After the GDCM patch is in, ITK's version can be updated by running the ITK/Modules/ThirdParty/GDCM/UpdateFromUpstream.sh script. Thanks, Matt [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Remote/SubdivisionQuadEdgeMeshFilter.remote.cmake#L10 On Wed, Sep 30, 2015 at 3:10 AM, DVigneault wrote: > Thanks very much, Matt! > > Pull requests are here [1] and here [2]. I hope I've followed the > instructions correctly--please let me know if I've gone wrong anywhere. > > Best, and thanks, > > --Davis > > [1] > https://github.com/InsightSoftwareConsortium/itkSubdivisionQuadEdgeMeshFilter/pull/5 > [2] https://github.com/malaterre/GDCM/pull/16 > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Procedure-for-Submitting-Patches-to-Remote-Modules-Third-Party-Libraries-tp7587948p7587964.html > Sent from the ITK Insight 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From franciscolopezdelafranca at gmail.com Wed Sep 30 10:51:17 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Wed, 30 Sep 2015 16:51:17 +0200 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: <84A225AE-400C-4FBA-97FA-6A027CB17208@mail.nih.gov> References: <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> <1443521320260-7587935.post@n2.nabble.com> <84A225AE-400C-4FBA-97FA-6A027CB17208@mail.nih.gov> Message-ID: Hi Brad, I think I've always compiled in Release mode when working with ITK. The low performance is not only with your filter; the same happens with the itk::Statistics::ScalarImageToTextureFeaturesFilter and I've also tested (copy-paste-test) the example http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures, and it takes a long time. My image is float-pixel-typed, I donot know if it has something to do. I'll try to define it as short-typed. The radius I'm using is 3x3x3 and 13 offsets (default in 3D). Any suggestion is very welcome. Thank you very much. Regards. /Francisco 2015-09-30 14:55 GMT+02:00 Bradley Lowekamp : > Hello, > > Did you compile TextureFeatureImage in Release mode? > > 1) The filter does not scale well with a large radius. And given by your > initial report of print a very large number of offset you, it sounds like > you are using a large radius with many offsets. I created a 224x224x300 > unsigned short image and ran with the default offset and a radius of 2 in 5 > minutes on my laptop. When I wrote this filter is was ~10x faster than this > example... things change though... > > > 2) I sounds like the boundaries/limits of the histogram may be clipping > you values. I would inspect the co-occurance matrix. > > > HTH, > Brad > > On Sep 30, 2015, at 3:28 AM, Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com> wrote: > > I've tested with itkTextureFeatureImageFilter, with > itk::ScalarImageToTextureFeaturesFilter and also with the > http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures example, for > a 3D image and here are my comments: > > > 1. I had to interrupt the test after several hours and it kept on > calculating. And this is for only a 3D image (224x224x300). I need to > process around 35 images. > 2. The result (texture features: entropy, energy, correlation, LH, > inertia, CS and CP) for every voxel was: [1, 0, 1, 0, 0, 0, 7.83083e+247]. > These values were not what I expected based on my experience on another > application I developed, but in that case, I calculated the texture > features for an image as a whole, not voxel by voxel. > > Regards. > > 2015-09-30 8:46 GMT+02:00 vis : > >> i yes i have tried radius = 3; >> still no luck >> >> On Wed, Sep 30, 2015 at 12:06 PM, Francisco L?pez-Franca [via ITK Insight >> Users] wrote: >> >> > Have you tried with a radius of 3 instead of 1? >> > >> > 2015-09-30 8:26 GMT+02:00 vis <[hidden email] >> > >: >> > >> >> hey Matt, >> >> thanks for ur advice.. it did build successfully... but im not able to >> run >> >> the code for 2D png image... i tried to change the dimension to 2 and >> >> build >> >> it which it did.. but when i run the code using the command >> >> line itkTextureFeatureImageFilterTest.exe cthead.png putput.png 1... i >> see >> >> this output >> >> >> >> offset: [-1, -1] [0, -1] >> >> offset: [0, -1] [1, -1] >> >> offset: [-1, 0] [0, 0] >> >> offset: [0, 0] [1, 0] >> >> offset: [-1, 1] [0, 1] >> >> offset: [0, 1] [1, 1] and it asks for abort the program... if pls tel >> me >> >> how can i modify this code to work wid 2d image... forgive me if my >> ques >> >> are really silly im trying to learn something.. >> >> regards >> >> Vis >> >> >> >> On Wed, Sep 30, 2015 at 2:56 AM, Matt McCormick-2 [via ITK Insight >> Users] >> >> < >> >> [hidden email] > >> >> >> wrote: >> >> >> >> > Hi, >> >> > >> >> > The function: >> >> > >> >> > itkTextureFeatureImageFilterTest(int argc, char *argv[]) >> >> > >> >> > must be renamed to >> >> > >> >> > main(int argc, char* argv[]) >> >> > >> >> > HTH, >> >> > Matt >> >> > >> >> > On Tue, Sep 29, 2015 at 6:08 AM, vis <[hidden email] >> >> > > wrote: >> >> > >> >> > > hi all, >> >> > > im trying to build the itkTextureFeatureImageFilterTest.cxx code >> but >> >> im >> >> > not >> >> > > able to it is showing the following error >> >> > > 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: >> >> Debug >> >> > x64 >> >> > > ------ >> >> > > 1> Checking Build System >> >> > > 1> CMake does not need to re-run because >> >> > > >> D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/CMakeFiles/generate.stamp >> >> > is >> >> > > up-to-date. >> >> > > 2>------ Rebuild All started: Project: >> >> itkTextureFeatureImageFilterTest, >> >> > > Configuration: Debug x64 ------ >> >> > > 2> Building Custom Rule >> >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt >> >> > > 2> CMake does not need to re-run because >> >> > > >> D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp >> >> > is >> >> > > up-to-date. >> >> > > 2> itkTextureFeatureImageFilterTest.cxx >> >> > > 2>C:\Program Files (x86)\Microsoft Visual Studio >> >> > > 11.0\VC\include\xutility(2176): warning C4996: 'std::_Copy_impl': >> >> > Function >> >> > > call with parameters that may be unsafe - this call relies on the >> >> caller >> >> > to >> >> > > check that the passed values are correct. To disable this warning, >> use >> >> > > -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual >> C++ >> >> > > 'Checked Iterators' >> >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> >> > > 11.0\VC\include\xutility(2157) : see declaration of >> 'std::_Copy_impl' >> >> > > 2> >> >> > > >> >> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(439) >> : >> >> > see >> >> > > reference to function template instantiation '_OutIt >> std::copy> >> > > unsigned char*,unsigned char*>(_InIt,_InIt,_OutIt)' being compiled >> >> > > 2> with >> >> > > 2> [ >> >> > > 2> _OutIt=unsigned char *, >> >> > > 2> _InIt=const unsigned char * >> >> > > 2> ] >> >> > > 2> >> >> > > >> >> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(353) >> : >> >> > > while compiling class template member function 'void >> >> > > itk::ImageFileReader::GenerateData(void)' >> >> > > 2> with >> >> > > 2> [ >> >> > > 2> TOutputImage=InputImageType >> >> > > 2> ] >> >> > > 2> >> >> > > >> >> > >> >> >> D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\itkTextureFeatureImageFilterTest.cxx(47) >> >> > >> >> > > : see reference to class template instantiation >> >> > > 'itk::ImageFileReader' being compiled >> >> > > 2> with >> >> > > 2> [ >> >> > > 2> TOutputImage=InputImageType >> >> > > 2> ] >> >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> >> > > 11.0\VC\include\xutility(2157) : see declaration of >> 'std::_Copy_impl' >> >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> >> > > 11.0\VC\include\xutility(2157) : see declaration of >> 'std::_Copy_impl' >> >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> >> > > 11.0\VC\include\xutility(2157) : see declaration of >> 'std::_Copy_impl' >> >> > > 2> Creating library >> >> > > >> >> > >> >> >> D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.lib >> >> > >> >> > > and object >> >> > > >> >> > >> >> >> D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.exp >> >> > >> >> > > 2>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external >> symbol >> >> > main >> >> > > referenced in function __tmainCRTStartup >> >> > > >> >> > >> >> >> 2>D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\Debug\itkTextureFeatureImageFilterTest.exe >> >> > >> >> > > : fatal error LNK1120: 1 unresolved externals >> >> > > 3>------ Rebuild All started: Project: ALL_BUILD, Configuration: >> Debug >> >> > x64 >> >> > > ------ >> >> > > 3> Building Custom Rule >> >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt >> >> > > 3> CMake does not need to re-run because >> >> > > >> D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp >> >> > is >> >> > > up-to-date. >> >> > > ========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ========== >> >> > > im using the follwing CMakeList.txt >> >> > > # This is the root ITK CMakeLists file. >> >> > > cmake_minimum_required(VERSION 2.4) >> >> > > if(COMMAND CMAKE_POLICY) >> >> > > cmake_policy(SET CMP0003 NEW) >> >> > > endif() >> >> > > >> >> > > >> >> > > # This project is designed to be built outside the Insight source >> >> tree. >> >> > > project(HelloWorld) >> >> > > >> >> > > # Find ITK. >> >> > > find_package(ITK REQUIRED) >> >> > > include(${ITK_USE_FILE}) >> >> > > >> >> > > add_executable(itkTextureFeatureImageFilterTest >> >> > > itkTextureFeatureImageFilterTest.cxx ) >> >> > > >> >> > > target_link_libraries(itkTextureFeatureImageFilterTest >> >> ${ITK_LIBRARIES}) >> >> > > >> >> > > please tel me wat the error is?? >> >> > > >> >> > > >> >> > > >> >> > > -- >> >> > > View this message in context: >> >> > >> >> >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587935.html >> >> > > Sent from the ITK Insight 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 >> >> > > >> >> > > Kitware offers ITK Training Courses, for more information visit: >> >> > > http://www.kitware.com/products/protraining.php >> >> > > >> >> > > Please keep messages on-topic and check the ITK FAQ at: >> >> > > http://www.itk.org/Wiki/ITK_FAQ >> >> > > >> >> > > Follow this link to subscribe/unsubscribe: >> >> > > http://public.kitware.com/mailman/listinfo/insight-users >> >> > _____________________________________ >> >> > Powered by www.kitware.com >> >> > >> >> > Visit other Kitware open-source projects at >> >> > http://www.kitware.com/opensource/opensource.html >> >> > >> >> > Kitware offers ITK Training Courses, for more information visit: >> >> > http://www.kitware.com/products/protraining.php >> >> > >> >> > Please keep messages on-topic and check the ITK FAQ at: >> >> > http://www.itk.org/Wiki/ITK_FAQ >> >> > >> >> > Follow this link to subscribe/unsubscribe: >> >> > http://public.kitware.com/mailman/listinfo/insight-users >> >> > >> >> > >> >> > ------------------------------ >> >> > If you reply to this email, your message will be added to the >> discussion >> >> > below: >> >> > >> >> > >> >> >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587952.html >> >> > To unsubscribe from [ITK-users] Texture pixel by pixel, click here >> >> > < > . >> >> > NAML >> >> > < >> >> >> http://itk-insight-users.2283740.n2.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.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://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587960.html >> >> Sent from the ITK Insight 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 >> >> >> >> Kitware offers ITK Training Courses, for more information visit: >> >> http://www.kitware.com/products/protraining.php >> >> >> >> Please keep messages on-topic and check the ITK FAQ at: >> >> http://www.itk.org/Wiki/ITK_FAQ >> >> >> >> Follow this link to subscribe/unsubscribe: >> >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > >> > >> > ------------------------------ >> > If you reply to this email, your message will be added to the discussion >> > below: >> > >> > >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587961.html >> > To unsubscribe from [ITK-users] Texture pixel by pixel, click here >> > < >> http://itk-insight-users.2283740.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7587867&code=aXRraGVscGFjY0BnbWFpbC5jb218NzU4Nzg2N3wzNzEzNjYzNzk= >> > >> > . >> > NAML >> > < >> http://itk-insight-users.2283740.n2.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.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://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587963.html >> Sent from the ITK Insight 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 >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex.med.marco at gmail.com Wed Sep 30 11:05:05 2015 From: alex.med.marco at gmail.com (Alex Med) Date: Wed, 30 Sep 2015 18:35:05 +0330 Subject: [ITK-users] Compound blending Message-ID: Hi, is there any example or entry point for Compound blending Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex.med.marco at gmail.com Wed Sep 30 11:52:07 2015 From: alex.med.marco at gmail.com (Alex Med) Date: Wed, 30 Sep 2015 19:22:07 +0330 Subject: [ITK-users] Fusion in Radiant Message-ID: Hi , The fusion in Radiant what kind of the Fusion ? can you explain about this Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.beare at gmail.com Wed Sep 30 17:24:48 2015 From: richard.beare at gmail.com (Richard Beare) Date: Thu, 1 Oct 2015 06:54:48 +0930 Subject: [ITK-users] Spatially variant morphological closing In-Reply-To: <1443620146273-36263.post@n7.nabble.com> References: <1443620146273-36263.post@n7.nabble.com> Message-ID: Spatially variant erosions and dilations are easy enough to visualise but, as you've discovered, openings and closings are less obvious. Some issues are discussed in the following papers. @Article{cuisenaire2006locally, title = "Locally Adaptable Mathematical Morphology Using Distance Transformations", author = "O. Cuisenaire", journal = "Pattern Recognition", volume = "39", number = "3", pages = "405--416", year = "2006", publisher = "Elsevier", } @Article{bouaynaya2007theoretical2, title = "Theoretical Foundations of Spatially-variant Mathematical Morphology Part {II}: Gray-level Images", author = "N. Bouaynaya and D. Schonfeld", journal = "IEEE Transactions on Pattern Analysis and Machine Intelligence", volume = "30", number = "5", pages = "837--850", year = "2008", publisher = "Published by the IEEE Computer Society", } @Article{bouaynaya2007theoretical1, title = "Theoretical Foundations of Spatially-variant Mathematical Morphology Part {I}: Binary Images", author = "N. Bouaynaya and D. Schonfeld", journal = "IEEE Transactions on Pattern Analysis and Machine Intelligence", volume = "30", number = "5", pages = "823--836", year = "2008", publisher = "Published by the IEEE Computer Society", } I've also done some work on the efficient implementations for circular/spherical structuring elements on binary images: @InProceedings{Beare2011j, author = {Beare, R. and Jackway, P.}, title = {Parallel Algorithms Via Scaled Paraboloid Structuring Function s for Spatially-Variant and Label-Set Dilations and Erosions}, booktitle = {International Conference on Digital Image Computing: Techniques and Applications (DICTA) }, year = 2011, month = {December}} On Wed, Sep 30, 2015 at 11:05 PM, Daoued23 wrote: > Hi everyone, > > I want to implement a spatially variant morphological closing, which its > structuring element is estimated for every pixel. I work on binary images. > > > So to apply the aspatially variant morphological closing, we estimate the > structuring element for every pixel surrounded by its neighborhood, apply > the dilation on every neighbouring window with the corresponding estimated > structring element. Then we get the dilated image as the union of all the > dilated windows. Now, we apply the erosion on every neighbouring window of > the dilated image with the transposed of the structuring element already > estimated. The adaptively closed image will be the union of the eroded > windows of the dilated image. > > Now the problem is that, we find background windows (all pixels are black) > in the image, so we cannot estimate a structuring element. when it's the > phase of the dilation we don't apply anything, but some pixels can appear > in > this windows as the result of the union of the surrounding windows that > have > been dilated. When applying the erosion on these new pixels which > structuring element should we consider knowing that we can't estimate one > based on the original image (background window)??? > > Thank you > > Best regards > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-Spatially-variant-morphological-closing-tp36263.html > Sent from the ITK - 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 > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Wed Sep 30 17:38:41 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Wed, 30 Sep 2015 23:38:41 +0200 Subject: [ITK-users] Texture pixel by pixel In-Reply-To: <84A225AE-400C-4FBA-97FA-6A027CB17208@mail.nih.gov> References: <729B1C07-6BAA-41AD-8B16-A1A2ECE039DF@mail.nih.gov> <1443521320260-7587935.post@n2.nabble.com> <84A225AE-400C-4FBA-97FA-6A027CB17208@mail.nih.gov> Message-ID: Hello Bradley again, I would like to ask you for a couple of favours. In the one hand, could you please send me your 3D image so that I can test on it? And on the other hand, could you test the example I have referenced in the previous email with your image, not changing anything in the code, such as it is, and tell me if the execution time is normal? Thank you very much. Regards, /Francisco PS: All my application trace is printed via standard 'cout' command, not due to a debugging compilation mode. El mi?rcoles, 30 de septiembre de 2015, Bradley Lowekamp < blowekamp at mail.nih.gov> escribi?: > Hello, > > Did you compile TextureFeatureImage in Release mode? > > 1) The filter does not scale well with a large radius. And given by your > initial report of print a very large number of offset you, it sounds like > you are using a large radius with many offsets. I created a 224x224x300 > unsigned short image and ran with the default offset and a radius of 2 in 5 > minutes on my laptop. When I wrote this filter is was ~10x faster than this > example... things change though... > > > 2) I sounds like the boundaries/limits of the histogram may be clipping > you values. I would inspect the co-occurance matrix. > > > HTH, > Brad > > On Sep 30, 2015, at 3:28 AM, Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com > > > wrote: > > I've tested with itkTextureFeatureImageFilter, with > itk::ScalarImageToTextureFeaturesFilter and also with the > http://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures example, for > a 3D image and here are my comments: > > > 1. I had to interrupt the test after several hours and it kept on > calculating. And this is for only a 3D image (224x224x300). I need to > process around 35 images. > 2. The result (texture features: entropy, energy, correlation, LH, > inertia, CS and CP) for every voxel was: [1, 0, 1, 0, 0, 0, 7.83083e+247]. > These values were not what I expected based on my experience on another > application I developed, but in that case, I calculated the texture > features for an image as a whole, not voxel by voxel. > > Regards. > > 2015-09-30 8:46 GMT+02:00 vis >: > >> i yes i have tried radius = 3; >> still no luck >> >> On Wed, Sep 30, 2015 at 12:06 PM, Francisco L?pez-Franca [via ITK Insight >> Users] > > >> wrote: >> >> > Have you tried with a radius of 3 instead of 1? >> > >> > 2015-09-30 8:26 GMT+02:00 vis <[hidden email] >> > >: >> > >> >> hey Matt, >> >> thanks for ur advice.. it did build successfully... but im not able to >> run >> >> the code for 2D png image... i tried to change the dimension to 2 and >> >> build >> >> it which it did.. but when i run the code using the command >> >> line itkTextureFeatureImageFilterTest.exe cthead.png putput.png 1... i >> see >> >> this output >> >> >> >> offset: [-1, -1] [0, -1] >> >> offset: [0, -1] [1, -1] >> >> offset: [-1, 0] [0, 0] >> >> offset: [0, 0] [1, 0] >> >> offset: [-1, 1] [0, 1] >> >> offset: [0, 1] [1, 1] and it asks for abort the program... if pls tel >> me >> >> how can i modify this code to work wid 2d image... forgive me if my >> ques >> >> are really silly im trying to learn something.. >> >> regards >> >> Vis >> >> >> >> On Wed, Sep 30, 2015 at 2:56 AM, Matt McCormick-2 [via ITK Insight >> Users] >> >> < >> >> [hidden email] > >> >> >> wrote: >> >> >> >> > Hi, >> >> > >> >> > The function: >> >> > >> >> > itkTextureFeatureImageFilterTest(int argc, char *argv[]) >> >> > >> >> > must be renamed to >> >> > >> >> > main(int argc, char* argv[]) >> >> > >> >> > HTH, >> >> > Matt >> >> > >> >> > On Tue, Sep 29, 2015 at 6:08 AM, vis <[hidden email] >> >> > > wrote: >> >> > >> >> > > hi all, >> >> > > im trying to build the itkTextureFeatureImageFilterTest.cxx code >> but >> >> im >> >> > not >> >> > > able to it is showing the following error >> >> > > 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: >> >> Debug >> >> > x64 >> >> > > ------ >> >> > > 1> Checking Build System >> >> > > 1> CMake does not need to re-run because >> >> > > >> D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/CMakeFiles/generate.stamp >> >> > is >> >> > > up-to-date. >> >> > > 2>------ Rebuild All started: Project: >> >> itkTextureFeatureImageFilterTest, >> >> > > Configuration: Debug x64 ------ >> >> > > 2> Building Custom Rule >> >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt >> >> > > 2> CMake does not need to re-run because >> >> > > >> D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp >> >> > is >> >> > > up-to-date. >> >> > > 2> itkTextureFeatureImageFilterTest.cxx >> >> > > 2>C:\Program Files (x86)\Microsoft Visual Studio >> >> > > 11.0\VC\include\xutility(2176): warning C4996: 'std::_Copy_impl': >> >> > Function >> >> > > call with parameters that may be unsafe - this call relies on the >> >> caller >> >> > to >> >> > > check that the passed values are correct. To disable this warning, >> use >> >> > > -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual >> C++ >> >> > > 'Checked Iterators' >> >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> >> > > 11.0\VC\include\xutility(2157) : see declaration of >> 'std::_Copy_impl' >> >> > > 2> >> >> > > >> >> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(439) >> : >> >> > see >> >> > > reference to function template instantiation '_OutIt >> std::copy> >> > > unsigned char*,unsigned char*>(_InIt,_InIt,_OutIt)' being compiled >> >> > > 2> with >> >> > > 2> [ >> >> > > 2> _OutIt=unsigned char *, >> >> > > 2> _InIt=const unsigned char * >> >> > > 2> ] >> >> > > 2> >> >> > > >> >> c:\itk\source\modules\io\imagebase\include\itkImageFileReader.hxx(353) >> : >> >> > > while compiling class template member function 'void >> >> > > itk::ImageFileReader::GenerateData(void)' >> >> > > 2> with >> >> > > 2> [ >> >> > > 2> TOutputImage=InputImageType >> >> > > 2> ] >> >> > > 2> >> >> > > >> >> > >> >> >> D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\itkTextureFeatureImageFilterTest.cxx(47) >> >> > >> >> > > : see reference to class template instantiation >> >> > > 'itk::ImageFileReader' being compiled >> >> > > 2> with >> >> > > 2> [ >> >> > > 2> TOutputImage=InputImageType >> >> > > 2> ] >> >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> >> > > 11.0\VC\include\xutility(2157) : see declaration of >> 'std::_Copy_impl' >> >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> >> > > 11.0\VC\include\xutility(2157) : see declaration of >> 'std::_Copy_impl' >> >> > > 2> C:\Program Files (x86)\Microsoft Visual Studio >> >> > > 11.0\VC\include\xutility(2157) : see declaration of >> 'std::_Copy_impl' >> >> > > 2> Creating library >> >> > > >> >> > >> >> >> D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.lib >> >> > >> >> > > and object >> >> > > >> >> > >> >> >> D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/bin/Debug/itkTextureFeatureImageFilterTest.exp >> >> > >> >> > > 2>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external >> symbol >> >> > main >> >> > > referenced in function __tmainCRTStartup >> >> > > >> >> > >> >> >> 2>D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\Debug\itkTextureFeatureImageFilterTest.exe >> >> > >> >> > > : fatal error LNK1120: 1 unresolved externals >> >> > > 3>------ Rebuild All started: Project: ALL_BUILD, Configuration: >> Debug >> >> > x64 >> >> > > ------ >> >> > > 3> Building Custom Rule >> >> > > D:/ITK_VTK_EX/My_ITK_Ex/seg/Texture/test/CMakeLists.txt >> >> > > 3> CMake does not need to re-run because >> >> > > >> D:\ITK_VTK_EX\My_ITK_Ex\seg\Texture\test\bin\CMakeFiles\generate.stamp >> >> > is >> >> > > up-to-date. >> >> > > ========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ========== >> >> > > im using the follwing CMakeList.txt >> >> > > # This is the root ITK CMakeLists file. >> >> > > cmake_minimum_required(VERSION 2.4) >> >> > > if(COMMAND CMAKE_POLICY) >> >> > > cmake_policy(SET CMP0003 NEW) >> >> > > endif() >> >> > > >> >> > > >> >> > > # This project is designed to be built outside the Insight source >> >> tree. >> >> > > project(HelloWorld) >> >> > > >> >> > > # Find ITK. >> >> > > find_package(ITK REQUIRED) >> >> > > include(${ITK_USE_FILE}) >> >> > > >> >> > > add_executable(itkTextureFeatureImageFilterTest >> >> > > itkTextureFeatureImageFilterTest.cxx ) >> >> > > >> >> > > target_link_libraries(itkTextureFeatureImageFilterTest >> >> ${ITK_LIBRARIES}) >> >> > > >> >> > > please tel me wat the error is?? >> >> > > >> >> > > >> >> > > >> >> > > -- >> >> > > View this message in context: >> >> > >> >> >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587935.html >> >> > > Sent from the ITK Insight 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 >> >> > > >> >> > > Kitware offers ITK Training Courses, for more information visit: >> >> > > http://www.kitware.com/products/protraining.php >> >> > > >> >> > > Please keep messages on-topic and check the ITK FAQ at: >> >> > > http://www.itk.org/Wiki/ITK_FAQ >> >> > > >> >> > > Follow this link to subscribe/unsubscribe: >> >> > > http://public.kitware.com/mailman/listinfo/insight-users >> >> > _____________________________________ >> >> > Powered by www.kitware.com >> >> > >> >> > Visit other Kitware open-source projects at >> >> > http://www.kitware.com/opensource/opensource.html >> >> > >> >> > Kitware offers ITK Training Courses, for more information visit: >> >> > http://www.kitware.com/products/protraining.php >> >> > >> >> > Please keep messages on-topic and check the ITK FAQ at: >> >> > http://www.itk.org/Wiki/ITK_FAQ >> >> > >> >> > Follow this link to subscribe/unsubscribe: >> >> > http://public.kitware.com/mailman/listinfo/insight-users >> >> > >> >> > >> >> > ------------------------------ >> >> > If you reply to this email, your message will be added to the >> discussion >> >> > below: >> >> > >> >> > >> >> >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587952.html >> >> > To unsubscribe from [ITK-users] Texture pixel by pixel, click here >> >> > < > . >> >> > NAML >> >> > < >> >> >> http://itk-insight-users.2283740.n2.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.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://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587960.html >> >> Sent from the ITK Insight 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 >> >> >> >> Kitware offers ITK Training Courses, for more information visit: >> >> http://www.kitware.com/products/protraining.php >> >> >> >> Please keep messages on-topic and check the ITK FAQ at: >> >> http://www.itk.org/Wiki/ITK_FAQ >> >> >> >> Follow this link to subscribe/unsubscribe: >> >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > >> > >> > ------------------------------ >> > If you reply to this email, your message will be added to the discussion >> > below: >> > >> > >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587961.html >> > To unsubscribe from [ITK-users] Texture pixel by pixel, click here >> > < >> http://itk-insight-users.2283740.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7587867&code=aXRraGVscGFjY0BnbWFpbC5jb218NzU4Nzg2N3wzNzEzNjYzNzk= >> > >> > . >> > NAML >> > < >> http://itk-insight-users.2283740.n2.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.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://itk-insight-users.2283740.n2.nabble.com/ITK-users-Texture-pixel-by-pixel-tp7587867p7587963.html >> Sent from the ITK Insight 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 >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: