From Mathieu.Malaterre@creatis.insa-lyon.fr Tue Jul 1 09:07:46 2003 From: Mathieu.Malaterre@creatis.insa-lyon.fr (Mathieu Malaterre) Date: Tue, 01 Jul 2003 10:07:46 +0200 Subject: [Insight-users] ImageIO or FILeReader or FIleWrite's problem, In-Reply-To: <20030630212157.41964.qmail@web20907.mail.yahoo.com> References: <20030630212157.41964.qmail@web20907.mail.yahoo.com> Message-ID: <3F014152.30901@creatis.insa-lyon.fr> Shunming Fang wrote: > If I just use one ImageIO to reader and > writer(supposed the input file and out file format is > the same), no problem. Only implmenting like the > following way, the segmentation happen before > writer->Update(), Yes, it is before writer->Update() Shunming, Are you sure you don't use any 'Update()' before this one ? Because setting up a pipeline doesn't do anything at all...until an 'Update()' is call on a filter. So please send us the whole code you are using. You can also send us the backtrace of a gdb session. Thanks, Mathieu > because try..Catch didn't catch the segmenataion. > I wander whether in itk, there are just one ImageIO > instance allowed? > Fang From salah@gris.uni-tuebingen.de Tue Jul 1 11:10:36 2003 From: salah@gris.uni-tuebingen.de (salah) Date: Tue, 1 Jul 2003 12:10:36 +0200 Subject: [Insight-users] WG: itk with Microsoft Visual Studio .NET 2003 Message-ID: <4B943954DD289E47958BCEC8C32269BE1EFB42@wsi-server2.wsi-gris.uni-tuebingen.de> > -----Urspr=FCngliche Nachricht----- > Von: salah =20 > Gesendet: Montag, 30. Juni 2003 18:00 > An: ITK Users (E-Mail) > Betreff: itk with Microsoft Visual Studio .NET 2003 >=20 > Hello all, >=20 > I am using ITK+VTK+FLTK with Windows 2000 and=20 > Microsoft visual C++ 6.0.=20 >=20 > I am thinking of using the same combination with=20 > Microsoft Visual Studio .NET 2003. >=20 > 1. Does this combination work well? I mean equally > well (or better) than my current one? >=20 > 2. Would the combinations=20 > ITK+VTK+FLTK+Microsoft visual C++ 6.0=20 > OR > ITK+VTK+FLTK+Microsoft Visual Studio .NET 2003 >=20 > work well with Windows XP? Which Windows is more > stable to work with ITK-based projects?? >=20 >=20 > Many Thanks, > Zein >=20 >=20 >=20 From millerjv@crd.ge.com Tue Jul 1 16:33:11 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Tue, 1 Jul 2003 11:33:11 -0400 Subject: [Insight-users] Find largest connected object in a Volume Message-ID: This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C33FE5.17316CF0 Content-Type: text/plain; charset="iso-8859-1" I just added a new filter to the ITK repository that relabels an image. The input would the output of any segmentation algorithm that creates a label map. The ConnectedComponentImageFilter would be one such filter. Watershed would another, etc. The filter is called RelabelComponentImageFilter and it changes the labels in the image such that label 1 is assigned to the largest object, label 2 is the next largest object, etc. Any single object can be extracted using BinaryThresholdImageFilter by setting the LowerThreshold and the UpperThreshold to the same value. In fact, any group of objects can be extracted using BinaryThresholdImageFilter by having the LowerThreshold and UpperThreshold span a group range (the ThresholdImageFilter can be used to extract a range of objects without changing their labels again). So using the RelabelComponentImageFilter in conjuction with a threshold filter you can extract the largest object, the second largest object, or the k largest objects. Size is defined by area/volume/number of pixels, etc. After the filter executes, you can query the number of objects, and the size of each object. Jim -----Original Message----- From: Miller, James V (Research) [mailto:millerjv@crd.ge.com] Sent: Friday, June 27, 2003 1:34 PM To: 'cspl'; insight-users@itk.org Subject: RE: [Insight-users] Find largest connected object in a Volume In Code/BasicFilters there are two classes ConnectedComponentImageFilter and HardConnectedComponentImageFilter. The former is a rewrite of the latter to use more of the ITK infrastructure. The latter may be removed soon. The ConnectedComponentImageFilter will use 6-connectivity in a volume to label the objects in the volume. Each connected object will have a unique label. However, this does not extract the largest connected object. You would need a separate filter (that does not exist yet) to scan through the label map and extract the largest object. As Luis suggested, you could a histogram of the label map to determine which object is the "largest". -----Original Message----- From: cspl [mailto:affable@hd2.dot.net.in] Sent: Friday, June 27, 2003 2:19 AM To: insight-users@itk.org Subject: [Insight-users] Find largest connected object in a Volume Hi Luis and all, I am in need of help on connectivity filter. Let me explain my requirment. I have a volume of some slices. I have to find the largest object in the entire volume. Initiallly i will threshold the image so that it will in binary format. Then i have to use 6-connectivity of find the largest object in the volume. The largest object should be labeled 1. Is there any filter which solves my problem. I should use 6-connectivity. Please do suggest me if there are other alternatives too. Please help me in this regard. Thanks in advance. -Regards, Sateesh. ------_=_NextPart_001_01C33FE5.17316CF0 Content-Type: text/html; charset="iso-8859-1"
I just added a new filter to the ITK repository that relabels an image. The input would the output of any segmentation algorithm that creates a label map.  The ConnectedComponentImageFilter would be one such filter.  Watershed would another, etc.  The filter is called RelabelComponentImageFilter and it changes the labels in the image such that label 1 is assigned to the largest object, label 2 is the next largest object, etc.  Any single object can be extracted using BinaryThresholdImageFilter by setting the LowerThreshold and the UpperThreshold to the same value.  In fact, any group of objects can be extracted using BinaryThresholdImageFilter by having the LowerThreshold and UpperThreshold span a group range (the ThresholdImageFilter can be used to extract a range of objects without changing their labels again).
 
So using the RelabelComponentImageFilter in conjuction with a threshold filter you can extract the largest object, the second largest object, or the k largest objects.
 
Size is defined by area/volume/number of pixels, etc.
 
After the filter executes, you can query the number of objects, and the size of each object.
 
Jim
 
 
-----Original Message-----
From: Miller, James V (Research) [mailto:millerjv@crd.ge.com] 
Sent: Friday, June 27, 2003 1:34 PM
To: 'cspl'; insight-users@itk.org
Subject: RE: [Insight-users] Find largest connected object in a Volume

In Code/BasicFilters there are two classes ConnectedComponentImageFilter and
HardConnectedComponentImageFilter.  The former is a rewrite of the latter to use more of the ITK infrastructure. The latter may be removed soon. 
 
The ConnectedComponentImageFilter will use 6-connectivity in a volume to label the objects in the volume.  Each connected object will have a unique label.
 
However, this does not extract the largest connected object.  You would need a separate filter (that does not exist yet) to scan through the label map and extract the largest object.  As Luis suggested, you could a histogram of the label map to determine which object is the "largest".
 
 
-----Original Message-----
From: cspl [mailto:affable@hd2.dot.net.in]
Sent: Friday, June 27, 2003 2:19 AM
To: insight-users@itk.org
Subject: [Insight-users] Find largest connected object in a Volume

Hi Luis and all,
   I am in need of help on connectivity filter. Let me explain my requirment.
   I have a volume of some slices. I have to find the largest object in the entire volume. Initiallly i will threshold the image so that it will in binary format. Then i have to use 6-connectivity of find the largest object in the volume. The largest object should be labeled 1. Is there any filter which solves my problem. I should use 6-connectivity. Please do suggest me if there are other alternatives too.
   
   Please help me in this regard.
 
   Thanks in advance.
 
-Regards,
  Sateesh.
------_=_NextPart_001_01C33FE5.17316CF0-- From bill.hoffman@kitware.com Tue Jul 1 18:19:52 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Tue, 01 Jul 2003 13:19:52 -0400 Subject: [Insight-users] kraepelin.uiowa -- IRIX64_MIPSpro7.3.1.3m-DEBUG errors Message-ID: <5.2.0.9.0.20030701131701.04dbe578@pop.biz.rr.com> Can the maintainer of this dashboard: kraepelin.uiowa -- IRIX64_MIPSpro7.3.1.3m-DEBUG errors Please try and remove this directory: `/scratch/purify/Testing/SGI/DEBUG/Insight/Utilities/kwsys' I think the errors are caused by a bad template ii_files directory. For a quick check this could be done: cd /scratch/purify/Testing/SGI/DEBUG/Insight/Utilities rm -rf kwsys make rebuild_cache make -Bill From santosh.keni@fiu.edu Wed Jul 2 00:34:55 2003 From: santosh.keni@fiu.edu (Santosh Keni) Date: Tue, 1 Jul 2003 19:34:55 -0400 Subject: [Insight-users] image registration Message-ID: <20030701233455.FEVY16642.spn25c0@spn25c0> Hello, I have installed ITK on a windows platform with MSVC6 compiler. I built the binaries using CMake 1.6 with source directory as "c:/ITK/InsightToolkit-1.2.0" and Build directory as "c:/ITK/InsightToolkit-1.2.0/Bin" . Then opened itk.dsw in MSVC6 and built it with "release" and "Debug" options. It gave me 11 warning and 0 errors with msg as shown below; --------------------Configuration: ALL_BUILD - Win32 Debug-------------------- Building Custom Rule ALL_BUILD "Build all projects" ALL_BUILD - 0 error(s), 11 warning(s) But after compilation it did not create the libraries and executables. can someone please tell me how to go about from here? My main goal is to register two sets of SPECT images of a brain phantom using 3D rigid body image registration. Each set of images is in a single volume file in Dicom format. So can anyone suggest a way to get this done using some GUI. From zhengyuanjie@sjtu.edu.cn Wed Jul 2 08:55:57 2003 From: zhengyuanjie@sjtu.edu.cn (֣Ԫ) Date: Wed, 2 Jul 2003 15:55:57 +0800 (BEIST) Subject: [Insight-users] help!! Message-ID: <20030702075557.DA7B715A3F2@sjtu.edu.cn> This is a multi-part message in MIME format. ----=_SkyMiracle_WorldPost_1057132557_= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 RGVhciBTaXIuDQpJIGFtIGEgbmV3IHVzZXIgb2YgSVRLIHdpdGggV2luZG93cyAyMDAwICBh bmQgIE1pY3Jvc29mdCB2aXN1YWwgQysrIDYuMC4gVG9kYXkgSSBhbSB0cnlpbmcgdG8gY29u ZmlndXJlIHRoZSBmaWxlIEhlbGxvV29ybGQgaW4gdGhlIEluc2lnaHQvRXhhbXBsZXMvSW5z dGFsbGF0aW9uIGRpcmVjdG9yeSB3aXRoIENNYWtlLiBIb3dldmVyIEkgY2Fuoa90IGZpbmlz aCB0aGUgY29uZmlndXJhdGlvbiAsIGJlY2F1c2UgQ01ha2UgdG9sZCBtZSB0aGF0IGl0IGNv dWxkbqGvdCBmaW5kIElUSy4gSSBkb26hr3Qga25vdyB3aGF0IGl0IG1lYW5zLiBJIHRoaW5r IGl0IHBlcmhhcHMgbWVhbnMgdGhlIHN0cmF0ZWd5IGZvciBmaW5kaW5nIElUSyBmYWlscywg YnV0IEkgZG9uoa90IGtub3cgaG93IHRvIGNvcnJlY3QgbXkgb3BlcmF0aW9ucy4gSSBhbSBz dXJlIHRoYXQgdGhlIHNvdXJjZSBhbmQgYmluYXJ5IGRpcmVjdG9yaWVzIGhhdmUgYmVlbiBj b3JyZWN0bHkgcGxhY2VkLiAgV291bGQgeW91IHBsZWFzZSBleHBsYWluIGl0IGZvciBtZT8g DQoNCkkgaGF2ZSBjb25maWd1cmVkIHNvbWUgb3RoZXIgcHJvdmlkZWQgZXhhbXBsZXMgYnkg SVRLIHN1Y2Nlc3NmdWxseS4gQW5kIEkgbG9hZGVkIHRoZSB3b3Jrc3BhY2VzIGdlbmVyYXRl ZCBieSBDTWFrZSB3aXRoIE1pY3Jvc29mdCBWaXN1YWwgYysrIDYuMC4gT3RoZXJ3aXNlIEkg Y2Fuoa90IGJ1aWxkIHRoZW0gd2l0aCB2YywgYmVjYXVzZSB0aGVyZSB3ZXJlIHNvbWUgaGVh ZGVyIGZpbGVzIEkgY291bGRuoa90IGZpbmQuIFdvdWxkIHlvdSBtaW5kIHRlbGwgbWUgdGhh dCBob3cgSSBjYW4gZmluZCBhbGwgdGhlIGhlYWRlciBmaWxlcyBuZWVkZWQgcXVpY2tseT8N ClRoYW5rIHlvdSBpbiBhZHZhbmNlIQ0KU2luY2VyZWx5IHlvdXJzIA0KWmhlbmcNCiANCiA= ----=_SkyMiracle_WorldPost_1057132557_=-- From mathias.seitel@igd.fhg.de Wed Jul 2 09:47:27 2003 From: mathias.seitel@igd.fhg.de (Mathias Seitel) Date: Wed, 02 Jul 2003 10:47:27 +0200 Subject: [Insight-users] Problem with FloodFilledFunctionConditionalConstIterator Message-ID: <3F029C1F.5080501@igd.fhg.de> Hello, I'm applying a connected threshold segmentation to a volume (256x256x16). For testing purposes I extract one slice, say #12, of the volume, using ExtractImageFilter. The slice has an index of (0, 0, 12) and a size of (256, 256, 1). For the region growing algorithm I add a seed point at (150, 100, 12). FloodFilledFunctionConditionalConstIterator::InitializeIterator() creates a temporary image with the same size as the original image but an index of (0, 0, 0). A set pixel method called later on this image however uses the original seed (z = 12) and thus calculates a wrong offset, which results in a runtime error. With the following lines added to InitializeIterator() everything seems to work fine (at least in my case): IndexType imageIndex = m_Image->GetLargestPossibleRegion().GetIndex(); tempRegion.SetIndex( imageIndex ); Regards, Mathias From Mathieu.Malaterre@creatis.insa-lyon.fr Wed Jul 2 10:23:13 2003 From: Mathieu.Malaterre@creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 02 Jul 2003 11:23:13 +0200 Subject: [Insight-users] ImageIO or FILeReader or FIleWrite's problem, In-Reply-To: <20030701211820.1432.qmail@web20907.mail.yahoo.com> References: <20030701211820.1432.qmail@web20907.mail.yahoo.com> Message-ID: <3F02A481.9090609@creatis.insa-lyon.fr> Your code is way too long, please make it as simple as possible. So that it still reproduce the bug. Furthermore: - You are using SetFilePrefix from an itkFileReader which doesn't exist: http://www.itk.org/Doxygen/html/functions.html#index_s - You are calling 'itkfilterwrap' but I don't have this code, I don't know if this allocate stuff properly, - You are also using your own classes: MRCImageIO and IMAGICImageIO but I don't know what it does, - Include all code: don't forget which '#include' you are using, - Please send me a backtrace of gdb: $ gdb myprog gdb> r [all necessary arguments] gdb> bt [cut and paste the output] Thanks mathieu Shunming Fang wrote: > Hello, Mathieu, > The following code is my code, I declare two instance > of my different specific ImageIO, one for reader and > other for writer, when I setup a pipelince form reader > -> filters->writer, the segmeantation always happen if > the two instance of ImageIO is the same, any > explanation about it?(Note: i change back for writer > using the same ImageIO instance imageIO) > Thanks, > Fang > > int main(int argc, char** argv) [snip] > > > --- Mathieu Malaterre > wrote: > >>Shunming Fang wrote: >> >>>If I just use one ImageIO to reader and >>>writer(supposed the input file and out file format >> >>is >> >>>the same), no problem. Only implmenting like the >>>following way, the segmentation happen before >>>writer->Update(), Yes, it is before >> >>writer->Update() >> >>Shunming, >> Are you sure you don't use any 'Update()' before >>this one ? >> Because setting up a pipeline doesn't do anything >>at all...until an >>'Update()' is call on a filter. >> >> So please send us the whole code you are using. You >>can also send us >>the backtrace of a gdb session. >> >>Thanks, >>Mathieu >> >> >> >> >>>because try..Catch didn't catch the segmenataion. >>>I wander whether in itk, there are just one >> >>ImageIO >> >>>instance allowed? >>>Fang >> >>_______________________________________________ >>Insight-users mailing list >>Insight-users@itk.org >>http://www.itk.org/mailman/listinfo/insight-users > > > > __________________________________ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From salah@gris.uni-tuebingen.de Wed Jul 2 15:03:08 2003 From: salah@gris.uni-tuebingen.de (salah) Date: Wed, 2 Jul 2003 16:03:08 +0200 Subject: [Insight-users] edge preserving smoothing filter Message-ID: <4B943954DD289E47958BCEC8C32269BE1EFB43@wsi-server2.wsi-gris.uni-tuebingen.de> hello all, depending on your experiments, what is the best edge- preserving smoothing filter to use with CT medical images. Speed/quality ?? Thanks, Zein From salah@gris.uni-tuebingen.de Wed Jul 2 15:06:38 2003 From: salah@gris.uni-tuebingen.de (salah) Date: Wed, 2 Jul 2003 16:06:38 +0200 Subject: [Insight-users] Is there a bug inGrayScaleErodeImageFilter?? Message-ID: <4B943954DD289E47958BCEC8C32269BE1EFB44@wsi-server2.wsi-gris.uni-tuebingen.de> Hi everybody , I have asked this question several times before and had unfortunately no answer. > The GrayScaleErodeImageFilter does not process the > margins of the image. It fills them simply with zeros!! > The GrayScaleFunctionErodeImageFilter does everything > on the other hand quite well.=20 > Is there a bug somewhere, or is that intended to be this > way?=20 I am using the 1.2 release, perhapse something was done=20 in later versions?! =20 > Thanx, > Zein >=20 >=20 >=20 > = ->8<------------->8<------------->8<------------->8<------------->8<-----= -------->8<- > Zein I. Salah=20 > University of T=FCbingen, WSI-GRIS, Sand 14, 72076 T=FCbingen=20 > Email: salah@gris.uni-tuebingen.de > Tel.: (07071) 29 75465 (GRIS), Fax: (07071) 29 54 66 >=20 From salah@gris.uni-tuebingen.de Wed Jul 2 15:34:48 2003 From: salah@gris.uni-tuebingen.de (salah) Date: Wed, 2 Jul 2003 16:34:48 +0200 Subject: [Insight-users] image intensity resclaing Message-ID: <4B943954DD289E47958BCEC8C32269BE1FA6CA@wsi-server2.wsi-gris.uni-tuebingen.de> Hello all, I need to do some kind of rescaling the intensities of an image in such a way like the so-called "histogram windowing". In other way, I want to rescale the intensities that lie in=20 a range (a, b) so that they fit in the whole intesity range=20 (say 0, 255), all values less than a are set to zero and all those greater that b are set to 255. Is there an already-made filter in itk that does this?? Thanks, Zein From pauly@cognitica.com Wed Jul 2 15:55:38 2003 From: pauly@cognitica.com (Paul Yushkevich) Date: Wed, 02 Jul 2003 10:55:38 -0400 Subject: [Insight-users] kwsys error Message-ID: <3F02F26A.2040702@cognitica.com> Hi, I updated my ITK installation this morning and I'm errors compiling in VC60 in the file Directory.cxx in Utilities\kwsys #include #include These lines are generating errors. They look a bit weird because, usually, I include just or . Is anyone else also getting this error? Paul. -- -------------------------------- Paul A. Yushkevich, Ph.D. President, Cognitica Corporation 17 Flemington Rd Chapel Hill, NC 27517 Tel: 1-919-929-7652 -------------------------------- From millerjv@crd.ge.com Wed Jul 2 16:12:04 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Wed, 2 Jul 2003 11:12:04 -0400 Subject: [Insight-users] Is there a bug inGrayScaleErodeImageFilter?? Message-ID: I still have not fixed this. It does process the margins, however, the prescribed boundary condition is to treat pixels outside the image as zeros. So zero propagate into the margin of the image. The boundary condition needs to be changed to NeumannZeroFlux variety. > -----Original Message----- > From: salah [mailto:salah@gris.uni-tuebingen.de] > Sent: Wednesday, July 02, 2003 10:07 AM > To: ITK Users (E-Mail) > Subject: [Insight-users] Is there a bug inGrayScaleErodeImageFilter?? > > > > Hi everybody , > > I have asked this question several times before and had > unfortunately no answer. > > > The GrayScaleErodeImageFilter does not process the > > margins of the image. It fills them simply with zeros!! > > The GrayScaleFunctionErodeImageFilter does everything > > on the other hand quite well. > > Is there a bug somewhere, or is that intended to be this > > way? > I am using the 1.2 release, perhapse something was done > in later versions?! > > > Thanx, > > Zein > > > > > > > > > ->8<------------->8<------------->8<------------->8<---------- > --->8<------------->8<- > > Zein I. Salah > > University of Tubingen, WSI-GRIS, Sand 14, 72076 Tubingen > > Email: salah@gris.uni-tuebingen.de > > Tel.: (07071) 29 75465 (GRIS), Fax: (07071) 29 54 66 > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From mark_foskey@unc.edu Wed Jul 2 16:19:56 2003 From: mark_foskey@unc.edu (Mark Foskey) Date: Wed, 02 Jul 2003 11:19:56 -0400 Subject: [Insight-users] kwsys error In-Reply-To: <3F02F26A.2040702@cognitica.com> References: <3F02F26A.2040702@cognitica.com> Message-ID: <3F02F81C.4020604@unc.edu> Jean-Philippe Guyon ran into that error yesterday, I think, but didn't investigate further since he still was able to compile his app. I don't know why it's not showing up on the dashboard. Paul Yushkevich wrote: > Hi, I updated my ITK installation this morning and I'm errors compiling > in VC60 in the file Directory.cxx in Utilities\kwsys > > #include > #include > > These lines are generating errors. They look a bit weird because, > usually, I include just or . > > Is anyone else also getting this error? > > Paul. > -- Mark Foskey (919) 843-5436 Computer-Aided Diagnosis and Display Lab mark_foskey@unc.edu Department of Radiology, CB 7515, UNC http://www.cs.unc.edu/~foskey Chapel Hill, NC 27599-7515 From millerjv@crd.ge.com Wed Jul 2 16:20:43 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Wed, 2 Jul 2003 11:20:43 -0400 Subject: [Insight-users] edge preserving smoothing filter Message-ID: GradientAnisotropicDiffusionImageFilter is the standard approach. The other variants like CurvatureAnisotropicDiffusionImageFilter produce images that are more "piecewise" constant which can be useful for extracting objects of interest. I have not looked at the background of the CurvatureImageFilter. So I cannot comment on its relative merits to the above diffusion operators. The BilateralImageFilter does not have the characteristic ripple (caused by sharp discontinuities) as the diffusion operators. This is appealing for some applications. But the BilateralImageFilter is very slow in comparison to the diffusion methods. Hopefully we'll have a version of Mean Shift image filtering soon. It should behave similar to the bilateral filter. We recently added some grayscale morphological operators based on geodesic erosion and dilation. These are also quite useful for removing noise. GrayscaleGeodesicErodeImageFilter GrayscaleGeodesicDilateImageFilter HMaximaImageFilter HMinimaImageFilter HConvexImageFilter HConcaveImageFilter > -----Original Message----- > From: salah [mailto:salah@gris.uni-tuebingen.de] > Sent: Wednesday, July 02, 2003 10:03 AM > To: ITK Users (E-Mail) > Subject: [Insight-users] edge preserving smoothing filter > > > hello all, > > depending on your experiments, what is the best edge- > preserving smoothing filter to use with CT medical images. > Speed/quality ?? > > Thanks, > Zein > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From millerjv@crd.ge.com Wed Jul 2 16:27:34 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Wed, 2 Jul 2003 11:27:34 -0400 Subject: [Insight-users] image intensity resclaing Message-ID: The RescaleIntensityImageFilter will rescale the intensities in the image the dynamic range on the input image is mapped to a user specified range. But it does not map a user specified input range to a user specified output range. The IntensityWindowingImageFilter does what you want but its API is not the standard window/level parameters. You set the input WindowMinimum and WindowMaximum and specify the associated OutputMinimum and OutputMaximum. I plan to add the standard window/level API to this filter (it will just remap the window/level to the above parameters). Jim > -----Original Message----- > From: salah [mailto:salah@gris.uni-tuebingen.de] > Sent: Wednesday, July 02, 2003 10:35 AM > To: ITK Users (E-Mail) > Subject: [Insight-users] image intensity resclaing > > > Hello all, > > I need to do some kind of rescaling the intensities of an > image in such a way like the so-called "histogram windowing". > In other way, I want to rescale the intensities that lie in > a range (a, b) so that they fit in the whole intesity range > (say 0, 255), all values less than a are set to zero and all > those greater that b are set to 255. > > Is there an already-made filter in itk that does this?? > > Thanks, > Zein > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From GIordanescu@cc.nih.gov Wed Jul 2 18:22:43 2003 From: GIordanescu@cc.nih.gov (Iordanescu, Gheorghe (NIH/CC/DRD)) Date: Wed, 2 Jul 2003 13:22:43 -0400 Subject: [Insight-users] Dicom slice position Message-ID: <0856166C2F7DE0488BB312A2BD3D58CB075DBD94@cyan2.CC.NIH.GOV> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C340BE.8C5042E0 Content-Type: text/plain Hi everybody, I would like to read a sequence of Dicom images in a volume. Unfortunately the images' names do not correspond to their order in space. For this I would like to read from each image header the "Image number", "Patient position", "slice thickness".and "pixel spacing". Does anybody have an example of how to read these fields from a dicom header? Thank you very much. George ------_=_NextPart_001_01C340BE.8C5042E0 Content-Type: text/html

Hi everybody,

 

I would like to read a sequence of Dicom images in a volume. Unfortunately the images' names do not correspond to their order in space. For this I would like to read from each image header the "Image number", "Patient position", "slice thickness".and "pixel spacing". Does anybody have an example of how to read these fields from a dicom header? Thank you very much.

 

George

------_=_NextPart_001_01C340BE.8C5042E0-- From bill.hoffman@kitware.com Wed Jul 2 18:45:35 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Wed, 02 Jul 2003 13:45:35 -0400 Subject: [Insight-users] kwsys error In-Reply-To: <3F02F81C.4020604@unc.edu> References: <3F02F26A.2040702@cognitica.com> <3F02F26A.2040702@cognitica.com> Message-ID: <5.2.0.9.0.20030702134225.04e114b0@pop.biz.rr.com> Please re-run CMakeSetup on ITK, and the files should be generated. Also, make sure you have done a complete cvs update (first), including the top level directory for ITK. -Bill At 11:19 AM 7/2/2003, Mark Foskey wrote: >Jean-Philippe Guyon ran into that error yesterday, I think, but didn't investigate further since he still was able to compile his app. I don't know why it's not showing up on the dashboard. > >Paul Yushkevich wrote: >>Hi, I updated my ITK installation this morning and I'm errors compiling in VC60 in the file Directory.cxx in Utilities\kwsys >>#include >>#include >>These lines are generating errors. They look a bit weird because, usually, I include just or . >>Is anyone else also getting this error? >>Paul. > >-- >Mark Foskey (919) 843-5436 Computer-Aided Diagnosis and Display Lab >mark_foskey@unc.edu Department of Radiology, CB 7515, UNC >http://www.cs.unc.edu/~foskey Chapel Hill, NC 27599-7515 > >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users From hjohnson@mail.psychiatry.uiowa.edu Wed Jul 2 14:39:05 2003 From: hjohnson@mail.psychiatry.uiowa.edu (Hans Johnson) Date: Wed, 02 Jul 2003 08:39:05 -0500 Subject: [Insight-users] kraepelin.uiowa -- IRIX64_MIPSpro7.3.1.3m-DEBUG errors In-Reply-To: <5.2.0.9.0.20030701131701.04dbe578@pop.biz.rr.com> References: <5.2.0.9.0.20030701131701.04dbe578@pop.biz.rr.com> Message-ID: <3F02E079.50208@mail.psychiatry.uiowa.edu> Bill, This has been done. I am re-running last nights nightly build right now, and hopefully this will resolve the dashboard errors. Thank you for the information. Regards, Hans Bill Hoffman wrote: >Can the maintainer of this dashboard: > >kraepelin.uiowa -- IRIX64_MIPSpro7.3.1.3m-DEBUG errors > >Please try and remove this directory: > >`/scratch/purify/Testing/SGI/DEBUG/Insight/Utilities/kwsys' > >I think the errors are caused by a bad template ii_files directory. > >For a quick check this could be done: > >cd /scratch/purify/Testing/SGI/DEBUG/Insight/Utilities >rm -rf kwsys >make rebuild_cache >make > > >-Bill > > > >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users > > From luis.ibanez@kitware.com Wed Jul 2 19:21:03 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 02 Jul 2003 14:21:03 -0400 Subject: [Insight-users] help!! References: <20030702075557.DA7B715A3F2@sjtu.edu.cn> Message-ID: <3F03228F.9050103@kitware.com> Hi Zheng, The HelloWorld example requires you to specify the binary directory where you built ITK. You must provide this path in the CMake variable "ITK_DIR" when you run CMake for configuring the HelloWorld example. If you continue experiencing any problems, please send us the CMakeCache.txt file that CMake is generating in the binary directory where you are trying to build the HelloWorld example. Thanks Luis ------------- ֣Ԫ wrote: > Dear Sir. > I am a new user of ITK with Windows 2000 and Microsoft visual C++ 6.0. Today I am trying to configure the file HelloWorld in the Insight/Examples/Installation directory with CMake. However I cant finish the configuration , because CMake told me that it couldnt find ITK. I dont know what it means. I think it perhaps means the strategy for finding ITK fails, but I dont know how to correct my operations. I am sure that the source and binary directories have been correctly placed. Would you please explain it for me? > > I have configured some other provided examples by ITK successfully. And I loaded the workspaces generated by CMake with Microsoft Visual c++ 6.0. Otherwise I cant build them with vc, because there were some header files I couldnt find. Would you mind tell me that how I can find all the header files needed quickly? > Thank you in advance! > Sincerely yours > Zheng > > From luis.ibanez@kitware.com Wed Jul 2 19:32:49 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 02 Jul 2003 14:32:49 -0400 Subject: [Insight-users] image registration References: <20030701233455.FEVY16642.spn25c0@spn25c0> Message-ID: <3F032551.1000600@kitware.com> Hi Santosh, Once you are done with the building process, you should find ITK libraries and executables for the examples in the directories: c:/ITK/InsightToolkit-1.2.0/Bin/bin/Debug and c:/ITK/InsightToolkit-1.2.0/Bin/bin/Release Since you build both for Debug and Release. Note the double : /Bin/bin the first one is the "Bin" that you specified, the second "bin" is one that ITK configuration adds for your convenience. ----- Having ITK built, probably the best next step is to get some coffee and go to the SoftwareGuide http://www.itk.org/ItkSoftwareGuide.pdf and read the section on image Resampling (section 5.7), and the chapter on image registration (chapter 7th). Please read the section on resampling first, since many concepts from this section are used later on registration. Both sections will point you to associated examples available in Insight/Examples/Filtering and Insight/Examples/Registration --- If you want to try a GUI based registration tool, you may want to go directly to the UNC's CADDLab page http://caddlab.rad.unc.edu/software/index.html#registration3D and download their nice 3D registration tool. Both source code and binary versions are available (Linux and Windows). This tool is based on ITK components. Regards, Luis ---------------------- Santosh Keni wrote: > Hello, > I have installed ITK on a windows platform with MSVC6 compiler. I built the binaries using CMake 1.6 with source directory as "c:/ITK/InsightToolkit-1.2.0" and Build directory as "c:/ITK/InsightToolkit-1.2.0/Bin" . Then opened itk.dsw in MSVC6 and built it with "release" and "Debug" options. It gave me 11 warning and 0 errors with msg as shown below; > --------------------Configuration: ALL_BUILD - Win32 Debug-------------------- > Building Custom Rule ALL_BUILD > "Build all projects" > > ALL_BUILD - 0 error(s), 11 warning(s) > > But after compilation it did not create the libraries and executables. can someone please tell me how to go about from here? > > My main goal is to register two sets of SPECT images of a brain phantom using 3D rigid body image registration. Each set of images is in a single volume file in Dicom format. So can anyone suggest a way to get this done using some GUI. > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From tbaker@claritysolutionsllc.com Wed Jul 2 20:06:47 2003 From: tbaker@claritysolutionsllc.com (Todd Baker) Date: Wed, 2 Jul 2003 15:06:47 -0400 Subject: [Insight-users] Position Available for Medical Imaging and Visualization Developer Message-ID: This is a multi-part message in MIME format. ------=_NextPart_000_000E_01C340AB.9035DC20 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello all: I don't mean to invade the insight-users list space... but hopefully this will be seen more as a service to the ITK community than a nuisance. This is a real job posting from the one doing the hiring. So please accept my apology in advance if this is too OT. Clarity Solutions is a software company providing leading-edge medical imaging and visualization solutions to the clinical community in a cost-effective, flexible and intuitive package. Because of our success in this area we are seeking team members with the advanced skill set and real-world experience to help us expand into new areas and to build on our current product offerings. We have the unique advantage of being backed by 20 years of solid medical imaging experience and success as well as having the flexibility and feel of a start-up company. It's the best of both worlds. A good, solid place to work with strong financial backing, great benefits and job security combined with a creative environment that allows us to be true innovators in our field. Clarity is looking for software engineers that understand the difference between high-tech, gee-whiz eye-candy and real-world usability and practicality. At the same time we strive to be technical leaders and therefore require an extensive background in clinical imaging and visualization. It will take more than the right credentials to get on this team. Applicant Requirements: - Strong educational and work background in the clinical imaging and visualization field. - In-depth knowledge of common Radiology and Nuclear Medicine modalities and image formats. - Minimum of M.S. in Computer Science, Engineering, Mathematics or other "hard science." - Bulletproof skills in C++ and OO design and implementation. (must be able to demonstrate previous applications relevant to our needs.) - Ability to function with minimal supervision. - DICOM experience is very valuable. - Experience using Qt a big plus. - Hands-on experience using imaging and visualization frameworks such as: - The Insight Toolkit for Segmentation and Registration (ITK) - The Visualization Toolkit (VTK) - Ability to function in a team environment (must play well with others). Todd Baker Project Director - R&D Lead Developer Clarity Solutions, LLC ------=_NextPart_000_000E_01C340AB.9035DC20 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message
Hello=20 all:
 
 
        I = don't mean=20 to invade the insight-users list space... but hopefully this will be = seen more=20 as a service to the ITK community than a nuisance. This is a real job = posting=20 from the one doing the hiring. So please accept my apology in advance if = this is=20 too OT.
 

Clarity Solutions is a software company providing leading-edge = medical=20 imaging and visualization solutions to the clinical community in a=20 cost-effective, flexible and intuitive package.

 

Because of our success in this area we are seeking team members = with the=20 advanced skill set and real-world experience to help us expand into new = areas=20 and to build on our current product offerings.

 

We have the unique advantage of being backed by 20 years of = solid medical=20 imaging experience and success as well as having the flexibility and = feel of a=20 start-up company. It’s the best of both worlds. A good, solid = place to work with=20 strong financial backing, great benefits and job security combined with = a=20 creative environment that allows us to be true innovators in our=20 field.

 

Clarity is looking for software engineers that understand the = difference=20 between high-tech, gee-whiz eye-candy and real-world usability and = practicality.=20 At the same time we strive to be technical leaders and therefore require = an=20 extensive background in clinical imaging and visualization.  It will take more than the = right=20 credentials to get on this team.

 

Applicant Requirements:

 

-        =20 Strong educational and work background in = the=20 clinical imaging and visualization field.

-        =20 In-depth knowledge of common Radiology and = Nuclear=20 Medicine modalities and image formats.

-        =20 Minimum of M.S. in Computer Science, = Engineering,=20 Mathematics or other “hard science.”

-        =20 Bulletproof skills in C++ and OO design and = implementation. (must be able to demonstrate previous applications = relevant to=20 our needs.)

-        =20 Ability to function with minimal=20 supervision.

-        =20 DICOM experience is very = valuable.

-        =20 Experience using Qt a big = plus.

-        =20 Hands-on experience using imaging and = visualization=20 frameworks such as:

          =20 - The Insight Toolkit for Segmentation and Registration=20 (ITK)

          =20 - The Visualization Toolkit (VTK)

-        =20 Ability to function in a team environment = (must play=20 well with others).

 
 
Todd = Baker
Project Director - = R&D Lead=20 Developer
Clarity Solutions,=20 LLC
 
------=_NextPart_000_000E_01C340AB.9035DC20-- From luis.ibanez@kitware.com Wed Jul 2 21:27:41 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 02 Jul 2003 16:27:41 -0400 Subject: [Insight-users] Problem with FloodFilledFunctionConditionalConstIterator References: <3F029C1F.5080501@igd.fhg.de> Message-ID: <3F03403D.4030806@kitware.com> Hi Mathias, Thanks for pointing this out. The code in FloodFilledFunctionConditionalConstIterator::InitializeIterator() has been modified according to your suggestion. The tempRegion is now equal to the LargestPossibleRegion(). a CVS update should give you the new version. Please let us know if you find further problems, Regards, Luis --------------------- Mathias Seitel wrote: > Hello, > > I'm applying a connected threshold segmentation to a volume > (256x256x16). For testing purposes I extract one slice, say #12, of the > volume, using ExtractImageFilter. The slice has an index of (0, 0, 12) > and a size of (256, 256, 1). For the region growing algorithm I add a > seed point at (150, 100, 12). > > FloodFilledFunctionConditionalConstIterator::InitializeIterator() > creates a temporary image with the same size as the original image but > an index of (0, 0, 0). A set pixel > method called later on this image however uses the original seed (z = > 12) and thus calculates a wrong offset, which results in a runtime error. > > With the following lines added to InitializeIterator() everything seems > to work fine (at least in my case): > > IndexType imageIndex = m_Image->GetLargestPossibleRegion().GetIndex(); > tempRegion.SetIndex( imageIndex ); > > Regards, > Mathias > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From sven.prevrhal@oarg.ucsf.edu Wed Jul 2 23:19:09 2003 From: sven.prevrhal@oarg.ucsf.edu (Sven Prevrhal) Date: Wed, 2 Jul 2003 15:19:09 -0700 Subject: [Insight-users] rescaling problems Message-ID: <000001c340e7$f5b6b240$7f07da0a@RORG.OARG.UCSF.EDU> This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C340AD.4957DA40 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I'd like to sample a CT volume onto a coarser grid and am having trouble. The resampleFilter Update throws an exception saying at least a part of the requested region is outside the maximum size, but only if I request a smaller size! Here's my code with the problem description commented: m_ResampleTransform->SetIdentity(); ImageSizeType scaledSize; ImageSizeType size = m_ImageReader->GetOutput()-> GetBufferedRegion().GetSize(); //From the GUI: this->m_SpacingFactor[0] = xValue; this->m_SpacingFactor[1] = yValue; this->m_SpacingFactor[2] = zValue; double * scaledSpacing = new double[ImageDimension]; const double * spacing = m_ImageReader->GetOutput()->GetSpacing(); for( int i = 0; i < ImageDimension; i++ ) { scaledSpacing[i] = spacing[i] * m_SpacingFactor[i]; // Here's the problem: If I leave // scaledSize[i] = size[i]; // it doesn't crash, // but I get a lot of zero voxels around. Setting scaledSize[i] = size[i] / m_SpacingFactor[i]; // should take the excess voxel out, but it crashes! } m_ResampleFilter->SetSize( scaledSize ); m_ResampleFilter->SetOutputSpacing( (const double *) scaledSpacing ); m_ResampleFilter->Modified(); // Update somewhere else, but that's when it crashes Example: I have 512x512xn input, want to resample onto 256x256xn output, I choose the m_SpacingFactors 2.0,2.0,1.0. Setting size to 256x256xn ->crash! This shouldn't be hard, but for some reason I am stuck. Any ideas totally appreciated!! sven -- ------=_NextPart_000_0001_01C340AD.4957DA40 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I’d like to sample a CT volume onto a coarser = grid and am having trouble. The resampleFilter Update throws an exception saying = at least a part of the requested region is outside the maximum size, but = only if I request a smaller size! Here’s my code with the problem = description commented:

 

  = m_ResampleTransform->SetIdentity();

 

  ImageSizeType scaledSize;

 

  ImageSizeType size =3D = m_ImageReader->GetOutput()->

         =      GetBufferedRegion().GetSize();

 

  //From the GUI:

  this->m_SpacingFactor[0] =3D = xValue;

  this->m_SpacingFactor[1] =3D = yValue;

  this->m_SpacingFactor[2] =3D = zValue;

 

  double * scaledSpacing =3D new = double[ImageDimension];

 

  const double * spacing =3D = m_ImageReader->GetOutput()->GetSpacing();

 

  for( int i =3D 0; i < ImageDimension; i++ ) = {

 

         =      scaledSpacing[i] =3D spacing[i] * m_SpacingFactor[i];

 

         =      // Here’s the problem: If I leave

         =      // scaledSize[i] =3D size[i];

         =      // it doesn’t crash,

         =      // but I get a lot of zero voxels around. Setting

         =      scaledSize[i] =3D  size[i] / m_SpacingFactor[i];

         =      // should take the excess voxel out, but it crashes!

  }

 

  m_ResampleFilter->SetSize( scaledSize = );

  m_ResampleFilter->SetOutputSpacing( (const = double *) scaledSpacing );

  = m_ResampleFilter->Modified();

 

  // Update somewhere else, but that’s = when it crashes

 

Example: I have 512x512xn input, want to resample = onto 256x256xn output, I choose the m_SpacingFactors 2.0,2.0,1.0. Setting = size to 256x256xn ->crash!

 

This shouldn’t be hard, but for some reason I = am stuck. Any ideas totally appreciated!!

 

sven

--

 

------=_NextPart_000_0001_01C340AD.4957DA40-- From luis.ibanez@kitware.com Thu Jul 3 06:43:37 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 03 Jul 2003 01:43:37 -0400 Subject: [Insight-users] rescaling problems References: <000001c340e7$f5b6b240$7f07da0a@RORG.OARG.UCSF.EDU> Message-ID: <3F03C289.4050809@kitware.com> Hi Sven, Your code looks ok, and the application of the factor scaling for reducing the size is perfectly valid. I guess that you may be experiencing a pipeline update problem. Do you have more filters after the ResampleImageFilter ? Are you calling Update() in any of those downstream filters ? I would suggest you to try calling "UpdateLargestPossibleRegion()" instead of just "Update()". For performance reasons, the pipeline only performs region negociations the first time it is executed. Calling UpdateLargestPossibleRegion() forces the pipeline to repeat the region negociation each time. This is quite important when you are changing the image size as a consequence of some parameter settings. Please let us know if you continue experiencing any problems, Thanks Luis ----------------------- Sven Prevrhal wrote: > I?d like to sample a CT volume onto a coarser grid and am having > trouble. The resampleFilter Update throws an exception saying at least a > part of the requested region is outside the maximum size, but only if I > request a smaller size! Here?s my code with the problem description > commented: > > > > m_ResampleTransform->SetIdentity(); > > > > ImageSizeType scaledSize; > > > > ImageSizeType size = m_ImageReader->GetOutput()-> > > GetBufferedRegion().GetSize(); > > > > //From the GUI: > > this->m_SpacingFactor[0] = xValue; > > this->m_SpacingFactor[1] = yValue; > > this->m_SpacingFactor[2] = zValue; > > > > double * scaledSpacing = new double[ImageDimension]; > > > > const double * spacing = m_ImageReader->GetOutput()->GetSpacing(); > > > > for( int i = 0; i < ImageDimension; i++ ) { > > > > scaledSpacing[i] = spacing[i] * m_SpacingFactor[i]; > > > > // Here?s the problem: If I leave > > // scaledSize[i] = size[i]; > > // it doesn?t crash, > > // but I get a lot of zero voxels around. Setting > > scaledSize[i] = size[i] / m_SpacingFactor[i]; > > // should take the excess voxel out, but it crashes! > > } > > > > m_ResampleFilter->SetSize( scaledSize ); > > m_ResampleFilter->SetOutputSpacing( (const double *) scaledSpacing ); > > m_ResampleFilter->Modified(); > > > > // Update somewhere else, but that?s when it crashes > > > > Example: I have 512x512xn input, want to resample onto 256x256xn output, > I choose the m_SpacingFactors 2.0,2.0,1.0. Setting size to 256x256xn ->crash! > > > > This shouldn?t be hard, but for some reason I am stuck. Any ideas > totally appreciated!! > > > > sven > > -- > > > From luis.ibanez@kitware.com Thu Jul 3 06:58:34 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 03 Jul 2003 01:58:34 -0400 Subject: [Insight-users] =?GB2312?B?UmU6IENvbmZpZ3VyaW5nIHRoZSBIZWxsb1dvcmxkIGV4YW1wbGU6IA==?= =?GB2312?B?IEkgc3RpbGwgY2Fuoa90IHNvbHZlIG15IHByb2JsZW0gdGlsbCBub3chIDog?= References: <20030703054120.D4D7E1C57ED@sjtu.edu.cn> Message-ID: <3F03C60A.6070802@kitware.com> HI Zheng, It seems that you haven't built ITK itself. You have to build ITK before attemting to use any of the examples. In order to build ITK, run CMake and provide as source directory E:\\zhengyuanjie\\InsightToolkit-1.2.0\\InsightToolkit-1.2.0 not E:\\zhengyuanjie\\InsightToolkit-1.2.0\\InsightToolkit-1.2.0\\Examples\\Installation Then as binary directory for building ITK, provide E:\\zhengyuanjie\\InsightBin After running CMake you will find a file "ITK.dsw" in the directory E:\\zhengyuanjie\\InsightBin Open this ITK.dsw file with VisualStudio 6 and "build" This should generate libraries and executables in the directory E:\\zhengyuanjie\\InsightBin\\bin under subdirectories "Release" or "Debug" depending on the compilation mode that you used. When the build is done (it would take about 40 minutes) you can now use the ITK libraries for building the HelloWorld example. In order to build this example please do the following Run CMakeSetup again, provide as source directory E:\\zhengyuanjie\\InsightToolkit-1.2.0\\InsightToolkit-1.2.0\\Examples\\Installation and as binary directory E:\\zhengyuanjie\\ItkExample CMake will ask you where did you build ITK, that is the binary directory where you built ITK. You must provide this information in the variable ITK_DIR, in your case you should give the directory E:\\zhengyuanjie\\InsightBin With this, CMake should be able to configure the example and generate a file HelloWorld.dsw in the directory E:\\zhengyuanjie\\ItkExample Open this dsw file with VisualStudio and build That will generate the executable for the example. ---- Regards, Luis ---------------- Zheng wrote: > Dear Luis: > I still cant solve my problem till now. You say The HelloWorld example requires you to specify the binary directory where you built ITK. I dont know the meaning of the binary directory where you built ITK. > I list my operations and the CMakeCache.txt below. > My operations is as below: > 1. Extract the files in archive InsightToolkit-1.2.0.zip to the folder E:\\zhengyuanjie\\InsightToolkit-1.2.0\\InsightToolkit-1.2.0\\ > 2. Run CMSetup167.exe, and set source and build directories respectively as E:\\zhengyuanjie\\InsightToolkit-1.2.0\\InsightToolkit-1.2.0\\Examples\\Installation and E:\\zhengyuanjie\\MyExample > 3. Select Visual Studio 6. > 4. Push the button configure. > 5. An error appears: Cannot build without ITK. Please set ITK_DIR(Press Cancel to suppress any further messages.) > 6. I push the Cancel button. > 7. I set variable ITK_DIR as E:\\zhengyuanjie\\InsightToolkit-1.2.0, and push configure button. Another error appears: > CMake Error: Error in cmake code at E:/zhengyuanjie/Cmake/Modules/FindITK.cmake:75: > INCLUDE Could not find include file: E:/zhengyuanjie/InsightToolkit-1.2.0/ITKConfig.cmake > (Press Cancel to suppress any further messages.) > 8. If I set variable ITK_DIR as E:\\zhengyuanjie\\MyExample and push configure button, an error appears: > CMake Error: Error in cmake code at E:/zhengyuanjie/Cmake/Modules/FindITK.cmake:75: > INCLUDE Could not find include file: E:/zhengyuanjie/InsightToolkit-1.2.0/ITKConfig.cmake > (Press Cancel to suppress any further messages.) > > > The CMakeCache.txt files content is as below: > # This is the CMakeCache file. > # For build in directory: e:/zhengyuanjie/MyExample > # You can edit this file to change values found and used by cmake. > # If you do not want to change any of the values, simply exit the editor. > # If you do want to change a value, simply edit, save, and exit the editor. > # The syntax for the file is as follows: > # KEY:TYPE=VALUE > # KEY is the name of a varible in the cache. > # TYPE is a hint to GUI\'s for the type of VALUE, DO NOT EDIT TYPE!. > # VALUE is the current value for the KEY. > > ######################## > # EXTERNAL cache entries > ######################## > > //Path to a program. > CMAKE_AR:FILEPATH=CMAKE_AR-NOTFOUND > > //For backwards compatibility, what version of CMake commands and > // syntax should this version of CMake allow. > CMAKE_BACKWARDS_COMPATIBILITY:STRING=1.6 > > //C++ compiler > CMAKE_CXX_COMPILER:STRING=cl > > //Flags used by the compiler during all build types. > CMAKE_CXX_FLAGS:STRING= /W3 /Zm1000 /GX /GR > > //Flags used by the compiler during debug builds. > CMAKE_CXX_FLAGS_DEBUG:STRING=/MDd /Zi /Od /GZ > > //Flags used by the compiler during release minsize builds. > CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1 > > //Flags used by the compiler during release builds (/MD /Ob1 /Oi > // /Ot /Oy /Gs will produce slightly less optimized but smaller > // files). > CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 > > //Flags used by the compiler during Release with Debug Info builds. > // > CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 > > //C compiler > CMAKE_C_COMPILER:STRING=cl > > //Flags for C compiler. > CMAKE_C_FLAGS:STRING= /W3 /Zm1000 > > //Flags used by the compiler during debug builds. > CMAKE_C_FLAGS_DEBUG:STRING=/MDd /Zi /Od /GZ > > //Flags used by the compiler during release minsize builds. > CMAKE_C_FLAGS_MINSIZEREL:STRING=/MD /O1 > > //Flags used by the compiler during release builds (/MD /Ob1 /Oi > // /Ot /Oy /Gs will produce slightly less optimized but smaller > // files). > CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 > > //Flags used by the compiler during Release with Debug Info builds. > // > CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 > > //Flags used by the linker. > CMAKE_EXE_LINKER_FLAGS:STRING=/STACK:10000000 /machine:I386 /INCREMENTAL:YES > > //Flags used by the linker during debug builds. > CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /pdbtype:sept > > //Flags used by the linker during release minsize builds. > CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= > > //Flags used by the linker during release builds. > CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= > > //Flags used by the linker during Release with Debug Info builds. > // > CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /pdbtype:sept > > //Install path prefix, prepended onto install directories. > CMAKE_INSTALL_PREFIX:PATH=/usr/local > > //make program > CMAKE_MAKE_PROGRAM:FILEPATH=C:/PROGRA~1/MICROS~3/Common/MSDev98/Bin/msdev.com > > //Flags used by the linker during the creation of modules. > CMAKE_MODULE_LINKER_FLAGS:STRING= > > //Flags used by the linker during debug builds. > CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= > > //Flags used by the linker during release minsize builds. > CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= > > //Flags used by the linker during release builds. > CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= > > //Flags used by the linker during Release with Debug Info builds. > // > CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /pdbtype:sept > > //Flags used by the linker during the creation of dll\'s. > CMAKE_SHARED_LINKER_FLAGS:STRING=/STACK:10000000 /machine:I386 /INCREMENTAL:YES > > //Flags used by the linker during debug builds. > CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /pdbtype:sept > > //Flags used by the linker during release minsize builds. > CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= > > //Flags used by the linker during release builds. > CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= > > //Flags used by the linker during Release with Debug Info builds. > // > CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /pdbtype:sept > > //If set, runtime paths are not added when using shared libraries. > // > CMAKE_SKIP_RPATH:BOOL=NO > > //Libraries linked by defalut with all applications. > CMAKE_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib > > //If this value is on, makefiles will be generated without the > // .SILENT directive, and all commands will be echoed to the console > // during the make. This is useful for debugging only. > CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE > > //Single output directory for building all executables. > EXECUTABLE_OUTPUT_PATH:PATH= > > //Value Computed by CMake > HelloWorld_BINARY_DIR:STATIC=E:/zhengyuanjie/MyExample > > //Value Computed by CMake > HelloWorld_SOURCE_DIR:STATIC=E:/zhengyuanjie/InsightToolkit-1.2.0/InsightToolkit-1.2.0/Examples/Installation > > //The directory containing ITKConfig.cmake. This is either the > // root of the build tree, or PREFIX/lib/InsightToolkit for an > // installation. > ITK_DIR:PATH=ITK_DIR-NOTFOUND > > //Single output directory for building all libraries. > LIBRARY_OUTPUT_PATH:PATH= > > > ######################## > # INTERNAL cache entries > ######################## > > //Advanced flag for variable: CMAKE_AR > CMAKE_AR-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_BUILD_TOOL > CMAKE_BUILD_TOOL-ADVANCED:INTERNAL=1 > //What is the target build tool cmake is generating for. > CMAKE_BUILD_TOOL:INTERNAL=C:/PROGRA~1/MICROS~3/Common/MSDev98/Bin/msdev.com > //This is the directory where this CMakeCahe.txt was created > CMAKE_CACHEFILE_DIR:INTERNAL=e:/zhengyuanjie/MyExample > //Major version of cmake used to create the current loaded cache > // > CMAKE_CACHE_MAJOR_VERSION:INTERNAL=1 > //Minor version of cmake used to create the current loaded cache > // > CMAKE_CACHE_MINOR_VERSION:INTERNAL=6 > //Major version of cmake used to create the current loaded cache > // > CMAKE_CACHE_RELEASE_VERSION:INTERNAL=patch 7 > //Path to CMake executable. > CMAKE_COMMAND:INTERNAL=E:/zhengyuanjie/CMake/bin/cmake.exe > //Advanced flag for variable: CMAKE_CXX_COMPILER > CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 > //Result of TRY_COMPILE > CMAKE_CXX_COMPILER_WORKS:INTERNAL=TRUE > //Advanced flag for variable: CMAKE_CXX_FLAGS > CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_CXX_FLAGS_DEBUG > CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_CXX_FLAGS_MINSIZEREL > CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_CXX_FLAGS_RELEASE > CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO > CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_C_COMPILER > CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 > //Result of TRY_COMPILE > CMAKE_C_COMPILER_WORKS:INTERNAL=TRUE > //Advanced flag for variable: CMAKE_C_FLAGS > CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_C_FLAGS_DEBUG > CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_C_FLAGS_MINSIZEREL > CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_C_FLAGS_RELEASE > CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_C_FLAGS_RELWITHDEBINFO > CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 > //Path to cache edit program executable. > CMAKE_EDIT_COMMAND:INTERNAL=E:/zhengyuanjie/CMake/bin/CMakeSetup.exe > //Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS > CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG > CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL > // > CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE > CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO > // > CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 > //Name of generator. > CMAKE_GENERATOR:INTERNAL=Visual Studio 6 > //Start directory with the top level CMakeLists.txt file for this > // project > CMAKE_HOME_DIRECTORY:INTERNAL=E:/zhengyuanjie/InsightToolkit-1.2.0/InsightToolkit-1.2.0/Examples/Installation > //Advanced flag for variable: CMAKE_INSTALL_PREFIX > CMAKE_INSTALL_PREFIX-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MAKE_PROGRAM > CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS > CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG > CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL > // > CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE > // > CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO > // > CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_RANLIB > CMAKE_RANLIB-ADVANCED:INTERNAL=1 > //noop for ranlib > CMAKE_RANLIB:INTERNAL=: > //Path to CMake installation. > CMAKE_ROOT:INTERNAL=E:/zhengyuanjie/CMake > //Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS > CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG > CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL > // > CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE > // > CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO > // > CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_SKIP_RPATH > CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_STANDARD_LIBRARIES > CMAKE_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_VERBOSE_MAKEFILE > CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 > > > Thank you in advance! > Sincerely yours > Zheng > > ----- Original Message ----- > From: Luis Ibanez > To: zhengyuanjie@sjtu.edu.cn > Cc: insight-users@itk.org > Subject: Re: [Insight-users] help!! > > > Hi Zheng, > > The HelloWorld example requires you to specify the binary > directory where you built ITK. > > You must provide this path in the CMake variable "ITK_DIR" > when you run CMake for configuring the HelloWorld example. > > If you continue experiencing any problems, please send us the > CMakeCache.txt file that CMake is generating in the binary > directory where you are trying to build the HelloWorld > example. > > > Thanks > > > > Luis > > > ------------- > ֣Ԫ wrote: > >>Dear Sir. >>I am a new user of ITK with Windows 2000 and Microsoft visual C++ 6.0. Today I am trying to configure the file HelloWorld in the Insight/Examples/Installation directory with CMake. However I cant finish the configuration , because CMake told me that it couldnt find ITK. I dont know what it means. I think it perhaps means the strategy for finding ITK fails, but I dont know how to correct my operations. I am sure that the source and binary directories have been correctly placed. Would you please explain it for me? >> >>I have configured some other provided examples by ITK successfully. And I loaded the workspaces generated by CMake with Microsoft Visual c++ 6.0. Otherwise I cant build them with vc, because there were some header files I couldnt find. Would you mind tell me that how I can find all the header files needed quickly? >>Thank you in advance! >>Sincerely yours >>Zheng >> >> > > > > > > > From jolinda@darkwing.uoregon.edu Thu Jul 3 23:35:34 2003 From: jolinda@darkwing.uoregon.edu (Jolinda Smith) Date: Thu, 3 Jul 2003 15:35:34 -0700 Subject: [Insight-users] Dicom slice position References: <0856166C2F7DE0488BB312A2BD3D58CB075DBD94@cyan2.CC.NIH.GOV> Message-ID: <00aa01c341b3$6af57b10$d64edf80@provolone> This is a multi-part message in MIME format. ------=_NextPart_000_00A7_01C34178.BE7A1A60 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi George, Just a quick note -- be very careful of the "slice thickness" and "slice = spacing" fields. Slice spacing is supposed to be the center-to-center = distance between slices, but in reality it's meaning is = scanner-dependent. "Image number" will not necessarily help either. What = you can trust are the "Image Orientation Patient" and "Image Position = Patient" fields. You can use the first to calculate the slice normal, = and the second to calculate the position of the slice along the slice = normal (as well as the distance between adjacent slices). Or, you could use my program MRIConvert, which does all that for you. Jolinda Smith Lewis Center for NeuroImaging University of Oregon jolinda@uoregon.edu http://lcni.uoregon.edu/~jolinda/MRIConvert ----- Original Message -----=20 From: Iordanescu, Gheorghe (NIH/CC/DRD)=20 To: 'insight-users@itk.org'=20 Sent: Wednesday, July 02, 2003 10:22 AM Subject: [Insight-users] Dicom slice position Hi everybody, I would like to read a sequence of Dicom images in a volume. = Unfortunately the images' names do not correspond to their order in = space. For this I would like to read from each image header the "Image = number", "Patient position", "slice thickness".and "pixel spacing". Does = anybody have an example of how to read these fields from a dicom header? = Thank you very much. George ------=_NextPart_000_00A7_01C34178.BE7A1A60 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
Hi George,
 
Just a quick note -- be very careful of the "slice = thickness"=20 and "slice spacing" fields. Slice spacing is supposed to be the = center-to-center=20 distance between slices, but in reality it's meaning is = scanner-dependent.=20 "Image number" will not necessarily help either. What you can trust are = the=20 "Image Orientation Patient" and "Image Position Patient" fields. You can = use the=20 first to calculate the slice normal, and the second to calculate the = position of=20 the slice along the slice normal (as well as the distance between = adjacent=20 slices).
 
Or, you could use my program MRIConvert, which does = all that=20 for you.
 
Jolinda Smith
Lewis Center for = NeuroImaging
University=20 of Oregon
jolinda@uoregon.edu
http://lcni.uoregon.= edu/~jolinda/MRIConvert
----- Original Message -----
From:=20 Iordanescu, Gheorghe = (NIH/CC/DRD)=20
Sent: Wednesday, July 02, 2003 = 10:22=20 AM
Subject: [Insight-users] Dicom = slice=20 position

Hi = everybody,

 

I would like to read a = sequence of=20 Dicom images in a volume. Unfortunately the images' names do not = correspond to=20 their order in space. For this I would like to read from each image = header the=20 "Image number", "Patient position", "slice thickness".and "pixel = spacing".=20 Does anybody have an example of how to read these fields from a dicom = header?=20 Thank you very much.

 

George

------=_NextPart_000_00A7_01C34178.BE7A1A60-- From GIordanescu@cc.nih.gov Fri Jul 4 00:05:27 2003 From: GIordanescu@cc.nih.gov (Iordanescu, Gheorghe (NIH/CC/DRD)) Date: Thu, 3 Jul 2003 19:05:27 -0400 Subject: [Insight-users] Dicom slice position Message-ID: <0856166C2F7DE0488BB312A2BD3D58CB075DBD9A@cyan2.CC.NIH.GOV> Jolinda, Thank you very much for your reply. The information you gave me is very useful but I still need some help. I already have a code that reads = Dicom images and finally gives me an ITK image. I was interested though in = using ITK classes to do this. All the code is there - I only need some = guidance on how to extract the necessary fields. Instead of writing the info from = the dicom header in a txt file on the disk, I would like to use it and = build the 3d ITK image. I think this would be a big improvement for our code... George =20 -----Original Message----- From: Jolinda Smith [mailto:jolinda@darkwing.uoregon.edu]=20 Sent: Thursday, July 03, 2003 6:36 PM To: insight-users@itk.org Subject: Re: [Insight-users] Dicom slice position Hi George, =A0 Just a quick note -- be very careful of the "slice thickness" and = "slice spacing" fields. Slice spacing is supposed to be the center-to-center distance between slices, but in reality it's meaning is = scanner-dependent. "Image number" will not necessarily help either. What you can trust are = the "Image Orientation Patient" and "Image Position Patient" fields. You = can use the first to calculate the slice normal, and the second to calculate = the position of the slice along the slice normal (as well as the distance between adjacent slices). =A0 Or, you could use my program MRIConvert, which does all that for you. =A0 Jolinda Smith Lewis Center for NeuroImaging University of Oregon jolinda@uoregon.edu http://lcni.uoregon.edu/~jolinda/MRIConvert ----- Original Message -----=20 From: Iordanescu, Gheorghe (NIH/CC/DRD)=20 To: 'insight-users@itk.org'=20 Sent: Wednesday, July 02, 2003 10:22 AM Subject: [Insight-users] Dicom slice position Hi everybody, =A0 I would like to read a sequence of Dicom images in a volume. = Unfortunately the images' names do not correspond to their order in space. For this I would like to read from each image header the "Image number", "Patient position", "slice thickness".and "pixel spacing". Does anybody have an example of how to read these fields from a dicom header? Thank you very much. =A0 George From jolinda@darkwing.uoregon.edu Fri Jul 4 01:10:53 2003 From: jolinda@darkwing.uoregon.edu (Jolinda Smith) Date: Thu, 3 Jul 2003 17:10:53 -0700 Subject: [Insight-users] Dicom slice position References: <0856166C2F7DE0488BB312A2BD3D58CB075DBD9A@cyan2.CC.NIH.GOV> Message-ID: <00c101c341c0$bbc48290$d64edf80@provolone> Hi George, As far as I know ITK does not include functions for reading arbitrary DICOM tags. Your options are to either use a dicom library such as DCMTK, or start from scratch using the DICOM standard. Having done the latter, I recommend the former! I'd give you a quick answer on how to read DICOM tags, but I'm afraid there isn't one. It's not a simple format -- the standard is over 1000 pages long. (I can give a long answer if you really want it.) If you need your application to read DICOM files directly, check out DCMTK. I haven't used it, but it's supposed to be very good. But if you can stand to read metaimage volumes instead, your life will be a lot easier. BTW, I don't know how general your application is, but there are some sequences that produce multiple images per slice. If you need to handle such sequences, you'll need to identify what slice goes with what volume. Some scanners and sequences use the "temporal position id" for this, but other cases have to be dealt with on a sequence-by-sequence basis. Jolinda ----- Original Message ----- From: "Iordanescu, Gheorghe (NIH/CC/DRD)" To: "'Jolinda Smith'" ; Sent: Thursday, July 03, 2003 4:05 PM Subject: RE: [Insight-users] Dicom slice position > Jolinda, > > Thank you very much for your reply. The information you gave me is very > useful but I still need some help. I already have a code that reads Dicom > images and finally gives me an ITK image. I was interested though in using > ITK classes to do this. All the code is there - I only need some guidance on > how to extract the necessary fields. Instead of writing the info from the > dicom header in a txt file on the disk, I would like to use it and build the > 3d ITK image. I think this would be a big improvement for our code... > > George > > > > -----Original Message----- > From: Jolinda Smith [mailto:jolinda@darkwing.uoregon.edu] > Sent: Thursday, July 03, 2003 6:36 PM > To: insight-users@itk.org > Subject: Re: [Insight-users] Dicom slice position > > Hi George, > > Just a quick note -- be very careful of the "slice thickness" and "slice > spacing" fields. Slice spacing is supposed to be the center-to-center > distance between slices, but in reality it's meaning is scanner-dependent. > "Image number" will not necessarily help either. What you can trust are the > "Image Orientation Patient" and "Image Position Patient" fields. You can use > the first to calculate the slice normal, and the second to calculate the > position of the slice along the slice normal (as well as the distance > between adjacent slices). > > Or, you could use my program MRIConvert, which does all that for you. > > Jolinda Smith > Lewis Center for NeuroImaging > University of Oregon > jolinda@uoregon.edu > http://lcni.uoregon.edu/~jolinda/MRIConvert > ----- Original Message ----- > From: Iordanescu, Gheorghe (NIH/CC/DRD) > To: 'insight-users@itk.org' > Sent: Wednesday, July 02, 2003 10:22 AM > Subject: [Insight-users] Dicom slice position > > Hi everybody, > > I would like to read a sequence of Dicom images in a volume. Unfortunately > the images' names do not correspond to their order in space. For this I > would like to read from each image header the "Image number", "Patient > position", "slice thickness".and "pixel spacing". Does anybody have an > example of how to read these fields from a dicom header? Thank you very > much. > > George > From Darren.Weber@radiology.ucsf.edu Thu Jul 3 17:41:56 2003 From: Darren.Weber@radiology.ucsf.edu (Darren Weber) Date: Thu, 3 Jul 2003 09:41:56 -0700 Subject: [Insight-users] configure for winXP other than MSVS? References: <20030703054120.D4D7E1C57ED@sjtu.edu.cn> <3F03C60A.6070802@kitware.com> Message-ID: <004a01c341cc$e0f1e970$0501000a@DARRENWEBER> Hi, Is it possible to configure Cmake for something like djgpp, the open source c-compiler for windows? Best, Darren From gavinb+xtk@cs.mu.OZ.AU Fri Jul 4 05:48:52 2003 From: gavinb+xtk@cs.mu.OZ.AU (Gavin Baker) Date: Fri, 4 Jul 2003 14:48:52 +1000 Subject: [Insight-users] Clusters and MPI Message-ID: <20030704144852.A23277@mundroo.cs.mu.OZ.AU> Hello all, What is the current state of clustering support with ITK? A few people have mentioned using ITK in clusters using MPI: http://www.itk.org/pipermail/insight-users/2003-January/002181.html http://www.itk.org/pipermail/insight-users/2003-October/003633.html Has anyone made any progress with this? Are there any official plans to add MPI support? I understand ITK has multi-threading support built in, but does not yet support MPI. I know that VTK has MPI support - how much of this could be adapted to ITK? Would it be feasible to use MPI to connect pipelines, or would it be better to adapt the multi-threading infrastructure to optionally use MPI? Thanks for any info, :: Gavin -- Gavin Baker Computer Vision Lab (CVMIL) http://www.cs.mu.oz.au/~gavinb University of Melbourne From Mathieu.Malaterre@creatis.insa-lyon.fr Fri Jul 4 08:53:41 2003 From: Mathieu.Malaterre@creatis.insa-lyon.fr (Mathieu Malaterre) Date: Fri, 04 Jul 2003 09:53:41 +0200 Subject: [Insight-users] Dicom slice position In-Reply-To: <0856166C2F7DE0488BB312A2BD3D58CB075DBD9A@cyan2.CC.NIH.GOV> References: <0856166C2F7DE0488BB312A2BD3D58CB075DBD9A@cyan2.CC.NIH.GOV> Message-ID: <3F053285.2090905@creatis.insa-lyon.fr> George, I am using gdcm to read my dicom images: http://www.creatis.insa-lyon.fr/Public/Gdcm/ The cvs version also provide a vtkGdcmReader which should be easy to pipeline in ITK. Furthermore you can access all the fields you like through a gdcmHeader. For example gdcmHeader GdcmHeader( "filename.dcm" ); GdcmHeader.GetPubElValByNumber(0x0010,0x0010); will return a std::string giving you the patient name. In the source tree you'll find: gdcm/Dict/dicomV3.dic where you can find the equivalence between patient name (or whatever) For instance: 0010 0010 PN PAT Patient Name ^^^^ ^^^^ HTH mathieu Ps: if you prefer you can use: GdcmHeader.GetPubElValRepByName Iordanescu, Gheorghe (NIH/CC/DRD) wrote: > Jolinda, > > Thank you very much for your reply. The information you gave me is very > useful but I still need some help. I already have a code that reads Dicom > images and finally gives me an ITK image. I was interested though in using > ITK classes to do this. All the code is there - I only need some guidance on > how to extract the necessary fields. Instead of writing the info from the > dicom header in a txt file on the disk, I would like to use it and build the > 3d ITK image. I think this would be a big improvement for our code... > > George > > > > -----Original Message----- > From: Jolinda Smith [mailto:jolinda@darkwing.uoregon.edu] > Sent: Thursday, July 03, 2003 6:36 PM > To: insight-users@itk.org > Subject: Re: [Insight-users] Dicom slice position > > Hi George, > > Just a quick note -- be very careful of the "slice thickness" and "slice > spacing" fields. Slice spacing is supposed to be the center-to-center > distance between slices, but in reality it's meaning is scanner-dependent. > "Image number" will not necessarily help either. What you can trust are the > "Image Orientation Patient" and "Image Position Patient" fields. You can use > the first to calculate the slice normal, and the second to calculate the > position of the slice along the slice normal (as well as the distance > between adjacent slices). > > Or, you could use my program MRIConvert, which does all that for you. > > Jolinda Smith > Lewis Center for NeuroImaging > University of Oregon > jolinda@uoregon.edu > http://lcni.uoregon.edu/~jolinda/MRIConvert > ----- Original Message ----- > From: Iordanescu, Gheorghe (NIH/CC/DRD) > To: 'insight-users@itk.org' > Sent: Wednesday, July 02, 2003 10:22 AM > Subject: [Insight-users] Dicom slice position > > Hi everybody, > > I would like to read a sequence of Dicom images in a volume. Unfortunately > the images' names do not correspond to their order in space. For this I > would like to read from each image header the "Image number", "Patient > position", "slice thickness".and "pixel spacing". Does anybody have an > example of how to read these fields from a dicom header? Thank you very > much. > > George > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From affable@hd2.dot.net.in Fri Jul 4 09:09:55 2003 From: affable@hd2.dot.net.in (CSPL) Date: Fri, 4 Jul 2003 13:39:55 +0530 Subject: [Insight-users] Thankyou for your response References: Message-ID: <003b01c34203$a75cd580$01000001@macinfo.net> This is a multi-part message in MIME format. ------=_NextPart_000_0038_01C34231.C0EA30F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Miller James, I have downloaded new version of itk and could use = itkConnectedComponentImageFilter and RelabelComponentImageFilter. These = two classes are working fine to get largest 3d object in a volume. I = could run my application successfully. Thanks for ur response for our problem. -Regards, Sateesh. ----- Original Message -----=20 From: Miller, James V (Research)=20 To: 'cspl' ; insight-users@itk.org ; Insight-developers (E-mail)=20 Sent: Tuesday, July 01, 2003 9:03 PM Subject: RE: [Insight-users] Find largest connected object in a Volume I just added a new filter to the ITK repository that relabels an = image. The input would the output of any segmentation algorithm that = creates a label map. The ConnectedComponentImageFilter would be one = such filter. Watershed would another, etc. The filter is called = RelabelComponentImageFilter and it changes the labels in the image such = that label 1 is assigned to the largest object, label 2 is the next = largest object, etc. Any single object can be extracted using = BinaryThresholdImageFilter by setting the LowerThreshold and the = UpperThreshold to the same value. In fact, any group of objects can be = extracted using BinaryThresholdImageFilter by having the LowerThreshold = and UpperThreshold span a group range (the ThresholdImageFilter can be = used to extract a range of objects without changing their labels again). So using the RelabelComponentImageFilter in conjuction with a = threshold filter you can extract the largest object, the second largest = object, or the k largest objects. Size is defined by area/volume/number of pixels, etc. After the filter executes, you can query the number of objects, and = the size of each object. Jim -----Original Message----- From: Miller, James V (Research) [mailto:millerjv@crd.ge.com]=20 Sent: Friday, June 27, 2003 1:34 PM To: 'cspl'; insight-users@itk.org Subject: RE: [Insight-users] Find largest connected object in a = Volume In Code/BasicFilters there are two classes = ConnectedComponentImageFilter and=20 HardConnectedComponentImageFilter. The former is a rewrite of the = latter to use more of the ITK infrastructure. The latter may be removed = soon. =20 The ConnectedComponentImageFilter will use 6-connectivity in a = volume to label the objects in the volume. Each connected object will = have a unique label. However, this does not extract the largest connected object. You = would need a separate filter (that does not exist yet) to scan through = the label map and extract the largest object. As Luis suggested, you = could a histogram of the label map to determine which object is the = "largest". -----Original Message----- From: cspl [mailto:affable@hd2.dot.net.in] Sent: Friday, June 27, 2003 2:19 AM To: insight-users@itk.org Subject: [Insight-users] Find largest connected object in a Volume Hi Luis and all, I am in need of help on connectivity filter. Let me explain my = requirment. I have a volume of some slices. I have to find the largest = object in the entire volume. Initiallly i will threshold the image so = that it will in binary format. Then i have to use 6-connectivity of find = the largest object in the volume. The largest object should be labeled = 1. Is there any filter which solves my problem. I should use = 6-connectivity. Please do suggest me if there are other alternatives = too. =20 Please help me in this regard. Thanks in advance. -Regards, Sateesh. ------=_NextPart_000_0038_01C34231.C0EA30F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Miller James,
 
 

   I have downloaded new version of itk and could use = itkConnectedComponentImageFilter and RelabelComponentImageFilter. These = two=20 classes are working fine to get largest 3d object in a volume. I could = run my=20 application successfully.
 
   Thanks for ur response for = our=20 problem.
 
-Regards,
   = Sateesh.
----- Original Message -----
From:=20 Miller, James V=20 (Research)
To: 'cspl' ; insight-users@itk.org ; Insight-developers = (E-mail)=20
Sent: Tuesday, July 01, 2003 = 9:03=20 PM
Subject: RE: [Insight-users] = Find largest=20 connected object in a Volume

I=20 just added a new filter to the ITK repository that relabels an image. = The=20 input would the output of any segmentation algorithm that creates a = label=20 map.  The ConnectedComponentImageFilter would be one such = filter. =20 Watershed would another, etc.  The filter is called=20 RelabelComponentImageFilter and it changes the labels in the image = such that=20 label 1 is assigned to the largest object, label 2 is the next largest = object,=20 etc.  Any single object can be extracted using = BinaryThresholdImageFilter=20 by setting the LowerThreshold and the UpperThreshold to the same = value. =20 In fact, any group of objects can be extracted using=20 BinaryThresholdImageFilter by having the LowerThreshold and = UpperThreshold=20 span a group range (the ThresholdImageFilter can be used to extract a = range of=20 objects without changing their labels again).
 
So=20 using the RelabelComponentImageFilter in conjuction with a threshold = filter=20 you can extract the largest object, the second largest object, or the = k=20 largest objects.
 
Size=20 is defined by area/volume/number of pixels, etc.
 
After the filter executes, you can query = the number=20 of objects, and the size of each object.
 
Jim
 
 
-----Original Message-----
From: Miller, James V = (Research)=20 [mailto:millerjv@crd.ge.com] 
Sent: Friday, June = 27, 2003=20 1:34 PM
To: 'cspl'; = insight-users@itk.org
Subject: RE:=20 [Insight-users] Find largest connected object in a=20 Volume

In=20 Code/BasicFilters there are two classes = ConnectedComponentImageFilter and=20
HardConnectedComponentImageFilter.  The former is a = rewrite of=20 the latter to use more of the ITK infrastructure. The latter may be = removed=20 soon. 
 
The ConnectedComponentImageFilter will use 6-connectivity = in a volume=20 to label the objects in the volume.  Each connected object will = have a=20 unique label.
 
However, this does not extract the largest connected = object. =20 You would need a separate filter (that does not exist yet) to scan = through=20 the label map and extract the largest object.  As Luis = suggested, you=20 could a histogram of the label map to determine which object is the=20 "largest".
 
 
-----Original Message-----
From: cspl=20 [mailto:affable@hd2.dot.net.in]
Sent: Friday, June 27, = 2003 2:19=20 AM
To: insight-users@itk.org
Subject: = [Insight-users]=20 Find largest connected object in a Volume

Hi Luis and all,
   = I am in=20 need of help on connectivity filter. Let me explain my=20 requirment.
   I have a volume of some slices. I have = to find=20 the largest object in the entire volume. Initiallly i will = threshold the=20 image so that it will in binary format. Then i have to use = 6-connectivity=20 of find the largest object in the volume. The largest object = should be=20 labeled 1. Is there any filter which solves my problem. I should = use=20 6-connectivity. Please do suggest me if there = are other=20 alternatives too.
   
   = Please help=20 me in this regard.
 
   Thanks in = advance.
 
-Regards,
 =20 = Sateesh.
------=_NextPart_000_0038_01C34231.C0EA30F0-- From Mathieu.Malaterre@creatis.insa-lyon.fr Fri Jul 4 17:49:01 2003 From: Mathieu.Malaterre@creatis.insa-lyon.fr (Mathieu Malaterre) Date: Fri, 04 Jul 2003 18:49:01 +0200 Subject: [Insight-users] Dicom slice position In-Reply-To: <00aa01c341b3$6af57b10$d64edf80@provolone> References: <0856166C2F7DE0488BB312A2BD3D58CB075DBD94@cyan2.CC.NIH.GOV> <00aa01c341b3$6af57b10$d64edf80@provolone> Message-ID: <3F05AFFD.30605@creatis.insa-lyon.fr> Jolinda, I have a question about your program MRI convert. I used it to convert my set of DICOM images. And as you said it takes into account the Image Position Patient. Here is the value I extracted from my files: Patient [ -199.506987\-34.042491\255.448394] Patient [ -199.510827\-32.554461\255.259324] Patient [ -199.514667\-31.066431\255.070254] Patient [ -199.518497\-29.578401\254.881184] Patient [ -199.522337\-28.090371\254.692124] Patient [ -199.530017\-25.114311\254.313984] Patient [ -199.533847\-23.626281\254.124914] Patient [ -199.526177\-26.602341\254.503054] Patient [ -199.537687\-22.138251\253.935844] Patient [ -199.541527\-20.650221\253.746784] Patient [ -199.545367\-19.162191\253.557714] Patient [ -199.549197\-17.674161\253.368644] Patient [ -199.553037\-16.186131\253.179574] Patient [ -199.556877\-14.698111\252.990514] Patient [ -199.560717\-13.210081\252.801444] Patient [ -199.564557\-11.722051\252.612374] Patient [ -199.568387\-10.234021\252.423304] Patient [-199.572227\-8.745991\252.234234] Patient [-199.576067\-7.257961\252.045174] Patient [-199.579907\-5.769931\251.856104] Patient [-199.583737\-4.281901\251.667034] Patient [-199.587577\-2.793871\251.477964] Patient [-199.591417\-1.305841\251.288904] Patient [ -199.595257\0.182189\251.099834] Patient [ -199.599087\1.670219\250.910764] Patient [ -199.602927\3.158249\250.721694] Patient [ -199.606767\4.646279\250.532624] Patient [ -199.610607\6.134309\250.343564] Patient [ -199.614437\7.622339\250.154494] Patient [ -199.618277\9.110369\249.965424] Patient [-199.622117\10.598399\249.776354] Patient [-199.625957\12.086429\249.587284] Patient [-199.629787\13.574459\249.398224] Patient [-199.637467\16.550519\249.020084] Patient [-199.633627\15.062489\249.209154] Patient [-199.641307\18.038549\248.831014] Patient [-199.645137\19.526574\248.641954] Patient [-199.648977\21.014603\248.452884] Patient [-199.652817\22.502633\248.263814] Patient [-199.656657\23.990662\248.074744] Patient [-199.660487\25.478692\247.885674] Patient [-199.664327\26.966721\247.696614] Patient [-199.668167\28.454751\247.507544] Patient [-199.672007\29.942780\247.318474] Patient [-199.679677\32.918839\246.940334] Patient [-199.675847\31.430810\247.129404] Patient [-199.683517\34.406869\246.751274] Patient [-199.687357\35.894898\246.562204] Patient [-199.691197\37.382928\246.373134] Patient [-199.695027\38.870959\246.184064] So acquisition axe is Y (Y spacing is 1.5), but there is also a Z variation. So my questions is: - Does MRIConvert takes this Z variation also into account ? - If yes how come the result is still 512*512 ? There should be some black/white area 512 ------------- ------------- ------------- ------------- ------------- 512 <--> <--> In those two areas you don't know the value of the pixel, right ? Thanks for putting some light on it. mathieu Ps: When will the linux version be available ? From affable@hd2.dot.net.in Sat Jul 5 13:32:12 2003 From: affable@hd2.dot.net.in (CSPL) Date: Sat, 5 Jul 2003 18:02:12 +0530 Subject: [Insight-users] Unable to run ItkImageGaussianModelEstimator example Message-ID: <000c01c342f1$75ba48c0$01000001@macinfo.net> This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C3431F.8F230530 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear Mr.Sayan, I want to split the objects on shape basis.The shape is convex.I have = gone through the Itk classe ItkImageGaussianModelEstimator.I got one = exmple to run .I want to know the output of the example.It is giving = exception in itkImageGaussianEstimator class update function.I have set = the parameters as follows..How to create train image.Please give me = suggestion to run the application properly. Example is Insight\Examples\Segmentation\GibbsPriorImageFilter1.cxx. typedef itk::ImageGaussianModelEstimator=20 ImageGaussianModelEstimatorType; =20 ImageGaussianModelEstimatorType::Pointer=20 applyEstimateModel =3D ImageGaussianModelEstimatorType::New(); =20 applyEstimateModel->SetNumberOfModels(3); applyEstimateModel->SetInputImage(vecImage); = applyEstimateModel->SetTrainingImage(trainingimagereader->GetOutput()); = =20 //Run the gaussian classifier algorithm try { applyEstimateModel->Update();///here program is getting exception. } catch(itk::ExceptionObject &exp) { std::cerr<<"Exception caught"<
Dear Mr.Sayan,
 
I want to split the objects on shape = basis.The=20 shape is convex.I have gone through the Itk classe=20 ItkImageGaussianModelEstimator.I got one exmple to run .I want to = know the=20 output of the example.It is giving exception in = itkImageGaussianEstimator class=20 update function.I have set the parameters as follows..How to create = train=20 image.Please give me suggestion to run the application = properly.
Example=20 is  = Insight\Examples\Segmentation\GibbsPriorImageFilter1.cxx.
 
  typedef=20 itk::ImageGaussianModelEstimator<VecImageType,
   =20 MembershipFunctionType, ClassImageType>
   =20 ImageGaussianModelEstimatorType;
 
 =20 ImageGaussianModelEstimatorType::Pointer
   =20 applyEstimateModel =3D ImageGaussianModelEstimatorType::New();  =
 
 =20 applyEstimateModel->SetNumberOfModels(3);
 =20 applyEstimateModel->SetInputImage(vecImage);
 =20 applyEstimateModel->SetTrainingImage(trainingimagereader->GetOutput= ()); =20
 

 
  //Run the gaussian classifier = algorithm
 =20 try
  {
 applyEstimateModel->Update();///here program = is=20 getting exception.
  }
  catch(itk::ExceptionObject=20 &exp)
  {
   std::cerr<<"Exception=20 caught"<<std::endl;
  =20 std::cerr<<exp<<std::endl;
  }
 

Thanking = you,
Regards,
Ramakrishna
------=_NextPart_000_0009_01C3431F.8F230530-- From yasheng_chen@med.unc.edu Sat Jul 5 21:25:49 2003 From: yasheng_chen@med.unc.edu (Yasheng Chen) Date: Sat, 05 Jul 2003 16:25:49 -0400 Subject: [Insight-users] Q: internal compiler error Message-ID: <5f9dac75f97b3d.5f97b3d5f9dac7@med.unc.edu> Hi, I got an error message (see below) when I include the header file "itkCastImageFilter.h". C:\itkdownload\InsightToolkit-1.2.0\Code\Common\itkConceptChecking.h (96) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1786) I think I have installed the service pack 5 with vc++, and the itk version is 1.2.0. Does any one have suggestions of what may go wrong ? Thank you very much ! Yasheng From luis.ibanez@kitware.com Sat Jul 5 23:19:47 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Sat, 05 Jul 2003 18:19:47 -0400 Subject: [Insight-users] Unable to run ItkImageGaussianModelEstimator example References: <000c01c342f1$75ba48c0$01000001@macinfo.net> Message-ID: <3F074F03.5020304@kitware.com> Hi Ramakrishna, Could you please give us more details on the kind of processing you want to perform. From your previous posting we guessed that you were interested on classified clusters in a parameteric space. However from your last message it seems that your data is directly in the image space and you want to separate objects in the image space as opposed to clusters in a parametric space. Are your objects already segmented ? Could you post a representative image on the web, so we can have a better idea of what you want to achieve. If what you are targeting is shape analysis in the image space, you may have better chances using mathematical morphology operators and/or level set filters (e.g. taking advantage of the curvature scaling). Please let us know, Regards, Luis ---------------------- CSPL wrote: > Dear Mr.Sayan, > > I want to split the objects on shape basis.The shape is convex.I have > gone through the Itk classe ItkImageGaussianModelEstimator.I got one > exmple to run .I want to know the output of the example.It is giving > exception in itkImageGaussianEstimator class update function.I have set > the parameters as follows..How to create train image.Please give me > suggestion to run the application properly. > Example is Insight\Examples\Segmentation\GibbsPriorImageFilter1.cxx. > > typedef itk::ImageGaussianModelEstimator MembershipFunctionType, ClassImageType> > ImageGaussianModelEstimatorType; > > ImageGaussianModelEstimatorType::Pointer > applyEstimateModel = ImageGaussianModelEstimatorType::New(); > > applyEstimateModel->SetNumberOfModels(3); > applyEstimateModel->SetInputImage(vecImage); > applyEstimateModel->SetTrainingImage(trainingimagereader->GetOutput()); > > > > //Run the gaussian classifier algorithm > try > { > applyEstimateModel->Update();///here program is getting exception. > } > catch(itk::ExceptionObject &exp) > { > std::cerr<<"Exception caught"< std::cerr< } > > > Thanking you, > Regards, > Ramakrishna From imho@skynet.be Mon Jul 7 12:22:02 2003 From: imho@skynet.be (imho) Date: Mon, 07 Jul 2003 13:22:02 +0200 Subject: [Insight-users] vtk polydata import / export Message-ID: <3F0957DA.4040107@skynet.be> This is a multi-part message in MIME format. --------------010108090505060104070405 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi all, is it possible to import and export a vtkPolyData or can I use images only? How can I do? I have two vtkPolyData volumes, and I'd like to use itk filters like this : vtk reader -> vtk filters -> itk filters -> vtk viewer I've tried this : VTK -> ITK -> VTK ITKImageExporter4 VTKImageImporter4 ITKImageImporter4 == first POLY ITKImageExporter5 VTKImageImporter5 == second POLY (no output) but I don't know how to convert my vtkPolyData or how to typedef the VTKimporter to make it work : typedef unsigned short PixelType; typedef itk::Image ImageType; typedef itk::VTKImageImport ImageImportType; is ok but not with a polyData, and typedef itk::VTKImageImport ImageImportType; isn't ok Thanks a lot imho --------------010108090505060104070405 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all,
is it possible to import and export a vtkPolyData or can I use images only?
How can I do?
I have two vtkPolyData volumes, and I'd like to use itk filters like this :

vtk reader -> vtk filters -> itk filters -> vtk viewer
I've tried this :

VTK                            ->             ITK                    ->             VTK

ITKImageExporter4            VTKImageImporter4            ITKImageImporter4        == first POLY

ITKImageExporter5            VTKImageImporter5                                                  == second POLY (no output)

but I don't know how to convert my vtkPolyData or how to typedef the VTKimporter to make it work :
    typedef unsigned short PixelType;
    typedef itk::Image<PixelType, Dimension> ImageType;
    typedef itk::VTKImageImport<ImageType> ImageImportType;
is ok but not with a polyData, and

    typedef itk::VTKImageImport<vtkPolyData*> ImageImportType;
 isn't ok

Thanks a lot

imho
--------------010108090505060104070405-- From gwenael.guillard@enst-bretagne.fr Mon Jul 7 14:17:13 2003 From: gwenael.guillard@enst-bretagne.fr (=?iso-8859-1?Q?Gwena=EBl?= Guillard) Date: Mon, 07 Jul 2003 15:17:13 +0200 Subject: [Insight-users] hysteresis thresholding, local maxima filter Message-ID: <3F0972D9.18C5F22B@enst-bretagne.Fr> Hi, Is hysteresis thresholding implemented under another name? Or did I miss it in the documentation? The same question for a local maxima filter. Thank you for your answers, Gwen From luis.ibanez@kitware.com Mon Jul 7 15:21:12 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 07 Jul 2003 10:21:12 -0400 Subject: [Insight-users] hysteresis thresholding, local maxima filter References: <3F0972D9.18C5F22B@enst-bretagne.Fr> Message-ID: <3F0981D8.9010401@kitware.com> Hi Gwen, Hysteresis thresholding is implemented as part of the CannyEdgeDetectionImageFilter http://www.itk.org/Insight/Doxygen/html/classitk_1_1CannyEdgeDetectionImageFilter.html Please take a look at the method HyteresisThresholding() in itkCannyEdgeDetectionImageFilter.txx line 393 Do you need to apply this operation outside of the Canny edge detection framework ? -- Local maxima is detected used zero crossings on a second derivative image (e.g. the Laplacian) Pure Zero crossing is implemented in http://www.itk.org/Insight/Doxygen/html/classitk_1_1ZeroCrossingImageFilter.html Zero crossing of the laplacian is implemented in http://www.itk.org/Insight/Doxygen/html/classitk_1_1ZeroCrossingBasedEdgeDetectionImageFilter.html Regards, Luis ----------------------- Gwenal Guillard wrote: > Hi, > > Is hysteresis thresholding implemented under another name? Or did I miss > it in the documentation? > The same question for a local maxima filter. > > Thank you for your answers, > > Gwen > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Mon Jul 7 15:26:07 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 07 Jul 2003 10:26:07 -0400 Subject: [Insight-users] vtk polydata import / export References: <3F0957DA.4040107@skynet.be> Message-ID: <3F0982FF.6040601@kitware.com> Hi Imho, The import/export connections currently available between ITK and VTK only manage image-to-image conversions. You may want to convert your vtkPolyData to a vtkImageData and then use the itkVTKImageToImageFilter available in InsightApplications/Auxiliary/vtk In any case, a vtkPolyData may not be the best support for representing an image... Please let us know if you have futher questions, Thanks Luis ------------------ imho wrote: > Hi all, > is it possible to import and export a vtkPolyData or can I use images only? > How can I do? > I have two vtkPolyData volumes, and I'd like to use itk filters like this : > > vtk reader -> vtk filters -> itk filters -> vtk viewer > I've tried this : > > VTK -> ITK -> VTK > > ITKImageExporter4 VTKImageImporter4 > ITKImageImporter4 == first POLY > > ITKImageExporter5 VTKImageImporter5 > == second POLY (no output) > > but I don't know how to convert my vtkPolyData or how to typedef the > VTKimporter to make it work : > typedef unsigned short PixelType; > typedef itk::Image ImageType; > typedef itk::VTKImageImport ImageImportType; > is ok but not with a polyData, and > > typedef itk::VTKImageImport ImageImportType; > isn't ok > > Thanks a lot > > imho From sebordas@unizar.es Mon Jul 7 15:36:08 2003 From: sebordas@unizar.es (Sebastian Ordas) Date: Mon, 7 Jul 2003 16:36:08 +0200 Subject: [Insight-users] MRIConvert problem Message-ID: <003401c34495$1b23c210$829ed29b@GTC.LAB> This is a multi-part message in MIME format. ------=_NextPart_000_0031_01C344A5.DE37D740 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, MRIConvert is a powerful application developed by Jolinda Smith for = converting DICOM data sets into metafile info volumes. >From this point it is straightforward to continue working within ITK, as = a VTK or ITK volume. Nevertheless, I found problems when attempting to convert a gated-SPECT = .dcm file, as it only converts the very first slice but not the rest. Jolinda, any suggestion? I will try DCMTK and see how it goes ...=20 Regards, Sebastian ------=_NextPart_000_0031_01C344A5.DE37D740 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all,
MRIConvert is a powerful application = developed by=20 Jolinda Smith for = converting DICOM=20 data sets into metafile info volumes.
From this point it is straightforward = to continue=20 working within ITK, as a VTK or ITK volume.
Nevertheless, I found problems when = attempting to=20 convert a gated-SPECT .dcm file, as it only converts the very = first
slice but not the rest. Jolinda, any=20 suggestion?
I will try DCMTK and see how it = goes ...=20
 
Regards,
 
Sebastian
------=_NextPart_000_0031_01C344A5.DE37D740-- From imho@skynet.be Mon Jul 7 15:42:06 2003 From: imho@skynet.be (imho) Date: Mon, 07 Jul 2003 16:42:06 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F0982FF.6040601@kitware.com> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> Message-ID: <3F0986BE.8040602@skynet.be> Hi Luis, I use vtkPolyData to represent 2 3D liver's models builded from slices. I already do registration on it with VTK (point-based + ICP), and now I'd like to use the demon registration in ITK. So I'll try the conversion you purpose. Thanks for your help Imho. Luis Ibanez wrote: > > Hi Imho, > > The import/export connections currently available > between ITK and VTK only manage image-to-image > conversions. > > You may want to convert your vtkPolyData to a vtkImageData > and then use the itkVTKImageToImageFilter available in > > InsightApplications/Auxiliary/vtk > > In any case, a vtkPolyData may not be the best support > for representing an image... > > > Please let us know if you have futher questions, > > > Thanks > > > Luis > > > > ------------------ > imho wrote: > >> Hi all, >> is it possible to import and export a vtkPolyData or can I use images >> only? >> How can I do? >> I have two vtkPolyData volumes, and I'd like to use itk filters like >> this : >> >> vtk reader -> vtk filters -> itk filters -> vtk viewer >> I've tried this : >> >> VTK -> ITK >> -> VTK >> >> ITKImageExporter4 VTKImageImporter4 >> ITKImageImporter4 == first POLY >> >> ITKImageExporter5 VTKImageImporter5 >> == second POLY (no >> output) >> >> but I don't know how to convert my vtkPolyData or how to typedef the >> VTKimporter to make it work : >> typedef unsigned short PixelType; >> typedef itk::Image ImageType; >> typedef itk::VTKImageImport ImageImportType; >> is ok but not with a polyData, and >> >> typedef itk::VTKImageImport ImageImportType; >> isn't ok >> >> Thanks a lot >> >> imho > > > > > > From yasheng_chen@med.unc.edu Sat Jul 5 18:20:57 2003 From: yasheng_chen@med.unc.edu (Yasheng Chen) Date: Sat, 05 Jul 2003 13:20:57 -0400 Subject: [Insight-users] Q: internal compiler error Message-ID: <5f8f5c85f958a2.5f958a25f8f5c8@med.unc.edu> Hi, I got an error message (see below) when I include the header file "itkCastImageFilter.h". C:\itkdownload\InsightToolkit-1.2.0\Code\Common\itkConceptChecking.h (96) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1786) I have installed the service pack 5 for vc++, and the version is 1.2.0. Does any one have suggestions of what may go wrong ? Thank you very much ! Yasheng From millerjv@crd.ge.com Mon Jul 7 15:47:05 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Mon, 7 Jul 2003 10:47:05 -0400 Subject: [Insight-users] Q: internal compiler error Message-ID: I have lost track of VC6 service packs. Is service pack 5 the latest? > -----Original Message----- > From: Yasheng Chen [mailto:yasheng_chen@med.unc.edu] > Sent: Saturday, July 05, 2003 1:21 PM > To: insight-users@itk.org > Subject: [Insight-users] Q: internal compiler error > Importance: High > > > Hi, > > I got an error message (see below) when I include the header > file "itkCastImageFilter.h". > > C:\itkdownload\InsightToolkit-1.2.0\Code\Common\itkConceptChecking.h > (96) : fatal error C1001: INTERNAL COMPILER ERROR > (compiler file 'msc1.cpp', line 1786) > > I have installed the service pack 5 for vc++, and the version > is 1.2.0. > Does any one have suggestions of what may go wrong ? > > Thank you very much ! > > Yasheng > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Mon Jul 7 15:52:22 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 07 Jul 2003 10:52:22 -0400 Subject: [Insight-users] Q: internal compiler error References: <5f8f5c85f958a2.5f958a25f8f5c8@med.unc.edu> Message-ID: <3F098926.9030208@kitware.com> Hi Yasheng, You may have a compiler installation problem. ITK version 1.2 was built regularly with VC++ 6.0 without ICE problems. I would suggest you to verify that installation of your compiler as well as the installation of service pack 5. In order to double check whether the source of the problem is your compiler or not, you could also download the current CVS version of the toolkit, for which you can verify the builds on the Dashboard. http://www.itk.org/Testing/Dashboard/MostRecentResults-Nightly/Dashboard.html Regards, Luis ----------------------- Yasheng Chen wrote: > Hi, > > I got an error message (see below) when I include the header > file "itkCastImageFilter.h". > > C:\itkdownload\InsightToolkit-1.2.0\Code\Common\itkConceptChecking.h > (96) : fatal error C1001: INTERNAL COMPILER ERROR > (compiler file 'msc1.cpp', line 1786) > > I have installed the service pack 5 for vc++, and the version is 1.2.0. > Does any one have suggestions of what may go wrong ? > > Thank you very much ! > > Yasheng > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Mon Jul 7 16:09:47 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 07 Jul 2003 11:09:47 -0400 Subject: [Insight-users] Re: Problems in combining ITK with MFC program created by MS VC++ References: <20030707064111.97176.qmail@web15305.mail.bjs.yahoo.com> Message-ID: <3F098D3B.5000205@kitware.com> Hi Zheng, ITK is independent of any GUI. You ca build your program using MFC, Qt, wxWindows, FLTK or any other GUI library. Please see the previous posting to the list concerning the configuration of MFC applications with CMake. http://www.itk.org/pipermail/insight-users/2003-March/002751.html You only need to create a single CMakeLists.txt file and let CMake configure the VisualStudio workspace for you. However you will not be able to use the Wizard from visual studio since the .dsw should be created by CMake. Regards, Luis ---------------------- zheng yuanjie wrote: > Hi, Luis > > I am a green hand of ITK. I have been using Microsft Visual C++ with > Windows xp. You know all the examples in ITK are console program, and > now I can succeed in processing them. But I wonder if I can use all the > mechanisms provided in the toolkit like /itkImageFileReader/ and > /itkImageFileWriter/ etc. in MFC based program created by MS VC. > > I have tried to do it, however I failed. Now I list the processes done > by me as below: > > 1. I created a new workspace named /TestITK /with /MFC AppWizard(exe)/ > by Microsoft Visulal C++ 6.0. Its an application of single document. > All the files of the workspace has also been sent to you in the appendix > of your email. > > 2. I wrote two /CMakeLists/ files, and saved them under the /TestITK/ > folder and /res/ folder (created by /MFC AppWizard(exe)/ respectively. > The content of one of the two /CMakeLists/ files is listed below: > > PROJECT(mTestITK) > > > > # Find ITK. > > FIND_PACKAGE(ITK) > > IF(ITK_FOUND) > > INCLUDE(${ITK_USE_FILE}) > > ELSE(ITK_FOUND) > > MESSAGE(FATAL_ERROR > > "Cannot build without ITK. Please set ITK_DIR.") > > ENDIF(ITK_FOUND) > > > > ADD_EXECUTABLE(mTestITK MainFrm.cpp MainFrm.h resource.h StdAfx.cpp > StdAfx.h TestITK.cpp TestITK.h TestITK.rc TestITKDoc.cpp TestITKDoc.h > TestITKView.cpp TestITKView.h ) > > TARGET_LINK_LIBRARIES(mTestITK ITKCommon ITKIO) > > > > SUBDIRS( > > res > > ) > > The content of the other one under the /res/ folder is: > > PROJECT(mTestITK) > > ADD_EXECUTABLE(mTestITK TestITK.ico TestITK.rc2 TestITKDoc.ico Toolbar.bmp) > > 3. I configured all the files under /TestITK/ folder with /CMake/, and I > succeeded in doing it. > > 4. I opened the workspace created by /CMake/ with Microsoft Visual C++ > 6.0, however I cant built it. > > Would you please tell me that the reasons of my failure, and how I can > combine ITK with MFC based program created by MS VC++? > > Thank you in advance! > > Sincerely yours, > > Zheng > > > ------------------------------------------------------------------------ > *Do You Yahoo!?* > ڵûĻ > > From jolinda@darkwing.uoregon.edu Mon Jul 7 16:54:54 2003 From: jolinda@darkwing.uoregon.edu (Jolinda Smith) Date: Mon, 7 Jul 2003 08:54:54 -0700 Subject: [Insight-users] Dicom slice position References: <0856166C2F7DE0488BB312A2BD3D58CB075DBD94@cyan2.CC.NIH.GOV> <00aa01c341b3$6af57b10$d64edf80@provolone> <3F05AFFD.30605@creatis.insa-lyon.fr> Message-ID: <001c01c344a0$1bb37df0$d64edf80@provolone> Hi Mathieu, The answer to the first question is yes, it does. As for the second, your ascii picture is misleading. What you've drawn is a skewed volume, where the slice normal is along the y-axis only, but the origin of each slice shifts in both y and z. Presumably, you actually have a rotated volume. You can check this with the image orientation patient field: it should look something like almost 1/zero/very small/very small/0/almost 1. This field gives the direction cosines for the rows and columns. There probably are no "missing" areas, as you can see if you just flip through your images. They don't "drift" over to the left. Jolinda > Jolinda, > > I have a question about your program MRI convert. I used it to convert > my set of DICOM images. And as you said it takes into account the Image > Position Patient. Here is the value I extracted from my files: > > Patient [ -199.506987\-34.042491\255.448394] > Patient [ -199.510827\-32.554461\255.259324] > Patient [ -199.514667\-31.066431\255.070254] > Patient [ -199.518497\-29.578401\254.881184] > Patient [ -199.522337\-28.090371\254.692124] > Patient [ -199.530017\-25.114311\254.313984] > Patient [ -199.533847\-23.626281\254.124914] > Patient [ -199.526177\-26.602341\254.503054] > Patient [ -199.537687\-22.138251\253.935844] > Patient [ -199.541527\-20.650221\253.746784] > Patient [ -199.545367\-19.162191\253.557714] > Patient [ -199.549197\-17.674161\253.368644] > Patient [ -199.553037\-16.186131\253.179574] > Patient [ -199.556877\-14.698111\252.990514] > Patient [ -199.560717\-13.210081\252.801444] > Patient [ -199.564557\-11.722051\252.612374] > Patient [ -199.568387\-10.234021\252.423304] > Patient [-199.572227\-8.745991\252.234234] > Patient [-199.576067\-7.257961\252.045174] > Patient [-199.579907\-5.769931\251.856104] > Patient [-199.583737\-4.281901\251.667034] > Patient [-199.587577\-2.793871\251.477964] > Patient [-199.591417\-1.305841\251.288904] > Patient [ -199.595257\0.182189\251.099834] > Patient [ -199.599087\1.670219\250.910764] > Patient [ -199.602927\3.158249\250.721694] > Patient [ -199.606767\4.646279\250.532624] > Patient [ -199.610607\6.134309\250.343564] > Patient [ -199.614437\7.622339\250.154494] > Patient [ -199.618277\9.110369\249.965424] > Patient [-199.622117\10.598399\249.776354] > Patient [-199.625957\12.086429\249.587284] > Patient [-199.629787\13.574459\249.398224] > Patient [-199.637467\16.550519\249.020084] > Patient [-199.633627\15.062489\249.209154] > Patient [-199.641307\18.038549\248.831014] > Patient [-199.645137\19.526574\248.641954] > Patient [-199.648977\21.014603\248.452884] > Patient [-199.652817\22.502633\248.263814] > Patient [-199.656657\23.990662\248.074744] > Patient [-199.660487\25.478692\247.885674] > Patient [-199.664327\26.966721\247.696614] > Patient [-199.668167\28.454751\247.507544] > Patient [-199.672007\29.942780\247.318474] > Patient [-199.679677\32.918839\246.940334] > Patient [-199.675847\31.430810\247.129404] > Patient [-199.683517\34.406869\246.751274] > Patient [-199.687357\35.894898\246.562204] > Patient [-199.691197\37.382928\246.373134] > Patient [-199.695027\38.870959\246.184064] > > > So acquisition axe is Y (Y spacing is 1.5), but there is also a Z variation. > > So my questions is: > - Does MRIConvert takes this Z variation also into account ? > - If yes how come the result is still 512*512 ? There should be some > black/white area > > 512 > ------------- > ------------- > ------------- > ------------- > ------------- > 512 > <--> <--> > In those two areas you don't know the value of the pixel, right ? > > Thanks for putting some light on it. > > mathieu > Ps: When will the linux version be available ? > From yasheng_chen@med.unc.edu Mon Jul 7 17:23:00 2003 From: yasheng_chen@med.unc.edu (Yasheng Chen) Date: Mon, 07 Jul 2003 12:23:00 -0400 Subject: [Insight-users] Q: internal compiler error Message-ID: <91a7f95137.9513791a7f@med.unc.edu> Hi, Thank you all very much for the comments ! Guess what is amazing and weird with the problem ? Julien Jomier at UNC told me to switch the order of the includes, it solves the problem ( I have no idea how he figured it out ). Thanks again ! Yasheng ----- Original Message ----- From: "Robert Tamburo" Date: Monday, July 7, 2003 11:38 am Subject: Re: [Insight-users] Q: internal compiler error > I had the same issue a few months ago. My temporary fix was: > > Commenting out the following lines of code in itkConceptChecking.h > > //template struct UniqueType_int {}; > //template struct UniqueType_unsigned_int {}; > > /* > struct Constraints > { > typedef Detail::UniqueType_unsigned_int DT1; > typedef Detail::UniqueType_unsigned_int DT2; > void constraints() > { > DT1 a =3D DT2(); > Detail::IgnoreUnusedVariable(a); > } > }; > itkConceptConstraintsMacro(); > */ > > > > ----- Original Message ----- > From: "Luis Ibanez" > To: "Yasheng Chen" > Cc: > Sent: Monday, July 07, 2003 10:52 AM > Subject: Re: [Insight-users] Q: internal compiler error > > > > > > Hi Yasheng, > > > > You may have a compiler installation problem. > > > > ITK version 1.2 was built regularly with VC++ 6.0 > > without ICE problems. > > > > I would suggest you to verify that installation > > of your compiler as well as the installation of > > service pack 5. > > > > In order to double check whether the source of the > > problem is your compiler or not, you could also > > download the current CVS version of the toolkit, > > for which you can verify the builds on the Dashboard. > > > http://www.itk.org/Testing/Dashboard/MostRecentResults- > Nightly/Dashboard.html> > > > > > > Regards, > > > > > > Luis > > > > > > ----------------------- > > Yasheng Chen wrote: > > > Hi, > > > > > > I got an error message (see below) when I include the header > > > file "itkCastImageFilter.h". > > > > > > C:\itkdownload\InsightToolkit- > 1.2.0\Code\Common\itkConceptChecking.h> > (96) : fatal error > C1001: INTERNAL COMPILER ERROR > > > (compiler file 'msc1.cpp', line 1786) > > > > > > I have installed the service pack 5 for vc++, and the version > is 1.2.0. > > > Does any one have suggestions of what may go wrong ? > > > > > > Thank you very much ! > > > > > > Yasheng > > > > > > _______________________________________________ > > > Insight-users mailing list > > > Insight-users@itk.org > > > http://www.itk.org/mailman/listinfo/insight-users > > > > > > > > > > > _______________________________________________ > > Insight-users mailing list > > Insight-users@itk.org > > http://www.itk.org/mailman/listinfo/insight-users > > > > From luis.ibanez@kitware.com Mon Jul 7 21:34:04 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 07 Jul 2003 16:34:04 -0400 Subject: [Insight-users] hysteresis thresholding, local maxima filter References: <3F0972D9.18C5F22B@enst-bretagne.Fr> <3F0981D8.9010401@kitware.com> <3F098CB7.8CAE6AB8@enst-bretagne.Fr> Message-ID: <3F09D93C.7060108@kitware.com> Hi Gwen, You are probably not using the most recent CVS checkout. In the current one ThreadedCompute2ndDerivativePos() is in line 557 HysteresisThresholding() is in line 393 http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Code/BasicFilters/itkCannyEdgeDetectionImageFilter.txx?annotate=1.42&cvsroot=Insight We could include the Hysteresis threshold on the wish list of classes to be implemented in the near future. Regards Luis ----------------------- Gwenal Guillard wrote: > Hi Luis, > > At this line I've got the method ThreadedCompute2ndDerivativePos(...), > not HysteresisThresholding(). > I would like to use such a method outside the Canny edge detection > framework. > > Gwen > > > > > Luis Ibanez a crit : > >> Hi Gwen, >> >> Hysteresis thresholding is implemented as part of the >> CannyEdgeDetectionImageFilter >> http://www.itk.org/Insight/Doxygen/html/classitk_1_1CannyEdgeDetectionImageFilter.html >> >> >> Please take a look at the method HyteresisThresholding() in >> itkCannyEdgeDetectionImageFilter.txx line 393 >> >> Do you need to apply this operation outside of the Canny edge >> detection framework ? >> >> -- >> >> Local maxima is detected used zero crossings on a second derivative >> image (e.g. the Laplacian) >> >> Pure Zero crossing is implemented in >> http://www.itk.org/Insight/Doxygen/html/classitk_1_1ZeroCrossingImageFilter.html >> >> >> Zero crossing of the laplacian is implemented in >> http://www.itk.org/Insight/Doxygen/html/classitk_1_1ZeroCrossingBasedEdgeDetectionImageFilter.html >> >> >> Regards, >> >> Luis >> >> ----------------------- >> Gwenal Guillard wrote: >> > Hi, >> > >> > Is hysteresis thresholding implemented under another name? Or did I >> miss >> > it in the documentation? >> > The same question for a local maxima filter. >> > >> > Thank you for your answers, >> > >> > Gwen >> > >> > _______________________________________________ >> > Insight-users mailing list >> > Insight-users@itk.org >> > http://www.itk.org/mailman/listinfo/insight-users >> > >> > -- > ----------------------------------------------------------- > Gwenael Guillard > Doctorant > Departement Image et Traitement de l'Information (ITI) > LAboratoire de Traitement de l'Information Medicale (LATIM) - INSERM ERM 0102 > ENST Bretagne > Technopole Brest Iroise > BP 832 - 29285 Brest Cedex > Tel : 02 29 00 13 01 > email : gwenael.guillard@enst-bretagne.fr, g.guillard@ieee.org > > From hanssen@caesar.de Tue Jul 8 08:42:32 2003 From: hanssen@caesar.de (Nils Hanssen) Date: Tue, 8 Jul 2003 09:42:32 +0200 Subject: [Insight-users] Crash in ShapeDetectionLevelSetImageFilter Message-ID: <000201c34524$7dea4470$0607010a@ssn4006> This is a multi-part message in MIME format. ------=_NextPart_000_0003_01C34535.41758570 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, I am trying to understand the behaviour of the ShapeDetectionLSIF. Therefore, I set the propagation-weighting to zero. By setting the curvature-weighting to a value of one I would expect that the inital surface is shrinking to a point (I set the MaxRMSError to zero) and the number of iterations very high. The filter is crashing in SegmentationLevelSetFunction ::PropagationSpeed(const NeighborhoodType &neighborhood, const FloatOffsetType &offset) const [...] --> else return ( static_cast(m_SpeedImage->GetPixel(idx)) ); // crashing here [...] When I set the propagation-weighting to - for instance - 0.0001 the filter is not crashing, but the contour is not shrinking according to the mean curvature. Is that the correct behaviour of the filter? I would appreciate any suggestions. Thanks! Regards, Nils ------------------------- Nils Hanssen Surgical Systems Laboratory research center c ae sa r Ludwig-Erhard-Allee 2 53175 Bonn fon: +49-228-9656-197 fax: +49-228-9656-117 http://www.caesar.de/ssl ------=_NextPart_000_0003_01C34535.41758570 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I am = trying to=20 understand the behaviour of the ShapeDetectionLSIF.
Therefore, I set the=20 propagation-weighting to zero. By setting the curvature-weighting to a = value of=20 one I would expect that the inital surface is shrinking to a point (I = set the=20 MaxRMSError to zero) and the number of iterations very high.=20
 
The = filter is=20 crashing in
SegmentationLevelSetFunction<TImageType,=20 TFeatureImageType>
::PropagationSpeed(const NeighborhoodType=20 &neighborhood, const FloatOffsetType &offset) = const
[...]
--> = else return (=20 static_cast<ScalarValueType>(m_SpeedImage->GetPixel(idx)) ); // = crashing here
[...]
 
When I = set the=20 propagation-weighting to - for instance - 0.0001 the filter is not=20 crashing, but the contour is not shrinking according to the mean=20 curvature.
 
Is = that the correct=20 behaviour of the filter?
 
I = would appreciate=20 any suggestions. Thanks!
 
 
Regards,
Nils
 

-------------------------
Nils Hanssen
Surgical=20 Systems Laboratory
research center c=20 ae sa r
Ludwig-Erhard-Allee 2
53175=20 Bonn
fon: +49-228-9656-197
fax: +49-228-9656-117
http://www.caesar.de/ssl


 
------=_NextPart_000_0003_01C34535.41758570-- From Mathieu.Malaterre@creatis.insa-lyon.fr Tue Jul 8 08:43:08 2003 From: Mathieu.Malaterre@creatis.insa-lyon.fr (Mathieu Malaterre) Date: Tue, 08 Jul 2003 09:43:08 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F0986BE.8040602@skynet.be> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0986BE.8040602@skynet.be> Message-ID: <3F0A760C.3070709@creatis.insa-lyon.fr> imho, You can have a look here: http://www.creatis.insa-lyon.fr/~malaterre/itk/polydata2itk.cxx This is based on InsightApplications/Auxilary/vtk/vtk2itk.cxx But instead of transforming a vtkUnstructuredGrid it take into account a vtkPolyData Beware that it has not been heavily tested. It currently only works on triangle polydata (so you need to go through a vtkTriangleFiler first). HTH mathieu imho wrote: > Hi Luis, > > I use vtkPolyData to represent 2 3D liver's models builded from slices. > I already do registration on it with VTK (point-based + ICP), and now > I'd like to use the demon registration in ITK. > So I'll try the conversion you purpose. > > Thanks for your help > > Imho. > > > Luis Ibanez wrote: > >> >> Hi Imho, >> >> The import/export connections currently available >> between ITK and VTK only manage image-to-image >> conversions. >> >> You may want to convert your vtkPolyData to a vtkImageData >> and then use the itkVTKImageToImageFilter available in >> >> InsightApplications/Auxiliary/vtk >> >> In any case, a vtkPolyData may not be the best support >> for representing an image... >> >> >> Please let us know if you have futher questions, >> >> >> Thanks >> >> >> Luis >> >> >> >> ------------------ >> imho wrote: >> >>> Hi all, >>> is it possible to import and export a vtkPolyData or can I use images >>> only? >>> How can I do? >>> I have two vtkPolyData volumes, and I'd like to use itk filters like >>> this : >>> >>> vtk reader -> vtk filters -> itk filters -> vtk viewer >>> I've tried this : >>> >>> VTK -> ITK >>> -> VTK >>> >>> ITKImageExporter4 VTKImageImporter4 >>> ITKImageImporter4 == first POLY >>> >>> ITKImageExporter5 VTKImageImporter5 >>> == second POLY (no >>> output) >>> >>> but I don't know how to convert my vtkPolyData or how to typedef the >>> VTKimporter to make it work : >>> typedef unsigned short PixelType; >>> typedef itk::Image ImageType; >>> typedef itk::VTKImageImport ImageImportType; >>> is ok but not with a polyData, and >>> >>> typedef itk::VTKImageImport ImageImportType; >>> isn't ok >>> >>> Thanks a lot >>> >>> imho >> >> >> >> >> >> >> > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From imho@skynet.be Tue Jul 8 09:12:46 2003 From: imho@skynet.be (imho) Date: Tue, 08 Jul 2003 10:12:46 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F0A760C.3070709@creatis.insa-lyon.fr> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0986BE.8040602@skynet.be> <3F0A760C.3070709@creatis.insa-lyon.fr> Message-ID: <3F0A7CFE.6080901@skynet.be> Hi Mathieu, thanks, I've had a look on this and I'll try it if I can't use a system of pipe-line between vtk and itk. It looks good. Imho Mathieu Malaterre wrote: > imho, > > You can have a look here: > > http://www.creatis.insa-lyon.fr/~malaterre/itk/polydata2itk.cxx > > This is based on > > InsightApplications/Auxilary/vtk/vtk2itk.cxx > > But instead of transforming a vtkUnstructuredGrid it take into account > a vtkPolyData > > Beware that it has not been heavily tested. It currently only works on > triangle polydata (so you need to go through a vtkTriangleFiler first). > > HTH > mathieu > > > imho wrote: > >> Hi Luis, >> >> I use vtkPolyData to represent 2 3D liver's models builded from slices. >> I already do registration on it with VTK (point-based + ICP), and now >> I'd like to use the demon registration in ITK. >> So I'll try the conversion you purpose. >> >> Thanks for your help >> >> Imho. >> >> >> Luis Ibanez wrote: >> >>> >>> Hi Imho, >>> >>> The import/export connections currently available >>> between ITK and VTK only manage image-to-image >>> conversions. >>> >>> You may want to convert your vtkPolyData to a vtkImageData >>> and then use the itkVTKImageToImageFilter available in >>> >>> InsightApplications/Auxiliary/vtk >>> >>> In any case, a vtkPolyData may not be the best support >>> for representing an image... >>> >>> >>> Please let us know if you have futher questions, >>> >>> >>> Thanks >>> >>> >>> Luis >>> >>> >>> >>> ------------------ >>> imho wrote: >>> >>>> Hi all, >>>> is it possible to import and export a vtkPolyData or can I use >>>> images only? >>>> How can I do? >>>> I have two vtkPolyData volumes, and I'd like to use itk filters >>>> like this : >>>> >>>> vtk reader -> vtk filters -> itk filters -> vtk viewer >>>> I've tried this : >>>> >>>> VTK -> >>>> ITK -> VTK >>>> >>>> ITKImageExporter4 VTKImageImporter4 >>>> ITKImageImporter4 == first POLY >>>> >>>> ITKImageExporter5 VTKImageImporter5 >>>> == second POLY (no >>>> output) >>>> >>>> but I don't know how to convert my vtkPolyData or how to typedef >>>> the VTKimporter to make it work : >>>> typedef unsigned short PixelType; >>>> typedef itk::Image ImageType; >>>> typedef itk::VTKImageImport ImageImportType; >>>> is ok but not with a polyData, and >>>> >>>> typedef itk::VTKImageImport ImageImportType; >>>> isn't ok >>>> >>>> Thanks a lot >>>> >>>> imho >>> >>> >>> >>> >>> >>> >>> >>> >> >> _______________________________________________ >> Insight-users mailing list >> Insight-users@itk.org >> http://www.itk.org/mailman/listinfo/insight-users >> > > From c.p.botha@ewi.tudelft.nl Tue Jul 8 09:44:33 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: 08 Jul 2003 10:44:33 +0200 Subject: [Insight-users] mkstemps in CableSwig Message-ID: <1057653873.14021.8.camel@dutidad> --=-HS0p4zPfAmcUtAvVUAHI Content-Type: text/plain Content-Transfer-Encoding: 7bit Dear ITKers, I'm building ITK with CableSwig integrated to have a look at the new Python wrappings. BTW, great work! In anycase, is it normal that I had to add mkstemps.c to the CMakeLists.txt in Insight/Utilities/CableSwig/GCCPatch/libiberty in order to get CableSwig to build without error? (Patched attached) Without this change, my ITK build stopped with the following error: Building executable /home/cpbotha/DoNotBackup/build/Insight/bin/genattrtab... /home/cpbotha/DoNotBackup/build/Insight/bin/libiberty.so: undefined reference to `mkstemps' This is on a Debian Woody (3.0) system with: gcc version 2.95.4 20011002 (Debian prerelease), i.e. the stock-standard Woody gcc installation. I am subscribed to ITK, but not to the Cable list, so CC's from there would be greatly appreciated! Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ --=-HS0p4zPfAmcUtAvVUAHI Content-Disposition: attachment; filename=CMakeLists.diff Content-Type: text/plain; name=CMakeLists.diff; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable --- CMakeLists.txt.orig Tue Jul 8 10:37:41 2003 +++ CMakeLists.txt Tue Jul 8 10:35:50 2003 @@ -23,6 +23,7 @@ md5.c objalloc.c obstack.c + mkstemps.c partition.c pexecute.c safe-ctype.c --=-HS0p4zPfAmcUtAvVUAHI-- From rjtst21@pitt.edu Mon Jul 7 16:38:56 2003 From: rjtst21@pitt.edu (Robert Tamburo) Date: Mon, 7 Jul 2003 11:38:56 -0400 Subject: [Insight-users] Q: internal compiler error References: <5f8f5c85f958a2.5f958a25f8f5c8@med.unc.edu> <3F098926.9030208@kitware.com> Message-ID: <00ef01c3449d$e0627910$6501a8c0@DINO> I had the same issue a few months ago. My temporary fix was: Commenting out the following lines of code in itkConceptChecking.h //template struct UniqueType_int {}; //template struct UniqueType_unsigned_int {}; /* struct Constraints { typedef Detail::UniqueType_unsigned_int DT1; typedef Detail::UniqueType_unsigned_int DT2; void constraints() { DT1 a =3D DT2(); Detail::IgnoreUnusedVariable(a); } }; itkConceptConstraintsMacro(); */ ----- Original Message ----- From: "Luis Ibanez" To: "Yasheng Chen" Cc: Sent: Monday, July 07, 2003 10:52 AM Subject: Re: [Insight-users] Q: internal compiler error > > Hi Yasheng, > > You may have a compiler installation problem. > > ITK version 1.2 was built regularly with VC++ 6.0 > without ICE problems. > > I would suggest you to verify that installation > of your compiler as well as the installation of > service pack 5. > > In order to double check whether the source of the > problem is your compiler or not, you could also > download the current CVS version of the toolkit, > for which you can verify the builds on the Dashboard. > http://www.itk.org/Testing/Dashboard/MostRecentResults-Nightly/Dashboard.html > > > > Regards, > > > Luis > > > ----------------------- > Yasheng Chen wrote: > > Hi, > > > > I got an error message (see below) when I include the header > > file "itkCastImageFilter.h". > > > > C:\itkdownload\InsightToolkit-1.2.0\Code\Common\itkConceptChecking.h > > (96) : fatal error C1001: INTERNAL COMPILER ERROR > > (compiler file 'msc1.cpp', line 1786) > > > > I have installed the service pack 5 for vc++, and the version is 1.2.0. > > Does any one have suggestions of what may go wrong ? > > > > Thank you very much ! > > > > Yasheng > > > > _______________________________________________ > > Insight-users mailing list > > Insight-users@itk.org > > http://www.itk.org/mailman/listinfo/insight-users > > > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From bill.hoffman@kitware.com Tue Jul 8 14:00:43 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Tue, 08 Jul 2003 09:00:43 -0400 Subject: [Insight-users] mkstemps in CableSwig In-Reply-To: <1057653873.14021.8.camel@dutidad> Message-ID: <5.2.0.9.0.20030708085225.04b76aa8@pop.biz.rr.com> This is a bug in the CMakeLists.txt file for CableSwig. I have checked in a fix in the CableSwig/CMakelists.txt file. -Bill At 04:44 AM 7/8/2003, Charl P. Botha wrote: >Dear ITKers, > >I'm building ITK with CableSwig integrated to have a look at the new >Python wrappings. BTW, great work! > >In anycase, is it normal that I had to add mkstemps.c to the >CMakeLists.txt in Insight/Utilities/CableSwig/GCCPatch/libiberty in >order to get CableSwig to build without error? (Patched attached) >Without this change, my ITK build stopped with the following error: >Building executable >/home/cpbotha/DoNotBackup/build/Insight/bin/genattrtab... >/home/cpbotha/DoNotBackup/build/Insight/bin/libiberty.so: undefined >reference to `mkstemps' > >This is on a Debian Woody (3.0) system with: gcc version 2.95.4 20011002 >(Debian prerelease), i.e. the stock-standard Woody gcc installation. > >I am subscribed to ITK, but not to the Cable list, so CC's from there >would be greatly appreciated! > >Thanks, >Charl > >-- >charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From luis.ibanez@kitware.com Tue Jul 8 14:54:36 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 08 Jul 2003 09:54:36 -0400 Subject: [Insight-users] Crash in ShapeDetectionLevelSetImageFilter References: <000201c34524$7dea4470$0607010a@ssn4006> Message-ID: <3F0ACD1C.4050706@kitware.com> Hi Nils, Are you using a very recent checkout of ITK ? The level set filters have been reworked in recent days, so it will help us to know if you are experiencing this behavior with the current version or with the version as it was two weeks ago (or before that). Please let us know, Thanks Luis ------------------------ Nils Hanssen wrote: > Hi, > > I am trying to understand the behaviour of the ShapeDetectionLSIF. > Therefore, I set the propagation-weighting to zero. By setting the > curvature-weighting to a value of one I would expect that the inital > surface is shrinking to a point (I set the MaxRMSError to zero) and the > number of iterations very high. > > The filter is crashing in > SegmentationLevelSetFunction > ::PropagationSpeed(const NeighborhoodType &neighborhood, const > FloatOffsetType &offset) const > [...] > --> else return ( static_cast(m_SpeedImage->GetPixel(idx)) ); // crashing here > [...] > > When I set the propagation-weighting to - for instance - 0.0001 the > filter is not crashing, but the contour is not shrinking according to > the mean curvature. > > Is that the correct behaviour of the filter? > > I would appreciate any suggestions. Thanks! > > > Regards, > Nils > > > ------------------------- > Nils Hanssen > Surgical Systems Laboratory > research center c ae sa r > Ludwig-Erhard-Allee 2 > 53175 Bonn > fon: +49-228-9656-197 > fax: +49-228-9656-117 > ___http://www.caesar.de/ssl_ > > > From hanssen@caesar.de Tue Jul 8 15:04:44 2003 From: hanssen@caesar.de (Nils Hanssen) Date: Tue, 8 Jul 2003 16:04:44 +0200 Subject: [Insight-users] Crash in ShapeDetectionLevelSetImageFilter In-Reply-To: <3F0ACD1C.4050706@kitware.com> Message-ID: <000201c34559$e2d7df70$0607010a@ssn4006> Hi Luis, I am using the 1.2.0 web release. Regards, Nils > -----Original Message----- > From: insight-users-admin@itk.org > [mailto:insight-users-admin@itk.org]On > Behalf Of Luis Ibanez > Sent: Tuesday, July 08, 2003 3:55 PM > To: Nils Hanssen > Cc: Insight-users@public.kitware.com > Subject: Re: [Insight-users] Crash in > ShapeDetectionLevelSetImageFilter > > > > Hi Nils, > > Are you using a very recent checkout of ITK ? > > The level set filters have been reworked in > recent days, so it will help us to know if you > are experiencing this behavior with the current > version or with the version as it was two weeks > ago (or before that). > > Please let us know, > > Thanks > > > Luis > > > ------------------------ > Nils Hanssen wrote: > > Hi, > > > > I am trying to understand the behaviour of the ShapeDetectionLSIF. > > Therefore, I set the propagation-weighting to zero. By setting the > > curvature-weighting to a value of one I would expect that > the inital > > surface is shrinking to a point (I set the MaxRMSError to > zero) and the > > number of iterations very high. > > > > The filter is crashing in > > SegmentationLevelSetFunction > > ::PropagationSpeed(const NeighborhoodType &neighborhood, const > > FloatOffsetType &offset) const > > [...] > > --> else return ( > static_cast(m_SpeedImage->GetPixel(idx)) ); > // crashing here > > [...] > > > > When I set the propagation-weighting to - for instance - 0.0001 the > > filter is not crashing, but the contour is not shrinking > according to > > the mean curvature. > > > > Is that the correct behaviour of the filter? > > > > I would appreciate any suggestions. Thanks! > > > > > > Regards, > > Nils > > > > > > ------------------------- > > Nils Hanssen > > Surgical Systems Laboratory > > research center c ae sa r > > Ludwig-Erhard-Allee 2 > > 53175 Bonn > > fon: +49-228-9656-197 > > fax: +49-228-9656-117 > > ___http://www.caesar.de/ssl_ > > > > > > > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From M.Hastenteufel@dkfz-heidelberg.de Tue Jul 8 15:18:29 2003 From: M.Hastenteufel@dkfz-heidelberg.de (Mark Hastenteufel) Date: Tue, 08 Jul 2003 16:18:29 +0200 Subject: [Insight-users] 3D Ultrasound Message-ID: <3F0AD2B5.5090102@DKFZ.de> Hello, I can remember that someone has written something about an itk image-filter that transforms 3D ultrasound data from cylindric to cartesion coordinates. I cannot find this e-mail anymore. Can someone help me? Does there exist a filter that does the transformation? Thnaks, Mark -- Mark Hastenteufel Deutsches Krebsforschungszentrum (German Cancer Research Center) Div. Medical and Biological Informatics H0100 Tel: (+49) 6221-42 2353 Im Neuenheimer Feld 280 Fax: (+49) 6221-42 2345 D-69120 Heidelberg e-mail M.Hastenteufel@DKFZ.de Germany http://www.dkfz.de/mbi/people/markh.html From samson@mit.edu Tue Jul 8 17:04:50 2003 From: samson@mit.edu (Samson Timoner) Date: Tue, 08 Jul 2003 12:04:50 -0400 Subject: [Insight-users] debian/gcc build error Message-ID: I'm using gcc 2.95.4, with itk1.2, on a debian linux box. I got an internal compiler error compiling examples, as shown below. This is the first time I've used gcc 2.95.x with itk. I don't believe I've had this problem with debian/gcc 3.0x. Any thoughts on the solution other than updating my compiler? (I thought itk supported gcc 2.95.x) Thanks, -- Samson /bigscratch/samson/prog/itk/build/Examples/Filtering: building default_target /bigscratch/samson/prog/itk/build/Examples/IO: building default_target /bigscratch/samson/prog/itk/build/Examples/Registration: building default_target Building object file MultiResImageRegistration1.o... /bigscratch/samson/prog/itk/InsightToolkit-1.2.0/Code/Common/itkImageRegionConstIterator.h: In method `class itk::ImageRegionConstIterator > & itk::ImageRegionConstIterator >::operator --()': /bigscratch/samson/prog/itk/InsightToolkit-1.2.0/Code/Algorithms/itkMattesMutualInformationImageToImageMetric.txx:564: instantiated from `itk::MattesMutualInformationImageToImageMetric,itk::Image >::GetValue(const itk::Array &) const' /bigscratch/samson/prog/itk/InsightToolkit-1.2.0/Code/Common/itkLinearInterpolateImageFunction.h:69: instantiated from here /bigscratch/samson/prog/itk/InsightToolkit-1.2.0/Code/Common/itkImageRegionConstIterator.h:282: Internal compiler error. /bigscratch/samson/prog/itk/InsightToolkit-1.2.0/Code/Common/itkImageRegionConstIterator.h:282: Please submit a full bug report. /bigscratch/samson/prog/itk/InsightToolkit-1.2.0/Code/Common/itkImageRegionConstIterator.h:282: Internal compiler error: /bigscratch/samson/prog/itk/InsightToolkit-1.2.0/Code/Common/itkImageRegionConstIterator.h:282: See for instructions. make[5]: *** [MultiResImageRegistration1.o] Error 1 make[4]: *** [default_target] Error 2 make[3]: *** [default_target_Registration] Error 2 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_Examples] Error 2 make: *** [default_target] Error 2 From pchandra@radonc.unc.edu Tue Jul 8 17:11:08 2003 From: pchandra@radonc.unc.edu (Parag Chandra) Date: Tue, 8 Jul 2003 12:11:08 -0400 Subject: [Insight-users] RE: Q: internal compiler error Message-ID: <000e01c3456b$8a666750$99221398@radonc.radonc.unc.edu> This is a multi-part message in MIME format. ------=_NextPart_000_000F_01C3454A.0354C750 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi Yasheng, I get this problem all the time when using ITK (never had this problem when compiling ITK itself). In every case, the fix is simply to change the order of #include statements in your program/derived classes. Note that the offending statement will many times not be in the source file that MSVC6 is complaining about, so you'll have to trace upwards in your hierarchy and fiddle with the #include ordering there. Hope this helps. Best regards, Parag Chandra ------=_NextPart_000_000F_01C3454A.0354C750 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

Hi Yasheng,

 

I get this problem all the time when using ITK (never = had this problem when compiling ITK itself). In every case, the fix is = simply to change the order of #include statements in your program/derived classes. = Note that the offending statement will many times not be in the source file that = MSVC6 is complaining about, so you’ll have to trace upwards in your = hierarchy and fiddle with the #include ordering there. Hope this = helps.

 

Best regards,

Parag Chandra

 

------=_NextPart_000_000F_01C3454A.0354C750-- From yass71@yahoo.com Tue Jul 8 22:58:55 2003 From: yass71@yahoo.com (yasser salman) Date: Tue, 8 Jul 2003 14:58:55 -0700 (PDT) Subject: [Insight-users] tiff volume.. Message-ID: <20030708215855.77438.qmail@web20418.mail.yahoo.com> hi all i'm asking for a 3D brain volume of tiff format ., can any one tell my any web site to download this volume.. yasser.. __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From hanssen@caesar.de Wed Jul 9 08:43:06 2003 From: hanssen@caesar.de (Nils Hanssen) Date: Wed, 9 Jul 2003 09:43:06 +0200 Subject: [Insight-users] Curvature term in ShapeDetectionLevelSetImageFilter Message-ID: <000401c345ed$bce44cb0$0607010a@ssn4006> This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C345FE.806D1CB0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, I want to segment a tubular object with the ShapeDetectionLSIF. The initial level-set is the "axis" of the tubular object. To prevent the contour from leaking through gaps in the edge-map, I set the curvature-weighting with values between 0.02 and 5. The size of the gaps is approx. 3% of the perimeter of the contour, but I was not able to stop the leaking. What do I have to tune to achieve a significant smoothing? Regards, Nils ------=_NextPart_000_0005_01C345FE.806D1CB0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I want = to segment a=20 tubular object with the ShapeDetectionLSIF. The initial level-set is the = "axis"=20 of the tubular object.
To = prevent the=20 contour from leaking through gaps in the edge-map, I set the = curvature-weighting=20 with values between 0.02 and 5.
The = size of the gaps=20 is approx. 3% of the perimeter of the contour, but I was not able to = stop the=20 leaking.
 
What = do I have to=20 tune to achieve a significant smoothing?
 
 
Regards,
Nils
 
 
 
 
------=_NextPart_000_0005_01C345FE.806D1CB0-- From luis.ibanez@kitware.com Wed Jul 9 16:51:20 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 09 Jul 2003 11:51:20 -0400 Subject: [Insight-users] Curvature term in ShapeDetectionLevelSetImageFilter References: <000401c345ed$bce44cb0$0607010a@ssn4006> Message-ID: <3F0C39F8.4070103@kitware.com> Hi Nils, In order to prevents leaks the ratio between the propagation scaling and the curvature scaling has to be modified. You may want to try reducing the propagation scaling factor as you increase the curvature scaling. The drawback in doing this is that if your initial level set is far from the actuar borders of the tubular structure that you want to segment, a low propagation scaling may be insufficient for bringing the level set to the expected edge. Note however that this balance of the scalings can only reduce the leaks, but will not prevent them from appening. As long as there is an open gap in the feature image, the level set will leak, it is just a matter of how many iterations it will take for it to leak. You may want to rework the feature image in order to make darker the edges. This can be done by reducing the "beta" parameter of the Sigmoid, and by using a smaller number (in absolute value) for the "alpha" parameter of the sigmoid. The feature image should look almost as a binary imaga of the expected segmentation. (With almost black in the edges and almost white in the internal region to be segmented). (I'm assuming that you are using a sigmoid filter for preparing the feature image to be passed to the ShapeDetection filter... is that the case ? ) You may want to experiment also with letting the filter run for less iterations. -- Please let us know if you continue experiencing problems. In that case it may be desirable to figure out a better way to initialize the filter for performing your segmentation. Regards, Luis --------------------- Nils Hanssen wrote: > Hi, > > I want to segment a tubular object with the ShapeDetectionLSIF. The > initial level-set is the "axis" of the tubular object. > To prevent the contour from leaking through gaps in the edge-map, I set > the curvature-weighting with values between 0.02 and 5. > The size of the gaps is approx. 3% of the perimeter of the contour, but > I was not able to stop the leaking. > > What do I have to tune to achieve a significant smoothing? > > > Regards, > Nils > > > > From luis.ibanez@kitware.com Wed Jul 9 17:14:06 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 09 Jul 2003 12:14:06 -0400 Subject: [Insight-users] Crash in ShapeDetectionLevelSetImageFilter References: <000201c34559$e2d7df70$0607010a@ssn4006> Message-ID: <3F0C3F4E.5040509@kitware.com> Hi Nils, You are right in your interpretation of the behavior for the ShapeDetectionLevelSetFilter. Increasing the curvature scaling while decreasing the propagation scaling should make the contour collapse (contract). I just verified this behavior using a syntethic image of a sphere. Note that in version 1.2 this filter is expecting the input level set to conform to the convention of "negative inside" which means that the level set has negative values 'inside' the contour and positive values outside the contour. You may have to push the curvature scaling to a value higher than 1.0. (e.g. 5.0 or so). I would avoid to use 0.0 for the propagation scaling ( in part just for superstition against zeros values as parameters). You may want to try something like 0.1 for the propagation scaling. Please verify the convention used by your initial level set. That may be the cause for the contour not behaving as expected. Regards, Luis --------------------- Nils Hanssen wrote: > Hi Luis, > > I am using the 1.2.0 web release. > > Regards, > Nils > > >>-----Original Message----- >>From: insight-users-admin@itk.org >>[mailto:insight-users-admin@itk.org]On >>Behalf Of Luis Ibanez >>Sent: Tuesday, July 08, 2003 3:55 PM >>To: Nils Hanssen >>Cc: Insight-users@public.kitware.com >>Subject: Re: [Insight-users] Crash in >>ShapeDetectionLevelSetImageFilter >> >> >> >>Hi Nils, >> >>Are you using a very recent checkout of ITK ? >> >>The level set filters have been reworked in >>recent days, so it will help us to know if you >>are experiencing this behavior with the current >>version or with the version as it was two weeks >>ago (or before that). >> >>Please let us know, >> >> Thanks >> >> >> Luis >> >> >>------------------------ >>Nils Hanssen wrote: >> >>>Hi, >>> >>>I am trying to understand the behaviour of the ShapeDetectionLSIF. >>>Therefore, I set the propagation-weighting to zero. By setting the >>>curvature-weighting to a value of one I would expect that >> >>the inital >> >>>surface is shrinking to a point (I set the MaxRMSError to >> >>zero) and the >> >>>number of iterations very high. >>> >>>The filter is crashing in >>>SegmentationLevelSetFunction >>>::PropagationSpeed(const NeighborhoodType &neighborhood, const >>>FloatOffsetType &offset) const >>>[...] >>>--> else return ( >> >>static_cast(m_SpeedImage->GetPixel(idx)) ); >>// crashing here >> >>>[...] >>> >>>When I set the propagation-weighting to - for instance - 0.0001 the >>>filter is not crashing, but the contour is not shrinking >> >>according to >> >>>the mean curvature. >>> >>>Is that the correct behaviour of the filter? >>> >>>I would appreciate any suggestions. Thanks! >>> >>> >>>Regards, >>>Nils >>> >>> >>>------------------------- >>>Nils Hanssen >>>Surgical Systems Laboratory >>>research center c ae sa r >>>Ludwig-Erhard-Allee 2 >>>53175 Bonn >>>fon: +49-228-9656-197 >>>fax: +49-228-9656-117 >>>___http://www.caesar.de/ssl_ >>> >>> >>> >> >> >> >>_______________________________________________ >>Insight-users mailing list >>Insight-users@itk.org >>http://www.itk.org/mailman/listinfo/insight-users >> > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Wed Jul 9 21:54:05 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 09 Jul 2003 16:54:05 -0400 Subject: [Insight-users] Support for multiple seeds added to Confidence Connected Message-ID: <3F0C80ED.307@kitware.com> Hi, The ConfidenceConnectedImageFilter accepts now multiple seed points. They are set with the method AddSeed() as opposed to the previous method SetSeed() This allow to take advantage of the capabilities of the Floodfill iterator for managing multiple initial seeds. The ConfidenceConnected filter will now be able to grow simultaneously multiple non-connected regions, but still using common statistics. The same functionality is also available through the Volview plugins in InsightApplications Luis From hanssen@caesar.de Thu Jul 10 08:16:22 2003 From: hanssen@caesar.de (Nils Hanssen) Date: Thu, 10 Jul 2003 09:16:22 +0200 Subject: [Insight-users] Crash in ShapeDetectionLevelSetImageFilter In-Reply-To: <3F0C3F4E.5040509@kitware.com> Message-ID: <000301c346b3$2bc24c70$0607010a@ssn4006> Hi Luis, thank you for the detailed answer. My initial level set conforms to the "negative inside" convention. Now, I am using a curvature weighting of 1000 (just to see what happens in the extreme case) and a propagation weighting of 0.001. When running the ShapeDetectionLSIF, the contour is not collapsing at all. Maybe that's because of the feature image that dictates the curvature speed (== propagation speed in the ShapeDetectionLSIF)? Since the curvature speed in the ShapeDetectionLSF equals the propagation speed, I derived my own classes called "TubularLevelSetFunction" and "TubularLevelSetImageFilter". These are basically clones of the ShapeDetection* classes, but with the difference that I set the curvature speed to (constant) one in the Level-set function. Now, the contour is collapsing according to the mean curvature but all this happens _very_ slowly (the curvature weighting is 1000!). In itk::LevelSetFunction::ComputeUpdate(...) I see the following: --- curvature_term = curve; curvature_term *= m_CurvatureWeight * this->CurvatureSpeed(it, offset); --- so it should make no difference when I set the curvature weight to 1 and the curvature speed to (constant) 1000 (and not vice versa), right? But when I do this, I get numerical instabilities during the evolution. What is wrong with my assumption? Luis, what was the curvature weighting and curvature speed when you tested the collapsing contour with the syntethic sphere image? Was the curvature speed constant or dependent on the image? For now, I do all calculations in 2D. Could that be a problem? I have installed a observer that shows me the progress of the contour after each update event. Regards, Nils > -----Original Message----- > From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > Sent: Wednesday, July 09, 2003 6:14 PM > To: Nils Hanssen > Cc: Insight-users@public.kitware.com > Subject: Re: [Insight-users] Crash in > ShapeDetectionLevelSetImageFilter > > > > Hi Nils, > > You are right in your interpretation of the > behavior for the ShapeDetectionLevelSetFilter. > > Increasing the curvature scaling while decreasing > the propagation scaling should make the contour > collapse (contract). > > I just verified this behavior using a syntethic > image of a sphere. > > Note that in version 1.2 this filter is expecting > the input level set to conform to the convention > of "negative inside" which means that the level > set has negative values 'inside' the contour and > positive values outside the contour. > > You may have to push the curvature scaling to > a value higher than 1.0. (e.g. 5.0 or so). > > I would avoid to use 0.0 for the propagation > scaling ( in part just for superstition against > zeros values as parameters). You may want to > try something like 0.1 for the propagation > scaling. > > Please verify the convention used by your initial > level set. That may be the cause for the contour > not behaving as expected. > > > Regards, > > > Luis > > > > --------------------- > Nils Hanssen wrote: > > Hi Luis, > > > > I am using the 1.2.0 web release. > > > > Regards, > > Nils > > > > > >>-----Original Message----- > >>From: insight-users-admin@itk.org > >>[mailto:insight-users-admin@itk.org]On > >>Behalf Of Luis Ibanez > >>Sent: Tuesday, July 08, 2003 3:55 PM > >>To: Nils Hanssen > >>Cc: Insight-users@public.kitware.com > >>Subject: Re: [Insight-users] Crash in > >>ShapeDetectionLevelSetImageFilter > >> > >> > >> > >>Hi Nils, > >> > >>Are you using a very recent checkout of ITK ? > >> > >>The level set filters have been reworked in > >>recent days, so it will help us to know if you > >>are experiencing this behavior with the current > >>version or with the version as it was two weeks > >>ago (or before that). > >> > >>Please let us know, > >> > >> Thanks > >> > >> > >> Luis > >> > >> > >>------------------------ > >>Nils Hanssen wrote: > >> > >>>Hi, > >>> > >>>I am trying to understand the behaviour of the ShapeDetectionLSIF. > >>>Therefore, I set the propagation-weighting to zero. By setting the > >>>curvature-weighting to a value of one I would expect that > >> > >>the inital > >> > >>>surface is shrinking to a point (I set the MaxRMSError to > >> > >>zero) and the > >> > >>>number of iterations very high. > >>> > >>>The filter is crashing in > >>>SegmentationLevelSetFunction > >>>::PropagationSpeed(const NeighborhoodType &neighborhood, const > >>>FloatOffsetType &offset) const > >>>[...] > >>>--> else return ( > >> > >>static_cast(m_SpeedImage->GetPixel(idx)) ); > >>// crashing here > >> > >>>[...] > >>> > >>>When I set the propagation-weighting to - for instance - > 0.0001 the > >>>filter is not crashing, but the contour is not shrinking > >> > >>according to > >> > >>>the mean curvature. > >>> > >>>Is that the correct behaviour of the filter? > >>> > >>>I would appreciate any suggestions. Thanks! > >>> > >>> > >>>Regards, > >>>Nils > >>> > >>> > >>>------------------------- > >>>Nils Hanssen > >>>Surgical Systems Laboratory > >>>research center c ae sa r > >>>Ludwig-Erhard-Allee 2 > >>>53175 Bonn > >>>fon: +49-228-9656-197 > >>>fax: +49-228-9656-117 > >>>___http://www.caesar.de/ssl_ > >>> > >>> > >>> > >> > >> > >> > >>_______________________________________________ > >>Insight-users mailing list > >>Insight-users@itk.org > >>http://www.itk.org/mailman/listinfo/insight-users > >> > > > > _______________________________________________ > > Insight-users mailing list > > Insight-users@itk.org > > http://www.itk.org/mailman/listinfo/insight-users > > > > > > From hanssen@caesar.de Thu Jul 10 08:27:15 2003 From: hanssen@caesar.de (Nils Hanssen) Date: Thu, 10 Jul 2003 09:27:15 +0200 Subject: [Insight-users] Curvature term in ShapeDetectionLevelSetImageFilter In-Reply-To: <3F0C39F8.4070103@kitware.com> Message-ID: <000401c346b4$b05f2970$0607010a@ssn4006> Hi Luis, yes, I am using the proposed pipeline [gradient magnitude] --> [sigmoid]. The feature image really looks like a binary image with high values inside the tube and low values on the border. The problem are the gaps in the border of the tube that have high values and act like "bridges" to the surrounding high valued areas -> bad. I thought, the regularizing terms in the level sets would be strong and flexible enough to prevent the leakage, but for now I didn't find the good parameters. Of course, I increased the curvature weighting and decreased the propagation weighting simultaneously, but with no luck. I choose the "axis" of the tube as the initial level-set, since this axis is known "a priori" in my application. Regards, Nils > -----Original Message----- > From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > Sent: Wednesday, July 09, 2003 5:51 PM > To: Nils Hanssen > Cc: insight-users@public.kitware.com > Subject: Re: [Insight-users] Curvature term in > ShapeDetectionLevelSetImageFilter > > > > Hi Nils, > > In order to prevents leaks the ratio between the > propagation scaling and the curvature scaling > has to be modified. > > You may want to try reducing the propagation scaling > factor as you increase the curvature scaling. > > The drawback in doing this is that if your initial > level set is far from the actuar borders of the > tubular structure that you want to segment, a low > propagation scaling may be insufficient for bringing > the level set to the expected edge. > > Note however that this balance of the scalings can > only reduce the leaks, but will not prevent them from > appening. As long as there is an open gap in the > feature image, the level set will leak, it is just > a matter of how many iterations it will take for it > to leak. > > You may want to rework the feature image in order > to make darker the edges. This can be done by reducing > the "beta" parameter of the Sigmoid, and by using > a smaller number (in absolute value) for the "alpha" > parameter of the sigmoid. The feature image should > look almost as a binary imaga of the expected segmentation. > (With almost black in the edges and almost white in > the internal region to be segmented). > (I'm assuming that you are using a sigmoid filter for > preparing the feature image to be passed to the > ShapeDetection filter... is that the case ? ) > > You may want to experiment also with letting the filter > run for less iterations. > > -- > > Please let us know if you continue experiencing problems. > > In that case it may be desirable to figure out a better > way to initialize the filter for performing your segmentation. > > > Regards, > > > Luis > > > > --------------------- > Nils Hanssen wrote: > > Hi, > > > > I want to segment a tubular object with the ShapeDetectionLSIF. The > > initial level-set is the "axis" of the tubular object. > > To prevent the contour from leaking through gaps in the > edge-map, I set > > the curvature-weighting with values between 0.02 and 5. > > The size of the gaps is approx. 3% of the perimeter of the > contour, but > > I was not able to stop the leaking. > > > > What do I have to tune to achieve a significant smoothing? > > > > > > Regards, > > Nils > > > > > > > > > > > > From luis.ibanez@kitware.com Thu Jul 10 14:58:10 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 10 Jul 2003 09:58:10 -0400 Subject: [Insight-users] Curvature in ShapeDetectionLevelSetImageFilter References: <000301c346b3$2bc24c70$0607010a@ssn4006> Message-ID: <3F0D70F2.6040500@kitware.com> This is a multi-part message in MIME format. --------------000605020500000407020604 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi Nils, I just performed a couple of tests, and the ShapeDetectionLSIF is behaving as expected. (Note that I did this with the current CVS version, not ITK 1.2). A couple of sample images that help to test your case were checked in under: - Insight/Examples/Data/Circle.png - Insight/Examples/Data/CircleSpikes.png http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Examples/Data/Circle.png?cvsroot=Insight http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Examples/Data/CircleSpikes.png?cvsroot=Insight CircleSpikes.png simulates the conditions of your tube but in 2D. The example ShapeDetectionLevelSetImageFilter was also slightly modified in order to take the scaling parameter from the command line arguments. http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Examples/Segmentation/ShapeDetectionLevelSetFilter.cxx?cvsroot=Insight&sortby=date Running this example with the parameters below succeded to segment the internal circle without taking the spikes (bridges). Note that although the segmentation doesn't goes into the spikes, they excert some influence on the shape of the final contour. Here are the parameters: ShapeDetectionLevelSetFilter input image: CirclesSpikes.png output image: SegmentedCircle.png seed point: 50 50 distance: 20 sigma: 1.0 sigmoid alpha: -40 sigmoid beta: 128 curvatureScaling: 3.1 propagationScaling: 0.97 The overlay of the segmented circle, on top of the CircleSpikes.png image is shown in the attachement. --- The balance between the curvatureScaling and the propagationScaling parameters is quite delicate. For example: keeping curvature scaling = 3.1 propagation scaling = 0.98 will overflow the whole image while prop. scaling = 0.96 will grow just to half the circle OR keeping propagation scaling = 0.97 curvature scaling = 3.0 will overflow the image curvature scaling = 3.2 will fall short on reaching the edges My guess is that it may be possible to find a continuous function F(): curvatureScaling = F( propagationScaling ) for which the segmentation grabs on the circle edges, but at some threshold of "PropagationScaling" the computation will start presenting numerical instabilities. Regards, Luis --------------------- Nils Hanssen wrote: > Hi Luis, > > thank you for the detailed answer. > > > My initial level set conforms to the "negative inside" convention. > Now, I am using a curvature weighting of 1000 (just to see what happens in > the extreme case) and a propagation weighting of 0.001. When running the > ShapeDetectionLSIF, the contour is not collapsing at all. Maybe that's > because of the feature image that dictates the curvature speed (== > propagation speed in the ShapeDetectionLSIF)? > > Since the curvature speed in the ShapeDetectionLSF equals the propagation > speed, I derived my own classes called "TubularLevelSetFunction" and > "TubularLevelSetImageFilter". These are basically clones of the > ShapeDetection* classes, but with the difference that I set the curvature > speed to (constant) one in the Level-set function. > Now, the contour is collapsing according to the mean curvature but all this > happens _very_ slowly (the curvature weighting is 1000!). > > In itk::LevelSetFunction::ComputeUpdate(...) I see the following: > --- > curvature_term = curve; > curvature_term *= m_CurvatureWeight * this->CurvatureSpeed(it, offset); > --- > so it should make no difference when I set the curvature weight to 1 and the > curvature speed to (constant) 1000 (and not vice versa), right? But when I > do this, I get numerical instabilities during the evolution. What is wrong > with my assumption? > > Luis, what was the curvature weighting and curvature speed when you tested > the collapsing contour with the syntethic sphere image? Was the curvature > speed constant or dependent on the image? > > For now, I do all calculations in 2D. Could that be a problem? I have > installed a observer that shows me the progress of the contour after each > update event. > > > Regards, > Nils > > > >>-----Original Message----- >>From: Luis Ibanez [mailto:luis.ibanez@kitware.com] >>Sent: Wednesday, July 09, 2003 6:14 PM >>To: Nils Hanssen >>Cc: Insight-users@public.kitware.com >>Subject: Re: [Insight-users] Crash in >>ShapeDetectionLevelSetImageFilter >> >> >> >>Hi Nils, >> >>You are right in your interpretation of the >>behavior for the ShapeDetectionLevelSetFilter. >> >>Increasing the curvature scaling while decreasing >>the propagation scaling should make the contour >>collapse (contract). >> >>I just verified this behavior using a syntethic >>image of a sphere. >> >>Note that in version 1.2 this filter is expecting >>the input level set to conform to the convention >>of "negative inside" which means that the level >>set has negative values 'inside' the contour and >>positive values outside the contour. >> >>You may have to push the curvature scaling to >>a value higher than 1.0. (e.g. 5.0 or so). >> >>I would avoid to use 0.0 for the propagation >>scaling ( in part just for superstition against >>zeros values as parameters). You may want to >>try something like 0.1 for the propagation >>scaling. >> >>Please verify the convention used by your initial >>level set. That may be the cause for the contour >>not behaving as expected. >> >> >>Regards, >> >> >> Luis >> >> >> >>--------------------- >>Nils Hanssen wrote: >> >>>Hi Luis, >>> >>>I am using the 1.2.0 web release. >>> >>>Regards, >>>Nils >>> >>> >>> >>>>-----Original Message----- >>>>From: insight-users-admin@itk.org >>>>[mailto:insight-users-admin@itk.org]On >>>>Behalf Of Luis Ibanez >>>>Sent: Tuesday, July 08, 2003 3:55 PM >>>>To: Nils Hanssen >>>>Cc: Insight-users@public.kitware.com >>>>Subject: Re: [Insight-users] Crash in >>>>ShapeDetectionLevelSetImageFilter >>>> >>>> >>>> >>>>Hi Nils, >>>> >>>>Are you using a very recent checkout of ITK ? >>>> >>>>The level set filters have been reworked in >>>>recent days, so it will help us to know if you >>>>are experiencing this behavior with the current >>>>version or with the version as it was two weeks >>>>ago (or before that). >>>> >>>>Please let us know, >>>> >>>> Thanks >>>> >>>> >>>> Luis >>>> >>>> >>>>------------------------ >>>>Nils Hanssen wrote: >>>> >>>> >>>>>Hi, >>>>> >>>>>I am trying to understand the behaviour of the ShapeDetectionLSIF. >>>>>Therefore, I set the propagation-weighting to zero. By setting the >>>>>curvature-weighting to a value of one I would expect that >>>> >>>>the inital >>>> >>>> >>>>>surface is shrinking to a point (I set the MaxRMSError to >>>> >>>>zero) and the >>>> >>>> >>>>>number of iterations very high. >>>>> >>>>>The filter is crashing in >>>>>SegmentationLevelSetFunction >>>>>::PropagationSpeed(const NeighborhoodType &neighborhood, const >>>>>FloatOffsetType &offset) const >>>>>[...] >>>>>--> else return ( >>>> >>>>static_cast(m_SpeedImage->GetPixel(idx)) ); >>>>// crashing here >>>> >>>> >>>>>[...] >>>>> >>>>>When I set the propagation-weighting to - for instance - >>>> >>0.0001 the >> >>>>>filter is not crashing, but the contour is not shrinking >>>> >>>>according to >>>> >>>> >>>>>the mean curvature. >>>>> >>>>>Is that the correct behaviour of the filter? >>>>> >>>>>I would appreciate any suggestions. Thanks! >>>>> >>>>> >>>>>Regards, >>>>>Nils >>>>> >>>>> >>>>>------------------------- >>>>>Nils Hanssen >>>>>Surgical Systems Laboratory >>>>>research center c ae sa r >>>>>Ludwig-Erhard-Allee 2 >>>>>53175 Bonn >>>>>fon: +49-228-9656-197 >>>>>fax: +49-228-9656-117 >>>>>___http://www.caesar.de/ssl_ >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>>_______________________________________________ >>>>Insight-users mailing list >>>>Insight-users@itk.org >>>>http://www.itk.org/mailman/listinfo/insight-users >>>> >>> >>>_______________________________________________ >>>Insight-users mailing list >>>Insight-users@itk.org >>>http://www.itk.org/mailman/listinfo/insight-users >>> >> >> >> >> > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > --------------000605020500000407020604 Content-Type: image/png; name="CircleSpikesSegmented.png" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="CircleSpikesSegmented.png" iVBORw0KGgoAAAANSUhEUgAAAhAAAAIkCAIAAADAiYVlAAAXxUlEQVR4nO3dT8gtZ30H8Hlt utBNF1epSGgrgQhFLKS7gjSEIgZ0ExLoLqvW3Q1YiZBNXhcGFBTyrrrU9U0uFITckJK8kNBd xZbEcm9yVRAKigELVmtsfbs4cZw7/853zpl/55zPh0uYd86cOTP3vZnveZ7fPPMUf/LFbxUA sM1ZURR/9M1/XfowAE7dL7/95fe+98rSR9Huqaeeuri4uG/zw2/+7Z+XPRoA7t69u/Qh9Llv 6QMA4PfefvvtfOPPfvazt27dmnT7aoZ9oPby0x//1S+//eXNn5699L+6fn/4F39jwYIFC2tb 2HgpNs/2pfdrGNUuqTIMzs/Pv/7DDxYNv/z2l7teOiD/96N//4M/+5QFCxYsrGThtz//yX+8 +I9vv/32Sy+99Pzzzxe9bt26tdmsXJho+00L4+Li4uLioiUwit7M6E+LzRs/9OTXaitrawCo +c33XqkGxk9/+tOejb/73e/WAmCi7auBUe+S2jg/P68tbGzyoL9tcXV1Ve2wOvTOK4BF/KZX 6/Z/3KFr+81bqrstf2w9pPbA+PoPP1hGRXnFf/rjvyoarYdWm8zY/Lm6utq6/fxW0l9pwYIF C9WFqvd6tW7fXNnz0nvvvXf//fcXRXH//fdv9ln9sXU/7V1SG9WOqc1/a2nx3996ur67s7OX XnppU4gv/3t2drbCLqnF+ystWLBgobpQq2HcuXOnKIqiKD7xiU8Uv3P79u3Nwg9+8INaF9Od O3c2W5bblO+9fft26/a1nVc/otx+ew2jVNYkWusQL/7tp2prHn300UMJDIBVqdUw3nrrrc36 T37yk+U2b7755mbhxz/+cS0A3nrrrc2W5Tble998883W7ZP9VwPjvq3nsEmL1pceffTR1vW3 bt3aJMfmv1s/AoCanfudmtvku+rZf9FVw9jY3BC1KV0UbeX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I9LQwAIgIDAAiAgOAiMAAIKLoPS8TYAAHSwsDgIjAACAiMACICAwAIore wDFyg8kEtDAAiAgMACICA4CIwAAgoug9MZU34FhoYQAQERgARAQGABGBAUBEYAAQERgARAQG ABGBAUBEYAAQWctI76urq6UPYRpGesMKHO0V5l5nZ2eT7l8LA4CIwAAgIjAAiAgMACJrKXof D1VuWJ+pq8EnQgsDgIjAACAiMACICAwAIgIDgIi7pMb27LP3/OimKeBYaGEAEBEYAEQEBgAR gQFARGAAEBEYAEQEBgARgQFARGAAEFlLYJwdqaX/XgFGs5bAAGDlBAYAEYEBQERgABDxeHPg GNUmGjg/X+YwjosWBgARgQFARGAAEBEYAEQUvSdmim/gWGhhABARGABEBAYAEYEBQERgABAR GABEBAYAEYEBQERgABAx0nteBn7DRGr/czEBLQwAIgIDgIjAACAiMACIKHpP6+zsrPrj1dXV UkcCJ6X2vx6j0MIAICIwAIgIDAAiAgOAiKL3ogz8hp0Z2j07LQwAIgIDgIjAACAiMACICAwA IgIDgIjAACAiMACICAwAIgIDgIhHg8xqy/QYnhQCPXqfBWICjBloYQAQERgARAQGABGBAUBE YAAQERgARAQGABGBAUBEYAAQMdJ7xZrjWo395nT0jutmEVoYAEQEBgARgQFARGAAEFH0XtKW p50D3TzPfH5aGABEBAYAEYEBQERgABBR9F6R7TVwk35zxLYN7VblXpwWBgARgQFARGAAEBEY AEQEBgARgQFARGAAEBEYAEQEBgARI73XqzmutT7228BvtnnhP/9q6UPo1ju027juFeoLjGvP PDjbcZB4/JUv9L38sR/NdBwcgmpUPP6xf1nwSDr1/nt2/VnQu8/daV3fFxhd72EpL3z1dt/L Whh0WGk74+96Wxif0cJYHTUMACICA47ZSjujOEwCA4CIu6QOyfYJM+BguS1q/bQwAIgIDAAi AgOAiMAAIKLofUQ8KYSV630WCOunhQFARGAAEBEYAEQEBgARRe8DtmXgtxo4izPjxXHRwgAg IjAAiAgMACICA4CIovfJUANnBqrcR00LA4CIwAAgIjAAiAgMACKK3qdKDZxR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j56SAjeZX5mZajKW5t2T/u3Uc5Qbt P++Xmy02di96jzhBxdCpFJIZMnY4o56d9DwCa88PhVNW9kpV1xTjXfvya2u1Q3+2L+zF7/4G yj9dm20Oqf9EZngMTBoYzefHNdWeKNc/QcUUWmdc6ClO1E6na9qGoR8KhHbrNZpi/9WcmPMB XJvCQ/mnuUEtwJLSxXRGmNO7tLVPpidsNlfqPXt19nx7V1/TpB8KrMdEBYweW+9xqt5k1Wz9 zNweGtAltbXQ3XWn02xV5eYB9Hz9361u31M70c6AfbT2yfR31PS82trZ1b//oZ8+6Hi69LQw yruYkvu79jyM0O41jOqFslpkHhQPg6ZSKO69yjdnyNjhAKqa/VTlZBU3GrOXj/WhcJqqXUNh /XaH+1OH1jDyCkr/9kP3Nsg+J5Ws2cJ8GHCs1jYfxujHM/UJjrj/tf0u+pkPA1jeuJfg9dwF u3VXo+xnWX1Fb40MOAafWfoAmkY8pKnPbtz9r/B3MYQWBgARgQFA5J4uqZs3by51HACs3PuB 8cADDzz//PND3/zUU0/t8C4A5rf/Ffv9wLh169bOu7h79+4+RwDAbPa52qthABARGABEBAYA kbOiKDZjvgGgy8XFxdKHAMCB+H9lU8ZCTqVKZwAAAABJRU5ErkJggg== --------------000605020500000407020604-- From M.Hastenteufel@dkfz-heidelberg.de Thu Jul 10 16:34:48 2003 From: M.Hastenteufel@dkfz-heidelberg.de (Mark Hastenteufel) Date: Thu, 10 Jul 2003 17:34:48 +0200 Subject: [Insight-users] 3D Ultrasound In-Reply-To: <000901c34560$b2f7ff40$6501a8c0@DINO> References: <3F0AD2B5.5090102@DKFZ.de> <000901c34560$b2f7ff40$6501a8c0@DINO> Message-ID: <3F0D8798.1010601@DKFZ.de> Hi Robert, thanks for the hint. Do you have any idea how to use this transform?. What are these methods good for: virtual void SetMaxAzimuth (long _arg) virtual void SetMaxElevation (long _arg) virtual void SetRadiusSampleSize (double _arg) virtual void SetAzimuthAngularSeparation (double _arg) virtual void SetElevationAngularSeparation (double _arg) virtual void SetFirstSampleDistance (double _arg) Thank you, Mark Robert Tamburo wrote: > It's called: itkAzimuthElevationToCartesianTransform > > ----- Original Message ----- > From: "Mark Hastenteufel" > To: "ITK Users" > Sent: Tuesday, July 08, 2003 10:18 AM > Subject: [Insight-users] 3D Ultrasound > > > >>Hello, >> >>I can remember that someone has written something about >>an itk image-filter that transforms 3D ultrasound data >>from cylindric to cartesion coordinates. >> >>I cannot find this e-mail anymore. Can someone >>help me? Does there exist a filter that does >>the transformation? >> >>Thnaks, >> >>Mark >> >> >> >> >>-- >>Mark Hastenteufel >>Deutsches Krebsforschungszentrum (German Cancer Research Center) >>Div. Medical and Biological Informatics H0100 Tel: (+49) 6221-42 2353 >>Im Neuenheimer Feld 280 Fax: (+49) 6221-42 2345 >>D-69120 Heidelberg e-mail M.Hastenteufel@DKFZ.de >>Germany http://www.dkfz.de/mbi/people/markh.html >> >> >>_______________________________________________ >>Insight-users mailing list >>Insight-users@itk.org >>http://www.itk.org/mailman/listinfo/insight-users >> -- Mark Hastenteufel Deutsches Krebsforschungszentrum (German Cancer Research Center) Div. Medical and Biological Informatics H0100 Tel: (+49) 6221-42 2353 Im Neuenheimer Feld 280 Fax: (+49) 6221-42 2345 D-69120 Heidelberg e-mail M.Hastenteufel@DKFZ.de Germany http://www.dkfz.de/mbi/people/markh.html From michakuhn@gmx.ch Thu Jul 10 16:48:36 2003 From: michakuhn@gmx.ch (Michael Kuhn) Date: Thu, 10 Jul 2003 09:48:36 -0600 Subject: [Insight-users] registration and spacing Message-ID: <3F0D8AD4.8050708@gmx.ch> Hi, I'm trying to do a registration using 3D Data (pixel type short). The general setup is as follows: The input consists of one file containing the data. The data is then transformed using a ResampleImageFilter which applies a translation to it. Afterwards, the original as well as the transformed image are fed into a ImageRegistrationMethod as fixed (original) and moving (translated) image respectively. If the spacing of both data sets is set to 1.0 (in every direction), the registration works fine. However if I scale the spacings as well as the translation vector (for the translation itself as well as the initalParameters for the registration) and the minimum/maximum step length with the same factor, the registration doesn't work any longer (i.e. produces incorrect results). The origin of the data was set to [0,0,0]. I would expect that the registration works for any common scaling of these parameters, however, it doesn't. Can somebody explain me why? My dataset has a size of [40,40,40] and I translate it with parameters FACTOR * [-1, -2, 0]. The initial parameters are set to FACTOR * [2,2,0] (where FACTOR is the common scaling factor mentioned above). The max and min step length are set to FACTOR * 4.0 and FACTOR * 0.01 respectively. For the initial transform as well as the registration I use a TranslateTransform and a LinearInterpolateImageFunction. The registration is done using a RegularStepGradientDescentOptimzer and a MeanSquaresImageToImageMetric. Thanks, Michael From lng@insightful.com Thu Jul 10 17:17:16 2003 From: lng@insightful.com (Lydia Ng) Date: Thu, 10 Jul 2003 09:17:16 -0700 Subject: [Insight-users] Curvature in ShapeDetectionLevelSetImageFilter Message-ID: Hi Nils and Luis, There is issue in the current implementation of the level set framework in that the curvature term is not taken into account when computing the time step. Ideally, the time step should computed to maintain numerical stability. Thus, setting the curvature weight is high relative to the propagation term will cause problem most likely due to the time step being too large. This is a known problem - computing the time step to meet the CFL criterion is not widely reported in the literature - a few of us is still trying to figure out what is the mathematically sound thing to do here. BTW - I have also fixed the problem of when the propagation weight is zero - it shouldn't crash now - but you will still get the numerical instability issue as above. - Lydia > -----Original Message----- > From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > Sent: Thursday, July 10, 2003 6:58 AM > To: Nils Hanssen > Cc: Insight-users@public.kitware.com > Subject: Re: [Insight-users] Curvature in > ShapeDetectionLevelSetImageFilter >=20 >=20 > Hi Nils, >=20 > I just performed a couple of tests, and the > ShapeDetectionLSIF is behaving as expected. > (Note that I did this with the current CVS > version, not ITK 1.2). >=20 > A couple of sample images that help to test > your case were checked in under: >=20 > - Insight/Examples/Data/Circle.png > - Insight/Examples/Data/CircleSpikes.png >=20 > http://www.itk.org/cgi- > bin/cvsweb.cgi/Insight/Examples/Data/Circle.png?cvsroot=3DInsight > http://www.itk.org/cgi- > = bin/cvsweb.cgi/Insight/Examples/Data/CircleSpikes.png?cvsroot=3DInsight >=20 > CircleSpikes.png simulates the conditions of your > tube but in 2D. >=20 > The example ShapeDetectionLevelSetImageFilter > was also slightly modified in order to take the > scaling parameter from the command line arguments. >=20 > http://www.itk.org/cgi- > bin/cvsweb.cgi/Insight/Examples/Segmentation/ShapeDetectionLevelSetFilte r. > cxx?cvsroot=3DInsight&sortby=3Ddate >=20 > Running this example with the parameters below > succeded to segment the internal circle without > taking the spikes (bridges). Note that although > the segmentation doesn't goes into the spikes, they > excert some influence on the shape of the final > contour. >=20 > Here are the parameters: >=20 > ShapeDetectionLevelSetFilter >=20 > input image: CirclesSpikes.png > output image: SegmentedCircle.png > seed point: 50 50 > distance: 20 > sigma: 1.0 > sigmoid alpha: -40 > sigmoid beta: 128 > curvatureScaling: 3.1 > propagationScaling: 0.97 >=20 > The overlay of the segmented circle, on top > of the CircleSpikes.png image is shown in > the attachement. >=20 > --- >=20 > The balance between the curvatureScaling and the > propagationScaling parameters is quite delicate. >=20 > For example: >=20 > keeping curvature scaling =3D 3.1 > propagation scaling =3D 0.98 will overflow the whole image > while prop. scaling =3D 0.96 will grow just to half the circle >=20 > OR >=20 > keeping propagation scaling =3D 0.97 > curvature scaling =3D 3.0 will overflow the image > curvature scaling =3D 3.2 will fall short on reaching the edges >=20 >=20 >=20 > My guess is that it may be possible to find a > continuous function F(): >=20 > curvatureScaling =3D F( propagationScaling ) >=20 > for which the segmentation grabs on the circle edges, > but at some threshold of "PropagationScaling" the > computation will start presenting numerical > instabilities. >=20 >=20 >=20 >=20 > Regards, >=20 >=20 >=20 > Luis >=20 >=20 >=20 > --------------------- > Nils Hanssen wrote: > > Hi Luis, > > > > thank you for the detailed answer. > > > > > > My initial level set conforms to the "negative inside" convention. > > Now, I am using a curvature weighting of 1000 (just to see what happens > in > > the extreme case) and a propagation weighting of 0.001. When running the > > ShapeDetectionLSIF, the contour is not collapsing at all. Maybe that's > > because of the feature image that dictates the curvature speed = (=3D=3D > > propagation speed in the ShapeDetectionLSIF)? > > > > Since the curvature speed in the ShapeDetectionLSF equals the > propagation > > speed, I derived my own classes called "TubularLevelSetFunction" and > > "TubularLevelSetImageFilter". These are basically clones of the > > ShapeDetection* classes, but with the difference that I set the > curvature > > speed to (constant) one in the Level-set function. > > Now, the contour is collapsing according to the mean curvature but all > this > > happens _very_ slowly (the curvature weighting is 1000!). > > > > In itk::LevelSetFunction::ComputeUpdate(...) I see the following: > > --- > > curvature_term =3D curve; > > curvature_term *=3D m_CurvatureWeight * this->CurvatureSpeed(it, > offset); > > --- > > so it should make no difference when I set the curvature weight to 1 and > the > > curvature speed to (constant) 1000 (and not vice versa), right? But when > I > > do this, I get numerical instabilities during the evolution. What is > wrong > > with my assumption? > > > > Luis, what was the curvature weighting and curvature speed when you > tested > > the collapsing contour with the syntethic sphere image? Was the > curvature > > speed constant or dependent on the image? > > > > For now, I do all calculations in 2D. Could that be a problem? I have > > installed a observer that shows me the progress of the contour after > each > > update event. > > > > > > Regards, > > Nils > > > > > > > >>-----Original Message----- > >>From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > >>Sent: Wednesday, July 09, 2003 6:14 PM > >>To: Nils Hanssen > >>Cc: Insight-users@public.kitware.com > >>Subject: Re: [Insight-users] Crash in > >>ShapeDetectionLevelSetImageFilter > >> > >> > >> > >>Hi Nils, > >> > >>You are right in your interpretation of the > >>behavior for the ShapeDetectionLevelSetFilter. > >> > >>Increasing the curvature scaling while decreasing > >>the propagation scaling should make the contour > >>collapse (contract). > >> > >>I just verified this behavior using a syntethic > >>image of a sphere. > >> > >>Note that in version 1.2 this filter is expecting > >>the input level set to conform to the convention > >>of "negative inside" which means that the level > >>set has negative values 'inside' the contour and > >>positive values outside the contour. > >> > >>You may have to push the curvature scaling to > >>a value higher than 1.0. (e.g. 5.0 or so). > >> > >>I would avoid to use 0.0 for the propagation > >>scaling ( in part just for superstition against > >>zeros values as parameters). You may want to > >>try something like 0.1 for the propagation > >>scaling. > >> > >>Please verify the convention used by your initial > >>level set. That may be the cause for the contour > >>not behaving as expected. > >> > >> > >>Regards, > >> > >> > >> Luis > >> > >> > >> > >>--------------------- > >>Nils Hanssen wrote: > >> > >>>Hi Luis, > >>> > >>>I am using the 1.2.0 web release. > >>> > >>>Regards, > >>>Nils > >>> > >>> > >>> > >>>>-----Original Message----- > >>>>From: insight-users-admin@itk.org > >>>>[mailto:insight-users-admin@itk.org]On > >>>>Behalf Of Luis Ibanez > >>>>Sent: Tuesday, July 08, 2003 3:55 PM > >>>>To: Nils Hanssen > >>>>Cc: Insight-users@public.kitware.com > >>>>Subject: Re: [Insight-users] Crash in > >>>>ShapeDetectionLevelSetImageFilter > >>>> > >>>> > >>>> > >>>>Hi Nils, > >>>> > >>>>Are you using a very recent checkout of ITK ? > >>>> > >>>>The level set filters have been reworked in > >>>>recent days, so it will help us to know if you > >>>>are experiencing this behavior with the current > >>>>version or with the version as it was two weeks > >>>>ago (or before that). > >>>> > >>>>Please let us know, > >>>> > >>>> Thanks > >>>> > >>>> > >>>> Luis > >>>> > >>>> > >>>>------------------------ > >>>>Nils Hanssen wrote: > >>>> > >>>> > >>>>>Hi, > >>>>> > >>>>>I am trying to understand the behaviour of the ShapeDetectionLSIF. > >>>>>Therefore, I set the propagation-weighting to zero. By setting the > >>>>>curvature-weighting to a value of one I would expect that > >>>> > >>>>the inital > >>>> > >>>> > >>>>>surface is shrinking to a point (I set the MaxRMSError to > >>>> > >>>>zero) and the > >>>> > >>>> > >>>>>number of iterations very high. > >>>>> > >>>>>The filter is crashing in > >>>>>SegmentationLevelSetFunction > >>>>>::PropagationSpeed(const NeighborhoodType &neighborhood, const > >>>>>FloatOffsetType &offset) const > >>>>>[...] > >>>>>--> else return ( > >>>> > >>>>static_cast(m_SpeedImage->GetPixel(idx)) ); > >>>>// crashing here > >>>> > >>>> > >>>>>[...] > >>>>> > >>>>>When I set the propagation-weighting to - for instance - > >>>> > >>0.0001 the > >> > >>>>>filter is not crashing, but the contour is not shrinking > >>>> > >>>>according to > >>>> > >>>> > >>>>>the mean curvature. > >>>>> > >>>>>Is that the correct behaviour of the filter? > >>>>> > >>>>>I would appreciate any suggestions. Thanks! > >>>>> > >>>>> > >>>>>Regards, > >>>>>Nils > >>>>> > >>>>> > >>>>>------------------------- > >>>>>Nils Hanssen > >>>>>Surgical Systems Laboratory > >>>>>research center c ae sa r > >>>>>Ludwig-Erhard-Allee 2 > >>>>>53175 Bonn > >>>>>fon: +49-228-9656-197 > >>>>>fax: +49-228-9656-117 > >>>>>___http://www.caesar.de/ssl_ > >>>>> > >>>>> > >>>>> > >>>> > >>>> > >>>> > >>>>_______________________________________________ > >>>>Insight-users mailing list > >>>>Insight-users@itk.org > >>>>http://www.itk.org/mailman/listinfo/insight-users > >>>> > >>> > >>>_______________________________________________ > >>>Insight-users mailing list > >>>Insight-users@itk.org > >>>http://www.itk.org/mailman/listinfo/insight-users > >>> > >> > >> > >> > >> > > > > _______________________________________________ > > Insight-users mailing list > > Insight-users@itk.org > > http://www.itk.org/mailman/listinfo/insight-users > > >=20 From luis.ibanez@kitware.com Thu Jul 10 21:52:59 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 10 Jul 2003 16:52:59 -0400 Subject: [Insight-users] registration and spacing References: <3F0D8AD4.8050708@gmx.ch> Message-ID: <3F0DD22B.6010201@kitware.com> Hi Michael, It is normal that the registration fails in the setup that you are configuring. Your ImageRegistrationMethod is using a "TranslationTransform". This transform cannot compensate for the scaling changes that you are introducing when you change the pixel spacing. If you want to compensate for translation and scaling you may have to use a "SimilarityTransform" which is the simplest transform capable of managing both translation and scaling. You could also go one step further and use an "AffineTransform". Your expectation of the registration to work with a common scaling of the factors you altered, seems to be based on the assumption that registraion is performed in pixel space. That is, in the discrete grid of the images. However, registration in ITK is not performed in the pixel space. It is performed in the physical space in millimeters. When you scale the pixel spacing of one image, you create the conditions for registering two objects that have different physical sizes. The correspondance between these two object can only be achieved with a Transform supporting some form of scaling factor. --- Just on the side: Note that a scale factor of 2X is quite aggresive. In normal conditions in medical image registration we would not expect to find such a huge scale factor in normal anatomical structures, unless you were comparing infants with adults. E.g. For reference: In humans, the size of the brain in the newborn is about 25% of its adult size and it reaches about 75 % of its adult size by the end of the first year. Regards Luis ----------------------- Michael Kuhn wrote: > Hi, > > I'm trying to do a registration using 3D Data (pixel type short). The > general setup is as follows: > > The input consists of one file containing the data. The data is then > transformed using a ResampleImageFilter which applies a translation to > it. Afterwards, the original as well as the transformed image are fed > into a ImageRegistrationMethod as fixed (original) and moving > (translated) image respectively. > > If the spacing of both data sets is set to 1.0 (in every direction), the > registration works fine. However if I scale the spacings as well as the > translation vector (for the translation itself as well as the > initalParameters for the registration) and the minimum/maximum step > length with the same factor, the registration doesn't work any longer > (i.e. produces incorrect results). The origin of the data was set to > [0,0,0]. > > I would expect that the registration works for any common scaling of > these parameters, however, it doesn't. Can somebody explain me why? > > My dataset has a size of [40,40,40] and I translate it with parameters > FACTOR * [-1, -2, 0]. The initial parameters are set to FACTOR * [2,2,0] > (where FACTOR is the common scaling factor mentioned above). The max and > min step length are set to FACTOR * 4.0 and FACTOR * 0.01 respectively. > > For the initial transform as well as the registration I use a > TranslateTransform and a > LinearInterpolateImageFunction. The registration is > done using a RegularStepGradientDescentOptimzer and a > MeanSquaresImageToImageMetric. > > Thanks, > > Michael > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From kshivann@engineering.uiowa.edu Thu Jul 10 22:18:26 2003 From: kshivann@engineering.uiowa.edu (kshivann) Date: Thu, 10 Jul 2003 16:18:26 -0500 Subject: [Insight-users] (no subject) Message-ID: <3ED9C3FD@webmail.engineering.uiowa.edu> hi, i am trying to link itk with vtk. in the example given in the webpage http://www.itk.org/HTML/MRIRegistration.htm it is given to enter VTK_BINARY_PATH:PATH=location_of_your VTK binary tree and run cmake . where should i enter the path and can i add any extra item in CMake GUI kiran From luis.ibanez@kitware.com Thu Jul 10 22:26:09 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 10 Jul 2003 17:26:09 -0400 Subject: [Insight-users] (no subject) References: <3ED9C3FD@webmail.engineering.uiowa.edu> Message-ID: <3F0DD9F1.2090302@kitware.com> Hi Kiran, If you are using a recent checkout of the ITK cvs repository, this directory is called now: "VTK_DIR" This entry It should appear in the CMake GUI when you provide the source directory of InsightApplications. Note that the MRIRegistration application is not configured to be built in isolation. Instead, it is intended to be built along with all the other applications in "InsightApplications". Regards, Luis -------------------- kshivann wrote: > hi, > i am trying to link itk with vtk. in the example given in the webpage > http://www.itk.org/HTML/MRIRegistration.htm it is given to enter > VTK_BINARY_PATH:PATH=location_of_your VTK binary tree and run cmake . > where should i enter the path and can i add any extra item in CMake GUI > > kiran > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Thu Jul 10 22:42:37 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 10 Jul 2003 17:42:37 -0400 Subject: [Insight-users] Clusters and MPI References: <20030704144852.A23277@mundroo.cs.mu.OZ.AU> Message-ID: <3F0DDDCD.60503@kitware.com> Hi Gavin, ITK's design wasn't intended for clusters. At this point there are no plans for adding this support to the toolkit. You could, however, adapt specific ITK filters to be executed in a distributed environment. This will be more of a hand-picked set of filters, since you will have to make sure that the algorithmic nature of the filter is well suited for a distributed environment. For example, filters requiring the whole input image in order to compute a region of the output, will not be appropriate for a distributed environment. This basically eliminates most of the registration methods, as well as the region growing segmentation methods. There is some hope for the LevelSet segmentation methods, but taking into account that the different processes would have to synchronize their boundaries at every iteration of the PDE solver. One interesting option for registration methods in a distributed environment are those based on evolutionary algorithms, since we could imagine multiple processor computing the fitness function of the different member of the population (e.g. the image metrics of different combinations of transform parameters), and then syncrhonizing for performing the genetic selection and introducing new variability in the gene pool. --- Even if support for distributed processing were added to the toolkit, this could only be used by filters whose output can be computed from a bounded region of the input. This is probably only the case for the low level image processing filters in ITK. ---- Are you interested in a particular application of medical image processing ? For a specific task, there may be some alternatives for taking advantage of your cluster when using ITK. Regards, Luis --------------------- Gavin Baker wrote: > Hello all, > > What is the current state of clustering support with ITK? > > A few people have mentioned using ITK in clusters using MPI: > > http://www.itk.org/pipermail/insight-users/2003-January/002181.html > http://www.itk.org/pipermail/insight-users/2003-October/003633.html > > Has anyone made any progress with this? Are there any official plans to add > MPI support? > > I understand ITK has multi-threading support built in, but does not yet > support MPI. I know that VTK has MPI support - how much of this could be > adapted to ITK? > > Would it be feasible to use MPI to connect pipelines, or would it be better > to adapt the multi-threading infrastructure to optionally use MPI? > > Thanks for any info, > > :: Gavin > From lng@insightful.com Thu Jul 10 22:56:04 2003 From: lng@insightful.com (Lydia Ng) Date: Thu, 10 Jul 2003 14:56:04 -0700 Subject: [Insight-users] registration and spacing Message-ID: Hi Michael, I don't see any thing obvious problem in the code. Now that we've verify that the resampling is correct, let's play around with some of the optimizer's parameters. Say for your PNG example, what you say the registration doesn't work for FACTOR > 4 - what is actually happening? No converging to the solution but heading towards it or has the optimization move wildly away? If is the former, perhaps you could try increasing the parameters to FACTOR * FACTOR * minStep and FACTOR * FACTOR * maxStep? Since the metric derivative have reduced due to reduction in image derivative as a result in the increase spacing - on the other hand the optimization now also have twice as far to move? - Lydia > -----Original Message----- > From: Michael Kuhn [mailto:michakuhn@gmx.ch] > Sent: Thursday, July 10, 2003 11:27 AM > To: Lydia Ng > Cc: stepmose@ee.ethz.ch > Subject: Re: [Insight-users] registration and spacing >=20 > Hi Lydia, >=20 > thanks for the reply. I've attached the whole code that I'm using. It is > able to process png images and aim images (a 3D data type used for CT > images by some people). >=20 > There are some classes included which you don't have (vtkUtility, > vtkAIMReader). Therefore it won't compile for you. However, I could > rewrite it such that it should compile without these classes for png > images if necessary. >=20 > I've meanwhile written out the images and they seem to be ok. I had to > introduce a RescaleIntesityImageFilter to cast from short to unsigned > char/short, since, obviously, short isn't supported for writing PNG > images (at least I got an exception telling me so). First I tried to > change PixelType (right at the beginning of main()) to unsigned short, > however, the registration didn't work properly anymore then. >=20 > Anyway, the images (in the case of png) seem to be ok for me before > feeding them into the registration for different FACTORs (FACTOR is > defined using a #define statement directely after the #include > statements). However, the registration doesn't always work properly: If > FACTOR is larger than about 4, the registration produces results that > don't make sense. If FACTOR is smaller that 0.1, the registration > doesn't iterate but creates an end event immediately after the start > event and results in the initial parameters. In case of my 3D AIM data, > the behaviour was slightly different. There, it didn't produce any > reasonable results for FACTORs of 1.1 or 0.9 already, but always iterated. >=20 > I hope this informations help you to understand the problem. >=20 > Thanks, >=20 > Michael >=20 >=20 > Lydia Ng wrote: >=20 > >Hi Michael, > > > >>From you email I understand you are doing the following: > > > >- You have one input image (A) > >- You feed (A) into a ResampleImageFilter with a TranslationTransform > >and > > you get image (B) > >- Then you register (A) and (B) > > > >And everything works for spacing of 1.0 in every dimension. > > > >You said that you scale the spacing by a FACTOR, could you describe how > >you did this? I am wondering if the parameters of the > >ResampleImageFilter are set correctly. In particular, you would have to > >set the spacing of the output to be FACTOR also? Are you able write out > >the images (just before registration) to file just to check they are > >okay? > > > >- Lydia > > > > > > > >>-----Original Message----- > >>From: Michael Kuhn [mailto:michakuhn@gmx.ch] > >>Sent: Thursday, July 10, 2003 8:49 AM > >>To: insight-users@itk.org > >>Subject: [Insight-users] registration and spacing > >> > >>Hi, > >> > >>I'm trying to do a registration using 3D Data (pixel type short). The > >>general setup is as follows: > >> > >>The input consists of one file containing the data. The data is then > >>transformed using a ResampleImageFilter which applies a translation to > >>it. Afterwards, the original as well as the transformed image are fed > >>into a ImageRegistrationMethod as fixed (original) and moving > >>(translated) image respectively. > >> > >>If the spacing of both data sets is set to 1.0 (in every direction), > >> > >> > >the > > > > > >>registration works fine. However if I scale the spacings as well as > >> > >> > >the > > > > > >>translation vector (for the translation itself as well as the > >>initalParameters for the registration) and the minimum/maximum step > >>length with the same factor, the registration doesn't work any longer > >>(i.e. produces incorrect results). The origin of the data was set to > >>[0,0,0]. > >> > >>I would expect that the registration works for any common scaling of > >>these parameters, however, it doesn't. Can somebody explain me why? > >> > >>My dataset has a size of [40,40,40] and I translate it with parameters > >>FACTOR * [-1, -2, 0]. The initial parameters are set to FACTOR * > >> > >> > >[2,2,0] > > > > > >>(where FACTOR is the common scaling factor mentioned above). The max > >> > >> > >and > > > > > >>min step length are set to FACTOR * 4.0 and FACTOR * 0.01 > >> > >> > >respectively. > > > > > >>For the initial transform as well as the registration I use a > >>TranslateTransform and a > >>LinearInterpolateImageFunction. The registration is > >>done using a RegularStepGradientDescentOptimzer and a > >>MeanSquaresImageToImageMetric. > >> > >>Thanks, > >> > >>Michael > >> > >>_______________________________________________ > >>Insight-users mailing list > >>Insight-users@itk.org > >>http://www.itk.org/mailman/listinfo/insight-users > >> > >> > > > > > > > > From cates@sci.utah.edu Thu Jul 10 23:28:24 2003 From: cates@sci.utah.edu (Joshua Cates) Date: Thu, 10 Jul 2003 16:28:24 -0600 (MDT) Subject: [Insight-users] Curvature in ShapeDetectionLevelSetImageFilter In-Reply-To: Message-ID: Hi Lydia, Can you send Ross and I an example of data/parameters which cause problems in (ideally) one of the Example applications? We'll hack on this next week. thanks, Josh. ______________________________ Josh Cates School of Computer Science University of Utah Email: cates@sci.utah.edu Phone: (801) 587-7697 URL: http://www.sci.utah.edu/~cates On Thu, 10 Jul 2003, Lydia Ng wrote: > Hi Nils and Luis, > > There is issue in the current implementation of the level set framework > in that the curvature term is not taken into account when computing the > time step. Ideally, the time step should computed to maintain numerical > stability. > > Thus, setting the curvature weight is high relative to the propagation > term will cause problem most likely due to the time step being too > large. > > This is a known problem - computing the time step to meet the CFL > criterion is not widely reported in the literature - a few of us is > still trying to figure out what is the mathematically sound thing to do > here. > > BTW - I have also fixed the problem of when the propagation weight is > zero - it shouldn't crash now - but you will still get the numerical > instability issue as above. > > - Lydia > > > -----Original Message----- > > From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > > Sent: Thursday, July 10, 2003 6:58 AM > > To: Nils Hanssen > > Cc: Insight-users@public.kitware.com > > Subject: Re: [Insight-users] Curvature in > > ShapeDetectionLevelSetImageFilter > > > > > > Hi Nils, > > > > I just performed a couple of tests, and the > > ShapeDetectionLSIF is behaving as expected. > > (Note that I did this with the current CVS > > version, not ITK 1.2). > > > > A couple of sample images that help to test > > your case were checked in under: > > > > - Insight/Examples/Data/Circle.png > > - Insight/Examples/Data/CircleSpikes.png > > > > http://www.itk.org/cgi- > > bin/cvsweb.cgi/Insight/Examples/Data/Circle.png?cvsroot=Insight > > http://www.itk.org/cgi- > > bin/cvsweb.cgi/Insight/Examples/Data/CircleSpikes.png?cvsroot=Insight > > > > CircleSpikes.png simulates the conditions of your > > tube but in 2D. > > > > The example ShapeDetectionLevelSetImageFilter > > was also slightly modified in order to take the > > scaling parameter from the command line arguments. > > > > http://www.itk.org/cgi- > > > bin/cvsweb.cgi/Insight/Examples/Segmentation/ShapeDetectionLevelSetFilte > r. > > cxx?cvsroot=Insight&sortby=date > > > > Running this example with the parameters below > > succeded to segment the internal circle without > > taking the spikes (bridges). Note that although > > the segmentation doesn't goes into the spikes, they > > excert some influence on the shape of the final > > contour. > > > > Here are the parameters: > > > > ShapeDetectionLevelSetFilter > > > > input image: CirclesSpikes.png > > output image: SegmentedCircle.png > > seed point: 50 50 > > distance: 20 > > sigma: 1.0 > > sigmoid alpha: -40 > > sigmoid beta: 128 > > curvatureScaling: 3.1 > > propagationScaling: 0.97 > > > > The overlay of the segmented circle, on top > > of the CircleSpikes.png image is shown in > > the attachement. > > > > --- > > > > The balance between the curvatureScaling and the > > propagationScaling parameters is quite delicate. > > > > For example: > > > > keeping curvature scaling = 3.1 > > propagation scaling = 0.98 will overflow the whole image > > while prop. scaling = 0.96 will grow just to half the circle > > > > OR > > > > keeping propagation scaling = 0.97 > > curvature scaling = 3.0 will overflow the image > > curvature scaling = 3.2 will fall short on reaching the edges > > > > > > > > My guess is that it may be possible to find a > > continuous function F(): > > > > curvatureScaling = F( propagationScaling ) > > > > for which the segmentation grabs on the circle edges, > > but at some threshold of "PropagationScaling" the > > computation will start presenting numerical > > instabilities. > > > > > > > > > > Regards, > > > > > > > > Luis > > > > > > > > --------------------- > > Nils Hanssen wrote: > > > Hi Luis, > > > > > > thank you for the detailed answer. > > > > > > > > > My initial level set conforms to the "negative inside" convention. > > > Now, I am using a curvature weighting of 1000 (just to see what > happens > > in > > > the extreme case) and a propagation weighting of 0.001. When running > the > > > ShapeDetectionLSIF, the contour is not collapsing at all. Maybe > that's > > > because of the feature image that dictates the curvature speed (== > > > propagation speed in the ShapeDetectionLSIF)? > > > > > > Since the curvature speed in the ShapeDetectionLSF equals the > > propagation > > > speed, I derived my own classes called "TubularLevelSetFunction" and > > > "TubularLevelSetImageFilter". These are basically clones of the > > > ShapeDetection* classes, but with the difference that I set the > > curvature > > > speed to (constant) one in the Level-set function. > > > Now, the contour is collapsing according to the mean curvature but > all > > this > > > happens _very_ slowly (the curvature weighting is 1000!). > > > > > > In itk::LevelSetFunction::ComputeUpdate(...) I see the following: > > > --- > > > curvature_term = curve; > > > curvature_term *= m_CurvatureWeight * this->CurvatureSpeed(it, > > offset); > > > --- > > > so it should make no difference when I set the curvature weight to 1 > and > > the > > > curvature speed to (constant) 1000 (and not vice versa), right? But > when > > I > > > do this, I get numerical instabilities during the evolution. What is > > wrong > > > with my assumption? > > > > > > Luis, what was the curvature weighting and curvature speed when you > > tested > > > the collapsing contour with the syntethic sphere image? Was the > > curvature > > > speed constant or dependent on the image? > > > > > > For now, I do all calculations in 2D. Could that be a problem? I > have > > > installed a observer that shows me the progress of the contour after > > each > > > update event. > > > > > > > > > Regards, > > > Nils > > > > > > > > > > > >>-----Original Message----- > > >>From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > > >>Sent: Wednesday, July 09, 2003 6:14 PM > > >>To: Nils Hanssen > > >>Cc: Insight-users@public.kitware.com > > >>Subject: Re: [Insight-users] Crash in > > >>ShapeDetectionLevelSetImageFilter > > >> > > >> > > >> > > >>Hi Nils, > > >> > > >>You are right in your interpretation of the > > >>behavior for the ShapeDetectionLevelSetFilter. > > >> > > >>Increasing the curvature scaling while decreasing > > >>the propagation scaling should make the contour > > >>collapse (contract). > > >> > > >>I just verified this behavior using a syntethic > > >>image of a sphere. > > >> > > >>Note that in version 1.2 this filter is expecting > > >>the input level set to conform to the convention > > >>of "negative inside" which means that the level > > >>set has negative values 'inside' the contour and > > >>positive values outside the contour. > > >> > > >>You may have to push the curvature scaling to > > >>a value higher than 1.0. (e.g. 5.0 or so). > > >> > > >>I would avoid to use 0.0 for the propagation > > >>scaling ( in part just for superstition against > > >>zeros values as parameters). You may want to > > >>try something like 0.1 for the propagation > > >>scaling. > > >> > > >>Please verify the convention used by your initial > > >>level set. That may be the cause for the contour > > >>not behaving as expected. > > >> > > >> > > >>Regards, > > >> > > >> > > >> Luis > > >> > > >> > > >> > > >>--------------------- > > >>Nils Hanssen wrote: > > >> > > >>>Hi Luis, > > >>> > > >>>I am using the 1.2.0 web release. > > >>> > > >>>Regards, > > >>>Nils > > >>> > > >>> > > >>> > > >>>>-----Original Message----- > > >>>>From: insight-users-admin@itk.org > > >>>>[mailto:insight-users-admin@itk.org]On > > >>>>Behalf Of Luis Ibanez > > >>>>Sent: Tuesday, July 08, 2003 3:55 PM > > >>>>To: Nils Hanssen > > >>>>Cc: Insight-users@public.kitware.com > > >>>>Subject: Re: [Insight-users] Crash in > > >>>>ShapeDetectionLevelSetImageFilter > > >>>> > > >>>> > > >>>> > > >>>>Hi Nils, > > >>>> > > >>>>Are you using a very recent checkout of ITK ? > > >>>> > > >>>>The level set filters have been reworked in > > >>>>recent days, so it will help us to know if you > > >>>>are experiencing this behavior with the current > > >>>>version or with the version as it was two weeks > > >>>>ago (or before that). > > >>>> > > >>>>Please let us know, > > >>>> > > >>>> Thanks > > >>>> > > >>>> > > >>>> Luis > > >>>> > > >>>> > > >>>>------------------------ > > >>>>Nils Hanssen wrote: > > >>>> > > >>>> > > >>>>>Hi, > > >>>>> > > >>>>>I am trying to understand the behaviour of the > ShapeDetectionLSIF. > > >>>>>Therefore, I set the propagation-weighting to zero. By setting > the > > >>>>>curvature-weighting to a value of one I would expect that > > >>>> > > >>>>the inital > > >>>> > > >>>> > > >>>>>surface is shrinking to a point (I set the MaxRMSError to > > >>>> > > >>>>zero) and the > > >>>> > > >>>> > > >>>>>number of iterations very high. > > >>>>> > > >>>>>The filter is crashing in > > >>>>>SegmentationLevelSetFunction > > >>>>>::PropagationSpeed(const NeighborhoodType &neighborhood, const > > >>>>>FloatOffsetType &offset) const > > >>>>>[...] > > >>>>>--> else return ( > > >>>> > > >>>>static_cast(m_SpeedImage->GetPixel(idx)) ); > > >>>>// crashing here > > >>>> > > >>>> > > >>>>>[...] > > >>>>> > > >>>>>When I set the propagation-weighting to - for instance - > > >>>> > > >>0.0001 the > > >> > > >>>>>filter is not crashing, but the contour is not shrinking > > >>>> > > >>>>according to > > >>>> > > >>>> > > >>>>>the mean curvature. > > >>>>> > > >>>>>Is that the correct behaviour of the filter? > > >>>>> > > >>>>>I would appreciate any suggestions. Thanks! > > >>>>> > > >>>>> > > >>>>>Regards, > > >>>>>Nils > > >>>>> > > >>>>> > > >>>>>------------------------- > > >>>>>Nils Hanssen > > >>>>>Surgical Systems Laboratory > > >>>>>research center c ae sa r > > >>>>>Ludwig-Erhard-Allee 2 > > >>>>>53175 Bonn > > >>>>>fon: +49-228-9656-197 > > >>>>>fax: +49-228-9656-117 > > >>>>>___http://www.caesar.de/ssl_ > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>>> > > >>>> > > >>>>_______________________________________________ > > >>>>Insight-users mailing list > > >>>>Insight-users@itk.org > > >>>>http://www.itk.org/mailman/listinfo/insight-users > > >>>> > > >>> > > >>>_______________________________________________ > > >>>Insight-users mailing list > > >>>Insight-users@itk.org > > >>>http://www.itk.org/mailman/listinfo/insight-users > > >>> > > >> > > >> > > >> > > >> > > > > > > _______________________________________________ > > > Insight-users mailing list > > > Insight-users@itk.org > > > http://www.itk.org/mailman/listinfo/insight-users > > > > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From lng@insightful.com Fri Jul 11 00:41:54 2003 From: lng@insightful.com (Lydia Ng) Date: Thu, 10 Jul 2003 16:41:54 -0700 Subject: [Insight-users] Curvature in ShapeDetectionLevelSetImageFilter Message-ID: Hi Josh and Nils, =20 Actually I did tried to get one of my Examples to illustrate this problem but I actually couldn't since in the Examples the CurvatureSpeed() is between 0 and 1. I believe Nils derived his own classes and set the CurvatureSpeed() to a high value. Nils: would you be able to post your code/test illustrating the numerical instability problem? - Lydia > -----Original Message----- > From: Joshua Cates [mailto:cates@sci.utah.edu] > Sent: Thursday, July 10, 2003 3:28 PM > To: Lydia Ng > Cc: Luis Ibanez; Nils Hanssen; Insight-users@public.kitware.com > Subject: RE: [Insight-users] Curvature in > ShapeDetectionLevelSetImageFilter >=20 > Hi Lydia, >=20 > Can you send Ross and I an example of data/parameters which cause problems > in (ideally) one of the Example applications? We'll hack on this next > week. >=20 > thanks, >=20 > Josh. >=20 > ______________________________ > Josh Cates > School of Computer Science > University of Utah > Email: cates@sci.utah.edu > Phone: (801) 587-7697 > URL: http://www.sci.utah.edu/~cates >=20 >=20 > On Thu, 10 Jul 2003, Lydia Ng wrote: >=20 > > Hi Nils and Luis, > > > > There is issue in the current implementation of the level set framework > > in that the curvature term is not taken into account when computing the > > time step. Ideally, the time step should computed to maintain numerical > > stability. > > > > Thus, setting the curvature weight is high relative to the propagation > > term will cause problem most likely due to the time step being too > > large. > > > > This is a known problem - computing the time step to meet the CFL > > criterion is not widely reported in the literature - a few of us is > > still trying to figure out what is the mathematically sound thing to do > > here. > > > > BTW - I have also fixed the problem of when the propagation weight is > > zero - it shouldn't crash now - but you will still get the numerical > > instability issue as above. > > > > - Lydia > > > > > -----Original Message----- > > > From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > > > Sent: Thursday, July 10, 2003 6:58 AM > > > To: Nils Hanssen > > > Cc: Insight-users@public.kitware.com > > > Subject: Re: [Insight-users] Curvature in > > > ShapeDetectionLevelSetImageFilter > > > > > > > > > Hi Nils, > > > > > > I just performed a couple of tests, and the > > > ShapeDetectionLSIF is behaving as expected. > > > (Note that I did this with the current CVS > > > version, not ITK 1.2). > > > > > > A couple of sample images that help to test > > > your case were checked in under: > > > > > > - Insight/Examples/Data/Circle.png > > > - Insight/Examples/Data/CircleSpikes.png > > > > > > http://www.itk.org/cgi- > > > bin/cvsweb.cgi/Insight/Examples/Data/Circle.png?cvsroot=3DInsight > > > http://www.itk.org/cgi- > > > bin/cvsweb.cgi/Insight/Examples/Data/CircleSpikes.png?cvsroot=3DInsight > > > > > > CircleSpikes.png simulates the conditions of your > > > tube but in 2D. > > > > > > The example ShapeDetectionLevelSetImageFilter > > > was also slightly modified in order to take the > > > scaling parameter from the command line arguments. > > > > > > http://www.itk.org/cgi- > > > > > bin/cvsweb.cgi/Insight/Examples/Segmentation/ShapeDetectionLevelSetFilte > > r. > > > cxx?cvsroot=3DInsight&sortby=3Ddate > > > > > > Running this example with the parameters below > > > succeded to segment the internal circle without > > > taking the spikes (bridges). Note that although > > > the segmentation doesn't goes into the spikes, they > > > excert some influence on the shape of the final > > > contour. > > > > > > Here are the parameters: > > > > > > ShapeDetectionLevelSetFilter > > > > > > input image: CirclesSpikes.png > > > output image: SegmentedCircle.png > > > seed point: 50 50 > > > distance: 20 > > > sigma: 1.0 > > > sigmoid alpha: -40 > > > sigmoid beta: 128 > > > curvatureScaling: 3.1 > > > propagationScaling: 0.97 > > > > > > The overlay of the segmented circle, on top > > > of the CircleSpikes.png image is shown in > > > the attachement. > > > > > > --- > > > > > > The balance between the curvatureScaling and the > > > propagationScaling parameters is quite delicate. > > > > > > For example: > > > > > > keeping curvature scaling =3D 3.1 > > > propagation scaling =3D 0.98 will overflow the whole image > > > while prop. scaling =3D 0.96 will grow just to half the circle > > > > > > OR > > > > > > keeping propagation scaling =3D 0.97 > > > curvature scaling =3D 3.0 will overflow the image > > > curvature scaling =3D 3.2 will fall short on reaching the edges > > > > > > > > > > > > My guess is that it may be possible to find a > > > continuous function F(): > > > > > > curvatureScaling =3D F( propagationScaling ) > > > > > > for which the segmentation grabs on the circle edges, > > > but at some threshold of "PropagationScaling" the > > > computation will start presenting numerical > > > instabilities. > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > Luis > > > > > > > > > > > > --------------------- > > > Nils Hanssen wrote: > > > > Hi Luis, > > > > > > > > thank you for the detailed answer. > > > > > > > > > > > > My initial level set conforms to the "negative inside" convention. > > > > Now, I am using a curvature weighting of 1000 (just to see what > > happens > > > in > > > > the extreme case) and a propagation weighting of 0.001. When running > > the > > > > ShapeDetectionLSIF, the contour is not collapsing at all. Maybe > > that's > > > > because of the feature image that dictates the curvature speed (=3D=3D > > > > propagation speed in the ShapeDetectionLSIF)? > > > > > > > > Since the curvature speed in the ShapeDetectionLSF equals the > > > propagation > > > > speed, I derived my own classes called "TubularLevelSetFunction" and > > > > "TubularLevelSetImageFilter". These are basically clones of the > > > > ShapeDetection* classes, but with the difference that I set the > > > curvature > > > > speed to (constant) one in the Level-set function. > > > > Now, the contour is collapsing according to the mean curvature but > > all > > > this > > > > happens _very_ slowly (the curvature weighting is 1000!). > > > > > > > > In itk::LevelSetFunction::ComputeUpdate(...) I see the following: > > > > --- > > > > curvature_term =3D curve; > > > > curvature_term *=3D m_CurvatureWeight * = this->CurvatureSpeed(it, > > > offset); > > > > --- > > > > so it should make no difference when I set the curvature weight to 1 > > and > > > the > > > > curvature speed to (constant) 1000 (and not vice versa), right? But > > when > > > I > > > > do this, I get numerical instabilities during the evolution. What is > > > wrong > > > > with my assumption? > > > > > > > > Luis, what was the curvature weighting and curvature speed when you > > > tested > > > > the collapsing contour with the syntethic sphere image? Was the > > > curvature > > > > speed constant or dependent on the image? > > > > > > > > For now, I do all calculations in 2D. Could that be a problem? I > > have > > > > installed a observer that shows me the progress of the contour after > > > each > > > > update event. > > > > > > > > > > > > Regards, > > > > Nils > > > > > > > > > > > > > > > >>-----Original Message----- > > > >>From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > > > >>Sent: Wednesday, July 09, 2003 6:14 PM > > > >>To: Nils Hanssen > > > >>Cc: Insight-users@public.kitware.com > > > >>Subject: Re: [Insight-users] Crash in > > > >>ShapeDetectionLevelSetImageFilter > > > >> > > > >> > > > >> > > > >>Hi Nils, > > > >> > > > >>You are right in your interpretation of the > > > >>behavior for the ShapeDetectionLevelSetFilter. > > > >> > > > >>Increasing the curvature scaling while decreasing > > > >>the propagation scaling should make the contour > > > >>collapse (contract). > > > >> > > > >>I just verified this behavior using a syntethic > > > >>image of a sphere. > > > >> > > > >>Note that in version 1.2 this filter is expecting > > > >>the input level set to conform to the convention > > > >>of "negative inside" which means that the level > > > >>set has negative values 'inside' the contour and > > > >>positive values outside the contour. > > > >> > > > >>You may have to push the curvature scaling to > > > >>a value higher than 1.0. (e.g. 5.0 or so). > > > >> > > > >>I would avoid to use 0.0 for the propagation > > > >>scaling ( in part just for superstition against > > > >>zeros values as parameters). You may want to > > > >>try something like 0.1 for the propagation > > > >>scaling. > > > >> > > > >>Please verify the convention used by your initial > > > >>level set. That may be the cause for the contour > > > >>not behaving as expected. > > > >> > > > >> > > > >>Regards, > > > >> > > > >> > > > >> Luis > > > >> > > > >> > > > >> > > > >>--------------------- > > > >>Nils Hanssen wrote: > > > >> > > > >>>Hi Luis, > > > >>> > > > >>>I am using the 1.2.0 web release. > > > >>> > > > >>>Regards, > > > >>>Nils > > > >>> > > > >>> > > > >>> > > > >>>>-----Original Message----- > > > >>>>From: insight-users-admin@itk.org > > > >>>>[mailto:insight-users-admin@itk.org]On > > > >>>>Behalf Of Luis Ibanez > > > >>>>Sent: Tuesday, July 08, 2003 3:55 PM > > > >>>>To: Nils Hanssen > > > >>>>Cc: Insight-users@public.kitware.com > > > >>>>Subject: Re: [Insight-users] Crash in > > > >>>>ShapeDetectionLevelSetImageFilter > > > >>>> > > > >>>> > > > >>>> > > > >>>>Hi Nils, > > > >>>> > > > >>>>Are you using a very recent checkout of ITK ? > > > >>>> > > > >>>>The level set filters have been reworked in > > > >>>>recent days, so it will help us to know if you > > > >>>>are experiencing this behavior with the current > > > >>>>version or with the version as it was two weeks > > > >>>>ago (or before that). > > > >>>> > > > >>>>Please let us know, > > > >>>> > > > >>>> Thanks > > > >>>> > > > >>>> > > > >>>> Luis > > > >>>> > > > >>>> > > > >>>>------------------------ > > > >>>>Nils Hanssen wrote: > > > >>>> > > > >>>> > > > >>>>>Hi, > > > >>>>> > > > >>>>>I am trying to understand the behaviour of the > > ShapeDetectionLSIF. > > > >>>>>Therefore, I set the propagation-weighting to zero. By setting > > the > > > >>>>>curvature-weighting to a value of one I would expect that > > > >>>> > > > >>>>the inital > > > >>>> > > > >>>> > > > >>>>>surface is shrinking to a point (I set the MaxRMSError to > > > >>>> > > > >>>>zero) and the > > > >>>> > > > >>>> > > > >>>>>number of iterations very high. > > > >>>>> > > > >>>>>The filter is crashing in > > > >>>>>SegmentationLevelSetFunction > > > >>>>>::PropagationSpeed(const NeighborhoodType &neighborhood, const > > > >>>>>FloatOffsetType &offset) const > > > >>>>>[...] > > > >>>>>--> else return ( > > > >>>> > > > >>>>static_cast(m_SpeedImage->GetPixel(idx)) ); > > > >>>>// crashing here > > > >>>> > > > >>>> > > > >>>>>[...] > > > >>>>> > > > >>>>>When I set the propagation-weighting to - for instance - > > > >>>> > > > >>0.0001 the > > > >> > > > >>>>>filter is not crashing, but the contour is not shrinking > > > >>>> > > > >>>>according to > > > >>>> > > > >>>> > > > >>>>>the mean curvature. > > > >>>>> > > > >>>>>Is that the correct behaviour of the filter? > > > >>>>> > > > >>>>>I would appreciate any suggestions. Thanks! > > > >>>>> > > > >>>>> > > > >>>>>Regards, > > > >>>>>Nils > > > >>>>> > > > >>>>> > > > >>>>>------------------------- > > > >>>>>Nils Hanssen > > > >>>>>Surgical Systems Laboratory > > > >>>>>research center c ae sa r > > > >>>>>Ludwig-Erhard-Allee 2 > > > >>>>>53175 Bonn > > > >>>>>fon: +49-228-9656-197 > > > >>>>>fax: +49-228-9656-117 > > > >>>>>___http://www.caesar.de/ssl_ > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>>_______________________________________________ > > > >>>>Insight-users mailing list > > > >>>>Insight-users@itk.org > > > >>>>http://www.itk.org/mailman/listinfo/insight-users > > > >>>> > > > >>> > > > >>>_______________________________________________ > > > >>>Insight-users mailing list > > > >>>Insight-users@itk.org > > > >>>http://www.itk.org/mailman/listinfo/insight-users > > > >>> > > > >> > > > >> > > > >> > > > >> > > > > > > > > _______________________________________________ > > > > Insight-users mailing list > > > > Insight-users@itk.org > > > > http://www.itk.org/mailman/listinfo/insight-users > > > > > > > > > > > _______________________________________________ > > Insight-users mailing list > > Insight-users@itk.org > > http://www.itk.org/mailman/listinfo/insight-users > > From Darren.Weber@radiology.ucsf.edu Fri Jul 11 05:11:40 2003 From: Darren.Weber@radiology.ucsf.edu (Darren Weber) Date: Thu, 10 Jul 2003 21:11:40 -0700 Subject: [Insight-users] http://www.bloodshed.net/devcpp.html Message-ID: <00c301c34762$9992d5d0$0501000a@dweber> Hi, newby to ITK. Has anyone had experience with compiling ITK using cygwin or http://www.bloodshed.net/devcpp.html ? I like linux, a lot, but I'm still using winXP a lot, so this might be convenient, if I can figure out how to use it. Best regards, Darren -- Darren Weber Postdoctoral Research Fellow Dynamic Neuroimaging Laboratory Department of Radiology University of California, San Francisco 521 Parnassus Avenue, Room C324 San Francisco, CA 94143-0628 Web: http://dnl.ucsf.edu/users/dweber/ Voice: (415) 514-2528 Fax: (415) 514-0405 From imho@bephp.com Fri Jul 11 07:50:09 2003 From: imho@bephp.com (imho) Date: Fri, 11 Jul 2003 08:50:09 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F0982FF.6040601@kitware.com> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> Message-ID: <3F0E5E21.3080902@bephp.com> Hi Luis, I try to do what you said, my pipeline is ready and also the demon registration class, and all is compiling, but I don't know how to convert my vtkPolyData to a vtkImageData. I do a simple CopyStructure but I think it works badly, because I have an execution error. Can I use the demonFilter with an itkMesh ? thanks Imho Luis Ibanez wrote: > > Hi Imho, > > The import/export connections currently available > between ITK and VTK only manage image-to-image > conversions. > > You may want to convert your vtkPolyData to a vtkImageData > and then use the itkVTKImageToImageFilter available in > > InsightApplications/Auxiliary/vtk > > In any case, a vtkPolyData may not be the best support > for representing an image... > > > Please let us know if you have futher questions, > > > Thanks > > > Luis > > > > ------------------ > imho wrote: > >> Hi all, >> is it possible to import and export a vtkPolyData or can I use images >> only? >> How can I do? >> I have two vtkPolyData volumes, and I'd like to use itk filters like >> this : >> >> vtk reader -> vtk filters -> itk filters -> vtk viewer >> I've tried this : >> >> VTK -> ITK >> -> VTK >> >> ITKImageExporter4 VTKImageImporter4 >> ITKImageImporter4 == first POLY >> >> ITKImageExporter5 VTKImageImporter5 >> == second POLY (no >> output) >> >> but I don't know how to convert my vtkPolyData or how to typedef the >> VTKimporter to make it work : >> typedef unsigned short PixelType; >> typedef itk::Image ImageType; >> typedef itk::VTKImageImport ImageImportType; >> is ok but not with a polyData, and >> >> typedef itk::VTKImageImport ImageImportType; >> isn't ok >> >> Thanks a lot >> >> imho > > > > > > From salah@gris.uni-tuebingen.de Fri Jul 11 10:07:56 2003 From: salah@gris.uni-tuebingen.de (salah) Date: Fri, 11 Jul 2003 11:07:56 +0200 Subject: [Insight-users] DiscreteGausianImageFilter Message-ID: <4B943954DD289E47958BCEC8C32269BE1EFB65@wsi-server2.wsi-gris.uni-tuebingen.de> Hello all, what are good parameter values to blure an image with=20 the DiscreteGausianImageFilter?? m_Smoother->SetVariance( ??? ); m_Smoother->SetMaximumKernelWidth( ??? ); thanks, Zein ->8<------------->8<------------->8<------------->8<------------->8<-----= -------->8<- Zein I. Salah=20 University of T=FCbingen, WSI-GRIS, Sand 14, 72076 T=FCbingen=20 Email: salah@gris.uni-tuebingen.de Tel.: (07071) 29 75464 (GRIS), Fax: (07071) 29 54 66 From hanssen@caesar.de Fri Jul 11 10:47:23 2003 From: hanssen@caesar.de (Nils Hanssen) Date: Fri, 11 Jul 2003 11:47:23 +0200 Subject: [Insight-users] Curvature in ShapeDetectionLevelSetImageFilter In-Reply-To: Message-ID: <000e01c34791$6e8c62f0$0607010a@ssn4006> This is a multi-part message in MIME format. ------=_NextPart_000_000F_01C347A2.321532F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Lydia and Josh, I made a complete clone of the ShapeDetectionLevelSetFunction and ShapeDetectionLevelSetImageFilter classes with the only difference, that I modified the ShapeDetectionLevelSetFunction::CurvatureSpeed(...) method. I tested two cases: Case 1 - Curvature-speed of the level set function returns constant 1 (one): PropagationScaling: 0.0001 (just to be close to zero) CurvatureScaling: 1.0 Case 2 - Curvature-speed of the level set function returns constant 1000: PropagationScaling: 0.0001 (just to be close to zero) CurvatureScaling: 1000.0 I thought that the two cases should be equivalent since I saw the weighting term in the LevelSetFunction::ComputeUpdate() method: --- curvature_term = curve; curvature_term *= m_CurvatureWeight * this->CurvatureSpeed(it, offset); --- So it should make no difference if I choose the m_CurvatureWeight=1, CurvatureSpeed=1000 or vice versa?! Case 1 runs okay, but Case 2 produces strange patterns at the contour border. Unfortunately, my application is not a console application -> There are some dependencies to other components. I think the example(s) of the ShapeDetectionLSIF with the above modification of the CurvatureSpeed method should behave similarly. Anyway, I can reduce it to a console application if that would help you. Thank you very much for the support so far, Luis, Josh and Lydia! Regards, Nils > Hi Josh and Nils, > > Actually I did tried to get one of my Examples to illustrate this > problem but I actually couldn't since in the Examples the > CurvatureSpeed() is between 0 and 1. > > I believe Nils derived his own classes and set the > CurvatureSpeed() to a > high value. > > Nils: would you be able to post your code/test illustrating the > numerical instability problem? > > - Lydia > > > -----Original Message----- > > From: Joshua Cates [mailto:cates@sci.utah.edu] > > Sent: Thursday, July 10, 2003 3:28 PM > > To: Lydia Ng > > Cc: Luis Ibanez; Nils Hanssen; Insight-users@public.kitware.com > > Subject: RE: [Insight-users] Curvature in > > ShapeDetectionLevelSetImageFilter > > > > Hi Lydia, > > > > Can you send Ross and I an example of data/parameters which cause > problems > > in (ideally) one of the Example applications? We'll hack > on this next > > week. > > > > thanks, > > > > Josh. > > > > ______________________________ > > Josh Cates > > School of Computer Science > > University of Utah > > Email: cates@sci.utah.edu > > Phone: (801) 587-7697 > > URL: http://www.sci.utah.edu/~cates > > > > > > On Thu, 10 Jul 2003, Lydia Ng wrote: > > > > > Hi Nils and Luis, > > > > > > There is issue in the current implementation of the level set > framework > > > in that the curvature term is not taken into account when > computing > the > > > time step. Ideally, the time step should computed to maintain > numerical > > > stability. > > > > > > Thus, setting the curvature weight is high relative to the > propagation > > > term will cause problem most likely due to the time step being too > > > large. > > > > > > This is a known problem - computing the time step to meet the CFL > > > criterion is not widely reported in the literature - a > few of us is > > > still trying to figure out what is the mathematically > sound thing to > do > > > here. > > > > > > BTW - I have also fixed the problem of when the propagation weight > is > > > zero - it shouldn't crash now - but you will still get > the numerical > > > instability issue as above. > > > > > > - Lydia > > > > > > > -----Original Message----- > > > > From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > > > > Sent: Thursday, July 10, 2003 6:58 AM > > > > To: Nils Hanssen > > > > Cc: Insight-users@public.kitware.com > > > > Subject: Re: [Insight-users] Curvature in > > > > ShapeDetectionLevelSetImageFilter > > > > > > > > > > > > Hi Nils, > > > > > > > > I just performed a couple of tests, and the > > > > ShapeDetectionLSIF is behaving as expected. > > > > (Note that I did this with the current CVS > > > > version, not ITK 1.2). > > > > > > > > A couple of sample images that help to test > > > > your case were checked in under: > > > > > > > > - Insight/Examples/Data/Circle.png > > > > - Insight/Examples/Data/CircleSpikes.png > > > > > > > > http://www.itk.org/cgi- > > > > bin/cvsweb.cgi/Insight/Examples/Data/Circle.png?cvsroot=Insight > > > > http://www.itk.org/cgi- > > > > > bin/cvsweb.cgi/Insight/Examples/Data/CircleSpikes.png?cvsroot=Insight > > > > > > > > CircleSpikes.png simulates the conditions of your > > > > tube but in 2D. > > > > > > > > The example ShapeDetectionLevelSetImageFilter > > > > was also slightly modified in order to take the > > > > scaling parameter from the command line arguments. > > > > > > > > http://www.itk.org/cgi- > > > > > > > > bin/cvsweb.cgi/Insight/Examples/Segmentation/ShapeDetectionLev > elSetFilte > > > r. > > > > cxx?cvsroot=Insight&sortby=date > > > > > > > > Running this example with the parameters below > > > > succeded to segment the internal circle without > > > > taking the spikes (bridges). Note that although > > > > the segmentation doesn't goes into the spikes, they > > > > excert some influence on the shape of the final > > > > contour. > > > > > > > > Here are the parameters: > > > > > > > > ShapeDetectionLevelSetFilter > > > > > > > > input image: CirclesSpikes.png > > > > output image: SegmentedCircle.png > > > > seed point: 50 50 > > > > distance: 20 > > > > sigma: 1.0 > > > > sigmoid alpha: -40 > > > > sigmoid beta: 128 > > > > curvatureScaling: 3.1 > > > > propagationScaling: 0.97 > > > > > > > > The overlay of the segmented circle, on top > > > > of the CircleSpikes.png image is shown in > > > > the attachement. > > > > > > > > --- > > > > > > > > The balance between the curvatureScaling and the > > > > propagationScaling parameters is quite delicate. > > > > > > > > For example: > > > > > > > > keeping curvature scaling = 3.1 > > > > propagation scaling = 0.98 will overflow the whole image > > > > while prop. scaling = 0.96 will grow just to half the circle > > > > > > > > OR > > > > > > > > keeping propagation scaling = 0.97 > > > > curvature scaling = 3.0 will overflow the image > > > > curvature scaling = 3.2 will fall short on reaching the edges > > > > > > > > > > > > > > > > My guess is that it may be possible to find a > > > > continuous function F(): > > > > > > > > curvatureScaling = F( propagationScaling ) > > > > > > > > for which the segmentation grabs on the circle edges, > > > > but at some threshold of "PropagationScaling" the > > > > computation will start presenting numerical > > > > instabilities. > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > > > > > Luis > > > > > > > > > > > > > > > > --------------------- > > > > Nils Hanssen wrote: > > > > > Hi Luis, > > > > > > > > > > thank you for the detailed answer. > > > > > > > > > > > > > > > My initial level set conforms to the "negative inside" > convention. > > > > > Now, I am using a curvature weighting of 1000 (just > to see what > > > happens > > > > in > > > > > the extreme case) and a propagation weighting of 0.001. When > running > > > the > > > > > ShapeDetectionLSIF, the contour is not collapsing at > all. Maybe > > > that's > > > > > because of the feature image that dictates the curvature speed > (== > > > > > propagation speed in the ShapeDetectionLSIF)? > > > > > > > > > > Since the curvature speed in the ShapeDetectionLSF equals the > > > > propagation > > > > > speed, I derived my own classes called > "TubularLevelSetFunction" > and > > > > > "TubularLevelSetImageFilter". These are basically > clones of the > > > > > ShapeDetection* classes, but with the difference that > I set the > > > > curvature > > > > > speed to (constant) one in the Level-set function. > > > > > Now, the contour is collapsing according to the mean curvature > but > > > all > > > > this > > > > > happens _very_ slowly (the curvature weighting is 1000!). > > > > > > > > > > In itk::LevelSetFunction::ComputeUpdate(...) I see the > following: > > > > > --- > > > > > curvature_term = curve; > > > > > curvature_term *= m_CurvatureWeight * > this->CurvatureSpeed(it, > > > > offset); > > > > > --- > > > > > so it should make no difference when I set the > curvature weight > to 1 > > > and > > > > the > > > > > curvature speed to (constant) 1000 (and not vice > versa), right? > But > > > when > > > > I > > > > > do this, I get numerical instabilities during the evolution. > What is > > > > wrong > > > > > with my assumption? > > > > > > > > > > Luis, what was the curvature weighting and curvature > speed when > you > > > > tested > > > > > the collapsing contour with the syntethic sphere > image? Was the > > > > curvature > > > > > speed constant or dependent on the image? > > > > > > > > > > For now, I do all calculations in 2D. Could that be a > problem? I > > > have > > > > > installed a observer that shows me the progress of the contour > after > > > > each > > > > > update event. > > > > > > > > > > > > > > > Regards, > > > > > Nils > > > > > > > > > > > > > > > > > > > >>-----Original Message----- > > > > >>From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > > > > >>Sent: Wednesday, July 09, 2003 6:14 PM > > > > >>To: Nils Hanssen > > > > >>Cc: Insight-users@public.kitware.com > > > > >>Subject: Re: [Insight-users] Crash in > > > > >>ShapeDetectionLevelSetImageFilter > > > > >> > > > > >> > > > > >> > > > > >>Hi Nils, > > > > >> > > > > >>You are right in your interpretation of the > > > > >>behavior for the ShapeDetectionLevelSetFilter. > > > > >> > > > > >>Increasing the curvature scaling while decreasing > > > > >>the propagation scaling should make the contour > > > > >>collapse (contract). > > > > >> > > > > >>I just verified this behavior using a syntethic > > > > >>image of a sphere. > > > > >> > > > > >>Note that in version 1.2 this filter is expecting > > > > >>the input level set to conform to the convention > > > > >>of "negative inside" which means that the level > > > > >>set has negative values 'inside' the contour and > > > > >>positive values outside the contour. > > > > >> > > > > >>You may have to push the curvature scaling to > > > > >>a value higher than 1.0. (e.g. 5.0 or so). > > > > >> > > > > >>I would avoid to use 0.0 for the propagation > > > > >>scaling ( in part just for superstition against > > > > >>zeros values as parameters). You may want to > > > > >>try something like 0.1 for the propagation > > > > >>scaling. > > > > >> > > > > >>Please verify the convention used by your initial > > > > >>level set. That may be the cause for the contour > > > > >>not behaving as expected. > > > > >> > > > > >> > > > > >>Regards, > > > > >> > > > > >> > > > > >> Luis > > > > >> > > > > >> > > > > >> > > > > >>--------------------- > > > > >>Nils Hanssen wrote: > > > > >> > > > > >>>Hi Luis, > > > > >>> > > > > >>>I am using the 1.2.0 web release. > > > > >>> > > > > >>>Regards, > > > > >>>Nils > > > > >>> > > > > >>> > > > > >>> > > > > >>>>-----Original Message----- > > > > >>>>From: insight-users-admin@itk.org > > > > >>>>[mailto:insight-users-admin@itk.org]On > > > > >>>>Behalf Of Luis Ibanez > > > > >>>>Sent: Tuesday, July 08, 2003 3:55 PM > > > > >>>>To: Nils Hanssen > > > > >>>>Cc: Insight-users@public.kitware.com > > > > >>>>Subject: Re: [Insight-users] Crash in > > > > >>>>ShapeDetectionLevelSetImageFilter > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>>Hi Nils, > > > > >>>> > > > > >>>>Are you using a very recent checkout of ITK ? > > > > >>>> > > > > >>>>The level set filters have been reworked in > > > > >>>>recent days, so it will help us to know if you > > > > >>>>are experiencing this behavior with the current > > > > >>>>version or with the version as it was two weeks > > > > >>>>ago (or before that). > > > > >>>> > > > > >>>>Please let us know, > > > > >>>> > > > > >>>> Thanks > > > > >>>> > > > > >>>> > > > > >>>> Luis > > > > >>>> > > > > >>>> > > > > >>>>------------------------ > > > > >>>>Nils Hanssen wrote: > > > > >>>> > > > > >>>> > > > > >>>>>Hi, > > > > >>>>> > > > > >>>>>I am trying to understand the behaviour of the > > > ShapeDetectionLSIF. > > > > >>>>>Therefore, I set the propagation-weighting to zero. By > setting > > > the > > > > >>>>>curvature-weighting to a value of one I would expect that > > > > >>>> > > > > >>>>the inital > > > > >>>> > > > > >>>> > > > > >>>>>surface is shrinking to a point (I set the MaxRMSError to > > > > >>>> > > > > >>>>zero) and the > > > > >>>> > > > > >>>> > > > > >>>>>number of iterations very high. > > > > >>>>> > > > > >>>>>The filter is crashing in > > > > >>>>>SegmentationLevelSetFunction > > > > >>>>>::PropagationSpeed(const NeighborhoodType &neighborhood, > const > > > > >>>>>FloatOffsetType &offset) const > > > > >>>>>[...] > > > > >>>>>--> else return ( > > > > >>>> > > > > >>>>static_cast(m_SpeedImage->GetPixel(idx)) ); > > > > >>>>// crashing here > > > > >>>> > > > > >>>> > > > > >>>>>[...] > > > > >>>>> > > > > >>>>>When I set the propagation-weighting to - for instance - > > > > >>>> > > > > >>0.0001 the > > > > >> > > > > >>>>>filter is not crashing, but the contour is not shrinking > > > > >>>> > > > > >>>>according to > > > > >>>> > > > > >>>> > > > > >>>>>the mean curvature. > > > > >>>>> > > > > >>>>>Is that the correct behaviour of the filter? > > > > >>>>> > > > > >>>>>I would appreciate any suggestions. Thanks! > > > > >>>>> > > > > >>>>> > > > > >>>>>Regards, > > > > >>>>>Nils > > > > >>>>> > > > > >>>>> > > > > >>>>>------------------------- > > > > >>>>>Nils Hanssen > > > > >>>>>Surgical Systems Laboratory > > > > >>>>>research center c ae sa r > > > > >>>>>Ludwig-Erhard-Allee 2 > > > > >>>>>53175 Bonn > > > > >>>>>fon: +49-228-9656-197 > > > > >>>>>fax: +49-228-9656-117 > > > > >>>>>___http://www.caesar.de/ssl_ > > > > >>>>> > > > > >>>>> > > > > >>>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>>_______________________________________________ > > > > >>>>Insight-users mailing list > > > > >>>>Insight-users@itk.org > > > > >>>>http://www.itk.org/mailman/listinfo/insight-users > > > > >>>> > > > > >>> > > > > >>>_______________________________________________ > > > > >>>Insight-users mailing list > > > > >>>Insight-users@itk.org > > > > >>>http://www.itk.org/mailman/listinfo/insight-users > > > > >>> > > > > >> > > > > >> > > > > >> > > > > >> > > > > > > > > > > _______________________________________________ > > > > > Insight-users mailing list > > > > > Insight-users@itk.org > > > > > http://www.itk.org/mailman/listinfo/insight-users > > > > > > > > > > > > > > > _______________________________________________ > > > Insight-users mailing list > > > Insight-users@itk.org > > > http://www.itk.org/mailman/listinfo/insight-users > > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > ------=_NextPart_000_000F_01C347A2.321532F0 Content-Type: application/ms-tnef; name="winmail.dat" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="winmail.dat" eJ8+IhgJAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEGgAMADgAAANMHBwALAAsALwAAAAUAKwEB A5AGAKAdAAAlAAAACwACAAEAAAALACMAAAAAAAMAJgAAAAAACwApAAAAAAADAC4AAAAAAAMANgAA AAAAHgBwAAEAAAA/AAAAW0luc2lnaHQtdXNlcnNdIEN1cnZhdHVyZSBpbiBTaGFwZURldGVjdGlv bkxldmVsU2V0SW1hZ2VGaWx0ZXIAAAIBcQABAAAAFgAAAAHDR5FttSjwKX5mrkbtrBwjxTySK0kA AAIBHQwBAAAAFwAAAFNNVFA6SEFOU1NFTkBDQUVTQVIuREUAAAsAAQ4AAAAAQAAGDgAC01+RR8MB AgEKDgEAAAAYAAAAAAAAAL0QC1krxdQRhzIAAQIipMnCgAAAAwAUDgEAAAALAB8OAQAAAAIBCRAB AAAAiRkAAIUZAAAaRgAATFpGdfdJ41QDAAoA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AAMAERABAAAAHgAIEAEAAABlAAAASElMWURJQUFOREpPU0gsSU1BREVBQ09NUExFVEVDTE9ORU9G VEhFU0hBUEVERVRFQ1RJT05MRVZFTFNFVEZVTkNUSU9OQU5EU0hBUEVERVRFQ1RJT05MRVZFTFNF VElNQUdFRgAAAADxJw== ------=_NextPart_000_000F_01C347A2.321532F0-- From hanssen@caesar.de Fri Jul 11 10:57:53 2003 From: hanssen@caesar.de (Nils Hanssen) Date: Fri, 11 Jul 2003 11:57:53 +0200 Subject: [Insight-users] Curvature in ShapeDetectionLevelSetImageFilter In-Reply-To: <3F0D70F2.6040500@kitware.com> Message-ID: <001401c34792$e5ce5d90$0607010a@ssn4006> Hi Luis. thank you so much for your suggestions; the support is really great! I'm currently compiling the latest CVS to be up-to-date. Then I will try your parameters to see what happens for my case. I'll report about the progress next week. Have a nice weekend, Nils > Hi Nils, > > I just performed a couple of tests, and the > ShapeDetectionLSIF is behaving as expected. > (Note that I did this with the current CVS > version, not ITK 1.2). > > A couple of sample images that help to test > your case were checked in under: > > - Insight/Examples/Data/Circle.png > - Insight/Examples/Data/CircleSpikes.png > > http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Examples/Data/Ci > rcle.png?cvsroot=Insight > http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Examples/Data/Ci > rcleSpikes.png?cvsroot=Insight > > CircleSpikes.png simulates the conditions of your > tube but in 2D. > > The example ShapeDetectionLevelSetImageFilter > was also slightly modified in order to take the > scaling parameter from the command line arguments. > > http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Examples/Segment > ation/ShapeDetectionLevelSetFilter.cxx?cvsroot=Insight&sortby=date > > Running this example with the parameters below > succeded to segment the internal circle without > taking the spikes (bridges). Note that although > the segmentation doesn't goes into the spikes, they > excert some influence on the shape of the final > contour. > > Here are the parameters: > > ShapeDetectionLevelSetFilter > > input image: CirclesSpikes.png > output image: SegmentedCircle.png > seed point: 50 50 > distance: 20 > sigma: 1.0 > sigmoid alpha: -40 > sigmoid beta: 128 > curvatureScaling: 3.1 > propagationScaling: 0.97 > > The overlay of the segmented circle, on top > of the CircleSpikes.png image is shown in > the attachement. > > --- > > The balance between the curvatureScaling and the > propagationScaling parameters is quite delicate. > > For example: > > keeping curvature scaling = 3.1 > propagation scaling = 0.98 will overflow the whole image > while prop. scaling = 0.96 will grow just to half the circle > > OR > > keeping propagation scaling = 0.97 > curvature scaling = 3.0 will overflow the image > curvature scaling = 3.2 will fall short on reaching the edges > > > > My guess is that it may be possible to find a > continuous function F(): > > curvatureScaling = F( propagationScaling ) > > for which the segmentation grabs on the circle edges, > but at some threshold of "PropagationScaling" the > computation will start presenting numerical > instabilities. > > > > > Regards, > > > > Luis > > > > --------------------- > Nils Hanssen wrote: > > Hi Luis, > > > > thank you for the detailed answer. > > > > > > My initial level set conforms to the "negative inside" convention. > > Now, I am using a curvature weighting of 1000 (just to see > what happens in > > the extreme case) and a propagation weighting of 0.001. > When running the > > ShapeDetectionLSIF, the contour is not collapsing at all. > Maybe that's > > because of the feature image that dictates the curvature speed (== > > propagation speed in the ShapeDetectionLSIF)? > > > > Since the curvature speed in the ShapeDetectionLSF equals > the propagation > > speed, I derived my own classes called "TubularLevelSetFunction" and > > "TubularLevelSetImageFilter". These are basically clones of the > > ShapeDetection* classes, but with the difference that I set > the curvature > > speed to (constant) one in the Level-set function. > > Now, the contour is collapsing according to the mean > curvature but all this > > happens _very_ slowly (the curvature weighting is 1000!). > > > > In itk::LevelSetFunction::ComputeUpdate(...) I see the following: > > --- > > curvature_term = curve; > > curvature_term *= m_CurvatureWeight * > this->CurvatureSpeed(it, offset); > > --- > > so it should make no difference when I set the curvature > weight to 1 and the > > curvature speed to (constant) 1000 (and not vice versa), > right? But when I > > do this, I get numerical instabilities during the > evolution. What is wrong > > with my assumption? > > > > Luis, what was the curvature weighting and curvature speed > when you tested > > the collapsing contour with the syntethic sphere image? Was > the curvature > > speed constant or dependent on the image? > > > > For now, I do all calculations in 2D. Could that be a > problem? I have > > installed a observer that shows me the progress of the > contour after each > > update event. > > > > > > Regards, > > Nils > > > > > > > >>-----Original Message----- > >>From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > >>Sent: Wednesday, July 09, 2003 6:14 PM > >>To: Nils Hanssen > >>Cc: Insight-users@public.kitware.com > >>Subject: Re: [Insight-users] Crash in > >>ShapeDetectionLevelSetImageFilter > >> > >> > >> > >>Hi Nils, > >> > >>You are right in your interpretation of the > >>behavior for the ShapeDetectionLevelSetFilter. > >> > >>Increasing the curvature scaling while decreasing > >>the propagation scaling should make the contour > >>collapse (contract). > >> > >>I just verified this behavior using a syntethic > >>image of a sphere. > >> > >>Note that in version 1.2 this filter is expecting > >>the input level set to conform to the convention > >>of "negative inside" which means that the level > >>set has negative values 'inside' the contour and > >>positive values outside the contour. > >> > >>You may have to push the curvature scaling to > >>a value higher than 1.0. (e.g. 5.0 or so). > >> > >>I would avoid to use 0.0 for the propagation > >>scaling ( in part just for superstition against > >>zeros values as parameters). You may want to > >>try something like 0.1 for the propagation > >>scaling. > >> > >>Please verify the convention used by your initial > >>level set. That may be the cause for the contour > >>not behaving as expected. > >> > >> > >>Regards, > >> > >> > >> Luis > >> > >> > >> > >>--------------------- > >>Nils Hanssen wrote: > >> > >>>Hi Luis, > >>> > >>>I am using the 1.2.0 web release. > >>> > >>>Regards, > >>>Nils > >>> > >>> > >>> > >>>>-----Original Message----- > >>>>From: insight-users-admin@itk.org > >>>>[mailto:insight-users-admin@itk.org]On > >>>>Behalf Of Luis Ibanez > >>>>Sent: Tuesday, July 08, 2003 3:55 PM > >>>>To: Nils Hanssen > >>>>Cc: Insight-users@public.kitware.com > >>>>Subject: Re: [Insight-users] Crash in > >>>>ShapeDetectionLevelSetImageFilter > >>>> > >>>> > >>>> > >>>>Hi Nils, > >>>> > >>>>Are you using a very recent checkout of ITK ? > >>>> > >>>>The level set filters have been reworked in > >>>>recent days, so it will help us to know if you > >>>>are experiencing this behavior with the current > >>>>version or with the version as it was two weeks > >>>>ago (or before that). > >>>> > >>>>Please let us know, > >>>> > >>>> Thanks > >>>> > >>>> > >>>> Luis > >>>> > >>>> > >>>>------------------------ > >>>>Nils Hanssen wrote: > >>>> > >>>> > >>>>>Hi, > >>>>> > >>>>>I am trying to understand the behaviour of the > ShapeDetectionLSIF. > >>>>>Therefore, I set the propagation-weighting to zero. By > setting the > >>>>>curvature-weighting to a value of one I would expect that > >>>> > >>>>the inital > >>>> > >>>> > >>>>>surface is shrinking to a point (I set the MaxRMSError to > >>>> > >>>>zero) and the > >>>> > >>>> > >>>>>number of iterations very high. > >>>>> > >>>>>The filter is crashing in > >>>>>SegmentationLevelSetFunction > >>>>>::PropagationSpeed(const NeighborhoodType &neighborhood, const > >>>>>FloatOffsetType &offset) const > >>>>>[...] > >>>>>--> else return ( > >>>> > >>>>static_cast(m_SpeedImage->GetPixel(idx)) ); > >>>>// crashing here > >>>> > >>>> > >>>>>[...] > >>>>> > >>>>>When I set the propagation-weighting to - for instance - > >>>> > >>0.0001 the > >> > >>>>>filter is not crashing, but the contour is not shrinking > >>>> > >>>>according to > >>>> > >>>> > >>>>>the mean curvature. > >>>>> > >>>>>Is that the correct behaviour of the filter? > >>>>> > >>>>>I would appreciate any suggestions. Thanks! > >>>>> > >>>>> > >>>>>Regards, > >>>>>Nils > >>>>> > >>>>> > >>>>>------------------------- > >>>>>Nils Hanssen > >>>>>Surgical Systems Laboratory > >>>>>research center c ae sa r > >>>>>Ludwig-Erhard-Allee 2 > >>>>>53175 Bonn > >>>>>fon: +49-228-9656-197 > >>>>>fax: +49-228-9656-117 > >>>>>___http://www.caesar.de/ssl_ > >>>>> > >>>>> > >>>>> > >>>> > >>>> > >>>> > >>>>_______________________________________________ > >>>>Insight-users mailing list > >>>>Insight-users@itk.org > >>>>http://www.itk.org/mailman/listinfo/insight-users > >>>> > >>> > >>>_______________________________________________ > >>>Insight-users mailing list > >>>Insight-users@itk.org > >>>http://www.itk.org/mailman/listinfo/insight-users > >>> > >> > >> > >> > >> > > > > _______________________________________________ > > Insight-users mailing list > > Insight-users@itk.org > > http://www.itk.org/mailman/listinfo/insight-users > > > > > From luis.ibanez@kitware.com Fri Jul 11 14:42:50 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Fri, 11 Jul 2003 09:42:50 -0400 Subject: [Insight-users] vtk polydata import / export References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> Message-ID: <3F0EBEDA.7020906@kitware.com> Hi Imho, You may want to use the VTK filter: vtkImplicitModeller http://www.vtk.org/doc/nightly/html/classvtkImplicitModeller.html This filter accepts as input a vtkPolyData, and produces a vtkImageData as output. The output vtkImageData is computed as a (non-signed) distance to the surface represented by the itkPolyData. Once you get this image you can go different paths: A) you could use these signed distance images as direct input for the Demon's registration algorithm or B) you could threshold both of them a bit over zero and then obtain the inside/outside regions using a connectivity filter (VTK or ITK), for example http://www.itk.org/Insight/Doxygen/html/classitk_1_1ConnectedComponentImageFilter.html This will give you binary masks inside the polydata surface. ---- The Demons registration algorithm is designed to work on images, the itkMesh will not be an appropriate input, so the conversion described above will certainly be necesary. Regards, Luis --------------------- imho wrote: > Hi Luis, > I try to do what you said, my pipeline is ready and also the demon > registration class, and all is compiling, but I don't know how to > convert my vtkPolyData to a vtkImageData. I do a simple CopyStructure > but I think it works badly, because I have an execution error. > Can I use the demonFilter with an itkMesh ? > > thanks > > Imho > > Luis Ibanez wrote: > >> >> Hi Imho, >> >> The import/export connections currently available >> between ITK and VTK only manage image-to-image >> conversions. >> >> You may want to convert your vtkPolyData to a vtkImageData >> and then use the itkVTKImageToImageFilter available in >> >> InsightApplications/Auxiliary/vtk >> >> In any case, a vtkPolyData may not be the best support >> for representing an image... >> >> >> Please let us know if you have futher questions, >> >> >> Thanks >> >> >> Luis >> >> >> >> ------------------ >> imho wrote: >> >>> Hi all, >>> is it possible to import and export a vtkPolyData or can I use images >>> only? >>> How can I do? >>> I have two vtkPolyData volumes, and I'd like to use itk filters like >>> this : >>> >>> vtk reader -> vtk filters -> itk filters -> vtk viewer >>> I've tried this : >>> >>> VTK -> ITK >>> -> VTK >>> >>> ITKImageExporter4 VTKImageImporter4 >>> ITKImageImporter4 == first POLY >>> >>> ITKImageExporter5 VTKImageImporter5 >>> == second POLY (no >>> output) >>> >>> but I don't know how to convert my vtkPolyData or how to typedef the >>> VTKimporter to make it work : >>> typedef unsigned short PixelType; >>> typedef itk::Image ImageType; >>> typedef itk::VTKImageImport ImageImportType; >>> is ok but not with a polyData, and >>> >>> typedef itk::VTKImageImport ImageImportType; >>> isn't ok >>> >>> Thanks a lot >>> >>> imho >> >> >> >> >> >> >> > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Fri Jul 11 14:56:21 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Fri, 11 Jul 2003 09:56:21 -0400 Subject: [Insight-users] DiscreteGausianImageFilter References: <4B943954DD289E47958BCEC8C32269BE1EFB65@wsi-server2.wsi-gris.uni-tuebingen.de> Message-ID: <3F0EC205.9070101@kitware.com> Hi Zein, It depends on your image,... but Sigmas of 1,2,3,4 are typical values, that means Variances of 1,4,9,16 After that, a lot of image information is lost. The larger the sigma (variance) the larger the kernel will be and hence the longer the computation time. The MaxKernelWidth sets a cap to the kernel size used by the filter. You may want to keep the kernel width below "10", unless you plan to go for lunch an leave your program computing the Gaussian filtering in the meantime :-) Regards, Luis --------------- salah wrote: > Hello all, > > what are good parameter values to blure an image with > the DiscreteGausianImageFilter?? > > m_Smoother->SetVariance( ??? ); > m_Smoother->SetMaximumKernelWidth( ??? ); > > thanks, > Zein > > > > ->8<------------->8<------------->8<------------->8<------------->8<------------->8<- > Zein I. Salah > University of Tbingen, WSI-GRIS, Sand 14, 72076 Tbingen > Email: salah@gris.uni-tuebingen.de > Tel.: (07071) 29 75464 (GRIS), Fax: (07071) 29 54 66 > > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From itkneha@yahoo.com Fri Jul 11 22:53:05 2003 From: itkneha@yahoo.com (Neha D) Date: Fri, 11 Jul 2003 14:53:05 -0700 (PDT) Subject: [Insight-users] ITK Book/Manual ??? In-Reply-To: <1840259920.20031019225228@lncc.br> Message-ID: <20030711215305.52346.qmail@web80509.mail.yahoo.com> --0-1452040519-1057960385=:51074 Content-Type: text/plain; charset=us-ascii Hi All, Is there book on ITK available now? Thanks, Neha --------------------------------- Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! --0-1452040519-1057960385=:51074 Content-Type: text/html; charset=us-ascii

Hi All,

Is there book on ITK available now?

Thanks,

Neha


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month! --0-1452040519-1057960385=:51074-- From Darren.Weber@radiology.ucsf.edu Fri Jul 11 23:54:59 2003 From: Darren.Weber@radiology.ucsf.edu (Darren Weber) Date: Fri, 11 Jul 2003 15:54:59 -0700 Subject: [Insight-users] compile without Cmake? Message-ID: <00b601c347ff$778fef20$ac6fda80@dweber> Hi, is it possible to compile ITK without using Cmake? Can anyone help me to do this? I am new to ITK and want to use it under windows, hopefully with Qt, but I do not have any of the supported compilers in the Cmake options, so I can't even get started. I've just discovered www.bloodshed.net where they provide a nice IDE and a good port of gcc to windows. I also have cygwin installed. I was thinking that ITK is open source, but it seems to get going you really need a non-open source compiler (at least for windows). I may be able to figure it out, but any tips would be greatly appreciated. Best regards, Darren -- Darren Weber Postdoctoral Research Fellow Dynamic Neuroimaging Laboratory Department of Radiology University of California, San Francisco 521 Parnassus Avenue, Room C324 San Francisco, CA 94143-0628 Web: http://dnl.ucsf.edu/users/dweber/ Voice: (415) 514-2528 Fax: (415) 514-0405 From pmcheng@u.washington.edu Sat Jul 12 00:41:00 2003 From: pmcheng@u.washington.edu (Phillip Cheng) Date: Fri, 11 Jul 2003 16:41:00 -0700 Subject: [Insight-users] Image deformation filter question Message-ID: <20AC44C9-B3F9-11D7-8AE2-003065F3822E@u.washington.edu> Hello, I would like to perform the following simple image deformation using ITK. 1. Generate a 3D mesh containing a vector displacement in mm for each grid point. 2. Apply the displacements to an image whose resolution is finer than the mesh, using B-splines for interpolation. I'm having difficulty connecting these steps efficiently in ITK. In particular, it seems I need to use itkBSplineDecompositionFilter to generate spline coefficients for each vector dimension in the mesh, and then copy all these coefficients to a 3x3D concatenated array for use in itkBSplineDeformableTransform (probably inverting things somewhere so that I have an output->input mapping). But the copying step wastes time and memory, especially if the mesh is large and I need to generate many such transforms. Is there a way to connect these pieces without copying the 3x3D arrays? I looked at itkBSplineDeformableTransformTest.cxx which wraps the parameter array into several itkImages, and that seems close to what I need, but I'm a little unclear as to how to direct the output of itkBSplineDecompositionFilter into the parameter images for the deformable transform. Thanks, Phillip Cheng From imho@bephp.com Sat Jul 12 08:37:16 2003 From: imho@bephp.com (imho) Date: Sat, 12 Jul 2003 09:37:16 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F0EBEDA.7020906@kitware.com> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> Message-ID: <3F0FBAAC.5080000@bephp.com> Hi Luis, thanks a lot for your detailled explanation, I'll try it and I'll tell you what I've got. ;-) Imho. Luis Ibanez wrote: > > Hi Imho, > > You may want to use the VTK filter: > > vtkImplicitModeller > > http://www.vtk.org/doc/nightly/html/classvtkImplicitModeller.html > > This filter accepts as input a vtkPolyData, > and produces a vtkImageData as output. > > The output vtkImageData is computed as a (non-signed) > distance to the surface represented by the itkPolyData. > > Once you get this image you can go different paths: > > A) you could use these signed distance images as > direct input for the Demon's registration algorithm > > or > > B) you could threshold both of them a bit over zero and > then obtain the inside/outside regions using a > connectivity filter (VTK or ITK), for example > http://www.itk.org/Insight/Doxygen/html/classitk_1_1ConnectedComponentImageFilter.html > This will give you binary masks inside the polydata surface. > > > ---- > > > The Demons registration algorithm is designed to work on > images, the itkMesh will not be an appropriate input, so > the conversion described above will certainly be necesary. > > > > > Regards, > > > Luis > > > --------------------- > imho wrote: > >> Hi Luis, >> I try to do what you said, my pipeline is ready and also the demon >> registration class, and all is compiling, but I don't know how to >> convert my vtkPolyData to a vtkImageData. I do a simple CopyStructure >> but I think it works badly, because I have an execution error. >> Can I use the demonFilter with an itkMesh ? >> >> thanks >> >> Imho >> >> Luis Ibanez wrote: >> >>> >>> Hi Imho, >>> >>> The import/export connections currently available >>> between ITK and VTK only manage image-to-image >>> conversions. >>> >>> You may want to convert your vtkPolyData to a vtkImageData >>> and then use the itkVTKImageToImageFilter available in >>> >>> InsightApplications/Auxiliary/vtk >>> >>> In any case, a vtkPolyData may not be the best support >>> for representing an image... >>> >>> >>> Please let us know if you have futher questions, >>> >>> >>> Thanks >>> >>> >>> Luis >>> >>> >>> >>> ------------------ >>> imho wrote: >>> >>>> Hi all, >>>> is it possible to import and export a vtkPolyData or can I use >>>> images only? >>>> How can I do? >>>> I have two vtkPolyData volumes, and I'd like to use itk filters >>>> like this : >>>> >>>> vtk reader -> vtk filters -> itk filters -> vtk viewer >>>> I've tried this : >>>> >>>> VTK -> >>>> ITK -> VTK >>>> >>>> ITKImageExporter4 VTKImageImporter4 >>>> ITKImageImporter4 == first POLY >>>> >>>> ITKImageExporter5 VTKImageImporter5 >>>> == second POLY (no >>>> output) >>>> >>>> but I don't know how to convert my vtkPolyData or how to typedef >>>> the VTKimporter to make it work : >>>> typedef unsigned short PixelType; >>>> typedef itk::Image ImageType; >>>> typedef itk::VTKImageImport ImageImportType; >>>> is ok but not with a polyData, and >>>> >>>> typedef itk::VTKImageImport ImageImportType; >>>> isn't ok >>>> >>>> Thanks a lot >>>> >>>> imho >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> _______________________________________________ >> Insight-users mailing list >> Insight-users@itk.org >> http://www.itk.org/mailman/listinfo/insight-users >> > > > > . > From wlorens1@nycap.rr.com Sat Jul 12 13:17:48 2003 From: wlorens1@nycap.rr.com (Bill Lorensen) Date: Sat, 12 Jul 2003 08:17:48 -0400 Subject: [Insight-users] compile without Cmake? In-Reply-To: <00b601c347ff$778fef20$ac6fda80@dweber> Message-ID: <5.2.0.9.2.20030712081621.024b65d0@pop.nycap.rr.com> Darren, itk builds just fine with cygwin. There is a cmake in the cygwin distribution. Also, itk and cmake both build with the free Borland 5.5 compiler. Bill At 03:54 PM 7/11/03 -0700, Darren Weber wrote: >Hi, > >is it possible to compile ITK without using Cmake? Can anyone help me to do >this? I am new to ITK and want to use it under windows, hopefully with Qt, >but I do not have any of the supported compilers in the Cmake options, so I >can't even get started. I've just discovered www.bloodshed.net where they >provide a nice IDE and a good port of gcc to windows. I also have cygwin >installed. I was thinking that ITK is open source, but it seems to get >going you really need a non-open source compiler (at least for windows). I >may be able to figure it out, but any tips would be greatly appreciated. > >Best regards, Darren > > >-- >Darren Weber >Postdoctoral Research Fellow >Dynamic Neuroimaging Laboratory >Department of Radiology > >University of California, San Francisco >521 Parnassus Avenue, Room C324 >San Francisco, CA 94143-0628 > >Web: http://dnl.ucsf.edu/users/dweber/ >Voice: (415) 514-2528 >Fax: (415) 514-0405 > >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users From wlorens1@nycap.rr.com Sat Jul 12 13:19:54 2003 From: wlorens1@nycap.rr.com (Bill Lorensen) Date: Sat, 12 Jul 2003 08:19:54 -0400 Subject: [Insight-users] ITK Book/Manual ??? In-Reply-To: <20030711215305.52346.qmail@web80509.mail.yahoo.com> References: <1840259920.20031019225228@lncc.br> Message-ID: <5.2.0.9.2.20030712081837.024a9670@pop.nycap.rr.com> Neha, The Software Guide is excellent. You can get it at: http://www.itk.org/HTML/Documentation.htm It is over 400 pages and is updated frequently. Bill At 02:53 PM 7/11/03 -0700, Neha D wrote: >Hi All, > >Is there book on ITK available now? > >Thanks, > >Neha > > >Do you Yahoo!? >SBC Yahoo! DSL - Now only $29.95 per month! From doumit.daou13@fnac.net Sun Jul 13 09:08:49 2003 From: doumit.daou13@fnac.net (Doumit Daou) Date: Sun, 13 Jul 2003 10:08:49 +0200 Subject: [Insight-users] Help acquire executable ITK program Message-ID: <001d01c34915$fde21960$a7db273e@doumitdaou> This is a multi-part message in MIME format. ------=_NextPart_000_001A_01C34926.C147D100 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I do not understand how software programming works. Naturally, I did not = succed in transforming all what I downoaded CMake, ITK... into = executable programs despite my efforts. This was not a surprise to me. Can somebody help me acquire exe application programs of ITK or give = details for a novice like me how to do it (step by step on a windows = platform with visual studio 6.0). It will be a great help to me.=20 Thank you for replying to my mail on the adress doumit.daou13@fnac.net Sincerely ------=_NextPart_000_001A_01C34926.C147D100 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I do not understand how software=20 programming works. Naturally, I did not succed in transforming all = what I=20 downoaded CMake, ITK... into executable programs despite my efforts. = This was=20 not a surprise to me.
Can somebody help me=20 acquire exe application programs of ITK or give details for a novice = like me how=20 to do it (step by step on a windows platform with visual studio=20 6.0).
It will be a great help to = me. 
Thank you for replying to my mail on = the adress doumit.daou13@fnac.net<= /DIV>
Sincerely
------=_NextPart_000_001A_01C34926.C147D100-- From felix.schwenk@nme.at Mon Jul 14 10:22:34 2003 From: felix.schwenk@nme.at (Felix Schwenk) Date: Mon, 14 Jul 2003 11:22:34 +0200 Subject: [Insight-users] Help acquire executable ITK program In-Reply-To: <001d01c34915$fde21960$a7db273e@doumitdaou> Message-ID: <000201c349e9$77c93af0$0700a8c0@jasmin> This is a multi-part message in MIME format. ------=_NextPart_000_0003_01C349FA.3B539190 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit take a look at the following dir: Insight/InsigthDocuments/CoursWare/Training in this dir you find some very helpful information on how to successfully build itk. mainly the tutorial.pdf helped me a lot. i'm not sure if this folder is part of the downloadable itk version, so maybe you have to get the cvs version. how to du a cvs checkout is explained on the itk download homepage. hope that helped. -----Original Message----- From: insight-users-admin@itk.org [mailto:insight-users-admin@itk.org] On Behalf Of Doumit Daou Sent: Sunday, July 13, 2003 10:09 AM To: insight-users@itk.org Subject: [Insight-users] Help acquire executable ITK program I do not understand how software programming works. Naturally, I did not succed in transforming all what I downoaded CMake, ITK... into executable programs despite my efforts. This was not a surprise to me. Can somebody help me acquire exe application programs of ITK or give details for a novice like me how to do it (step by step on a windows platform with visual studio 6.0). It will be a great help to me. Thank you for replying to my mail on the adress doumit.daou13@fnac.net Sincerely ------=_NextPart_000_0003_01C349FA.3B539190 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Nachricht
take a=20 look at the following dir:=20 Insight/InsigthDocuments/CoursWare/Training
in=20 this dir you find some very helpful information on how to successfully = build=20 itk.
mainly=20 the tutorial.pdf helped me a lot.
i'm=20 not sure if this folder is part of the downloadable itk version, so = maybe you=20
have=20 to get the cvs version. how to du a cvs checkout is explained on the=20
itk=20 download homepage.
 
hope=20 that helped.
 
-----Original Message-----
From: = insight-users-admin@itk.org=20 [mailto:insight-users-admin@itk.org] On Behalf Of Doumit=20 Daou
Sent: Sunday, July 13, 2003 10:09 AM
To:=20 insight-users@itk.org
Subject: [Insight-users] Help acquire=20 executable ITK program

I do not understand how software = programming works. Naturally, I did not succed in transforming = all what I=20 downoaded CMake, ITK... into executable programs despite my efforts. = This was=20 not a surprise to me.
Can somebody help me acquire exe application programs of ITK or give details for = a novice=20 like me how to do it (step by step on a windows platform with visual = studio=20 6.0).
It will be a great help to = me. 
Thank you for replying to my mail on = the adress=20 doumit.daou13@fnac.net<= /DIV>
Sincerely
------=_NextPart_000_0003_01C349FA.3B539190-- From rsiitd@yahoo.com Mon Jul 14 12:52:46 2003 From: rsiitd@yahoo.com (ravi sharma) Date: Mon, 14 Jul 2003 04:52:46 -0700 (PDT) Subject: [Insight-users] Jacobians Message-ID: <20030714115246.25331.qmail@web10507.mail.yahoo.com> Hi, I am using affinetransforms for 3D rigid rotations.When I see the results of the registration I see scalings etc.I only want Rigid Registration.Perhaps setting the Jacobian value to a constant(is it 1??) I can limit the registration to 3D rigid body Registration.Any Suggestions???? Regards, Ravi. __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From luis.ibanez@kitware.com Mon Jul 14 14:27:51 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 14 Jul 2003 09:27:51 -0400 Subject: [Insight-users] ITK Book/Manual ??? References: <20030711215305.52346.qmail@web80509.mail.yahoo.com> Message-ID: <3F12AFD7.4010509@kitware.com> Hi Neha, The printed version of the Insight Software Guide will be available by the end of August. This will be a revised version of the document http://www.itk.org/ItkSoftwareGuide.pdf The guide will be synchronized with ITK 1.4 which is scheduled to be released by September. Regards, Luis --------------- Neha D wrote: > Hi All, > > Is there book on ITK available now? > > Thanks, > > Neha > > ------------------------------------------------------------------------ > Do you Yahoo!? > SBC Yahoo! DSL > > - Now only $29.95 per month! From vincent-magnotta@uiowa.edu Sat Jul 12 13:19:18 2003 From: vincent-magnotta@uiowa.edu (Vincent A. Magnotta) Date: Sat, 12 Jul 2003 07:19:18 -0500 Subject: [Insight-users] compile without Cmake? In-Reply-To: <00b601c347ff$778fef20$ac6fda80@dweber> References: <00b601c347ff$778fef20$ac6fda80@dweber> Message-ID: <3F0FFCC6.9010708@tesla.psychiatry.uiowa.edu> Darren, ITK will build under cygwin with the gcc compilers and will also build under windows using the free borland command line compilers. The borland compilers are currently tested daily and the results are posted on the quality dashboard for ITK. I do not see s cygwin build there, but I built it last night under cygwin without any problems. Vince Darren Weber wrote: >Hi, > >is it possible to compile ITK without using Cmake? Can anyone help me to do >this? I am new to ITK and want to use it under windows, hopefully with Qt, >but I do not have any of the supported compilers in the Cmake options, so I >can't even get started. I've just discovered www.bloodshed.net where they >provide a nice IDE and a good port of gcc to windows. I also have cygwin >installed. I was thinking that ITK is open source, but it seems to get >going you really need a non-open source compiler (at least for windows). I >may be able to figure it out, but any tips would be greatly appreciated. > >Best regards, Darren > > >-- >Darren Weber >Postdoctoral Research Fellow >Dynamic Neuroimaging Laboratory >Department of Radiology > >University of California, San Francisco >521 Parnassus Avenue, Room C324 >San Francisco, CA 94143-0628 > >Web: http://dnl.ucsf.edu/users/dweber/ >Voice: (415) 514-2528 >Fax: (415) 514-0405 > >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users > > From luis.ibanez@kitware.com Mon Jul 14 14:37:22 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 14 Jul 2003 09:37:22 -0400 Subject: [Insight-users] Jacobians: Rigid Registration References: <20030714115246.25331.qmail@web10507.mail.yahoo.com> Message-ID: <3F12B212.2070206@kitware.com> Hi Ravi, You may want to use the RigidTransforms: http://www.itk.org/Insight/Doxygen/html/classitk_1_1Euler3DTransform.html http://www.itk.org/Insight/Doxygen/html/classitk_1_1VersorRigid3DTransform.html with any optimizer or http://www.itk.org/Insight/Doxygen/html/classitk_1_1QuaternionRigidTransform.html and it associated optimizer http://www.itk.org/Insight/Doxygen/html/classitk_1_1QuaternionRigidTransformGradientDescentOptimizer.html This last combination is probably the best option. Regards, Luis -------------------- ravi sharma wrote: > Hi, > I am using affinetransforms for 3D rigid > rotations.When I see the results of the registration I > see scalings etc.I only want Rigid > Registration.Perhaps setting the Jacobian value to a > constant(is it 1??) I can limit the registration to 3D > rigid body Registration.Any Suggestions???? > Regards, > Ravi. > From jiang@TI.Uni-Trier.DE Mon Jul 14 14:49:52 2003 From: jiang@TI.Uni-Trier.DE (jiang) Date: Mon, 14 Jul 2003 15:49:52 +0200 Subject: [Insight-users] Is there ITK java wrapping version? Message-ID: Hi, I want to know if there is java wrapping version of ITK. Is it possible to program in Java with ITK? Thanks a lot. Chunyan From luis.ibanez@kitware.com Mon Jul 14 15:27:21 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 14 Jul 2003 10:27:21 -0400 Subject: [Insight-users] registration and spacing: GetOutput() / SetSpacing() and const-correctness References: <3F0D8AD4.8050708@gmx.ch> <3F0DD22B.6010201@kitware.com> <3F0DDB80.7090200@gmx.ch> Message-ID: <3F12BDC9.4070200@kitware.com> Hi Michael, Thanks for sending your code. It helps to clarify the produre you are using. Here are some factor that can be preventing your registration process from working correctly. 1) The mechanism you are using for changing the image scale is not reliable. You are taking the output of the reader and invoking its SetSpacing() method. double spacing[2]; spacing[0] = 1.0 * FACTOR; spacing[1] = 1.0 * FACTOR; reader->GetOutput()->SetSpacing(spacing); *img = reader->GetOutput(); You shouldn't attempt to change the spacing of the Output() in any ITK filter, nor any other property of the filter output. The output of a filter belongs to the filter itself, and can be recomputed at any call of the Update() method. The changes of spacing that you are applying could be overriden by the next call to an Update() in the pipeline. If you double check in your GetAIM() method, you are invoking Update() on the importer, after having reset the Spacing of the reader. This Update() will override your spacing modifications. The GetOutput() method of ITK filters should infact return a ConstSmartPointer in order to prevent this miss-use of the output of a filter. This is something we may have to fix in a future release... Since you are doing this spacing change more for debugging purposes than for being part of a normal data pipeline, I'll suggest you to convert your PNG images into MetaImage format and then simply modify the spacing in the .mhd file. Then, execute your program using the .mhd files as input (instead of the PNG). Another option is to use the "ChangeInformationImageFilter" which allows you to modify image data in a pipeline compatible fashion. Note that this is a very risky operation that you would not like to have in a real medical application. Please don't use this for anything different than debugging. 2) In the conversion from VTK image to ITK image you may find convenient to use the filters: ImageToVTKImageFilter VTKImateToImageFilter available in InsightApplications/Auxiliary/vtk That will simplify the code in your GetAIM() function. 3) The only occasion in which you are entitled to call the SetSpacing() and SetOrigin() methods is when you create the image in a program, instead of reading it from a file, or taking it from the output of a filter. Filter outputs should not be modified. 4) PNG is a poor format for storing medical images. It is supported in ITK only for facilitating simple experiments, examples and demos. In real applications you may want to use a more reliable format like GIPL, Analyze, MetaImage or VTK. Regards, Luis ------------------------ Michael Kuhn wrote: > Hi Luis, > > I think, my explanation of the setup was not very clear. I've attached > my code to avoid any misunderstandings. > > I do in fact scale the spacing of both images, the fixed as well as the > moving image. The two final Print statements in the code show the same > spacing for any value of FACTOR. > > We introduced this FACTOR, since we noticed that the registration worked > for images with spacing 1.0 but didn't for images with spacing 0.034. > Therefore we tried to alter the working version (using spacing 1.0) into > a version with different spacing and expected it to work. However, it > didn't. > > Since transformations are done in physical space, we scale the transform > vector as well as the initial parameters and the step sizes. Is there > something more we would have to scale by the same factor? > > In case the program is fed with a 2D png image, I write the fixed and > the moving images to disk. The resulting images seem to be ok for me > (i.e. one looks exactly like the original one and the other has the same > dimensions (in pixels) but is translated a little bit to the top right > and is black at the left and bottom edge). > > In case of 2D png images, the registrations produces incorrect results > for FACTOR above approximately 4 and it doesn't iterate (but generates > an end event immediately after the start event) for FACTOR values below > apprixunately 0.1. > > In case of 3D aim data (an image type used for CT images by some people, > which uses short intensities), the behaviour is slightly different. In > this case, the registrations always iterates, but produces wrong results > (except for spacing 1.0). > > Thanks a lot for your help, > > Michael > > > > Luis Ibanez wrote: > >> >> Hi Michael, >> >> It is normal that the registration fails in the setup that you >> are configuring. >> >> Your ImageRegistrationMethod is using a "TranslationTransform". >> >> This transform cannot compensate for the scaling changes that >> you are introducing when you change the pixel spacing. >> >> If you want to compensate for translation and scaling you may have >> to use a "SimilarityTransform" which is the simplest transform >> capable of managing both translation and scaling. You could also >> go one step further and use an "AffineTransform". >> >> Your expectation of the registration to work with a common >> scaling of the factors you altered, seems to be based on the >> assumption that registraion is performed in pixel space. That >> is, in the discrete grid of the images. >> >> However, registration in ITK is not performed in the pixel space. >> It is performed in the physical space in millimeters. >> >> When you scale the pixel spacing of one image, you create the >> conditions for registering two objects that have different >> physical sizes. The correspondance between these two object >> can only be achieved with a Transform supporting some form of >> scaling factor. >> >> >> --- >> >> >> Just on the side: Note that a scale factor of 2X is quite >> aggresive. In normal conditions in medical image registration >> we would not expect to find such a huge scale factor in normal >> anatomical structures, unless you were comparing infants with >> adults. E.g. For reference: In humans, the size of the brain >> in the newborn is about 25% of its adult size and it reaches >> about 75 % of its adult size by the end of the first year. >> >> >> >> >> Regards >> >> >> >> Luis >> >> >> ----------------------- >> Michael Kuhn wrote: >> >>> Hi, >>> >>> I'm trying to do a registration using 3D Data (pixel type short). The >>> general setup is as follows: >>> >>> The input consists of one file containing the data. The data is then >>> transformed using a ResampleImageFilter which applies a translation >>> to it. Afterwards, the original as well as the transformed image are >>> fed into a ImageRegistrationMethod as fixed (original) and moving >>> (translated) image respectively. >>> >>> If the spacing of both data sets is set to 1.0 (in every direction), >>> the registration works fine. However if I scale the spacings as well >>> as the translation vector (for the translation itself as well as the >>> initalParameters for the registration) and the minimum/maximum step >>> length with the same factor, the registration doesn't work any longer >>> (i.e. produces incorrect results). The origin of the data was set to >>> [0,0,0]. >>> >>> I would expect that the registration works for any common scaling of >>> these parameters, however, it doesn't. Can somebody explain me why? >>> >>> My dataset has a size of [40,40,40] and I translate it with >>> parameters FACTOR * [-1, -2, 0]. The initial parameters are set to >>> FACTOR * [2,2,0] (where FACTOR is the common scaling factor mentioned >>> above). The max and min step length are set to FACTOR * 4.0 and >>> FACTOR * 0.01 respectively. >>> >>> For the initial transform as well as the registration I use a >>> TranslateTransform and a >>> LinearInterpolateImageFunction. The registration >>> is done using a RegularStepGradientDescentOptimzer and a >>> MeanSquaresImageToImageMetric. >>> >>> Thanks, >>> >>> Michael >>> >>> _______________________________________________ >>> Insight-users mailing list >>> Insight-users@itk.org >>> http://www.itk.org/mailman/listinfo/insight-users >>> >> >> >> >> > > > ------------------------------------------------------------------------ > > #include "itkRGBPixel.h" > #include "itkImageFileReader.h" > #include "itkImageFileWriter.h" > #include "itkRescaleIntensityImageFilter.h" > #include "itkImage.h" > > #include "itkImageRegistrationMethod.h" > #include "itkTranslationTransform.h" > #include "itkMeanSquaresImageToImageMetric.h" > #include "itkLinearInterpolateImageFunction.h" > #include "itkBSplineInterpolateImageFunction.h" > #include "itkRegularStepGradientDescentOptimizer.h" > #include "itkNearestNeighborInterpolateImageFunction.h" > > #include "itkResampleImageFilter.h" > > #include "itkVTKImageImport.h" > > #include "vtkAIMReader.h" > #include "vtkImageExport.h" > > #include "vtkUtility.h" > #include "vtkPipelineConnectorVTK2ITK.h" > #include "observer.h" > > #include > > #define FACTOR 2.0 > > typedef short PixelType; > typedef itk::Image ImageType; > > template > void GetPNG(char* inputFilename, ImageTypePointer *img) { > typedef itk::ImageFileReader ReaderType; > ReaderType::Pointer reader = ReaderType::New(); > reader->SetFileName(inputFilename); > reader->Update(); > double spacing[2]; > spacing[0] = 1.0 * FACTOR; > spacing[1] = 1.0 * FACTOR; > reader->GetOutput()->SetSpacing(spacing); > *img = reader->GetOutput(); > } > > template > void GetAIM(char* inputFilename, ImageTypePointer *img) { > vtkAIMReader *reader = vtkAIMReader::New(); > reader->SetFileName(inputFilename); > reader->Update(); > float* spacing = reader->GetOutput()->GetSpacing(); > cout << "aimreader.spacing: " << spacing[0] << " " << spacing[1] << > " " << spacing[2] << endl; > spacing[0] = FACTOR * 1.0; //FACTOR * 0.019998; > spacing[1] = FACTOR * 1.0; //FACTOR * 0.019998; > spacing[2] = FACTOR * 1.0; //FACTOR * 0.021; > reader->GetOutput()->SetSpacing(spacing); > float* origin = reader->GetOutput()->GetOrigin(); > origin[0] = FACTOR * 0.0; > origin[1] = FACTOR * 0.0; > origin[2] = FACTOR * 0.0; > reader->GetOutput()->SetOrigin(origin); > reader->GetOutput()->PrintSelf(std::cout, 0); > > // reader->Update(); > vtkImageExport *vtkExporter = vtkImageExport::New(); > vtkExporter->SetInput(reader->GetOutput()); > typedef itk::VTKImageImport ImageImportType; > ImageImportType::Pointer itkImporter = ImageImportType::New(); > vtkPipelineConnectorVTK2ITK:: > ConnectPipelines(vtkExporter, itkImporter); > itkImporter->Update(); > *img = itkImporter->GetOutput(); > } > > template > void GenerateData(ImageTypePointer* myImage) { > const unsigned int Dimension = (*myImage)->GetImageDimension(); > ImageTypePointer::ObjectType::IndexType start; > ImageTypePointer::ObjectType::SizeType size; > double* spacing = new double[Dimension]; > double* origin = new double[Dimension]; > for (int i = 0; i < Dimension; i++) { > start[i] = 0; > size[i] = 40; > spacing[i] = 1.0; > origin[i] = 0.0; > } > ImageTypePointer::ObjectType::RegionType region; > region.SetSize(size); > region.SetIndex(start); > (*myImage)->SetRegions(region); > (*myImage)->Allocate(); > (*myImage)->SetSpacing(spacing); > (*myImage)->SetOrigin(origin); > ImageTypePointer::ObjectType::IndexType idx; > for(int x = 0; x < size[0]; x++) { > for(int y = 0; y < size[1]; y++) { > if (Dimension > 2) { > // generate 3D data > for(int z = 0; z < size[2]; z++) { > idx[0] = x; > idx[1] = y; > idx[2] = z; > if (x > size[0] / 4 && x < (size[0] * 3) / 4 && > y > size[1] / 4 && y < (size[1] * 3) / 4 && > z > size[2] / 4 && z < (size[2] * 3) / 4) { > (*myImage)->SetPixel(idx, 100); > } else { > (*myImage)->SetPixel(idx, 0); > } > } > } else { > // generate 2D data > idx[0] = x; > idx[1] = y; > if (x > size[0] / 4 && x < (size[0] * 3) / 4 && > y > size[1] / 4 && y < (size[1] * 3) / 4) { > (*myImage)->SetPixel(idx, 100); > } else { > (*myImage)->SetPixel(idx, 0); > } > } > } > } > } // generate own data > > char* GetInterpolatorType(int argc, char** argv) { > char* type = new char[20]; > if (vtkUtility::GetParam("-i", type, argc, argv)) { > if (strcmp(type, "linear") == 0 || strcmp(type, "bspline") == 0 || > strcmp(type, "nearest") == 0) { > return type; > } > } > return "linear"; > } > > template > void SetInterpolator(RegistrationTypePointer* reg, char* type) { > if (strcmp(type, "linear") == 0) { > typedef itk::LinearInterpolateImageFunction< > RegistrationTypePointer::ObjectType::MovingImageType, double> > InterpolatorType; > InterpolatorType::Pointer interpolator = InterpolatorType::New(); > (*reg)->SetInterpolator(interpolator); > cout << "using linear interpolator." << endl; > } else if (strcmp(type, "bspline") == 0) { > // http:// compare: public.kitware.com/Insight/Web/Doxygen/html/ > // classitk_1_1BSplineInterpolateImageFunction.html#s10 > // for the templating > typedef itk::BSplineInterpolateImageFunction< > RegistrationTypePointer::ObjectType::MovingImageType, double, > double> InterpolatorType; > InterpolatorType::Pointer interpolator = InterpolatorType::New(); > (*reg)->SetInterpolator(interpolator); > interpolator->SetSplineOrder(3); > cout << "using bspline interpolator with order 3." << endl; > } else if (strcmp(type, "nearest") == 0) { > typedef itk::NearestNeighborInterpolateImageFunction< > RegistrationTypePointer::ObjectType::MovingImageType, double> > InterpolatorType; > InterpolatorType::Pointer interpolator = InterpolatorType::New(); > (*reg)->SetInterpolator(interpolator); > cout << "using nearest neighbor interpolator." << endl; > } > } > > > template > itk::InterpolateImageFunction::Pointer GetInterpolator(ImageTypePointer img) { > if (strcmp(typ, "bspline") == 0) { > // http:// compare: public.kitware.com/Insight/Web/Doxygen/html/ > // classitk_1_1BSplineInterpolateImageFunction.html#s10 > // for the templating > typedef itk::BSplineInterpolateImageFunction< > ImageTypePointer::ObjectType, double, double> > InterpolatorType; > InterpolatorType::Pointer interpolator = InterpolatorType::New(); > cout << "using bspline interpolator with order 3." << endl; > interpolator->SetSplineOrder(3); > return interpolator; > } else if (strcmp(type, "nearest") == 0) { > typedef itk::NearestNeighborInterpolateImageFunction< > ImageTypePointer::ObjectType, double> > InterpolatorType; > InterpolatorType::Pointer interpolator = InterpolatorType::New(); > cout << "using nearest neighbor interpolator." << endl; > return interpolator; > } > // default: linear interpolator > typedef itk::LinearInterpolateImageFunction double> > InterpolatorType; > InterpolatorType::Pointer interpolator = InterpolatorType::New(); > cout << "using linear interpolator." << endl; > return interpolator; > } > > > int main(int argc, char** argv) > { > char inputFilename[255]; > > const unsigned int Dimension = 2; // use 2 in case of png images > // use 3 in case of aim images > // typedef short PixelType; > // typedef itk::Image ImageType; > > bool png = false; > > ImageType::Pointer myImage; > if (vtkUtility::GetParam("-png", inputFilename, argc, argv)) { > GetPNG(inputFilename, &myImage); > cout << "PNG image imported." << endl; > png = true; > } else if (vtkUtility::GetParam("-aim", inputFilename, argc, argv)) { > GetAIM(inputFilename, &myImage); > cout << "aim image imported" << endl; > } else { > //generate own data > myImage = ImageType::New(); > GenerateData(&myImage); > cout << "own data generated" << endl; > } > > myImage->Print(std::cout); > > typedef itk::ResampleImageFilter FilterType; > FilterType::Pointer filter = FilterType::New(); > > > > typedef itk::TranslationTransform TransformType; > typedef itk::LinearInterpolateImageFunction > InterpolatorType; > InterpolatorType::Pointer myInterpolator = InterpolatorType::New(); > filter->SetInterpolator(myInterpolator); > > > filter->SetDefaultPixelValue(0); > > //double spacing[Dimension]; > //double origin[Dimension]; > //for (int i = 0; i < Dimension; i++) { > // spacing[i] = 1.0; > // origin[i] = 1.0; > //} > > const double* spacing = myImage->GetSpacing(); > const double* origin = myImage->GetOrigin(); > > filter->SetOutputSpacing(spacing); > filter->SetOutputOrigin(origin); > > ImageType::SizeType size = > myImage->GetLargestPossibleRegion().GetSize(); > //size[0] = size[0] + 10; > //size[1] = size[1] + 15; > > std::cout << "size: " << size[0] << " " << size[1] << std::endl; > filter->SetSize(size); > > TransformType::Pointer myTransform = TransformType::New(); > TransformType::OutputVectorType translation; > translation[0] = FACTOR * -1; > translation[1] = FACTOR * -2; > if (Dimension > 2) { > translation[2] = 0.0; > } > > myTransform->Translate(translation); > filter->SetTransform(myTransform); > > filter->SetInput(myImage); > > typedef itk::ImageRegistrationMethod > RegistrationType; > RegistrationType::Pointer registration = RegistrationType::New(); > > //**************************************** > > typedef itk::LinearInterpolateImageFunction > InterpolatorType; > > // InterpolatorType::Pointer interpolator = GetInterpolator(registration->GetMovingImage()); > > //**************************************** > > > SetInterpolator(®istration, GetInterpolatorType(argc, argv)); > char* type = GetInterpolatorType(argc, argv); > // registration->SetInterpolator(interpolator); > > typedef itk::RegularStepGradientDescentOptimizer OptimizerType; > typedef itk::MeanSquaresImageToImageMetric > MetricType; > > MetricType::Pointer metric = MetricType::New(); > TransformType::Pointer transform = TransformType::New(); > OptimizerType::Pointer optimizer = OptimizerType::New(); > //InterpolatorType::Pointer interpolator = InterpolatorType::New(); > > registration->SetMetric(metric); > registration->SetOptimizer(optimizer); > registration->SetTransform(transform); > //registration->SetInterpolator(interpolator); > > registration->SetFixedImage(myImage); > > cout << "%%%%%%%%%%%%%%fixed image%%%%%%%%%%%%%%%%%" << endl; > myImage->Print(std::cout); > cout << endl; > > filter->Update(); > > registration->SetMovingImage(filter->GetOutput()); > cout << "%%%%%%%%%%%%%%moving image%%%%%%%%%%%%%%%%" << endl; > filter->GetOutput()->Print(std::cout); > cout << endl; > > if (png) { > typedef unsigned char OutputPixelType; > typedef itk::Image OutputImageType; > typedef itk::RescaleIntensityImageFilter > CastFilterType; > CastFilterType::Pointer castFilter = CastFilterType::New(); > typedef itk::ImageFileWriter WriterType; > WriterType::Pointer writer = WriterType::New(); > castFilter->SetOutputMinimum(0); > castFilter->SetOutputMaximum(255); > try { > castFilter->SetInput(myImage); > writer->SetFileName("d:\\regProjectData\\PNGs\\fixed.png"); > writer->SetInput(castFilter->GetOutput()); > writer->Update(); > castFilter->SetInput(filter->GetOutput()); > writer->SetFileName("d:\\regProjectData\\PNGs\\moving.png"); > writer->SetInput(castFilter->GetOutput()); > writer->Update(); > } catch (itk::ExceptionObject &err) { > std::cout << "Exception while writing files: " << std::endl; > std::cout << err << std::endl; > return -2; > } > } > > registration->SetFixedImageRegion( > myImage->GetBufferedRegion()); > > typedef RegistrationType::ParametersType ParametersType; > ParametersType initialParameters( transform->GetNumberOfParameters()); > initialParameters[0] = FACTOR * 2; > initialParameters[1] = FACTOR * 2; > if (Dimension > 2) { > initialParameters[2] = 0.0; > } > registration->SetInitialTransformParameters(initialParameters); > > double minStep; > if (!vtkUtility::GetParam("-minStep", &minStep, argc, argv)) { > minStep = FACTOR * 0.01; > } > cout << "using minimum step length of " << minStep << endl; > double maxStep; > if (!vtkUtility::GetParam("-maxStep", &maxStep, argc, argv)) { > maxStep = FACTOR * 4.0; > } > cout << "using maximum step length of " << maxStep << endl; > optimizer->SetMinimumStepLength(minStep); > optimizer->SetMaximumStepLength(maxStep); > > optimizer->SetNumberOfIterations(200); > > Observer::Pointer observer = Observer::New(); > > optimizer->AddObserver(itk::IterationEvent(), observer); > optimizer->AddObserver(itk::StartEvent(), observer); > optimizer->AddObserver(itk::EndEvent(), observer); > optimizer->AddObserver(itk::ProgressEvent(), observer); > > try { > registration->StartRegistration(); > } catch (itk::ExceptionObject &err) { > std::cerr << "ExceptionObject caught!" << std::endl; > std::cerr << err << std::endl; > return -1; > } > > > ParametersType finalParameters = > registration->GetLastTransformParameters(); > const double xTrans = finalParameters[0]; > const double yTrans = finalParameters[1]; > double zTrans = 0; > if (Dimension > 2) { > zTrans = finalParameters[2]; > } > > const unsigned int numberOfIterations = optimizer->GetCurrentIteration(); > const double bestValue = optimizer->GetValue(); > > std::cout << "xTrans: " << xTrans << std::endl; > std::cout << "yTrans: " << yTrans << std::endl; > if (Dimension > 2) { > std::cout << "zTrans: " << zTrans << std::endl; > } > > std::cout << "numberOfIterations: " << numberOfIterations << std::endl; > std::cout << "bestValue: " << bestValue << std::endl; > > > cout << "%%%%%%%%%%%%%%fixed image after reg%%%%%%%%%%%%%%%%%" << endl; > myImage->Print(std::cout); > cout << endl; > > //filter->Update(); > > registration->SetMovingImage(filter->GetOutput()); > cout << "%%%%%%%%%%%%%%moving image after reg%%%%%%%%%%%%%%%%" << endl; > filter->GetOutput()->Print(std::cout); > cout << endl; > > > return 0; > } > From luis.ibanez@kitware.com Mon Jul 14 20:38:56 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 14 Jul 2003 15:38:56 -0400 Subject: [Insight-users] registration and spacing: GetOutput() / SetSpacing() and const-correctness References: <3F0D8AD4.8050708@gmx.ch> <3F0DD22B.6010201@kitware.com> <3F0DDB80.7090200@gmx.ch> <3F12BDC9.4070200@kitware.com> <3F12E5BF.7080407@gmx.ch> Message-ID: <3F1306D0.5060500@kitware.com> Hi Michael, GetOutput() on the VTKImageToImage filter shouldn't generate a compiler error. Could you please post this error message to the users-list ? You probably need "img" to be a "ImageTypeConstPointer * img" Instead of what you seem to be passing now: "ImageTypePointer * img" The reason why you don't find documentation of VTKImageToImage in the Doxygen pages is that this class is not officially part of ITK. It is just provided for convenience for exactly what you are using : interfacing VTK with ITK. ---- Your new test is better configured, since now you are setting the spacing in the right place (the input images). The Optimizer steps are not necessarily in millimeters since they represent in general the parameters of any transform. However in the case of the Translation transform you can probably make this assumption safely. If the pixel spacing of your images is 0.0199, you may want to set the MinimumStepLength() to half of this value (e.g. your registration will have a precision of half a pixel), and you may want to set the MaximumStepLength() to 10X 0.0199, (that is, the first step will be ten pixels long). I'm affraid that at this point your code contains much more lines than what you really need for this task. I would suggest you to generate MetaImages from your data, and use the example in Insight/Examples/Registration/ImageRegistration3.cxx for refining your parameters. Start trying with minStepLength = 0.01 maxStepLength = 0.20 Note that the optimizer can stop due to several different reasons. There is a method GetStopCondition() that will tell you the reason for the optimizer to stop Valid reasons are defined in itkRegularStepGradientDescentBaseOptimizer.h GradientMagnitudeTolerance, StepTooSmall, ImageNotAvailable, SamplesNotAvailable, MaximumNumberOfIterations Call this GetStopCondition() method after the optimizer stops, and double check the reason for stopping. Regards, Luis ---------------------- Michael Kuhn wrote: > Hi Luis, > > I've meanwhile rewritten the GetAIM() function. It now uses the > VTKImageToImage filter you've suggested. [By the way, I didn't find the > class in the "alphabetical list" in the html documentation > (http://www.itk.org/Doxygen12/html/classes.html) of itk. Is there a html > documentation around? I had the problem, that invoking > vtk2itkFilter->GetOutput() produced a compile error (probably because of > the "const"). I used vtk2itkFilter->GetImporter()->GetOutput() instead. > Everything seems to work fine, however, I'm not quite sure if this is a > nice solution] > > Back to my problem about spacing. Instead of adjusting the spacing of my > aim data inside my program, I've adjusted them outside the program (i.e. > using a tool which allows to adjust the aim data itself). Using a > spacing of 1, the registration works fine. Using a spacing of 0.019998 > (which is the original spacing), the registration creates a start event, > no iteration event, and a end event (i.e. doesn't iterate). Since the > length of the translation vector, the min and max step size and the > initial parameters have to be adjusted according to the scaling (since > all of them are measured in mm, aren't they?), I've replaced FACTOR by a > double variable factor, which is set to spacing[0]. (The spacings in > other directions are in about the same (0.019998, 0.019998, 0.021)). > > I've attached the new code. > > Thanks a lot for your help. > > Kind regards, > > Michael > > > > > Luis Ibanez wrote: > >> >> Hi Michael, >> >> >> Thanks for sending your code. >> It helps to clarify the produre you are using. >> >> >> Here are some factor that can be preventing your >> registration process from working correctly. >> >> >> 1) The mechanism you are using for changing the >> image scale is not reliable. You are taking >> the output of the reader and invoking its >> SetSpacing() method. >> >> >> double spacing[2]; >> spacing[0] = 1.0 * FACTOR; >> spacing[1] = 1.0 * FACTOR; >> reader->GetOutput()->SetSpacing(spacing); >> *img = reader->GetOutput(); >> >> >> You shouldn't attempt to change the spacing >> of the Output() in any ITK filter, nor any >> other property of the filter output. The output >> of a filter belongs to the filter itself, and >> can be recomputed at any call of the Update() >> method. The changes of spacing that you >> are applying could be overriden by the next >> call to an Update() in the pipeline. >> >> If you double check in your GetAIM() method, >> you are invoking Update() on the importer, >> after having reset the Spacing of the reader. >> This Update() will override your spacing >> modifications. >> >> >> The GetOutput() method of ITK filters should >> infact return a ConstSmartPointer in order >> to prevent this miss-use of the output of a filter. >> This is something we may have to fix in a future >> release... >> >> Since you are doing this spacing change more >> for debugging purposes than for being part of >> a normal data pipeline, I'll suggest you to >> convert your PNG images into MetaImage format >> and then simply modify the spacing in the .mhd >> file. Then, execute your program using the .mhd >> files as input (instead of the PNG). >> >> Another option is to use the "ChangeInformationImageFilter" >> which allows you to modify image data in a pipeline >> compatible fashion. Note that this is a very risky >> operation that you would not like to have in a >> real medical application. Please don't use this >> for anything different than debugging. >> >> >> >> 2) In the conversion from VTK image to ITK image >> you may find convenient to use the filters: >> >> ImageToVTKImageFilter >> VTKImateToImageFilter >> >> available in InsightApplications/Auxiliary/vtk >> >> That will simplify the code in your GetAIM() function. >> >> >> >> 3) The only occasion in which you are entitled to call >> the SetSpacing() and SetOrigin() methods is when you >> create the image in a program, instead of reading it >> from a file, or taking it from the output of a filter. >> >> Filter outputs should not be modified. >> >> >> 4) PNG is a poor format for storing medical images. >> It is supported in ITK only for facilitating simple >> experiments, examples and demos. In real applications >> you may want to use a more reliable format like GIPL, >> Analyze, MetaImage or VTK. >> >> >> >> >> Regards, >> >> >> Luis >> >> From michakuhn@gmx.ch Mon Jul 14 21:01:28 2003 From: michakuhn@gmx.ch (Michael Kuhn) Date: Mon, 14 Jul 2003 14:01:28 -0600 Subject: [Insight-users] registration and spacing: GetOutput() / SetSpacing() and const-correctness References: <3F0D8AD4.8050708@gmx.ch> <3F0DD22B.6010201@kitware.com> <3F0DDB80.7090200@gmx.ch> <3F12BDC9.4070200@kitware.com> <3F12E5BF.7080407@gmx.ch> <3F1306D0.5060500@kitware.com> Message-ID: <3F130C18.7090103@gmx.ch> Hi, the error message I got was: Compiling... RegistrationTest.cxx D:\pack\vtkMy\src\Applications\Mixed\RegistrationTest\RegistrationTest.cxx(97) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'void' (or there is no acceptable conversion) D:\pack\vtkMy\src\Applications\Mixed\RegistrationTest\RegistrationTest.cxx(213) : see reference to function template instantiation 'void __cdecl GetAIM(char *,class itk::SmartPointer > *,double *)' being compiled D:\pack\vtkMy\src\Applications\Mixed\RegistrationTest\RegistrationTest.cxx(98) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'const class itk::Image *' (or there is no acceptable conversion) D:\pack\vtkMy\src\Applications\Mixed\RegistrationTest\RegistrationTest.cxx(213) : see reference to function template instantiation 'void __cdecl GetAIM(char *,class itk::SmartPointer > *,double *)' being compiled Error executing cl.exe. TestRegistrationTest.exe - 2 error(s), 0 warning(s) The code basically looks like this: template void GetAIM(char* inputFilename, ImageTypePointer *img) { (...) vtk2itkFilter->SetInput(reader->GetOutput()); vtk2itkFilter->GetImporter()->Update(); *img = vtk2itkFilter->Update(); *img = vtk2itkFilter->GetOutput(); } main(...) { (...) typedef short PixelType; typedef itk::Image ImageType; ImageType::Pointer myImage; (...) GetAIM(filename, myImage); (...) } Kind regards, Michael Luis Ibanez wrote: > > Hi Michael, > > > GetOutput() on the VTKImageToImage filter shouldn't generate a > compiler error. Could you please post this error message to > the users-list ? > > You probably need "img" to be a > > "ImageTypeConstPointer * img" > > Instead of what you seem to be passing now: > > "ImageTypePointer * img" > > > The reason why you don't find documentation of VTKImageToImage > in the Doxygen pages is that this class is not officially part > of ITK. It is just provided for convenience for exactly what > you are using : interfacing VTK with ITK. > > ---- > > Your new test is better configured, since now you are setting > the spacing in the right place (the input images). > > > The Optimizer steps are not necessarily in millimeters since > they represent in general the parameters of any transform. > However in the case of the Translation transform you can > probably make this assumption safely. > > If the pixel spacing of your images is 0.0199, you may want to > set the MinimumStepLength() to half of this value (e.g. your > registration will have a precision of half a pixel), and you > may want to set the MaximumStepLength() to 10X 0.0199, (that > is, the first step will be ten pixels long). > > I'm affraid that at this point your code contains much more lines > than what you really need for this task. I would suggest you > to generate MetaImages from your data, and use the example in > > > Insight/Examples/Registration/ImageRegistration3.cxx > > > for refining your parameters. > > Start trying with > > minStepLength = 0.01 > maxStepLength = 0.20 > > Note that the optimizer can stop due to several different > reasons. There is a method > > GetStopCondition() > > that will tell you the reason for the optimizer to stop > > Valid reasons are defined in > > itkRegularStepGradientDescentBaseOptimizer.h > > > GradientMagnitudeTolerance, > StepTooSmall, > ImageNotAvailable, > SamplesNotAvailable, > MaximumNumberOfIterations > > > Call this GetStopCondition() method after the optimizer > stops, and double check the reason for stopping. > > > > Regards, > > > Luis > > > ---------------------- > Michael Kuhn wrote: > >> Hi Luis, >> >> I've meanwhile rewritten the GetAIM() function. It now uses the >> VTKImageToImage filter you've suggested. [By the way, I didn't find >> the class in the "alphabetical list" in the html documentation >> (http://www.itk.org/Doxygen12/html/classes.html) of itk. Is there a >> html documentation around? I had the problem, that invoking >> vtk2itkFilter->GetOutput() produced a compile error (probably because >> of the "const"). I used vtk2itkFilter->GetImporter()->GetOutput() >> instead. Everything seems to work fine, however, I'm not quite sure >> if this is a nice solution] >> >> Back to my problem about spacing. Instead of adjusting the spacing of >> my aim data inside my program, I've adjusted them outside the program >> (i.e. using a tool which allows to adjust the aim data itself). Using >> a spacing of 1, the registration works fine. Using a spacing of >> 0.019998 (which is the original spacing), the registration creates a >> start event, no iteration event, and a end event (i.e. doesn't >> iterate). Since the length of the translation vector, the min and max >> step size and the initial parameters have to be adjusted according to >> the scaling (since all of them are measured in mm, aren't they?), >> I've replaced FACTOR by a double variable factor, which is set to >> spacing[0]. (The spacings in other directions are in about the same >> (0.019998, 0.019998, 0.021)). >> >> I've attached the new code. >> >> Thanks a lot for your help. >> >> Kind regards, >> >> Michael >> >> >> >> >> Luis Ibanez wrote: >> >>> >>> Hi Michael, >>> >>> >>> Thanks for sending your code. >>> It helps to clarify the produre you are using. >>> >>> >>> Here are some factor that can be preventing your >>> registration process from working correctly. >>> >>> >>> 1) The mechanism you are using for changing the >>> image scale is not reliable. You are taking >>> the output of the reader and invoking its >>> SetSpacing() method. >>> >>> >>> double spacing[2]; >>> spacing[0] = 1.0 * FACTOR; >>> spacing[1] = 1.0 * FACTOR; >>> reader->GetOutput()->SetSpacing(spacing); >>> *img = reader->GetOutput(); >>> >>> >>> You shouldn't attempt to change the spacing >>> of the Output() in any ITK filter, nor any >>> other property of the filter output. The output >>> of a filter belongs to the filter itself, and >>> can be recomputed at any call of the Update() >>> method. The changes of spacing that you >>> are applying could be overriden by the next >>> call to an Update() in the pipeline. >>> >>> If you double check in your GetAIM() method, >>> you are invoking Update() on the importer, >>> after having reset the Spacing of the reader. >>> This Update() will override your spacing >>> modifications. >>> >>> >>> The GetOutput() method of ITK filters should >>> infact return a ConstSmartPointer in order >>> to prevent this miss-use of the output of a filter. >>> This is something we may have to fix in a future >>> release... >>> >>> Since you are doing this spacing change more >>> for debugging purposes than for being part of >>> a normal data pipeline, I'll suggest you to >>> convert your PNG images into MetaImage format >>> and then simply modify the spacing in the .mhd >>> file. Then, execute your program using the .mhd >>> files as input (instead of the PNG). >>> >>> Another option is to use the "ChangeInformationImageFilter" >>> which allows you to modify image data in a pipeline >>> compatible fashion. Note that this is a very risky >>> operation that you would not like to have in a >>> real medical application. Please don't use this >>> for anything different than debugging. >>> >>> >>> >>> 2) In the conversion from VTK image to ITK image >>> you may find convenient to use the filters: >>> >>> ImageToVTKImageFilter >>> VTKImateToImageFilter >>> >>> available in InsightApplications/Auxiliary/vtk >>> >>> That will simplify the code in your GetAIM() function. >>> >>> >>> >>> 3) The only occasion in which you are entitled to call >>> the SetSpacing() and SetOrigin() methods is when you >>> create the image in a program, instead of reading it >>> from a file, or taking it from the output of a filter. >>> >>> Filter outputs should not be modified. >>> >>> >>> 4) PNG is a poor format for storing medical images. >>> It is supported in ITK only for facilitating simple >>> experiments, examples and demos. In real applications >>> you may want to use a more reliable format like GIPL, >>> Analyze, MetaImage or VTK. >>> >>> >>> >>> >>> Regards, >>> >>> >>> Luis >>> >>> > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > > From sven.prevrhal@oarg.ucsf.edu Mon Jul 14 21:23:52 2003 From: sven.prevrhal@oarg.ucsf.edu (Sven Prevrhal) Date: Mon, 14 Jul 2003 13:23:52 -0700 Subject: [Insight-users] geodesic active contours: problems with fast marching Message-ID: <001301c34a45$de7fc460$7f07da0a@RORG.OARG.UCSF.EDU> Hi, I use version 1.2.0 and want to use the geodesic active contours = application example for segmenting some bone in a stack of CT images. I use positive alpha for the sigmoid filter, so the speed image is > 0 inside the bone, = and small or zero outside the bone. I place 2 seed points inside the bone on = the center slice. I have three difficulties: 1. Seed points and fast marching: The bone splits in two pieces in the = "top" slices. How can I avoid having the results of the fast marching leak = into the gap between the bone in these slices? 2. The advection term doesn't seem to do anything. I get the same = results even for terms > 1.=20 3. The iterations leak into the surrounding tissue almost independently = of the slice, ie the result looks the same on all slices. Help totally appreciated! (Thanks Luis for the last one, the UpdateLargestPossibleRegion for chaining resampling output to another = filter worked!) :-) sven -- From lng@insightful.com Mon Jul 14 23:03:54 2003 From: lng@insightful.com (Lydia Ng) Date: Mon, 14 Jul 2003 15:03:54 -0700 Subject: [Insight-users] geodesic active contours: problems with fast marching Message-ID: > I did indeed play with the parameters, and the advection scaling makes > almost no difference. How do I turn off the other terms? Setting them to > zero or one? Setting the weight/scaling to zero will turn a term off. I think with the GAC filter you will need to have some propagation otherwise it is slow to expand. - Lydia > -----Original Message----- > From: Sven Prevrhal [mailto:sven.prevrhal@oarg.ucsf.edu] > Sent: Monday, July 14, 2003 2:57 PM > To: Lydia Ng > Subject: RE: [Insight-users] geodesic active contours: problems with fast > marching >=20 > Hi Lydia, >=20 > No I use the fast marching just to generate little spheres. I don't know > why > the application example does this, I guess to save computation time. I can > and do use smaller spheres. I tried the fast marching on the speed image, > but with disappointing results - a lot of leaking. That's why I tried the > geodesic contouring so I can have an advection term. >=20 > I did indeed play with the parameters, and the advection scaling makes > almost no difference. How do I turn off the other terms? Setting them to > zero or one? >=20 > Yes I could of course use more seed points but then I would get seeds in > the > outside region for the slices where the bone has branched. (It is a femur, > and for slices above the neck you have the major trochanter and the head > disjoint.) So I guess the active contouring needs to do that for me. >=20 > :-) sven > -- > Sven Prevrhal, Ph.D. > Assistant Adjunct Professor > University of California, San Francisco > Dept. of Radiology > Osteoporosis and Arthritis Research Group > 533 Parnassus Ave U368J > San Francisco, CA 94143-1250 > Phone (415) 476-2855 > Fax (415) 502-2663 >=20 > email: sven.prevrhal@oarg.ucsf.edu > http://www.oarg.ucsf.edu/~sprevrha >=20 >=20 > -----Original Message----- > From: Lydia Ng [mailto:lng@insightful.com] > Sent: Monday, July 14, 2003 2:28 PM > To: Sven Prevrhal > Subject: RE: [Insight-users] geodesic active contours: problems with fast > marching >=20 >=20 > > 1. Seed points and fast marching: The bone splits in two pieces in the > > "top" > > slices. How can I avoid having the results of the fast marching leak > into > > the gap between the bone in these slices? >=20 > In what context are you using FastMarching here? > Are you just using it to generate little spheres around your seed point > or are you using it to segmentation (ie. by setting the output of the > sigmoid as the speed image for fastmarching)? >=20 > If the former, then you have to make the radius of the spheres smaller > so that they are within your shape you want to segment. >=20 > If the latter, then you have to reduce the threshold in which you are > using to threshold the output time map. >=20 > > 3. The iterations leak into the surrounding tissue almost > independently of > > the slice, ie the result looks the same on all slices. >=20 > This might be a parameter tuning issue? > Have you played around with the parameters? > Have you look at the effect of say turning off all the terms except > propagation and then run it for a small number of iterations etc ... >=20 > Also if you are looking for something long and narrow, it might be a > good idea to set several seed point along the length of the object. > Since the speed is never zero - the boundary might start to unlock > before the front gets to the extremes of the objects. >=20 >=20 > - Lydia >=20 >=20 > > -----Original Message----- > > From: Sven Prevrhal [mailto:sven.prevrhal@oarg.ucsf.edu] > > Sent: Monday, July 14, 2003 1:24 PM > > To: insight-users@public.kitware.com > > Subject: [Insight-users] geodesic active contours: problems with fast > > marching > > > > Hi, > > > > I use version 1.2.0 and want to use the geodesic active contours > > application > > example for segmenting some bone in a stack of CT images. I use > positive > > alpha for the sigmoid filter, so the speed image is > 0 inside the > bone, > > and > > small or zero outside the bone. I place 2 seed points inside the bone > on > > the > > center slice. I have three difficulties: > > > > 1. Seed points and fast marching: The bone splits in two pieces in the > > "top" > > slices. How can I avoid having the results of the fast marching leak > into > > the gap between the bone in these slices? > > > > 2. The advection term doesn't seem to do anything. I get the same > results > > even for terms > 1. > > > > 3. The iterations leak into the surrounding tissue almost > independently of > > the slice, ie the result looks the same on all slices. > > > > Help totally appreciated! (Thanks Luis for the last one, the > > UpdateLargestPossibleRegion for chaining resampling output to another > > filter > > worked!) > > > > > > :-) sven > > -- > > > > > > _______________________________________________ > > Insight-users mailing list > > Insight-users@itk.org > > http://www.itk.org/mailman/listinfo/insight-users From luis.ibanez@kitware.com Mon Jul 14 23:23:19 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 14 Jul 2003 18:23:19 -0400 Subject: [Insight-users] Problems Building 1.2: References: <5620C7DC-532D-11D7-BEAD-000393C34B0E@ucalgary.ca> <3E6D5189.9000601@kitware.com> <3F0EEB28.7020102@mednet.ucla.edu> <3F0EF10A.3010504@kitware.com> <3F0F2FF4.4080808@mednet.ucla.edu> Message-ID: <3F132D57.9070200@kitware.com> Hi Fernando, What compiler (+version) are you using ? Luis --------------------------- Fernando Rannou wrote: > Hi Luis, > I just dowloaded ITK-1.2 from the web page, and I'm getting the following > compilation error: > ... > Building object file triangle.o... > /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c: In > function `parsecommandline': > /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c:2908: > `poly' undeclared (first use in this function) > /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c:2908: > (Each undeclared identifier is reported only once > /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c:2908: > for each function it appears in.) > > Any idea what's wrong? > Thanks > > Fernando > > Luis Ibanez wrote: > >> >> Hi Fernando, >> >> >> VTK 4.2 = Ok >> FLTK 1.1.3 = Ok >> CMake is now 1.6.7 >> >> ITK 1.2 = Ok >> but, that was October 2002 release, >> look forward for release ITK 1.4 by >> september 2003 >> >> >> Regards, >> >> Luis >> >> >> >> ------------------ >> Fernando Rannou wrote: >> >>> Hi Luis, >>> >>> Is the following list an stable combo for installation on a Linux >>> RedHat 8.0? >>> >>> ITK 1.2 >>> VTK 4.2 >>> CMake 1.6.5 >>> FLTK 1.1.3 >>> >>> What else do I need to have a "full featured" installation? >>> >>> Thanks >>> >>> >>> >> >> >> > > From luis.ibanez@kitware.com Mon Jul 14 23:38:41 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 14 Jul 2003 18:38:41 -0400 Subject: [Insight-users] vtk polydata import / export References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> Message-ID: <3F1330F1.2040902@kitware.com> Hi Imho, Your description is a bit confusing. You may want to verify your processing stage by stage. A pipeline: vtkExporter-->itkImporter-->itkExporter-->vtkImporter Should work without problem. You may want to verify that you are using compatible pixel types. What is the pixel type that you are using for instantiating the ITK images ? > > back in vtk I still have a vtkImageData error. > What is the error message that you get for vtkImageData ? is this a compilation error ? a link error ? or a runtime error ? Posting the error message can always help :-) Luis --------------- imho wrote: > Hi Luis, > > I've succeed converting vtkPolyData to vtkImageData, it deforms my > vtkPolyData and is very slow but I'll try other parameters... > the principal is that I have a vtkImageData to put in the exporter / > importer pipe-line. > And there I have a problem. itk returns a null imageData, so I've tried > a simple pipe-line to itk where I do nothing, just this : > > ------------------------------------------ > in itk class : > registrationITK::registrationITK(vtkImageImport* vtkImporter, > vtkImageExport *vtkExporter, vtkImageExport *vtkExporter2) > { itkImporter = ImageImportType::New(); > itkImporter2 = ImageImportType::New(); > itkExporter = ImageExportType::New(); > > itkExporter->SetInput(itkImporter->GetOutput()); > ConnectPipelines(vtkExporter, itkImporter); > ConnectPipelines(vtkExporter2, itkImporter2); > ConnectPipelines(itkExporter, vtkImporter); > itkImporter->Update(); > itkImporter2->Update(); > } > ------------------------------- > in vtk class : > ... > > vtkImporter4 = vtkImageImport::New(); > ... > vtkExporter4 = vtkImageExport::New(); > vtkExporter5 = vtkImageExport::New(); > > poly[0] = vtkPolyData::New(); > poly[1] = vtkPolyData::New(); > polyLive = vtkPolyData::New(); > > imageModel = vtkImageData::New(); > imageModelLive= vtkImageData::New(); > > polyToImage = vtkImplicitModeller::New(); > polyLiveToImage = vtkImplicitModeller::New(); > ... > polyToImage->SetInput(poly[0]); > polyLiveToImage->SetInput(polyLive); > polyToImage->SetSampleDimensions(10, 10, 10); > polyToImage->SetMaximumDistance(0.25); > polyLiveToImage->SetSampleDimensions(10, 10, 10); > polyLiveToImage->SetMaximumDistance(0.25); > > imageModel = polyToImage->GetOutput(); > imageModelLive = polyLiveToImage->GetOutput(); > vtkExporter4->SetInput(imageModel); > vtkExporter5->SetInput(imageModelLive); > > regITK = new registrationITK(vtkImporter4, vtkExporter4, > vtkExporter5); > > cast->SetInput(vtkImporter4->GetOutput()); > castTo3D->SetInput(vtkImporter4->GetOutput()); > > isRegITK = true; > > ... > poly[0]->CopyStructure(ApplyDemonRegistration()); > ------------------------------------------------ > vtkPolyData* sourceControlVTK::ApplyDemonRegistration() > { > vtkPolyData* pol = vtkPolyData::New(); > > // regITK->InitDemonRegistration(progress); // dans controlQt > imageModel = vtkImporter4->GetOutput(); > pol = imageToPolyMaker->makePoly(imageModel); > return pol; > > } > > back in vtk I still have a vtkImageData error. > So I resume, when I do : > vtkPolyData->vtkImageData->vtkPolyData > my poly is'nt allright but I have something to show > > but if I do : > vtkPolyData->vtkImageData->vtkExporter->itkImporter->itkExporter->vtkImporter->vtkImagedata->vtkPolyData > with or without the demonFilter > I have nothing back :/ > I surely do something wrong, but I can't find what. > Maybe you can help me (again). > > thanks a lot. > > Imho. > From hanssen@caesar.de Tue Jul 15 13:40:07 2003 From: hanssen@caesar.de (Nils Hanssen) Date: Tue, 15 Jul 2003 14:40:07 +0200 Subject: [Insight-users] Curvature in ShapeDetectionLevelSetImageFilter In-Reply-To: Message-ID: <002e01c34ace$399dd7f0$0607010a@ssn4006> This is a multi-part message in MIME format. ------=_NextPart_000_002F_01C34ADE.FD26A7F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Lydia, I compiled the 030711 CVS-version and it's no more crashing when I set the propagation-scaling to zero (like you said). But I am still wondering that the curvature-driven evolution (shrinking) is evolving very slowly, even if I set the curvature-scaling to 1000 and the propagation-scaling to a very small value. Is this due to the missing/wrong timestep-calculation like you said in the previous mail? Regards, Nils > -----Original Message----- > From: insight-users-admin@itk.org > [mailto:insight-users-admin@itk.org]On > Behalf Of Lydia Ng > Sent: Thursday, July 10, 2003 6:17 PM > To: Luis Ibanez; Nils Hanssen > Cc: Insight-users@public.kitware.com > Subject: RE: [Insight-users] Curvature in > ShapeDetectionLevelSetImageFilter > > > Hi Nils and Luis, > > There is issue in the current implementation of the level set > framework > in that the curvature term is not taken into account when > computing the > time step. Ideally, the time step should computed to maintain > numerical > stability. > > Thus, setting the curvature weight is high relative to the propagation > term will cause problem most likely due to the time step being too > large. > > This is a known problem - computing the time step to meet the CFL > criterion is not widely reported in the literature - a few of us is > still trying to figure out what is the mathematically sound > thing to do > here. > > BTW - I have also fixed the problem of when the propagation weight is > zero - it shouldn't crash now - but you will still get the numerical > instability issue as above. > > - Lydia > > > -----Original Message----- > > From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > > Sent: Thursday, July 10, 2003 6:58 AM > > To: Nils Hanssen > > Cc: Insight-users@public.kitware.com > > Subject: Re: [Insight-users] Curvature in > > ShapeDetectionLevelSetImageFilter > > > > > > Hi Nils, > > > > I just performed a couple of tests, and the > > ShapeDetectionLSIF is behaving as expected. > > (Note that I did this with the current CVS > > version, not ITK 1.2). > > > > A couple of sample images that help to test > > your case were checked in under: > > > > - Insight/Examples/Data/Circle.png > > - Insight/Examples/Data/CircleSpikes.png > > > > http://www.itk.org/cgi- > > bin/cvsweb.cgi/Insight/Examples/Data/Circle.png?cvsroot=Insight > > http://www.itk.org/cgi- > > > bin/cvsweb.cgi/Insight/Examples/Data/CircleSpikes.png?cvsroot=Insight > > > > CircleSpikes.png simulates the conditions of your > > tube but in 2D. > > > > The example ShapeDetectionLevelSetImageFilter > > was also slightly modified in order to take the > > scaling parameter from the command line arguments. > > > > http://www.itk.org/cgi- > > > bin/cvsweb.cgi/Insight/Examples/Segmentation/ShapeDetectionLev > elSetFilte > r. > > cxx?cvsroot=Insight&sortby=date > > > > Running this example with the parameters below > > succeded to segment the internal circle without > > taking the spikes (bridges). Note that although > > the segmentation doesn't goes into the spikes, they > > excert some influence on the shape of the final > > contour. > > > > Here are the parameters: > > > > ShapeDetectionLevelSetFilter > > > > input image: CirclesSpikes.png > > output image: SegmentedCircle.png > > seed point: 50 50 > > distance: 20 > > sigma: 1.0 > > sigmoid alpha: -40 > > sigmoid beta: 128 > > curvatureScaling: 3.1 > > propagationScaling: 0.97 > > > > The overlay of the segmented circle, on top > > of the CircleSpikes.png image is shown in > > the attachement. > > > > --- > > > > The balance between the curvatureScaling and the > > propagationScaling parameters is quite delicate. > > > > For example: > > > > keeping curvature scaling = 3.1 > > propagation scaling = 0.98 will overflow the whole image > > while prop. scaling = 0.96 will grow just to half the circle > > > > OR > > > > keeping propagation scaling = 0.97 > > curvature scaling = 3.0 will overflow the image > > curvature scaling = 3.2 will fall short on reaching the edges > > > > > > > > My guess is that it may be possible to find a > > continuous function F(): > > > > curvatureScaling = F( propagationScaling ) > > > > for which the segmentation grabs on the circle edges, > > but at some threshold of "PropagationScaling" the > > computation will start presenting numerical > > instabilities. > > > > > > > > > > Regards, > > > > > > > > Luis > > > > > > > > --------------------- > > Nils Hanssen wrote: > > > Hi Luis, > > > > > > thank you for the detailed answer. > > > > > > > > > My initial level set conforms to the "negative inside" convention. > > > Now, I am using a curvature weighting of 1000 (just to see what > happens > > in > > > the extreme case) and a propagation weighting of 0.001. > When running > the > > > ShapeDetectionLSIF, the contour is not collapsing at all. Maybe > that's > > > because of the feature image that dictates the curvature speed (== > > > propagation speed in the ShapeDetectionLSIF)? > > > > > > Since the curvature speed in the ShapeDetectionLSF equals the > > propagation > > > speed, I derived my own classes called > "TubularLevelSetFunction" and > > > "TubularLevelSetImageFilter". These are basically clones of the > > > ShapeDetection* classes, but with the difference that I set the > > curvature > > > speed to (constant) one in the Level-set function. > > > Now, the contour is collapsing according to the mean curvature but > all > > this > > > happens _very_ slowly (the curvature weighting is 1000!). > > > > > > In itk::LevelSetFunction::ComputeUpdate(...) I see the following: > > > --- > > > curvature_term = curve; > > > curvature_term *= m_CurvatureWeight * this->CurvatureSpeed(it, > > offset); > > > --- > > > so it should make no difference when I set the curvature > weight to 1 > and > > the > > > curvature speed to (constant) 1000 (and not vice versa), > right? But > when > > I > > > do this, I get numerical instabilities during the > evolution. What is > > wrong > > > with my assumption? > > > > > > Luis, what was the curvature weighting and curvature > speed when you > > tested > > > the collapsing contour with the syntethic sphere image? Was the > > curvature > > > speed constant or dependent on the image? > > > > > > For now, I do all calculations in 2D. Could that be a problem? I > have > > > installed a observer that shows me the progress of the > contour after > > each > > > update event. > > > > > > > > > Regards, > > > Nils > > > > > > > > > > > >>-----Original Message----- > > >>From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > > >>Sent: Wednesday, July 09, 2003 6:14 PM > > >>To: Nils Hanssen > > >>Cc: Insight-users@public.kitware.com > > >>Subject: Re: [Insight-users] Crash in > > >>ShapeDetectionLevelSetImageFilter > > >> > > >> > > >> > > >>Hi Nils, > > >> > > >>You are right in your interpretation of the > > >>behavior for the ShapeDetectionLevelSetFilter. > > >> > > >>Increasing the curvature scaling while decreasing > > >>the propagation scaling should make the contour > > >>collapse (contract). > > >> > > >>I just verified this behavior using a syntethic > > >>image of a sphere. > > >> > > >>Note that in version 1.2 this filter is expecting > > >>the input level set to conform to the convention > > >>of "negative inside" which means that the level > > >>set has negative values 'inside' the contour and > > >>positive values outside the contour. > > >> > > >>You may have to push the curvature scaling to > > >>a value higher than 1.0. (e.g. 5.0 or so). > > >> > > >>I would avoid to use 0.0 for the propagation > > >>scaling ( in part just for superstition against > > >>zeros values as parameters). You may want to > > >>try something like 0.1 for the propagation > > >>scaling. > > >> > > >>Please verify the convention used by your initial > > >>level set. That may be the cause for the contour > > >>not behaving as expected. > > >> > > >> > > >>Regards, > > >> > > >> > > >> Luis > > >> > > >> > > >> > > >>--------------------- > > >>Nils Hanssen wrote: > > >> > > >>>Hi Luis, > > >>> > > >>>I am using the 1.2.0 web release. > > >>> > > >>>Regards, > > >>>Nils > > >>> > > >>> > > >>> > > >>>>-----Original Message----- > > >>>>From: insight-users-admin@itk.org > > >>>>[mailto:insight-users-admin@itk.org]On > > >>>>Behalf Of Luis Ibanez > > >>>>Sent: Tuesday, July 08, 2003 3:55 PM > > >>>>To: Nils Hanssen > > >>>>Cc: Insight-users@public.kitware.com > > >>>>Subject: Re: [Insight-users] Crash in > > >>>>ShapeDetectionLevelSetImageFilter > > >>>> > > >>>> > > >>>> > > >>>>Hi Nils, > > >>>> > > >>>>Are you using a very recent checkout of ITK ? > > >>>> > > >>>>The level set filters have been reworked in > > >>>>recent days, so it will help us to know if you > > >>>>are experiencing this behavior with the current > > >>>>version or with the version as it was two weeks > > >>>>ago (or before that). > > >>>> > > >>>>Please let us know, > > >>>> > > >>>> Thanks > > >>>> > > >>>> > > >>>> Luis > > >>>> > > >>>> > > >>>>------------------------ > > >>>>Nils Hanssen wrote: > > >>>> > > >>>> > > >>>>>Hi, > > >>>>> > > >>>>>I am trying to understand the behaviour of the > ShapeDetectionLSIF. > > >>>>>Therefore, I set the propagation-weighting to zero. By setting > the > > >>>>>curvature-weighting to a value of one I would expect that > > >>>> > > >>>>the inital > > >>>> > > >>>> > > >>>>>surface is shrinking to a point (I set the MaxRMSError to > > >>>> > > >>>>zero) and the > > >>>> > > >>>> > > >>>>>number of iterations very high. > > >>>>> > > >>>>>The filter is crashing in > > >>>>>SegmentationLevelSetFunction > > >>>>>::PropagationSpeed(const NeighborhoodType &neighborhood, const > > >>>>>FloatOffsetType &offset) const > > >>>>>[...] > > >>>>>--> else return ( > > >>>> > > >>>>static_cast(m_SpeedImage->GetPixel(idx)) ); > > >>>>// crashing here > > >>>> > > >>>> > > >>>>>[...] > > >>>>> > > >>>>>When I set the propagation-weighting to - for instance - > > >>>> > > >>0.0001 the > > >> > > >>>>>filter is not crashing, but the contour is not shrinking > > >>>> > > >>>>according to > > >>>> > > >>>> > > >>>>>the mean curvature. > > >>>>> > > >>>>>Is that the correct behaviour of the filter? > > >>>>> > > >>>>>I would appreciate any suggestions. Thanks! > > >>>>> > > >>>>> > > >>>>>Regards, > > >>>>>Nils > > >>>>> > > >>>>> > > >>>>>------------------------- > > >>>>>Nils Hanssen > > >>>>>Surgical Systems Laboratory > > >>>>>research center c ae sa r > > >>>>>Ludwig-Erhard-Allee 2 > > >>>>>53175 Bonn > > >>>>>fon: +49-228-9656-197 > > >>>>>fax: +49-228-9656-117 > > >>>>>___http://www.caesar.de/ssl_ > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>>> > > >>>> > > >>>>_______________________________________________ > > >>>>Insight-users mailing list > > >>>>Insight-users@itk.org > > >>>>http://www.itk.org/mailman/listinfo/insight-users > > >>>> > > >>> > > >>>_______________________________________________ > > >>>Insight-users mailing list > > >>>Insight-users@itk.org > > >>>http://www.itk.org/mailman/listinfo/insight-users > > >>> > > >> > > >> > > >> > > >> > > > > > > _______________________________________________ > > > Insight-users mailing list > > > Insight-users@itk.org > > > http://www.itk.org/mailman/listinfo/insight-users > > > > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > ------=_NextPart_000_002F_01C34ADE.FD26A7F0 Content-Type: application/ms-tnef; name="winmail.dat" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="winmail.dat" eJ8+IggMAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEGgAMADgAAANMHBwAPAA4AKAAAAAIAKAEB A5AGABgZAAAlAAAACwACAAEAAAALACMAAAAAAAMAJgAAAAAACwApAAAAAAADAC4AAAAAAAMANgAA AAAAHgBwAAEAAAA/AAAAW0luc2lnaHQtdXNlcnNdIEN1cnZhdHVyZSBpbiBTaGFwZURldGVjdGlv bkxldmVsU2V0SW1hZ2VGaWx0ZXIAAAIBcQABAAAAFgAAAAHDSs440KqRzwZQyEwDtO7nMhaAljUA AAIBHQwBAAAAFwAAAFNNVFA6SEFOU1NFTkBDQUVTQVIuREUAAAsAAQ4AAAAAQAAGDgBQcDTOSsMB AgEKDgEAAAAYAAAAAAAAAL0QC1krxdQRhzIAAQIipMnCgAAAAwAUDgEAAAALAB8OAQAAAAIBCRAB AAAAARUAAP0UAACMNgAATFpGdR6fHG4DAAoAcmNwZzEyNeIyA0N0ZXgFQQEDAff/CoACpAPkBxMC gA/zAFAEVj8IVQeyESUOUQMBAgBjaOEKwHNldDIGAAbDESX2MwRGE7cwEiwRMwjvCfe2OxgfDjA1 ESIMYGMAUDMLCQFkMzY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QAAAAAAAAMAHIAIIAYAAAAAAMAAAAAAAABGAAAAABGFAAAAAAAAAwAegAggBgAAAAAAwAAAAAAA AEYAAAAAGIUAAAAAAAACAfgPAQAAABAAAAC9EAtZK8XUEYcyAAECIqTJAgH6DwEAAAAQAAAAvRAL WSvF1BGHMgABAiKkyQIB+w8BAAAAUAAAAAAAAAA4obsQBeUQGqG7CAArKlbCAABtc3BzdC5kbGwA AAAAAE5JVEH5v7gBAKoAN9luAAAAXFxmczAwXGhhbnNzZW5cb3V0bG9vay5wc3QAAwD+DwUAAAAD AA00/TcAAAIBfwABAAAAMQAAADAwMDAwMDAwQkQxMDBCNTkyQkM1RDQxMTg3MzIwMDAxMDIyMkE0 QzkwNEFEOTcwNAAAAAADAAYQOOmygQMABxCSHQAAAwAQEAAAAAADABEQAQAAAB4ACBABAAAAZQAA AEhJTFlESUEsSUNPTVBJTEVEVEhFMDMwNzExQ1ZTLVZFUlNJT05BTkRJVFNOT01PUkVDUkFTSElO R1dIRU5JU0VUVEhFUFJPUEFHQVRJT04tU0NBTElOR1RPWkVSTyhMSUtFWU8AAAAA0Bw= ------=_NextPart_000_002F_01C34ADE.FD26A7F0-- From c.p.botha@ewi.tudelft.nl Tue Jul 15 13:41:57 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: 15 Jul 2003 14:41:57 +0200 Subject: [Insight-users] ANNOUNCE: vtkFlRenderWindowInteractor 0.9 Message-ID: <1058272917.4665.14.camel@dutidad> Version 0.9 of the vtkFlRenderWindowInteractor is available from: http://cpbotha.net/vtkFlRenderWindowInteractor.html This fixes a serious(ish) bug where things would break if the enclosing FLTK GUI was hidden and then shown again. Thanks to Gwenael Guillard for bringing this to my attention. Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From luis.ibanez@kitware.com Tue Jul 15 14:46:59 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 09:46:59 -0400 Subject: [Insight-users] ANNOUNCE: vtkFlRenderWindowInteractor 0.9 References: <1058272917.4665.14.camel@dutidad> Message-ID: <3F1405D3.1060409@kitware.com> Hi Charl, Thanks for letting us know, The files in InsightApplications/Auxiliary/VtkFltk Have been updated according to your version 0.9. Thanks Luis ------------------------ Charl P. Botha wrote: > Version 0.9 of the vtkFlRenderWindowInteractor is available from: > http://cpbotha.net/vtkFlRenderWindowInteractor.html > > This fixes a serious(ish) bug where things would break if the enclosing > FLTK GUI was hidden and then shown again. Thanks to Gwenael Guillard > for bringing this to my attention. > > Thanks, > Charl > From imho@bephp.com Tue Jul 15 14:52:33 2003 From: imho@bephp.com (imho) Date: Tue, 15 Jul 2003 15:52:33 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F1330F1.2040902@kitware.com> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> <3F1330F1.2040902@kitware.com> Message-ID: <3F140721.3020109@bephp.com> This is a multi-part message in MIME format. --------------070406080708050108040501 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi Luis, the error that I have is a runtime error, I didn't add it because I have a message in front of it, and I can't copy paste it. Now I send you a print screen :) Maybe I didn't understand it rightly. The pixelType that I've for ITK is float : ... const unsigned int Dimension = 3; class registrationITK { public: ... typedef float PixelType; typedef itk::Image ImageType; ... private : ... ImageType::Pointer imageSource; ImageType::Pointer imageTarget; } thanks for your help Imho. Luis Ibanez wrote: > > Hi Imho, > > Your description is a bit confusing. > > You may want to verify your processing stage by stage. > > A pipeline: > > vtkExporter-->itkImporter-->itkExporter-->vtkImporter > > Should work without problem. > > You may want to verify that you are using compatible > pixel types. What is the pixel type that you are using > for instantiating the ITK images ? > > > > > back in vtk I still have a vtkImageData error. > > > What is the error message that you get for vtkImageData ? > is this a compilation error ? a link error ? or a runtime error ? > > Posting the error message can always help :-) > > > > Luis > > > > --------------- > imho wrote: > >> Hi Luis, >> >> I've succeed converting vtkPolyData to vtkImageData, it deforms my >> vtkPolyData and is very slow but I'll try other parameters... >> the principal is that I have a vtkImageData to put in the exporter / >> importer pipe-line. >> And there I have a problem. itk returns a null imageData, so I've >> tried a simple pipe-line to itk where I do nothing, just this : >> >> ------------------------------------------ >> in itk class : >> registrationITK::registrationITK(vtkImageImport* vtkImporter, >> vtkImageExport *vtkExporter, vtkImageExport *vtkExporter2) >> { itkImporter = ImageImportType::New(); >> itkImporter2 = ImageImportType::New(); >> itkExporter = ImageExportType::New(); >> >> itkExporter->SetInput(itkImporter->GetOutput()); >> ConnectPipelines(vtkExporter, itkImporter); >> ConnectPipelines(vtkExporter2, itkImporter2); >> ConnectPipelines(itkExporter, vtkImporter); >> itkImporter->Update(); >> itkImporter2->Update(); >> } >> ------------------------------- >> in vtk class : >> ... >> >> vtkImporter4 = vtkImageImport::New(); >> ... >> vtkExporter4 = vtkImageExport::New(); >> vtkExporter5 = vtkImageExport::New(); >> >> poly[0] = vtkPolyData::New(); >> poly[1] = vtkPolyData::New(); >> polyLive = vtkPolyData::New(); >> >> imageModel = vtkImageData::New(); >> imageModelLive= vtkImageData::New(); >> >> polyToImage = vtkImplicitModeller::New(); >> polyLiveToImage = vtkImplicitModeller::New(); >> ... >> polyToImage->SetInput(poly[0]); >> polyLiveToImage->SetInput(polyLive); >> polyToImage->SetSampleDimensions(10, 10, 10); >> polyToImage->SetMaximumDistance(0.25); >> polyLiveToImage->SetSampleDimensions(10, 10, 10); >> polyLiveToImage->SetMaximumDistance(0.25); >> >> imageModel = polyToImage->GetOutput(); >> imageModelLive = polyLiveToImage->GetOutput(); >> vtkExporter4->SetInput(imageModel); >> vtkExporter5->SetInput(imageModelLive); >> >> regITK = new registrationITK(vtkImporter4, vtkExporter4, >> vtkExporter5); >> >> cast->SetInput(vtkImporter4->GetOutput()); >> castTo3D->SetInput(vtkImporter4->GetOutput()); >> >> isRegITK = true; >> >> ... >> poly[0]->CopyStructure(ApplyDemonRegistration()); >> ------------------------------------------------ >> vtkPolyData* sourceControlVTK::ApplyDemonRegistration() >> { >> vtkPolyData* pol = vtkPolyData::New(); >> >> // regITK->InitDemonRegistration(progress); // dans controlQt >> imageModel = vtkImporter4->GetOutput(); >> pol = imageToPolyMaker->makePoly(imageModel); >> return pol; >> >> } >> >> back in vtk I still have a vtkImageData error. >> So I resume, when I do : >> vtkPolyData->vtkImageData->vtkPolyData >> my poly is'nt allright but I have something to show >> >> but if I do : >> vtkPolyData->vtkImageData->vtkExporter->itkImporter->itkExporter->vtkImporter->vtkImagedata->vtkPolyData >> with or without the demonFilter >> I have nothing back :/ >> I surely do something wrong, but I can't find what. >> Maybe you can help me (again). >> >> thanks a lot. >> >> Imho. >> > > . > --------------070406080708050108040501 Content-Type: image/gif; name="vtk-error.gif" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="vtk-error.gif" R0lGODlh7AHUAbMAAAAAANbWzv////////////////////////////////////////////// /////////ywAAAAA7AHUAQAE/jCIQKu9OOvNu/9gKI5kaZ5oqq5s674wO8V0bd94ru987/+b GXBILBqPyKRyaREyn9CodEqtuoSArBZA2Wor3uxlawlzOeIQeXyGpTXvQLwzL7fX6bj5+xbP vSp1dWhtHn+AJIMtZkh5hSaHel8vWI9dhY52YGd9mJaaIJmgLKJwnnScn3Kifqmjkpexm7Mo gqqmqLK0q4m3H4q6vEalJWuyrL4llRmwwsenzsK2oZixwMXJu9HMrhh4rp3BsOHBcinX1Lnb zTvX7EToI83IlNraxPjdz96pk2zczvZ46hRGmjFH+ciU+mbtjr5oxgKq+kawosNNFfdh5AMO 2ipJ/sgYbbyE8OIsihM52nn3z6C/j7fmdYs3otJBaDJBsWxJrBw/jfQ+Ap3JJdO4jieJDh0l lGdKpQaXRqV3tKE4qEaxapXaEKrOols3BA36c6VJmiKW8UME059MtriithQblqS+sf3Oaq0q t0+XuTCd2i3HsK9Xn3gHX7XbM/FIl5NEkpvGBmQyxwUB0iIrw95iiA/zEdLIVDPZVrow5zS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ZWTVb2kU/jbSk68RS0M1mh9U5BJQR0NTdUTP5F6QUpVTGmMz6+RS1jd nflSx1GtL756LwIFQ1x9VmmFRf4El6V6Um8l0VJjqKQjt6pyLXMrV9wgUWNM0mWEVni91SDU VYYpQx8tEMKCq3MVNKJTWGAMV0lETpJrQzQUSyBcLhoVVrcBtB+R1Fy1Tm8ZRGgoxF381v+U 0ssU/kxYFUVTjNJWpM62bFWqmc+5JNhYc1ZInRbYMlEEFc69C5RWZMR9FUZmtVc+/J/TbEZk Q7933ceCdTVtgcaHU08hGtLojDijHdBG/EWAFVfsutetI9uaBUGS7UZrHbt8rcYhGs25cdge jD9VS7VMVceYcq3ZNFcqVbk1qk3tpNt0BEJ5bEf3mVZqdUyNONy9LBj9Y9ZZRdV4dRq+TFUN A9RGxU+n6b3F5UfMzQlG9dwfA93Q3bHRJd0bM93TnbHUVd0TY93WPabXhd1hkt3Z/aXatd1e wt3cxZnd5V2b8d3flZngFV6XId7iLVTkJcrjVd6TYd7mHZnnhd6Pkd7pcu2Y6rXejMHe7K2Y 7eVeJPvelPTe8HWY8SVfhTHf8zWY9FVfgmHf9gWY94Xf5ZtfjKxf+73fjcxf/d1fj+xf//3f kAxgAR5gkixgAz7gk0xgBV5glWxgB37gloxgCZ5gmKxgC77gmcxgDd5gm+xgNYsAAAA7 --------------070406080708050108040501-- From luis.ibanez@kitware.com Tue Jul 15 15:42:46 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 10:42:46 -0400 Subject: [Insight-users] Re: Problems Building 1.2: gcc 3.2 : Utilities/vxl References: <5620C7DC-532D-11D7-BEAD-000393C34B0E@ucalgary.ca> <3E6D5189.9000601@kitware.com> <3F0EEB28.7020102@mednet.ucla.edu> <3F0EF10A.3010504@kitware.com> <3F0F2FF4.4080808@mednet.ucla.edu> <3F132D57.9070200@kitware.com> <3F13382B.9060804@mednet.ucla.edu> Message-ID: <3F1412E6.4090009@kitware.com> Hi Fernando, Thanks for letting us know about the compiler version that you are using. I just compiled ITK 1.2 using gcc3.2 under Linux Debian, without any problem. It seems that you enabled and advanced option that is set to OFF by default. The code in Insight/Utilities/vxl/v3p/netlib/ shouldn't be built by default. This was an experimental location for updating VXL after the release. Please rerun CMake and make sure that the variable: VXL_FROM_UTILITIES Is set to OFF. That should prevent the compilation of the directory Utilities/vxl the VXL version in Code/Numerics/vxl will be used instead. Regards Luis ------------------------ Fernando Rannou wrote: > Hi Luis, > this is what I'm using > > $ g++ --version > g++ (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) > Copyright (C) 2002 Free Software Foundation, Inc. > > Thanks > Fernando > > Luis Ibanez wrote: > >> Hi Fernando, >> >> >> What compiler (+version) are you using ? >> >> >> Luis >> >> >> --------------------------- >> Fernando Rannou wrote: >> >>> Hi Luis, >>> I just dowloaded ITK-1.2 from the web page, and I'm getting the >>> following >>> compilation error: >>> ... >>> Building object file triangle.o... >>> /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c: >>> In function `parsecommandline': >>> /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c:2908: >>> `poly' undeclared (first use in this function) >>> /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c:2908: >>> (Each undeclared identifier is reported only once >>> /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c:2908: >>> for each function it appears in.) >>> >>> Any idea what's wrong? >>> Thanks >>> >>> Fernando >>> From luis.ibanez@kitware.com Tue Jul 15 16:04:00 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 11:04:00 -0400 Subject: [Insight-users] vtk polydata import / export References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> <3F1330F1.2040902@kitware.com> <3F140721.3020109@bephp.com> Message-ID: <3F1417E0.8080300@kitware.com> Hi Imho, Could you please try the following: in your pipeline vtkPolydata->vtkImageData->vtkExporter->itkImporter add an ITK writer after the itkImporter itkImporter->itkImageFileWriter and save the data in a MetaImage format (which support pixel type float). The use the ImageViewer application available in InsightApplications in order to check the content of the image. You could also use a VTK image format and use VTK for checking the content of the file. The point of the test is to verify if the image is being imported correctly into ITK. Please let us know what you find. Thanks Luis -------------- imho wrote: > Hi Luis, > the error that I have is a runtime error, I didn't add it because I have > a message in front of it, and I can't copy paste it. Now I send you a > print screen :) Maybe I didn't understand it rightly. > > The pixelType that I've for ITK is float : > ... > const unsigned int Dimension = 3; > class registrationITK > { > public: > ... > typedef float PixelType; > typedef itk::Image ImageType; > ... > private : > ... > ImageType::Pointer imageSource; > ImageType::Pointer imageTarget; > > } > > thanks for your help > > Imho. > > > > Luis Ibanez wrote: > >> >> Hi Imho, >> >> Your description is a bit confusing. >> >> You may want to verify your processing stage by stage. >> >> A pipeline: >> >> vtkExporter-->itkImporter-->itkExporter-->vtkImporter >> >> Should work without problem. >> >> You may want to verify that you are using compatible >> pixel types. What is the pixel type that you are using >> for instantiating the ITK images ? >> >> > >> > back in vtk I still have a vtkImageData error. >> > >> What is the error message that you get for vtkImageData ? >> is this a compilation error ? a link error ? or a runtime error ? >> >> Posting the error message can always help :-) >> >> >> >> Luis >> >> >> >> --------------- >> imho wrote: >> >>> Hi Luis, >>> >>> I've succeed converting vtkPolyData to vtkImageData, it deforms my >>> vtkPolyData and is very slow but I'll try other parameters... >>> the principal is that I have a vtkImageData to put in the exporter / >>> importer pipe-line. >>> And there I have a problem. itk returns a null imageData, so I've >>> tried a simple pipe-line to itk where I do nothing, just this : >>> >>> ------------------------------------------ >>> in itk class : >>> registrationITK::registrationITK(vtkImageImport* vtkImporter, >>> vtkImageExport *vtkExporter, vtkImageExport *vtkExporter2) >>> { itkImporter = ImageImportType::New(); >>> itkImporter2 = ImageImportType::New(); >>> itkExporter = ImageExportType::New(); >>> >>> itkExporter->SetInput(itkImporter->GetOutput()); >>> ConnectPipelines(vtkExporter, itkImporter); >>> ConnectPipelines(vtkExporter2, itkImporter2); >>> ConnectPipelines(itkExporter, vtkImporter); >>> itkImporter->Update(); >>> itkImporter2->Update(); >>> } >>> ------------------------------- >>> in vtk class : >>> ... >>> >>> vtkImporter4 = vtkImageImport::New(); >>> ... >>> vtkExporter4 = vtkImageExport::New(); >>> vtkExporter5 = vtkImageExport::New(); >>> >>> poly[0] = vtkPolyData::New(); >>> poly[1] = vtkPolyData::New(); >>> polyLive = vtkPolyData::New(); >>> >>> imageModel = vtkImageData::New(); >>> imageModelLive= vtkImageData::New(); >>> >>> polyToImage = vtkImplicitModeller::New(); >>> polyLiveToImage = vtkImplicitModeller::New(); >>> ... >>> polyToImage->SetInput(poly[0]); >>> polyLiveToImage->SetInput(polyLive); >>> polyToImage->SetSampleDimensions(10, 10, 10); >>> polyToImage->SetMaximumDistance(0.25); >>> polyLiveToImage->SetSampleDimensions(10, 10, 10); >>> polyLiveToImage->SetMaximumDistance(0.25); >>> >>> imageModel = polyToImage->GetOutput(); >>> imageModelLive = polyLiveToImage->GetOutput(); >>> vtkExporter4->SetInput(imageModel); >>> vtkExporter5->SetInput(imageModelLive); >>> >>> regITK = new registrationITK(vtkImporter4, vtkExporter4, >>> vtkExporter5); >>> >>> cast->SetInput(vtkImporter4->GetOutput()); >>> castTo3D->SetInput(vtkImporter4->GetOutput()); >>> >>> isRegITK = true; >>> >>> ... >>> poly[0]->CopyStructure(ApplyDemonRegistration()); >>> ------------------------------------------------ >>> vtkPolyData* sourceControlVTK::ApplyDemonRegistration() >>> { >>> vtkPolyData* pol = vtkPolyData::New(); >>> >>> // regITK->InitDemonRegistration(progress); // dans controlQt >>> imageModel = vtkImporter4->GetOutput(); >>> pol = imageToPolyMaker->makePoly(imageModel); >>> return pol; >>> >>> } >>> >>> back in vtk I still have a vtkImageData error. >>> So I resume, when I do : >>> vtkPolyData->vtkImageData->vtkPolyData >>> my poly is'nt allright but I have something to show >>> >>> but if I do : >>> vtkPolyData->vtkImageData->vtkExporter->itkImporter->itkExporter->vtkImporter->vtkImagedata->vtkPolyData >>> with or without the demonFilter >>> I have nothing back :/ >>> I surely do something wrong, but I can't find what. >>> Maybe you can help me (again). >>> >>> thanks a lot. >>> >>> Imho. >>> >> >> . >> > > > ------------------------------------------------------------------------ > From tjr34@cam.ac.uk Tue Jul 15 16:17:22 2003 From: tjr34@cam.ac.uk (Tim Rudge) Date: Tue, 15 Jul 2003 16:17:22 +0100 Subject: [Insight-users] DLL output Message-ID: <332881406.1058285842@Dell620> Hi, This is not entirely ITK but... I am outputting DLL's from a project linked to ITK. I have had this working before but then I got a new CVS release and recompiled all using ITK.dsw. Now I get the error 'cannot find libITKPackage.so' from the application. But I am outputting .dll files (for Windows XP) so I don;t understand why the app is looking for .so files. Any ideas? Tim Rudge --------- Cellular Development Lab Dept. Plant Sciences Cambridge University From itk@stmoser.ch Tue Jul 15 16:21:09 2003 From: itk@stmoser.ch (itk@stmoser.ch) Date: Tue, 15 Jul 2003 17:21:09 +0200 (MEST) Subject: [Insight-users] MaximizeOn and PixelType In-Reply-To: <3F1412E6.4090009@kitware.com> References: <5620C7DC-532D-11D7-BEAD-000393C34B0E@ucalgary.ca> <3E6D5189.9000601@kitware.com> <3F0EEB28.7020102@mednet.ucla.edu> <3F0EF10A.3010504@kitware.com> <3F0F2FF4.4080808@mednet.ucla.edu> <3F132D57.9070200@kitware.com> <3F13382B.9060804@mednet.ucla.edu> <3F1412E6.4090009@kitware.com> Message-ID: Hi I've just been playing around with a basic registration program and the registration example nr. 3. According to some newsgroup postings, itkMeanSquareImageToImageMetric does sum up squared differences and therefore needs to be minimized. So MinimizeOn() needs to be called. In example 3 there is MaximizeOn() though. Why is that? It is interesting to note that if PixelType is set to 'short', the registration does fine with MinimizeOn(), but not with MaximizeOn(). If it is set to 'unsigned short', it will do with MaximizeOn() but not with MinimizeOn(). Can anyone help me? Thanks, Stephan From luis.ibanez@kitware.com Tue Jul 15 16:53:54 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 11:53:54 -0400 Subject: [Insight-users] MaximizeOn and PixelType References: <5620C7DC-532D-11D7-BEAD-000393C34B0E@ucalgary.ca> <3E6D5189.9000601@kitware.com> <3F0EEB28.7020102@mednet.ucla.edu> <3F0EF10A.3010504@kitware.com> <3F0F2FF4.4080808@mednet.ucla.edu> <3F132D57.9070200@kitware.com> <3F13382B.9060804@mednet.ucla.edu> <3F1412E6.4090009@kitware.com> Message-ID: <3F142392.2060600@kitware.com> Hi Stephan, You are right, the MeanSquare metric is optimal when its value is zero. The optimizer must then be set for Minimizing the cost function. This is done in ImageRegistration3.cxx line 381 with the call optmizer->MaximizeOff(); Note that setting MaximizeOff() is equivalent to call any of the following: optimizer->MinimizeOn(); optimizer->SetMaximize( false ); optimizer->SetMinimize( true ); You can verify the code in Insight/Code/Numerics itkRegularStepGradientDescentBaseOptimizer.h The registration should work for both signed and unsigned short pixel types, using MinimizeOn() [ or MaximizeOff() ] in both cases. MaximizeOn() will not produce registered images. You can also experiment this with the Python or Tcl versions: ImageRegistration3.py ImageRegistration3.tcl Regards, Luis ----------------------- itk@stmoser.ch wrote: > Hi > > I've just been playing around with a basic registration program and the > registration example nr. 3. According to some newsgroup postings, > itkMeanSquareImageToImageMetric does sum up squared differences and > therefore needs to be minimized. So MinimizeOn() needs to be called. In > example 3 there is MaximizeOn() though. Why is that? > > It is interesting to note that if PixelType is set to 'short', the > registration does fine with MinimizeOn(), but not with MaximizeOn(). If > it is set to 'unsigned short', it will do with MaximizeOn() but not with > MinimizeOn(). > > Can anyone help me? > > Thanks, Stephan > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Tue Jul 15 18:54:43 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 13:54:43 -0400 Subject: [Insight-users] MaximizeOn and PixelType : ITK 1.2 versus current CVS References: <5620C7DC-532D-11D7-BEAD-000393C34B0E@ucalgary.ca> <3E6D5189.9000601@kitware.com> <3F0EEB28.7020102@mednet.ucla.edu> <3F0EF10A.3010504@kitware.com> <3F0F2FF4.4080808@mednet.ucla.edu> <3F132D57.9070200@kitware.com> <3F13382B.9060804@mednet.ucla.edu> <3F1412E6.4090009@kitware.com> <3F142392.2060600@kitware.com> Message-ID: <3F143FE3.4010609@kitware.com> Hi Stephan, This was fixed soon after the 1.2 release. It was a double bug related to the computation of derivates in the MeanSquareMetric which resulted in reversing their direction. The bug was compensated by setting MaximizeOn() in the example. The example was fixed in its revision 1.8 (march 9 2002) http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Examples/Registration/ImageRegistration3.cxx?cvsroot=Insight when the MaximizeOn() was replaced with MaximizeOff() http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Examples/Registration/ImageRegistration3.cxx.diff?r1=1.7&r2=1.8&cvsroot=Insight --- Please be confident that your understanging of the Metric behavior is correct, and that you should use MaximizeOff() when optimizing the MeanSquares metric. At this point we are focusing more on getting the ITK 1.4 release done by early September. The CVS repository is scheduled to be freezed on August 1st. Since this issue is already solved in the current CVS version, this bug will not appear in the 1.4 release. Please let us know if you have further questions Thanks Luis --------------------- Stephan Moser wrote: > Hi Luis > > Thanks for your reply. I agree with you in all points, except that we > seem to talk about different code versions. I just now downloaded ITK > 1.2.0 (.zip file) again and in ImageRegistration3.cxx there is line nr. > 381 with the following statement: > > optimizer->MaximizeOn(); > > This is what confused me earlier on. Where is the problem? The program > does compile and works, showing the exact behavior as I described in my > last mail. > > Regards, Stephan > > > > On Tue, 15 Jul 2003, Luis Ibanez wrote: > > >>Hi Stephan, >> >>You are right, >>the MeanSquare metric is optimal when its value is zero. >>The optimizer must then be set for Minimizing the cost >>function. >> >>This is done in ImageRegistration3.cxx line 381 with >>the call >> >> optmizer->MaximizeOff(); >> >>Note that setting MaximizeOff() is equivalent to call >>any of the following: >> >> optimizer->MinimizeOn(); >> optimizer->SetMaximize( false ); >> optimizer->SetMinimize( true ); >> >>You can verify the code in Insight/Code/Numerics >> >> itkRegularStepGradientDescentBaseOptimizer.h >> >> >>The registration should work for both signed and >>unsigned short pixel types, using MinimizeOn() >>[ or MaximizeOff() ] in both cases. >> >>MaximizeOn() will not produce registered images. >> >> >>You can also experiment this with the Python >>or Tcl versions: >> >> ImageRegistration3.py >> ImageRegistration3.tcl >> >> >> >> >>Regards, >> >> >> Luis >> >> >> >>----------------------- >>itk@stmoser.ch wrote: >> >>>Hi >>> >>>I've just been playing around with a basic registration program and the >>>registration example nr. 3. According to some newsgroup postings, >>>itkMeanSquareImageToImageMetric does sum up squared differences and >>>therefore needs to be minimized. So MinimizeOn() needs to be called. In >>>example 3 there is MaximizeOn() though. Why is that? >>> >>>It is interesting to note that if PixelType is set to 'short', the >>>registration does fine with MinimizeOn(), but not with MaximizeOn(). If >>>it is set to 'unsigned short', it will do with MaximizeOn() but not with >>>MinimizeOn(). >>> >>>Can anyone help me? >>> >>>Thanks, Stephan >>> >>>_______________________________________________ >>>Insight-users mailing list >>>Insight-users@itk.org >>>http://www.itk.org/mailman/listinfo/insight-users >>> >> >> >> >>_______________________________________________ >>Insight-users mailing list >>Insight-users@itk.org >>http://www.itk.org/mailman/listinfo/insight-users >> > > From rannou@mednet.ucla.edu Tue Jul 15 19:11:59 2003 From: rannou@mednet.ucla.edu (Fernando Rannou) Date: Tue, 15 Jul 2003 11:11:59 -0700 Subject: [Insight-users] Re: Problems Building 1.2: gcc 3.2 : Utilities/vxl In-Reply-To: <3F1412E6.4090009@kitware.com> References: <5620C7DC-532D-11D7-BEAD-000393C34B0E@ucalgary.ca> <3E6D5189.9000601@kitware.com> <3F0EEB28.7020102@mednet.ucla.edu> <3F0EF10A.3010504@kitware.com> <3F0F2FF4.4080808@mednet.ucla.edu> <3F132D57.9070200@kitware.com> <3F13382B.9060804@mednet.ucla.edu> <3F1412E6.4090009@kitware.com> Message-ID: <3F1443EF.30803@mednet.ucla.edu> Thanks Luis. It worked. Fernando Luis Ibanez wrote: > > Hi Fernando, > > Thanks for letting us know about the > compiler version that you are using. > > I just compiled ITK 1.2 using gcc3.2 > under Linux Debian, without any problem. > > It seems that you enabled and advanced > option that is set to OFF by default. > The code in > > Insight/Utilities/vxl/v3p/netlib/ > > shouldn't be built by default. This > was an experimental location for updating > VXL after the release. > > Please rerun CMake and make sure that the > variable: > > > VXL_FROM_UTILITIES > > > Is set to OFF. > > That should prevent the compilation of > the directory Utilities/vxl > > > the VXL version in Code/Numerics/vxl > will be used instead. > > > Regards > > Luis > > > ------------------------ > Fernando Rannou wrote: > >> Hi Luis, >> this is what I'm using >> >> $ g++ --version >> g++ (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) >> Copyright (C) 2002 Free Software Foundation, Inc. >> >> Thanks >> Fernando >> >> Luis Ibanez wrote: >> >>> Hi Fernando, >>> >>> >>> What compiler (+version) are you using ? >>> >>> >>> Luis >>> >>> >>> --------------------------- >>> Fernando Rannou wrote: >>> >>>> Hi Luis, >>>> I just dowloaded ITK-1.2 from the web page, and I'm getting the >>>> following >>>> compilation error: >>>> ... >>>> Building object file triangle.o... >>>> /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c: >>>> In function `parsecommandline': >>>> /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c:2908: >>>> `poly' undeclared (first use in this function) >>>> /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c:2908: >>>> (Each undeclared identifier is reported only once >>>> /usr/local/InsightToolkit-1.2.0/Utilities/vxl/v3p/netlib/triangle.c:2908: >>>> for each function it appears in.) >>>> >>>> Any idea what's wrong? >>>> Thanks >>>> >>>> Fernando >>>> From luis.ibanez@kitware.com Tue Jul 15 19:12:14 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 14:12:14 -0400 Subject: [Insight-users] ITK 1.4 Release Schedule Message-ID: <3F1443FE.2010301@kitware.com> In a recent developers meeting we agreed on the following schedule for the release 1.4 of ITK. CVS Code Freeze in Insight: August 1 CVS Code Freeze in InsightApplications: August 15 CVS Tag 1.4 in Insight: September 15 The code freezing indicates that no new classes, nor new functionalities will be added after these dates. The period between August 1 and September 1 will be entirely dedicated to 1) Driving compiler errors to zero 2) Driving compiler warnings to zero 3) Solve any failing test 4) Increase code coverage to 70% The period between Sept 1 and Sept 15 will be mostly dedicated to packaging the release. We appreciate your reports on problems found in the release 1.2. At this point however, most of the ITK resources are dedicated to solve remanent issues in the current CVS version. If you find any problems with the 1.2 release, you may want to verify if they have been fixed in the current CVS version. If they have not, please let us know, so the issues can be solved in the period between August 1st and September 1. If you have been using the release 1.2, and feel adventurous today, this may be a good time for giving a try to the CVS version. Since any problems you may find will have to be solved before Sept 1, otherwise they will be around until the next release. No matter how adventurous you feel, please check the green level in the Dashboard before downloading the CVS version. Thanks Luis From luis.ibanez@kitware.com Tue Jul 15 19:31:05 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 14:31:05 -0400 Subject: [Insight-users] Rigid Registration References: <20030715161942.81941.qmail@web10502.mail.yahoo.com> Message-ID: <3F144869.20202@kitware.com> Hi Ravi, 1) The itkEuler3DRigidTransform does not use versors for representing the rotation. It uses three angles to be applied in sequence for rotating around the coordinate axis. (There was a Documentation bug on the header, that has been fixed now). http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Code/Common/itkEuler3DTransform.h?cvsroot=Insight These three angles are not normalized, as you may expect if they were the component of a Versor. The angles are using radians as units. 2) The settings of the image origin only have to be done at the beginning of the registration. (e.g. before invoking registrationMethod->StartRegistration()). 3) Please pay attention to the optimizer scales. Since the 6 parameters of the transform have very different scales, it is important to compensate for their difference in dynamic range. The angles will be expressed in radians, henceforth they will be in the range [ -3.14 : 3.14 ], while the translations are expected to be in the range of half the image extent (in millimeters). 4) FYI: Note that Versors are unit quaternions. They only have three components. The components satisfy the condition x^2 + y^2 + z^2 = sin^2( angle / 2 ) and a vector formed with componenets (x,y,z) is parallel to the axis of rotation. Versors represent pure rotations in 3D, while Quartenions represent rotation and scaling in 3D. Regards, Luis ------------------- ravi sharma wrote: > According to your suggestions I have used Euler3D > Rigid transform.The first 3 parameters are Versors.I > can get the images registered for translations but for > rotations it doesnot work.I gave set the origin of > both images at center of images using > ChangeInformationImageFilter.Does this have to be done > only one at start of registraton??? > Also my versor parameters come out to be > {-2.07,0.56,0.003}.Are the versors not > normalized...How can this happen because for versors > x*x+y*y+z*z+w*w=1. > What could be wrong?? > From Carolyn.Johnston@vexcel.com Tue Jul 15 20:23:33 2003 From: Carolyn.Johnston@vexcel.com (Carolyn Johnston) Date: Tue, 15 Jul 2003 13:23:33 -0600 Subject: [Insight-users] problems with median filter Message-ID: <5.0.0.25.2.20030715132327.00ab88c8@mail.vexcel.com> Hello all, I am using ITK to run some experiments with registration of digital elevation models. I have run into a confusing problem using the median filter class. I read in a digital elevation model and convert it to an itk float image using a conversion class. I set the image region, the origin, and the spacing for the image. I then write the resulting image out in raw format, and confirm that it is identical to what I read in. I then filter the image, and again write the raw output. I have tested the gradient magnitude filter, the threshold filter, and the median filter. Median filtering seems to introduce a sizeable deterministic shift into the output: the other filters I have tried don't do this. The shift is on the order of 500 pixels in Y and around 10 or so in X (for a 3600 by 3600 image). Rows and columns of zeros are introduced as well -- around 15 columns of zeros and 5 rows of zeros at the boundaries of the original image. Other than that, the image wraps at the boundaries. I suspect there is some parameter I am not setting, or am not setting correctly. I stepped through the median filtering code with gdb but did not find an uninitialized or default parameter read. What might be causing this problem? thanks, Carolyn Johnston Sr. Engineer, Vexcel Corporation From luis.ibanez@kitware.com Tue Jul 15 20:37:32 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 15:37:32 -0400 Subject: [Insight-users] problems with median filter References: <5.0.0.25.2.20030715132327.00ab88c8@mail.vexcel.com> Message-ID: <3F1457FC.40503@kitware.com> Hi Carolyn, The Median filter shouldn't produce any wrapping around the boundaries. Specially not that big (500 pixels). One possiblity is that the mechanism you are using for importing the data into an ITK image is not consistent. The main suspects here are the regions: LargestPossibleRegion BufferedRegion RequestedRegion Could you please do the following test: Add a Print( std::cout ) statement to the input image of the Median filter (before you run the filter), and also add a Print() on the output image of the median filter. Something like importedImage->Print( std::cout ); medianFilter->SetInput( importedImage ); medianFilter->Update(); medianFilter->GetOutput()->Print( std::cout ); and please post to the list the results of both Print() statements. What we want to check for is the correspondance between the regions in the input image and the regions of the output image. A typical source of error may be that one of the image regions has a starting index different from zero. Please let us know what you find. You are also welcome to post the conversion code that you are using for creating the ITK image from your elevation data. Thanks Luis ------------------------- Carolyn Johnston wrote: > Hello all, > > I am using ITK to run some experiments with registration of digital > elevation models. I have run into a confusing problem using the median > filter class. > > I read in a digital elevation model and convert it to an itk float image > using a conversion class. I set the image region, the origin, and the > spacing for the image. I then write the resulting image out in raw > format, and confirm that it is identical to what I read in. > > I then filter the image, and again write the raw output. I have tested > the gradient magnitude filter, the threshold filter, and the median > filter. Median filtering seems to introduce a sizeable deterministic > shift into the output: the other filters I have tried don't do this. The > shift is on the order of 500 pixels in Y and around 10 or so in X (for a > 3600 by 3600 image). Rows and columns of zeros are introduced as well -- > around 15 columns of zeros and 5 rows of zeros at the boundaries of the > original image. Other than that, the image wraps at the boundaries. > > I suspect there is some parameter I am not setting, or am not setting > correctly. I stepped through the median filtering code with gdb but did > not find an uninitialized or default parameter read. What might be > causing this problem? > > thanks, > Carolyn Johnston > Sr. Engineer, Vexcel Corporation > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From michakuhn@gmx.ch Tue Jul 15 20:41:38 2003 From: michakuhn@gmx.ch (Michael Kuhn) Date: Tue, 15 Jul 2003 21:41:38 +0200 (MEST) Subject: [Insight-users] CVS tarball compilation on linux Message-ID: <6421.1058298098@www11.gmx.net> Hi, I tried to build itk (I downloaded the tarball on "http://www.itk.org/cgi-bin/viewcvs.cgi/?cvsroot=Insight" today) on my Linux system. I got the following error message: Building object file itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.o ... /usr/local/Insight/Code/Algorithms/itkShapePriorSegmentationLevelSetFunction.txx : In instantiation of `itk::ShapePriorSegmentationLevelSetFunction, itkGeodesicActiveContourShapePriorLevelSetImageFilterTest(i nt, char**)::InternalImageType>::ShapePriorGlobalDataStruct': /usr/local/Insight/Code/Algorithms/itkShapePriorSegmentationLevelSetFunction.txx :83: instantiated from `typename itk::SegmentationLevelSetFunction::PixelType itk::ShapePriorSegmentationLevelSetFunction::ComputeUpdate(typename itk::SegmentationLevelSetFunct ion::NeighborhoodType&, void*, typename itk::Segm entationLevelSetFunction::FloatOffsetType&) [with TImageType = itk::Image, TFeatureImageType = itkGeodesicA ctiveContourShapePriorLevelSetImageFilterTest(int, char**)::InternalImageType]' /usr/local/Insight/Utilities/vxl/vnl/vnl_vector.h:120: instantiated from here /usr/local/Insight/Code/Common/itkLevelSetFunction.h:232: error: `struct itk::LevelSetFunction >::GlobalDataStruct' is protected /usr/local/Insight/Code/Algorithms/itkShapePriorSegmentationLevelSetFunction.txx :83: error: within this context make[7]: *** [itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.o] Error 1 make[6]: *** [default_target] Error 2 make[5]: *** [default_target_Algorithms] Error 2 make[4]: *** [default_target] Error 2 make[3]: *** [default_target_Code] Error 2 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_Testing] Error 2 make: *** [default_target] Error 2 The --version option of my gcc shows the following: gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Are there any problems known using this compiler? Or am I doing something wrong? Thanks, Michael -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ Jetzt ein- oder umsteigen und USB-Speicheruhr als Prmie sichern! From luis.ibanez@kitware.com Tue Jul 15 21:16:29 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 16:16:29 -0400 Subject: [Insight-users] CVS tarball compilation on linux References: <6421.1058298098@www11.gmx.net> Message-ID: <3F14611D.6000406@kitware.com> Hi Michael, The CVS version is working ok with GCC 3.3. We have tested it including the python wrapping. You said that you downloaded a tarball,... since there are no tarballs (tgz) files for the current CVS version, it is quite possible that you are actually using the tarballs of version 1.2 If you want to use the CVS version, please follow the instructions of the SoftwareGuide http://www.itk.org/ItkSoftwareGuide.pdf Section 1.4, pdf-page 28. They describe in detail how to download and install the toolkit. Please let us know if you encounter any problems. Regards, Luis -------------------------- Michael Kuhn wrote: > Hi, > > I tried to build itk (I downloaded the tarball on > "http://www.itk.org/cgi-bin/viewcvs.cgi/?cvsroot=Insight" today) on my Linux system. I got the > following error message: > > Building object file > itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.o > ... > /usr/local/Insight/Code/Algorithms/itkShapePriorSegmentationLevelSetFunction.txx > : In instantiation of > `itk::ShapePriorSegmentationLevelSetFunction ternalPixelType, 2>, > itkGeodesicActiveContourShapePriorLevelSetImageFilterTest(i > nt, > char**)::InternalImageType>::ShapePriorGlobalDataStruct': > /usr/local/Insight/Code/Algorithms/itkShapePriorSegmentationLevelSetFunction.txx > :83: instantiated from `typename > itk::SegmentationLevelSetFunction::PixelType > itk::ShapePriorSegmentationLevelSetFunction eType, TFeatureImageType>::ComputeUpdate(typename > itk::SegmentationLevelSetFunct ion TFeatureImageType>::NeighborhoodType&, void*, typename itk::Segm > entationLevelSetFunction TFeatureImageType>::FloatOffsetType&) [with TImageType = > itk::Image, TFeatureImageType = itkGeodesicA > > ctiveContourShapePriorLevelSetImageFilterTest(int, char**)::InternalImageType]' > /usr/local/Insight/Utilities/vxl/vnl/vnl_vector.h:120: instantiated from > here > /usr/local/Insight/Code/Common/itkLevelSetFunction.h:232: error: `struct > itk::LevelSetFunction > >>::GlobalDataStruct' > > is > protected > /usr/local/Insight/Code/Algorithms/itkShapePriorSegmentationLevelSetFunction.txx :83: error: within > this context > make[7]: *** [itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.o] > Error 1 > make[6]: *** [default_target] Error 2 > make[5]: *** [default_target_Algorithms] Error 2 > make[4]: *** [default_target] Error 2 > make[3]: *** [default_target_Code] Error 2 > make[2]: *** [default_target] Error 2 > make[1]: *** [default_target_Testing] Error 2 > make: *** [default_target] Error 2 > > > The --version option of my gcc shows the following: > > gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > Are there any problems known using this compiler? Or am I doing something > wrong? > > Thanks, > > Michael > From hqian@imaging.robarts.ca Tue Jul 15 22:48:39 2003 From: hqian@imaging.robarts.ca (Hua Qian) Date: Tue, 15 Jul 2003 17:48:39 -0400 Subject: [Insight-users] ITK Python Wrapping Examples Message-ID: <3F1476B7.9050006@imaging.robarts.ca> Hi, I am trying out the Python Wrapping for ITK recently. The build went on every smoothly. But I had troubles running some of the python examples. Some examples works, some don't. For example, CurvatureAnisotropicDiffusionImageFilter.py ran without problem: > python CurvatureAnisotropicDiffusionImageFilter.py ../Data/BrainProtonDensitySlice.png test.png 10 0.125 3.0 But CurvatureFlowImageFilter.py aborted abnormally: > python CurvatureFlowImageFilter.py ../Data/BrainProtonDensitySlice.png test.png 10 0.125 Abort Am I doing something wrong? I am using Mandrake Linux 9.1, gcc 3.2.2, python 2.2.2, cvs ITK, cvs CMake. Thanks, Hua Qian From c.p.botha@ewi.tudelft.nl Tue Jul 15 23:55:12 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Tue, 15 Jul 2003 23:55:12 +0100 Subject: [Insight-users] Python wrapping + exceptions Message-ID: <3F148650.1030902@ewi.tudelft.nl> Dear list, In Insight, error conditions are often handled by calling ITKExceptionMacro which on its part throws a C++ exception. This is all fine and well for C++ applications, where these can be neatly caught. In the Python wrapping however, there is no catch for the exception, so the whole wrapped ITK application is unceremoniously terminated. Am I missing something? If not, perhaps an itk::Object static variable that changes the ITKException behaviour to an that of onITKErrorMacro (still to be created, but it looks a lot like ITKWarningMacro) would be appropriate. ITKErrorMacro would invoke an event that would trigger the appropriate observers or output an error message if no observers have been registered. Yes, this is almost exactly like VTKErrorMacro. :) Are there better ways to solve this? If not, I can start making a patch to implement this. Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From Carolyn.Johnston@vexcel.com Wed Jul 16 00:17:08 2003 From: Carolyn.Johnston@vexcel.com (Carolyn Johnston) Date: Tue, 15 Jul 2003 17:17:08 -0600 Subject: [Insight-users] Re: problems with median filter In-Reply-To: <3F1457FC.40503@kitware.com> References: <5.0.0.25.2.20030715132327.00ab88c8@mail.vexcel.com> Message-ID: <5.0.0.25.2.20030715163832.00ad0988@mail.vexcel.com> Hi Luis, I should say first that for some reason... I am not having the shift problem I described anymore. <> It's like taking your car to the shop.. the only change was the call to Image::Print. Perhaps it's a quantum problem and simply trying to look at it fixes it? (Hm... are some of these quantities only calculated on the fly, as needed?) >The main suspects here are the regions: > > LargestPossibleRegion > BufferedRegion > RequestedRegion I agree with you that these were the main worries, and thank you for pointing out a way that I can look at the values of these regions. I've included two things here: one, my import function: two, the results you requested. The file "dem.raw" was created using an ImportImageFilter, and "post_dem.raw" are the results from the median filter. ______________________________________________________________ Here is the import function I use. ImageFilterType is typedef'd to MedianImageFilter. writeImage contains the call to print out the itk::IMage data. GDALToITK::ImageFilterType::Pointer GDALToITK::ImageFromDem(DemDataFloat& dem){ typedef itk::ImportImageFilter ImportFilterType; ImportFilterType::Pointer importFilter = ImportFilterType::New(); // set up image coordinate environment ImportFilterType::SizeType size; ImportFilterType::IndexType start; ImportFilterType::RegionType region; size[0]=dem.size.x; size[1]=dem.size.y; start.Fill(0); region.SetSize(size); region.SetIndex(start); importFilter->SetRegion(region); // set ground coordinate environment: origin and spacing double origin[2]; double spacing[2]; Dpoint2d geo_origin = dem.PixToGeo(Ipoint2d(0,0)); origin[0]=geo_origin.x; origin[1]=geo_origin.y; Dpoint2d geo_spacing = GetCoordSpacing(dem); // cpj ++ 7.8.2003: added fabs to fix bug where registration code expected positive values. spacing[0]=fabs(geo_spacing.x); spacing[1]=fabs(geo_spacing.y); importFilter->SetOrigin(origin); importFilter->SetSpacing(spacing); printf("Image information: \n"); printf("spacing: (%f, %f)\n", spacing[0], spacing[1]); printf("origin: (%f, %f)\n", origin[0], origin[1]); printf("size: (%u, %u)\n\n", (unsigned) size[0], (unsigned) size[1]); //copy dem data into ITK image. float *buffer; const int demsize=dem.imgdata.size(); assert(demsize==size[0]*size[1]); if(demsize!=0) buffer = &(dem.imgdata[0]); else throw itk::ExceptionObject("Specify nonzero size for input DEM"); // 'true' value means that importFilter won't delete buffer (which belongs to dem!) when it's destroyed importFilter->SetImportPointer(buffer, demsize, true); if(debug){ writeImage(importFilter, "/home/cpj/tec_project/test/DemRegister/dem.raw"); } // Instantiate a filter and attach it to the importer. // cpj: input type = ImageType =output image type. // have used gradient manitude and median filters here. ImageFilterType::Pointer filter = ImageFilterType::New(); filter->SetInput(importFilter->GetOutput()); //++ 7.15.2003: debug code importFilter->GetOutput()->Print(std::cout); // ++ cpj 7.15.2003 test: use only with ThresholdImageFilter // filter->SetOutsideValue(-1000); // filter->ThresholdBelow(-10000); // filter->ThresholdAbove(10000); if(debug){ writeImage(filter, "/home/cpj/tec_project/test/DemRegister/post_dem.raw"); } //++ 7.15.2003: debug code filter->GetOutput()->Print(std::cout); return filter; } // end of function _______________________________________________________________ output from the print statements: (OUTPUT FROM IMPORT-FILTERED IMAGE -- I've checked this, there's no shift) : writing image /home/cpj/tec_project/test/DemRegister/dem.raw Image (0x353b38) Reference Count: 2 Modified Time: 30 Debug: Off Observers: none Source: (0x3541e8) Source output index: 0 Release Data: Off Data Released: False Global Release Data: Off PipelineMTime: 14 UpdateTime: 32 LastRequestedRegionWasOutsideOfTheBufferedRegion: 0 LargestPossibleRegion: Dimension: 2 Index: [0, 0] Size: [3601, 3601] BufferedRegion: Dimension: 2 Index: [0, 0] Size: [3601, 3601] RequestedRegion: Dimension: 2 Index: [0, 0] Size: [3601, 3601] Origin: [-122.999861, 45.999861] Spacing: [0.000278, 0.000278] PixelContainer: ImportImageContainer (0x3539f0) Reference Count: 2 Modified Time: 31 Debug: Off Observers: none Pointer: 0x353a1c Container manages memory: false Size: 12967201 Capacity: 12967201 IndexToPhysicalTransform: AffineTransform (0x353c00) Reference Count: 2 Modified Time: 5 Debug: Off Observers: none Matrix: 0.000278 0.000000 -122.999861 0.000000 0.000278 45.999861 PhysicalToIndexTransform: AffineTransform (0x355480) Reference Count: 2 Modified Time: 6 Debug: Off Observers: none Matrix: 3600.000000 0.000000 442799.499992 0.000000 3600.000000 -165599.500001 (OUTPUT FROM MEDIAN FILTERED IMAGE -- does not contain shift any more!!!) : writing image /home/cpj/tec_project/test/DemRegister/post_dem.raw Image (0x355630) Reference Count: 1 Modified Time: 71 Debug: Off Observers: none Source: (0x3555b8) Source output index: 0 Release Data: Off Data Released: False Global Release Data: Off PipelineMTime: 56 UpdateTime: 73 LastRequestedRegionWasOutsideOfTheBufferedRegion: 0 LargestPossibleRegion: Dimension: 2 Index: [0, 0] Size: [3601, 3601] BufferedRegion: Dimension: 2 Index: [0, 0] Size: [3601, 3601] RequestedRegion: Dimension: 2 Index: [0, 0] Size: [3601, 3601] Origin: [-122.999861, 45.999861] Spacing: [0.000278, 0.000278] PixelContainer: ImportImageContainer (0x353a38) Reference Count: 2 Modified Time: 72 Debug: Off Observers: none Pointer: 0x353a64 Container manages memory: true Size: 12967201 Capacity: 12967201 IndexToPhysicalTransform: AffineTransform (0x3556f8) Reference Count: 2 Modified Time: 48 Debug: Off Observers: none Matrix: 0.000278 0.000000 -122.999861 0.000000 0.000278 45.999861 PhysicalToIndexTransform: AffineTransform (0x355868) Reference Count: 2 Modified Time: 49 Debug: Off Observers: none Matrix: 3600.000000 0.000000 442799.499992 0.000000 3600.000000 -165599.500001 From luis.ibanez@kitware.com Wed Jul 16 01:37:26 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 20:37:26 -0400 Subject: [Insight-users] ITK Python Wrapping Examples References: <3F1476B7.9050006@imaging.robarts.ca> Message-ID: <3F149E46.2090802@kitware.com> Hi Hua, I just rebulid the wrapping in a Linux Debian with gcc 3.3 and both python examples are working ok. Note that the finite difference solver in ITK has been under revision in recent days. It may be that your CVS checkout took the CurvatureFlowImageFilter in an unstable state. You may want to update your CVS checkout (verify first if the dashboard is green, since we anticipate a lot of activity before August 1). In any case, Charl's observation is correct. ITK is throwing an exception that is not being catched. That's why the "abort" message appears. One possible reason for this exception being thrown is that the time step parameter provided to the filter is too big. The timeStep parameter that you are using for the CurvatureFlowImageFilter is right in the limit of the value accepted as the bound for producing numerically stable results. Before updating your CVS, you may want to try with smaller values of time step. (e.g. 0.1 instead of 0.125). Please let us know if you continue experincing any problems, Thanks Luis ------------------- Hua Qian wrote: > Hi, > > I am trying out the Python Wrapping for ITK recently. The build > went on every smoothly. But I had troubles running some of the > python examples. Some examples works, some don't. > For example, CurvatureAnisotropicDiffusionImageFilter.py ran > without problem: > > > python CurvatureAnisotropicDiffusionImageFilter.py > ../Data/BrainProtonDensitySlice.png test.png 10 0.125 3.0 > > But CurvatureFlowImageFilter.py aborted abnormally: > > python CurvatureFlowImageFilter.py > ../Data/BrainProtonDensitySlice.png test.png 10 0.125 > Abort > > Am I doing something wrong? I am using Mandrake Linux 9.1, gcc 3.2.2, > python 2.2.2, cvs ITK, cvs CMake. > > Thanks, > > Hua Qian > > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Wed Jul 16 01:44:28 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 20:44:28 -0400 Subject: [Insight-users] Python wrapping + exceptions References: <3F148650.1030902@ewi.tudelft.nl> Message-ID: <3F149FEC.9030504@kitware.com> Hi Charl, Your observation is correct, ITK is throwing a C++ exception that is not being catched. The ideal fix would be to figure out a mechanism for catching C++ exceptions and translate them into Python exceptions. Your suggestion is a nice option too, since at least the error message will be available before the program terminates. The challenge would be to implement this in a way that is not too invasive on the C++ side. If you see a viable way of implementing this, we will be happy to incorporate it on the toolkit. Thanks Luis --------------------- Charl P. Botha wrote: > Dear list, > > In Insight, error conditions are often handled by calling > ITKExceptionMacro which on its part throws a C++ exception. This is all > fine and well for C++ applications, where these can be neatly caught. > > In the Python wrapping however, there is no catch for the exception, so > the whole wrapped ITK application is unceremoniously terminated. Am I > missing something? > > If not, perhaps an itk::Object static variable that changes the > ITKException behaviour to an that of onITKErrorMacro (still to be > created, but it looks a lot like ITKWarningMacro) would be appropriate. > ITKErrorMacro would invoke an event that would trigger the appropriate > observers or output an error message if no observers have been > registered. Yes, this is almost exactly like VTKErrorMacro. :) > > Are there better ways to solve this? If not, I can start making a patch > to implement this. > > Thanks, > Charl > From luis.ibanez@kitware.com Wed Jul 16 01:54:23 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 20:54:23 -0400 Subject: [Insight-users] Re: problems with median filter References: <5.0.0.25.2.20030715132327.00ab88c8@mail.vexcel.com> <5.0.0.25.2.20030715163832.00ad0988@mail.vexcel.com> Message-ID: <3F14A23F.7000601@kitware.com> Hi Carolyn, Your code for setting up of the import filter looks fine. As you said, it sounds just like one of those quantum mechanics bugs that disapear when you insert a std::cout for debugging :-) BTW You may want to try removing the ->Print(std::cout) statements that you just added, and check if the bug reapears. It may well be that the program is overriding some memory positions as a consecuence of incorrectly set pointers. Sometimes inserting new lines of code change the conditions that make the bug visible. If you are running on Unix, you may also try "Valgrind" which is very useful when trying to find problems with pointers and memory allocation. Please let us know if you encounter further problems, Thanks Luis -------------------------- Carolyn Johnston wrote: > Hi Luis, > > I should say first that for some reason... I am not having the shift > problem I described anymore. <> It's like taking your car to the > shop.. the only change was the call to Image::Print. Perhaps it's a > quantum problem and simply trying to look at it fixes it? (Hm... are > some of these quantities only calculated on the fly, as needed?) > >> The main suspects here are the regions: >> >> LargestPossibleRegion >> BufferedRegion >> RequestedRegion > > > I agree with you that these were the main worries, and thank you for > pointing out a way that I can look at the values of these regions. > > I've included two things here: one, my import function: two, the results > you requested. The file "dem.raw" was created using an > ImportImageFilter, and "post_dem.raw" are the results from the median > filter. > > ______________________________________________________________ > Here is the import function I use. ImageFilterType is typedef'd to > MedianImageFilter. writeImage contains the call to print out the > itk::IMage data. > > > GDALToITK::ImageFilterType::Pointer > GDALToITK::ImageFromDem(DemDataFloat& dem){ > > typedef itk::ImportImageFilter ImportFilterType; > ImportFilterType::Pointer importFilter = ImportFilterType::New(); > > // set up image coordinate environment > ImportFilterType::SizeType size; > ImportFilterType::IndexType start; > ImportFilterType::RegionType region; > size[0]=dem.size.x; > size[1]=dem.size.y; > start.Fill(0); > region.SetSize(size); > region.SetIndex(start); > importFilter->SetRegion(region); > > // set ground coordinate environment: origin and spacing > double origin[2]; > double spacing[2]; > Dpoint2d geo_origin = dem.PixToGeo(Ipoint2d(0,0)); > origin[0]=geo_origin.x; > origin[1]=geo_origin.y; > Dpoint2d geo_spacing = GetCoordSpacing(dem); > > // cpj ++ 7.8.2003: added fabs to fix bug where registration code > expected positive values. > spacing[0]=fabs(geo_spacing.x); > spacing[1]=fabs(geo_spacing.y); > importFilter->SetOrigin(origin); > importFilter->SetSpacing(spacing); > > printf("Image information: \n"); > printf("spacing: (%f, %f)\n", spacing[0], spacing[1]); > printf("origin: (%f, %f)\n", origin[0], origin[1]); > printf("size: (%u, %u)\n\n", (unsigned) size[0], (unsigned) size[1]); > //copy dem data into ITK image. > > float *buffer; > const int demsize=dem.imgdata.size(); > assert(demsize==size[0]*size[1]); > if(demsize!=0) > buffer = &(dem.imgdata[0]); > else > throw itk::ExceptionObject("Specify nonzero size for input DEM"); > > // 'true' value means that importFilter won't delete buffer (which > belongs to dem!) when it's destroyed > importFilter->SetImportPointer(buffer, demsize, true); > if(debug){ > writeImage(importFilter, > "/home/cpj/tec_project/test/DemRegister/dem.raw"); > } > > // Instantiate a filter and attach it to the importer. > // cpj: input type = ImageType =output image type. > // have used gradient manitude and median filters here. > ImageFilterType::Pointer filter = ImageFilterType::New(); > filter->SetInput(importFilter->GetOutput()); > > //++ 7.15.2003: debug code > importFilter->GetOutput()->Print(std::cout); > // ++ cpj 7.15.2003 test: use only with ThresholdImageFilter > // filter->SetOutsideValue(-1000); > // filter->ThresholdBelow(-10000); > // filter->ThresholdAbove(10000); > > if(debug){ > writeImage(filter, > "/home/cpj/tec_project/test/DemRegister/post_dem.raw"); > } > //++ 7.15.2003: debug code > filter->GetOutput()->Print(std::cout); > return filter; > } // end of function > > _______________________________________________________________ > > output from the print statements: > > (OUTPUT FROM IMPORT-FILTERED IMAGE -- I've checked this, there's no shift) > : writing image > /home/cpj/tec_project/test/DemRegister/dem.raw > Image (0x353b38) > Reference Count: 2 > Modified Time: 30 > Debug: Off > Observers: > none > Source: (0x3541e8) > Source output index: 0 > Release Data: Off > Data Released: False > Global Release Data: Off > PipelineMTime: 14 > UpdateTime: 32 > LastRequestedRegionWasOutsideOfTheBufferedRegion: 0 > LargestPossibleRegion: > Dimension: 2 > Index: [0, 0] > Size: [3601, 3601] > BufferedRegion: > Dimension: 2 > Index: [0, 0] > Size: [3601, 3601] > RequestedRegion: > Dimension: 2 > Index: [0, 0] > Size: [3601, 3601] > Origin: [-122.999861, 45.999861] > Spacing: [0.000278, 0.000278] > PixelContainer: ImportImageContainer (0x3539f0) > Reference Count: 2 > Modified Time: 31 > Debug: Off > Observers: > none > Pointer: 0x353a1c > Container manages memory: false > Size: 12967201 > Capacity: 12967201 > > > IndexToPhysicalTransform: AffineTransform (0x353c00) > Reference Count: 2 > Modified Time: 5 > Debug: Off > Observers: > none > Matrix: > 0.000278 0.000000 -122.999861 > 0.000000 0.000278 45.999861 > > > PhysicalToIndexTransform: AffineTransform (0x355480) > Reference Count: 2 > Modified Time: 6 > Debug: Off > Observers: > none > Matrix: > 3600.000000 0.000000 442799.499992 > 0.000000 3600.000000 -165599.500001 > > > (OUTPUT FROM MEDIAN FILTERED IMAGE -- does not contain shift any more!!!) > : writing image > /home/cpj/tec_project/test/DemRegister/post_dem.raw > Image (0x355630) > Reference Count: 1 > Modified Time: 71 > Debug: Off > Observers: > none > Source: (0x3555b8) > Source output index: 0 > Release Data: Off > Data Released: False > Global Release Data: Off > PipelineMTime: 56 > UpdateTime: 73 > LastRequestedRegionWasOutsideOfTheBufferedRegion: 0 > LargestPossibleRegion: > Dimension: 2 > Index: [0, 0] > Size: [3601, 3601] > BufferedRegion: > Dimension: 2 > Index: [0, 0] > Size: [3601, 3601] > RequestedRegion: > Dimension: 2 > Index: [0, 0] > Size: [3601, 3601] > Origin: [-122.999861, 45.999861] > Spacing: [0.000278, 0.000278] > PixelContainer: ImportImageContainer (0x353a38) > Reference Count: 2 > Modified Time: 72 > Debug: Off > Observers: > none > Pointer: 0x353a64 > Container manages memory: true > Size: 12967201 > Capacity: 12967201 > IndexToPhysicalTransform: AffineTransform (0x3556f8) > Reference Count: 2 > Modified Time: 48 > Debug: Off > Observers: > none > Matrix: > 0.000278 0.000000 -122.999861 > 0.000000 0.000278 45.999861 > > > PhysicalToIndexTransform: AffineTransform (0x355868) > Reference Count: 2 > Modified Time: 49 > Debug: Off > Observers: > none > Matrix: > 3600.000000 0.000000 442799.499992 > 0.000000 3600.000000 -165599.500001 > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Wed Jul 16 02:08:34 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 21:08:34 -0400 Subject: [Insight-users] DLL output References: <332881406.1058285842@Dell620> Message-ID: <3F14A592.3010200@kitware.com> Hi Tim, Are you getting this error message during the start up of the application ? or once it is executing ? or during the linking process ? It is quite strange that it is using the naming standard for Unix... it looks like a problem in the CMake configuration of your application. (e.g. maybe the name is hard coded in one of the CMakeLists.txt files....). CMake would generate appropriate names for shared libraries in Windows or Unix, so the only way for this name to appear is to be hard written somewhere,... or to make CMake think that it is generating a filename for Unix instead of Windows. If the message is a run-time message, you may want try the tool "Dependency Walker" by Steve Miller. http://www.dependencywalker.com/ It will show you all the libraries in which your application depends. Simply execute the tool, and in the file/open menu give the executable of your application. With this, at least you will know in what directory this library was expected to be found. Regards, Luis ----------------- Tim Rudge wrote: > Hi, > > This is not entirely ITK but... I am outputting DLL's from a project > linked to ITK. I have had this working before but then I got a new CVS > release and recompiled all using ITK.dsw. Now I get the error 'cannot > find libITKPackage.so' from the application. But I am outputting .dll > files (for Windows XP) so I don;t understand why the app is looking for > .so files. > > Any ideas? > > Tim Rudge > --------- > Cellular Development Lab > Dept. Plant Sciences > Cambridge University > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Wed Jul 16 02:45:38 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 15 Jul 2003 21:45:38 -0400 Subject: [Insight-users] Re: A problem of linking FLTK libraries in MFC based program! References: <20030716013438.79655.qmail@web15307.mail.bjs.yahoo.com> Message-ID: <3F14AE42.1060702@kitware.com> Hi Yuanjie Mixing FLTK and MFC doesn't seem to be a good idea. You will be trying two use two libraries that are designed for the same purpose: Managing a GUI. I would suggest you to choose one or the other. With FLTK you have the advantage of the portability to other platforms. Regards, Luis ---------------------- zheng yuanjie wrote: > Hi, Luis > > I have been using/ Microsoft Visual C++ 6.0/ with /Windows XP./ > > Would you please tell me if I can combine /MFC/ with /FLTK/ to construct > interface of one program? > > I have tried to combine them, but I failed. My operations are listed below: > > 1. I constructed a new project with /MFC AppWizard(exe)/. > > 2. I tried to link /FLTK/ static libraries in my program. I could > succeed in linking /fltkgld.lib/ and/ fltkimagesd.lib/, however I > failedd in doing /fltkd.lib/. When I tried to link /fltkd.lib/, and > debugged the program, an linking error came out as: > > /Linking.../ > > /fltkd.lib(fl_call_main.obj) : error LNK2001: unresolved external symbol > _main/ > > Would you mind telling me what's wrong with me? Please note that if I > construct a Win32 Application or Win32 ConsoleApplication, i.e. not a > MFC based one, I can succeed in linking all the libraries of FLTK. > > Sincerely yours, > > Yuanjie Zheng > > > > > ------------------------------------------------------------------------ > *Do You Yahoo!?* > ڵûĻ > > From imho@bephp.com Wed Jul 16 10:24:19 2003 From: imho@bephp.com (imho) Date: Wed, 16 Jul 2003 11:24:19 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F1417E0.8080300@kitware.com> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> <3F1330F1.2040902@kitware.com> <3F140721.3020109@bephp.com> <3F1417E0.8080300@kitware.com> Message-ID: <3F1519C3.9050800@bephp.com> This is a multi-part message in MIME format. --------------010301040301010406040005 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Luis, I have saved the data into a .mdh metaImage file, and it has a non null size. I've tried to compile the imageViewer but I have a linking error so I've tried to save it into a VTK format, but I can't open it with my polyDataReader of course ( ERROR: In C:\martink\vtk40\VTK\IO\vtkPolyDataReader.cxx, line 167 vtkPolyDataReader (0x057D3900): Cannot read dataset type: structured_points). But it seems that the importer in itk is ok, it's the last part of the pipe-line that I've to check out, the itkExporter->vtkImporter. I send you the output files, maybe it could help. thanks Luis Ibanez wrote: > > Hi Imho, > > Could you please try the following: > > in your pipeline > > vtkPolydata->vtkImageData->vtkExporter->itkImporter > > add an ITK writer after the itkImporter > > itkImporter->itkImageFileWriter > > and save the data in a MetaImage format > (which support pixel type float). > > The use the ImageViewer application available > in InsightApplications in order to check the > content of the image. > > You could also use a VTK image format > and use VTK for checking the content of > the file. > > The point of the test is to verify if the > image is being imported correctly into ITK. > > > Please let us know what you find. > > > Thanks > > > Luis > > > > -------------- > imho wrote: > >> Hi Luis, >> the error that I have is a runtime error, I didn't add it because I have >> a message in front of it, and I can't copy paste it. Now I send you a >> print screen :) Maybe I didn't understand it rightly. >> >> The pixelType that I've for ITK is float : >> ... >> const unsigned int Dimension = 3; >> class registrationITK >> { >> public: >> ... >> typedef float PixelType; >> typedef itk::Image ImageType; >> ... >> private : >> ... >> ImageType::Pointer imageSource; >> ImageType::Pointer imageTarget; >> >> } >> >> thanks for your help >> >> Imho. >> >> >> >> Luis Ibanez wrote: >> >>> >>> Hi Imho, >>> >>> Your description is a bit confusing. >>> >>> You may want to verify your processing stage by stage. >>> >>> A pipeline: >>> >>> vtkExporter-->itkImporter-->itkExporter-->vtkImporter >>> >>> Should work without problem. >>> >>> You may want to verify that you are using compatible >>> pixel types. What is the pixel type that you are using >>> for instantiating the ITK images ? >>> >>> > >>> > back in vtk I still have a vtkImageData error. >>> > >>> What is the error message that you get for vtkImageData ? >>> is this a compilation error ? a link error ? or a runtime error ? >>> >>> Posting the error message can always help :-) >>> >>> >>> >>> Luis >>> >>> >>> >>> --------------- >>> imho wrote: >>> >>>> Hi Luis, >>>> >>>> I've succeed converting vtkPolyData to vtkImageData, it deforms my >>>> vtkPolyData and is very slow but I'll try other parameters... >>>> the principal is that I have a vtkImageData to put in the exporter >>>> / importer pipe-line. >>>> And there I have a problem. itk returns a null imageData, so I've >>>> tried a simple pipe-line to itk where I do nothing, just this : >>>> >>>> ------------------------------------------ >>>> in itk class : >>>> registrationITK::registrationITK(vtkImageImport* vtkImporter, >>>> vtkImageExport *vtkExporter, vtkImageExport *vtkExporter2) >>>> { itkImporter = ImageImportType::New(); >>>> itkImporter2 = ImageImportType::New(); >>>> itkExporter = ImageExportType::New(); >>>> >>>> itkExporter->SetInput(itkImporter->GetOutput()); >>>> ConnectPipelines(vtkExporter, itkImporter); >>>> ConnectPipelines(vtkExporter2, itkImporter2); >>>> ConnectPipelines(itkExporter, vtkImporter); >>>> itkImporter->Update(); >>>> itkImporter2->Update(); >>>> } >>>> ------------------------------- >>>> in vtk class : >>>> ... >>>> >>>> vtkImporter4 = vtkImageImport::New(); >>>> ... >>>> vtkExporter4 = vtkImageExport::New(); >>>> vtkExporter5 = vtkImageExport::New(); >>>> >>>> poly[0] = vtkPolyData::New(); >>>> poly[1] = vtkPolyData::New(); >>>> polyLive = vtkPolyData::New(); >>>> >>>> imageModel = vtkImageData::New(); >>>> imageModelLive= vtkImageData::New(); >>>> >>>> polyToImage = vtkImplicitModeller::New(); >>>> polyLiveToImage = vtkImplicitModeller::New(); >>>> ... >>>> polyToImage->SetInput(poly[0]); >>>> polyLiveToImage->SetInput(polyLive); >>>> polyToImage->SetSampleDimensions(10, 10, 10); >>>> polyToImage->SetMaximumDistance(0.25); >>>> polyLiveToImage->SetSampleDimensions(10, 10, 10); >>>> polyLiveToImage->SetMaximumDistance(0.25); >>>> >>>> imageModel = polyToImage->GetOutput(); >>>> imageModelLive = polyLiveToImage->GetOutput(); >>>> vtkExporter4->SetInput(imageModel); >>>> vtkExporter5->SetInput(imageModelLive); >>>> >>>> regITK = new registrationITK(vtkImporter4, vtkExporter4, >>>> vtkExporter5); >>>> >>>> cast->SetInput(vtkImporter4->GetOutput()); >>>> castTo3D->SetInput(vtkImporter4->GetOutput()); >>>> >>>> isRegITK = true; >>>> >>>> ... >>>> poly[0]->CopyStructure(ApplyDemonRegistration()); >>>> ------------------------------------------------ >>>> vtkPolyData* sourceControlVTK::ApplyDemonRegistration() >>>> { >>>> vtkPolyData* pol = vtkPolyData::New(); >>>> >>>> // regITK->InitDemonRegistration(progress); // dans controlQt >>>> imageModel = vtkImporter4->GetOutput(); >>>> pol = imageToPolyMaker->makePoly(imageModel); >>>> return pol; >>>> >>>> } >>>> >>>> back in vtk I still have a vtkImageData error. >>>> So I resume, when I do : >>>> vtkPolyData->vtkImageData->vtkPolyData >>>> my poly is'nt allright but I have something to show >>>> >>>> but if I do : >>>> vtkPolyData->vtkImageData->vtkExporter->itkImporter->itkExporter->vtkImporter->vtkImagedata->vtkPolyData >>>> with or without the demonFilter >>>> I have nothing back :/ >>>> I surely do something wrong, but I can't find what. >>>> Maybe you can help me (again). >>>> >>>> thanks a lot. >>>> >>>> Imho. >>>> >>> >>> . >>> >> >> >> ------------------------------------------------------------------------ >> > > > > . > --------------010301040301010406040005 Content-Type: text/plain; name="test_itk_write.vtk" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="test_itk_write.vtk" IyB2dGsgRGF0YUZpbGUgVmVyc2lvbiAzLjAKVlRLIEZpbGUgR2VuZXJhdGVkIGJ5IEluc2ln aHQgU2VnbWVudGF0aW9uIGFuZCBSZWdpc3RyYXRpb24gVG9vbGtpdCAoSVRLKQpCSU5BUlkK REFUQVNFVCBTVFJVQ1RVUkVEX1BPSU5UUwpESU1FTlNJT05TIDEwIDEwIDEwClNQQUNJTkcg MCAwIDAKT1JJR0lOIDAgMCAwClBPSU5UX0RBVEEgMTAwMApTQ0FMQVJTIHNjYWxhcnMgZmxv YXQgMQpMT09LVVBfVEFCTEUgZGVmYXVsdAoCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9W Ar2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9 v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9W Ar2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9 v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9W Ar2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9 v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9W Ar2/VgK9v1YCvb9WAr2/VgK9v1YCvb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9vQd87wj9fegJBKT8vQOfmQUHq/zZBetAYQT1ZUEECvb9WAr2/Vm9o4UFAEmxBxFDpQDCm Bj/H0TxBNvc7QZBxKUFKIj5BAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9W Ar2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9 v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9W Ar2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9 v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9W Ar2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9 v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9W Ar2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9 v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9W --------------010301040301010406040005 Content-Type: text/plain; name="test_itk_write.mdh" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="test_itk_write.mdh" T2JqZWN0VHlwZSA9IEltYWdlCk5EaW1zID0gMwpCaW5hcnlEYXRhID0gVHJ1ZQpCaW5hcnlE YXRhQnl0ZU9yZGVyTVNCID0gRmFsc2UKQ29sb3IgPSAxIDAgMCAxCkVsZW1lbnRTcGFjaW5n ID0gMSAxIDEKRGltU2l6ZSA9IDEwIDEwIDEwCkVsZW1lbnRUeXBlID0gTUVUX0ZMT0FUCkVs ZW1lbnREYXRhRmlsZSA9IExPQ0FMCgK9v1YCvb9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/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9W Ar2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9 v1YCvb9WAr2/VgK9v1YCvb9WAr2/VgK9v1Y= --------------010301040301010406040005-- From luis.ibanez@kitware.com Wed Jul 16 15:25:53 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 16 Jul 2003 10:25:53 -0400 Subject: [Insight-users] Re: FLTK support References: <20030716022653.21542.qmail@web15304.mail.bjs.yahoo.com> Message-ID: <3F156071.5030707@kitware.com> Hi Yanjie, FLTK is an open source toolkit, just like ITK or VTK, Following the same spirit of Open Source software you can get support from the community of users that have confronted problems similar to yours. You may want to join the newsgroups of the FLTK community and post your questions and concerns there. Please see the link http://www.fltk.org/newsgroups.php Regards, Luis ------------------------- zheng yuanjie wrote: > Hi, Luis > > You suggest me to choose one from MFC and FLTK to manage my GUI. Personally I think FLTK is easier to learn and use, and I can build a more beautiful interface with it, however if a problem in using FLTK come out, it is not very easy to get help for me. To get help about MFC, I can refer to MSDN, but to get help about FLTK, I have been having to refer to the source code of FLTK. Would you please tell me how I can solve the problem? > > Thank you in advance! > > Sincerely yours, > > Yuanjie Zheng > > > */Luis Ibanez /* wrote: > > > Hi Yuanjie > > Mixing FLTK and MFC doesn't seem to be a good idea. > > You will be trying two use two libraries that are > designed for the same purpose: Managing a GUI. > > I would suggest you to choose one or the other. > > With FLTK you have the advantage of the portability > to other platforms. > > > > Regards, > > > Luis > > > > ---------------------- > zheng yuanjie wrote: > > Hi, Luis > > > > I have been using/ Microsoft Visual C++ 6.0/ with /Windows XP./ > > > > Would you please tell me if I can combine /MFC/ with /FLTK/ to > construct > > interface of one program? > > > > I have tried to combine them, but I failed. My operations are > listed below: > > > > 1. I constructed a new project with /MFC AppWizard(exe)/. > > > > 2. I tried to link /FLTK/ static libraries in my program. I ! could > > succeed in linking /fltkgld.lib/ and/ fltkimagesd.lib/, however I > > failedd in doing /fltkd.lib/. When I tried to link /fltkd.lib/, and > > debugged the program, an linking error came out as: > > > > /Linking.../ > > > > /fltkd.lib(fl_call_main.obj) : error LNK2001: unresolved external > symbol > > _main/ > > > > Would you mind telling me what's wrong with me? Please note that > if I > > construct a Win32 Application or Win32 ConsoleApplication, i.e. > not a > > MFC based one, I can succeed in linking all the libraries of FLTK. > > > > Sincerely yours, > > > > Yuanjie Zheng > > > > > > > > > > > ------------------------------------------------------------------------ > > *Do You Yahoo!?* > > ڵûĻ > > > > > > > > ------------------------------------------------------------------------ > ! *Do You Yahoo!?* > ڵûĻ > > From luis.ibanez@kitware.com Wed Jul 16 15:44:54 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 16 Jul 2003 10:44:54 -0400 Subject: [Insight-users] Re: Configuring ITK + VTK + FLTK project with CMake References: <20030716020422.73265.qmail@web15308.mail.bjs.yahoo.com> Message-ID: <3F1564E6.6050805@kitware.com> Hi Yuanjie, CMake has support for facilitating the configuration of a project that uses FLTK. However, FLTK itself is not build with CMake. Please follow the build instructions provided by FLTK in order to build this GUI Toolkit. http://www.fltk.org/faq.php In order to use ITK, VTK and FLTK in your project, the CMakeLists.txt file of your project just need to contain the following lines ---------------------------------- PROJECT( myApplicationName ) # # FIND ITK # FIND_PACKAGE(ITK) IF (USE_ITK_FILE) INCLUDE (${USE_ITK_FILE}) ELSE (USE_ITK_FILE) MESSAGE( FATAL_ERROR "This application requires ITK. One of these components is missing. Please verify configuration") ENDIF (USE_ITK_FILE) # # FIND VTK # FIND_PACKAGE(VTK) IF (USE_VTK_FILE) INCLUDE (${USE_VTK_FILE}) ELSE (USE_VTK_FILE) MESSAGE( FATAL_ERROR "This application requires VTK. One of these components is missing. Please verify configuration") ENDIF (USE_VTK_FILE) # # FIND FLTK # FIND_PACKAGE(FLTK) IF (FLTK_FOUND) INCLUDE_DIRECTORIES (${FLTK_INCLUDE_DIR}) ELSE (FLTK_FOUND) MESSAGE( FATAL_ERROR "This application requires FLTK. One of these components is missing. Please verify configuration") ENDIF (FLTK_FOUND) INCLUDE_DIRECTORIES( ${myApplicationName_SOURCE_DIR} ) # # Define the list of source files # SET(APPLICATION_SOURCES SourceFile1.cxx SourceFile2.cxx SourceFile3.cxx vtkFlRenderWindowInteractor.cxx ) ADD_EXECUTABLE( myApplication ${APPLICATION_SOURCES}) FLTK_WRAP_UI(myApplication myApplicationGUI.fl) ----------------------------------- Note the use of the command: FLTK_WRAP_IU( ) for managing the fluid files *.fl Regards, Luis -------------------- zheng yuanjie wrote: > Hi Luis > > I really appreciate your immediate feedback. I still have another > question. If I use Fltk to manage a GUI, how I can configure my program > with CMake. Please note that, in FLTK folder there is no any > CMakeList.txt file with which CMake can do configurations. > > Thank you in advance! > > Yours, sincerely > > Yuanjie Zheng > > > > */Luis Ibanez /* wrote: > > > Hi Yuanjie > > Mixing FLTK and MFC doesn't seem to be a good idea. > > You will be trying two use two libraries that are > designed for the same purpose: Managing a GUI. > > I would suggest you to choose one or the other. > > With FLTK you have the advantage of the portability > to other platforms. > > > > Regards, > > > Luis > > > > ---------------------- > zheng yuanjie wrote: > > Hi, Luis > > > > I have been using/ Microsoft Visual C++ 6.0/ with /Windows XP./ > > > > Would you please tell me if I can combine /MFC/ with /FLTK/ to > construct > > interface of one program? > > > > I have tried to combine them, but I failed. My operations are > listed below: > > > > 1. I constructed a new project with /MFC AppWizard(exe)/. > > > > 2. I tried to link /FLTK/ static libraries in my program. I ! could > > succeed in linking /fltkgld.lib/ and/ fltkimagesd.lib/, however I > > failedd in doing /fltkd.lib/. When I tried to link /fltkd.lib/, and > > debugged the program, an linking error came out as: > > > > /Linking.../ > > > > /fltkd.lib(fl_call_main.obj) : error LNK2001: unresolved external > symbol > > _main/ > > > > Would you mind telling me what's wrong with me? Please note that > if I > > construct a Win32 Application or Win32 ConsoleApplication, i.e. > not a > > MFC based one, I can succeed in linking all the libraries of FLTK. > > > > Sincerely yours, > > > > Yuanjie Zheng > > > > > > > > > > > ------------------------------------------------------------------------ > > *Do You Yahoo!?* > > ڵûĻ > > > > > > > > ------------------------------------------------------------------------ > ! *Do You Yahoo!?* > ڵûĻ > > From luis.ibanez@kitware.com Wed Jul 16 16:01:28 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 16 Jul 2003 11:01:28 -0400 Subject: [Insight-users] DLL output References: <3F14A592.3010200@kitware.com> <403016578.1058355977@Dell620> Message-ID: <3F1568C8.20501@kitware.com> Hi Tim, Thanks for checking with the dependency walker. If the ITKPackage.dll library actually exists in the location indicated by the DW, then, as you pointed out, the problem may be related to one of the libraries that ITKPackage.dll depend on. Please check with DW the dependencies of ITKPackage.dll (simply run DW and file/open the ITKPackage.dll file). Check if all of the libraries are in the directories indicated by DW. Please let us know what you find. Thanks Luis ----------------------- Tim Rudge wrote: > Luis, > > Thanks for your advice. The problem is when the app tries to load the > library at run-time. I have run DependencyWalker and it appears that the > app is looking for the file in the right place and correct name - > ITKpackage.dll, not .so as the error message says. The file is > definitely there but the DW log gives: > > LoadLibraryA("ITKpackage.dll") returned NULL. Error: The specified > module could not be found (126). > > Perhaps this is a problem with the ITK libs that my .dll depends on? > > regards, > > Tim > > --On 15 July 2003 21:08 -0400 Luis Ibanez wrote: > >> >> Hi Tim, >> >> Are you getting this error message during the start up of the >> application ? or once it is executing ? or during the linking >> process ? >> >> It is quite strange that it is using the naming standard for >> Unix... it looks like a problem in the CMake configuration of >> your application. (e.g. maybe the name is hard coded in one >> of the CMakeLists.txt files....). CMake would generate appropriate >> names for shared libraries in Windows or Unix, so the only way >> for this name to appear is to be hard written somewhere,... or >> to make CMake think that it is generating a filename for Unix >> instead of Windows. >> >> If the message is a run-time message, you may want try the tool >> "Dependency Walker" by Steve Miller. >> http://www.dependencywalker.com/ >> >> It will show you all the libraries in which your application >> depends. Simply execute the tool, and in the file/open menu >> give the executable of your application. >> >> With this, at least you will know in what directory this library >> was expected to be found. >> >> >> Regards, >> >> >> Luis >> >> >> ----------------- >> Tim Rudge wrote: >> >>> Hi, >>> >>> This is not entirely ITK but... I am outputting DLL's from a project >>> linked to ITK. I have had this working before but then I got a new CVS >>> release and recompiled all using ITK.dsw. Now I get the error 'cannot >>> find libITKPackage.so' from the application. But I am outputting .dll >>> files (for Windows XP) so I don;t understand why the app is looking for >>> .so files. >>> >>> Any ideas? >>> >>> Tim Rudge >>> --------- >>> Cellular Development Lab >>> Dept. Plant Sciences >>> Cambridge University >>> _______________________________________________ >>> Insight-users mailing list >>> Insight-users@itk.org >>> http://www.itk.org/mailman/listinfo/insight-users >>> >> >> >> > > > > Tim Rudge > --------- > Cellular Development Lab > Dept. Plant Sciences > Cambridge University > From tjr34@cam.ac.uk Wed Jul 16 16:23:34 2003 From: tjr34@cam.ac.uk (Tim Rudge) Date: Wed, 16 Jul 2003 16:23:34 +0100 Subject: [Insight-users] DLL output In-Reply-To: <3F1568C8.20501@kitware.com> References: <3F1568C8.20501@kitware.com> Message-ID: <419652984.1058372614@Dell620> DW seems to be looking in the wrong directory despite having set the /libpaths for ITK in the project settings. It is looking in the directory where the main apps librarys are kept. Tim --On 16 July 2003 11:01 -0400 Luis Ibanez wrote: > > Hi Tim, > > Thanks for checking with the dependency walker. > > If the ITKPackage.dll library actually exists in the > location indicated by the DW, then, as you pointed > out, the problem may be related to one of the libraries > that ITKPackage.dll depend on. > > Please check with DW the dependencies of ITKPackage.dll > (simply run DW and file/open the ITKPackage.dll file). > > Check if all of the libraries are in the directories > indicated by DW. > > Please let us know what you find. > > > Thanks > > > Luis > > > ----------------------- > > Tim Rudge wrote: >> Luis, >> >> Thanks for your advice. The problem is when the app tries to load the >> library at run-time. I have run DependencyWalker and it appears that the >> app is looking for the file in the right place and correct name - >> ITKpackage.dll, not .so as the error message says. The file is >> definitely there but the DW log gives: >> >> LoadLibraryA("ITKpackage.dll") returned NULL. Error: The specified >> module could not be found (126). >> >> Perhaps this is a problem with the ITK libs that my .dll depends on? >> >> regards, >> >> Tim >> >> --On 15 July 2003 21:08 -0400 Luis Ibanez >> wrote: >> >>> >>> Hi Tim, >>> >>> Are you getting this error message during the start up of the >>> application ? or once it is executing ? or during the linking >>> process ? >>> >>> It is quite strange that it is using the naming standard for >>> Unix... it looks like a problem in the CMake configuration of >>> your application. (e.g. maybe the name is hard coded in one >>> of the CMakeLists.txt files....). CMake would generate appropriate >>> names for shared libraries in Windows or Unix, so the only way >>> for this name to appear is to be hard written somewhere,... or >>> to make CMake think that it is generating a filename for Unix >>> instead of Windows. >>> >>> If the message is a run-time message, you may want try the tool >>> "Dependency Walker" by Steve Miller. >>> http://www.dependencywalker.com/ >>> >>> It will show you all the libraries in which your application >>> depends. Simply execute the tool, and in the file/open menu >>> give the executable of your application. >>> >>> With this, at least you will know in what directory this library >>> was expected to be found. >>> >>> >>> Regards, >>> >>> >>> Luis >>> >>> >>> ----------------- >>> Tim Rudge wrote: >>> >>>> Hi, >>>> >>>> This is not entirely ITK but... I am outputting DLL's from a project >>>> linked to ITK. I have had this working before but then I got a new CVS >>>> release and recompiled all using ITK.dsw. Now I get the error 'cannot >>>> find libITKPackage.so' from the application. But I am outputting .dll >>>> files (for Windows XP) so I don;t understand why the app is looking for >>>> .so files. >>>> >>>> Any ideas? >>>> >>>> Tim Rudge >>>> --------- >>>> Cellular Development Lab >>>> Dept. Plant Sciences >>>> Cambridge University >>>> _______________________________________________ >>>> Insight-users mailing list >>>> Insight-users@itk.org >>>> http://www.itk.org/mailman/listinfo/insight-users >>>> >>> >>> >>> >> >> >> >> Tim Rudge >> --------- >> Cellular Development Lab >> Dept. Plant Sciences >> Cambridge University >> > > > Tim Rudge --------- Cellular Development Lab Dept. Plant Sciences Cambridge University From hqian@imaging.robarts.ca Wed Jul 16 16:33:08 2003 From: hqian@imaging.robarts.ca (Hua Qian) Date: Wed, 16 Jul 2003 11:33:08 -0400 Subject: [Insight-users] ITK Python Wrapping Examples In-Reply-To: <3F149E46.2090802@kitware.com> References: <3F1476B7.9050006@imaging.robarts.ca> <3F149E46.2090802@kitware.com> Message-ID: <3F157034.8020207@imaging.robarts.ca> Hi Luis, I rebuilt ITK on another machine (Redhat 8.0) with the same CVS checkout. This time, all the python examples I tested ran nicely! The only change I made was to put CableSwig checkout in the Utilities directory. In my previous build (on a Mandrake), I put CableSwig in parallel with Insight. I am doing a fresh build on my Mandrake box right now and I'll let you know how it goes when the build completed. It will take a few hours. Regards, Hua Luis Ibanez wrote: > > Hi Hua, > > > I just rebulid the wrapping in a Linux Debian with gcc 3.3 > and both python examples are working ok. > > Note that the finite difference solver in ITK has been > under revision in recent days. It may be that your CVS > checkout took the CurvatureFlowImageFilter in an unstable > state. > > You may want to update your CVS checkout (verify first > if the dashboard is green, since we anticipate a lot > of activity before August 1). > > In any case, Charl's observation is correct. ITK is throwing > an exception that is not being catched. That's why the > "abort" message appears. > > One possible reason for this exception being thrown is that > the time step parameter provided to the filter is too big. > > The timeStep parameter that you are using for the > CurvatureFlowImageFilter is right in the limit of the > value accepted as the bound for producing numerically > stable results. Before updating your CVS, you may want > to try with smaller values of time step. (e.g. 0.1 instead > of 0.125). > > > > Please let us know if you continue experincing any > problems, > > > Thanks > > > > Luis > > > > ------------------- > Hua Qian wrote: > >> Hi, >> >> I am trying out the Python Wrapping for ITK recently. The build >> went on every smoothly. But I had troubles running some of the >> python examples. Some examples works, some don't. >> For example, CurvatureAnisotropicDiffusionImageFilter.py ran >> without problem: >> >> > python CurvatureAnisotropicDiffusionImageFilter.py >> ../Data/BrainProtonDensitySlice.png test.png 10 0.125 3.0 >> >> But CurvatureFlowImageFilter.py aborted abnormally: >> > python CurvatureFlowImageFilter.py >> ../Data/BrainProtonDensitySlice.png test.png 10 0.125 >> Abort >> >> Am I doing something wrong? I am using Mandrake Linux 9.1, gcc 3.2.2, >> python 2.2.2, cvs ITK, cvs CMake. >> >> Thanks, >> >> Hua Qian >> >> >> >> >> _______________________________________________ >> Insight-users mailing list >> Insight-users@itk.org >> http://www.itk.org/mailman/listinfo/insight-users >> > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users From bill.hoffman@kitware.com Wed Jul 16 16:44:00 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Wed, 16 Jul 2003 11:44:00 -0400 Subject: [Insight-users] DLL output In-Reply-To: <419652984.1058372614@Dell620> References: <3F1568C8.20501@kitware.com> <3F1568C8.20501@kitware.com> Message-ID: <5.2.0.9.0.20030716114156.04c56890@pop.biz.rr.com> There is no way to set a run time path on windows. The search for dll's works like this: 1. is the dll in the same directory as the executable 2. is the dll in the PATH The /libpath is only used during the creation of the dll or exe file, at run time the above algorithm is used. So, you can either set the PATH, or put all the dll and exe files in the same directory. -Bill At 11:23 AM 7/16/2003, Tim Rudge wrote: >DW seems to be looking in the wrong directory despite having set the /libpaths for ITK in the project settings. It is looking in the directory where the main apps librarys are kept. > >Tim > >--On 16 July 2003 11:01 -0400 Luis Ibanez wrote: > >> >>Hi Tim, >> >>Thanks for checking with the dependency walker. >> >>If the ITKPackage.dll library actually exists in the >>location indicated by the DW, then, as you pointed >>out, the problem may be related to one of the libraries >>that ITKPackage.dll depend on. >> >>Please check with DW the dependencies of ITKPackage.dll >>(simply run DW and file/open the ITKPackage.dll file). >> >>Check if all of the libraries are in the directories >>indicated by DW. >> >>Please let us know what you find. >> >> >>Thanks >> >> >> Luis >> >> >>----------------------- >> >>Tim Rudge wrote: >>>Luis, >>> >>>Thanks for your advice. The problem is when the app tries to load the >>>library at run-time. I have run DependencyWalker and it appears that the >>>app is looking for the file in the right place and correct name - >>>ITKpackage.dll, not .so as the error message says. The file is >>>definitely there but the DW log gives: >>> >>>LoadLibraryA("ITKpackage.dll") returned NULL. Error: The specified >>>module could not be found (126). >>> >>>Perhaps this is a problem with the ITK libs that my .dll depends on? >>> >>>regards, >>> >>>Tim >>> >>>--On 15 July 2003 21:08 -0400 Luis Ibanez >>>wrote: >>> >>>> >>>>Hi Tim, >>>> >>>>Are you getting this error message during the start up of the >>>>application ? or once it is executing ? or during the linking >>>>process ? >>>> >>>>It is quite strange that it is using the naming standard for >>>>Unix... it looks like a problem in the CMake configuration of >>>>your application. (e.g. maybe the name is hard coded in one >>>>of the CMakeLists.txt files....). CMake would generate appropriate >>>>names for shared libraries in Windows or Unix, so the only way >>>>for this name to appear is to be hard written somewhere,... or >>>>to make CMake think that it is generating a filename for Unix >>>>instead of Windows. >>>> >>>>If the message is a run-time message, you may want try the tool >>>>"Dependency Walker" by Steve Miller. >>>>http://www.dependencywalker.com/ >>>> >>>>It will show you all the libraries in which your application >>>>depends. Simply execute the tool, and in the file/open menu >>>>give the executable of your application. >>>> >>>>With this, at least you will know in what directory this library >>>>was expected to be found. >>>> >>>> >>>> Regards, >>>> >>>> >>>> Luis >>>> >>>> >>>>----------------- >>>>Tim Rudge wrote: >>>> >>>>>Hi, >>>>> >>>>>This is not entirely ITK but... I am outputting DLL's from a project >>>>>linked to ITK. I have had this working before but then I got a new CVS >>>>>release and recompiled all using ITK.dsw. Now I get the error 'cannot >>>>>find libITKPackage.so' from the application. But I am outputting .dll >>>>>files (for Windows XP) so I don;t understand why the app is looking for >>>>>.so files. >>>>> >>>>>Any ideas? >>>>> >>>>>Tim Rudge >>>>>--------- >>>>>Cellular Development Lab >>>>>Dept. Plant Sciences >>>>>Cambridge University >>>>>_______________________________________________ >>>>>Insight-users mailing list >>>>>Insight-users@itk.org >>>>>http://www.itk.org/mailman/listinfo/insight-users >>>> >>>> >>> >>> >>> >>>Tim Rudge >>>--------- >>>Cellular Development Lab >>>Dept. Plant Sciences >>>Cambridge University >> >> > > > >Tim Rudge >--------- >Cellular Development Lab >Dept. Plant Sciences >Cambridge University >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users From luis.ibanez@kitware.com Wed Jul 16 22:39:25 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 16 Jul 2003 17:39:25 -0400 Subject: [Insight-users] Re: [vtkusers] using vtk and itk References: <3F1926FF@webmail.ualberta.ca> Message-ID: <3F15C60D.9020608@kitware.com> Hi Nabby, The applications in "InsightApplications" are arranged to be configured only from the top directory. You should run CMake at the top level of InsightApplications instead of doing this in any of the subdirectories. The subprojects are relying on a number of configuration parameters that are set at the top level, like for example the location of VTK, ITK and FLTK. Regards, Luis ------------------------- cgarcha wrote: >hello everybody, > >How do we make vtk run with itk, do we have to do anything different during >the building the binaries (CMAKE). right now i opened >"/insightapplications/vtkITK/common" i built the binaries for this folder.. >using CMAKE, the binaries are stored in the same folder. > >when i try to comple the project its giving me errors. The only errors thati >am getting are that ".h" files are missing. is there anyway that the header >files are automatically included and we dont have to copy them from other >directories manually. > >Thanks very much > >NABBY > > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: > >Follow this link to subscribe/unsubscribe: >http://www.vtk.org/mailman/listinfo/vtkusers > > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: >Follow this link to subscribe/unsubscribe: >http://www.vtk.org/mailman/listinfo/vtkusers > > > From luis.ibanez@kitware.com Wed Jul 16 23:11:35 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 16 Jul 2003 18:11:35 -0400 Subject: [Insight-users] Re: [vtkusers] using vtk and itk References: <3F1975C9@webmail.ualberta.ca> Message-ID: <3F15CD97.7070301@kitware.com> Hi Nabby, The executable of the vtkITK application can be found in the subdirectory vtkITK/Wrapping/Tcl of the binary directory where you built InsightApplications. The executable that you will find is called vtkITK, and is a modified "wish" like vtk.exe. Note that this application in particular is taking ITK filters, packaging them inside VTK filters and then wrapping them for Tcl. This is one way, among many, for combining ITK and VTK. It is particularly tailored for VTK users accustomed to Tcl scripting. A more C++ way of combining VTK and ITK is available in the directory: InsightApplications/SegmentationEditorFltkGui which combines ITK, VTK and FLTK in an application implementing Watershed segmentation techniques. You may find this application more appealing. Luis ------------------- cgarcha wrote: >i have already done that, i did that to begin with. > >Now i want to run the examples that are included in "/vtkITK/common" >directory. i dont know how to run them, everytime i run something from the itk >all i see is the command window and options to run tests. >doesnt it include some visual examples which show segmentation and other >features. > >Thabk you very much >Nabby > > > > > From luis.ibanez@kitware.com Thu Jul 17 00:50:45 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 16 Jul 2003 19:50:45 -0400 Subject: [Insight-users] vtk polydata import / export References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> <3F1330F1.2040902@kitware.com> <3F140721.3020109@bephp.com> <3F1417E0.8080300@kitware.com> <3F1519C3.9050800@bephp.com> Message-ID: <3F15E4D5.4090705@kitware.com> Hi Imho, If you want to read the vtk image using VTK reader you may try the following reader. http://www.vtk.org/doc/nightly/html/classvtkDataSetReader.html I tried both image that you send, and they appear to be corrupted. What error did you encounter while building the viewer ? The viewer will help you a lot since with it you can see images in multiple formats: MetaImage, GIPL, Analyze, VTK... Luis -------------------- imho wrote: > Hi Luis, > > I have saved the data into a .mdh metaImage file, and it has a non null > size. > I've tried to compile the imageViewer but I have a linking error so I've > tried to save it into a VTK format, but I can't open it with my > polyDataReader of course ( ERROR: In > C:\martink\vtk40\VTK\IO\vtkPolyDataReader.cxx, line 167 > vtkPolyDataReader (0x057D3900): Cannot read dataset type: > structured_points). But it seems that the importer in itk is ok, it's > the last part of the pipe-line that I've to check out, the > itkExporter->vtkImporter. > > I send you the output files, maybe it could help. > > thanks > > From lara.vigneron@ulg.ac.be Thu Jul 17 13:28:22 2003 From: lara.vigneron@ulg.ac.be (Lara Vigneron) Date: Thu, 17 Jul 2003 14:28:22 +0200 Subject: [Insight-users] ITK+FLTK Message-ID: <006201c34c5e$e962d0f0$3010a58b@SIGNAL05> This is a multi-part message in MIME format. ------=_NextPart_000_005F_01C34C6F.ACDDE550 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, I have a problem with my ITK+FLTK configuration. I work on Windows platform. When I execute the DistanceMapFilter for instance, two windows are displayed correctly. But when I click on the Load button, an error occurs. I think the problem is related to the fl_file_chooser appeal. = Would anyone have an idea of what is wrong with my configuration? Thanks a lot, Lara Vigneron ------=_NextPart_000_005F_01C34C6F.ACDDE550 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all,

I have a problem with = my ITK+FLTK=20 configuration. I work on Windows
platform. When I execute the=20 DistanceMapFilter for instance, two windows
are displayed correctly. = But when=20 I click on the Load button, an error
occurs. I think the problem is = related=20 to the fl_file_chooser appeal. Would anyone  have an idea of what = is wrong=20 with my configuration?

Thanks a lot,

Lara=20 Vigneron

------=_NextPart_000_005F_01C34C6F.ACDDE550-- From luis.ibanez@kitware.com Thu Jul 17 15:02:03 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 17 Jul 2003 10:02:03 -0400 Subject: [Insight-users] ITK+FLTK References: <006201c34c5e$e962d0f0$3010a58b@SIGNAL05> Message-ID: <3F16AC5B.8010305@kitware.com> Hi Lara, I just tested the DistanceMapFilter application, on windows, and it is working fine. Could you please post the error message that you obtain when you click on the load button ? One possible suspect is that the file format you are trying to load is not recognized by any ITK registered reader. Note that this application is expecting a 3D image as input. What are the characteristics of the image you are trying to load ? Do you find similar errors with other FLTK+ITK applications in your build ? You may want to try running the GaussianFilter and GaussianFilter2D applications, just for testing. Please give us a more detailed description of the error you encounter. Thanks, Luis ------------------------ Lara Vigneron wrote: > Hi all, > > I have a problem with my ITK+FLTK configuration. I work on Windows > platform. When I execute the DistanceMapFilter for instance, two windows > are displayed correctly. But when I click on the Load button, an error > occurs. I think the problem is related to the fl_file_chooser appeal. > Would anyone have an idea of what is wrong with my configuration? > > Thanks a lot, > > Lara Vigneron From Mathieu.Malaterre@creatis.insa-lyon.fr Thu Jul 17 14:50:15 2003 From: Mathieu.Malaterre@creatis.insa-lyon.fr (Mathieu Malaterre) Date: Thu, 17 Jul 2003 15:50:15 +0200 Subject: [Insight-users] ITK+FLTK In-Reply-To: <3F16AC5B.8010305@kitware.com> References: <006201c34c5e$e962d0f0$3010a58b@SIGNAL05> <3F16AC5B.8010305@kitware.com> Message-ID: <3F16A997.7040703@creatis.insa-lyon.fr> Lara, Please include the FLTK version you are using. You should be using FLTK 1.1.3. HTH mathieu Luis Ibanez wrote: > > Hi Lara, > > I just tested the DistanceMapFilter application, > on windows, and it is working fine. > > Could you please post the error message that > you obtain when you click on the load button ? > > One possible suspect is that the file format you > are trying to load is not recognized by any ITK > registered reader. > > Note that this application is expecting a 3D image > as input. What are the characteristics of the image > you are trying to load ? > > Do you find similar errors with other FLTK+ITK > applications in your build ? > > You may want to try running the GaussianFilter > and GaussianFilter2D applications, just for testing. > > > > Please give us a more detailed description of the > error you encounter. > > > Thanks, > > > Luis > > > > ------------------------ > Lara Vigneron wrote: > >> Hi all, >> >> I have a problem with my ITK+FLTK configuration. I work on Windows >> platform. When I execute the DistanceMapFilter for instance, two windows >> are displayed correctly. But when I click on the Load button, an error >> occurs. I think the problem is related to the fl_file_chooser appeal. >> Would anyone have an idea of what is wrong with my configuration? >> >> Thanks a lot, >> >> Lara Vigneron > > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From imho@bephp.com Thu Jul 17 15:22:42 2003 From: imho@bephp.com (imho) Date: Thu, 17 Jul 2003 16:22:42 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F15E4D5.4090705@kitware.com> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> <3F1330F1.2040902@kitware.com> <3F140721.3020109@bephp.com> <3F1417E0.8080300@kitware.com> <3F1519C3.9050800@bephp.com> <3F15E4D5.4090705@kitware.com> Message-ID: <3F16B132.4000000@bephp.com> Hi Luis, I have a linking error " Compiling... itkImageViewer.cxx C:\itk\itksrc\Code\IO\itkImageViewerWindow.h(23) : fatal error C1083: Cannot open include file: 'itkGlutMaster.h': No such file or directory Error executing cl.exe. NewProject.exe - 1 error(s), 0 warning(s) " and I cant' find this in my itk folders. So if the image files were corrupted, I have a problem with the vtkExport ---> itkImport or I've writed the files badly. The conversion polyData->ImageData->polyData in VTK is OK witout the connection to itk. the files : vtk stuff " polyToImage->SetInput(poly[0]); // implicitModeller to do a polyData -> ImageData conversion polyLiveToImage->SetInput(polyLive); polyToImage->SetSampleDimensions(10, 10, 10); polyToImage->SetMaximumDistance(0.25); // polyToImage->SetModelBounds(poly[0]->GetBounds()); polyLiveToImage->SetSampleDimensions(10, 10, 10); // polyLiveToImage->SetSampleDimensions(110, 40, 20); polyLiveToImage->SetMaximumDistance(0.25); // polyLiveToImage->SetModelBounds(polyLive->GetBounds()); imageModel = polyToImage->GetOutput(); // getting the ImageData imageModelLive = polyLiveToImage->GetOutput(); vtkExporter4->SetInput(imageModel); vtkExporter5->SetInput(imageModelLive); regITK = new registrationITK(vtkImporter4, vtkExporter4, vtkExporter5); cast->SetInput(vtkImporter4->GetOutput()); castTo3D->SetInput(vtkImporter4->GetOutput()); isRegITK = true; " itk stuff in registrationITK.h " ... typedef float PixelType; typedef itk::Image ImageType; typedef itk::VTKImageImport ImageImportType; typedef itk::VTKImageImport ImageImportType2; typedef itk::VTKImageExport ImageExportType; typedef itk::ImageFileWriter ImageWriter; private : ImageImportType::Pointer itkImporter; ImageImportType::Pointer itkImporter2; ImageExportType::Pointer itkExporter; ImageWriter::Pointer writerITK; }; " in itkRegistration.cpp " registrationITK::registrationITK(vtkImageImport* vtkImporter, vtkImageExport *vtkExporter, vtkImageExport *vtkExporter2) { itkImporter = ImageImportType::New(); itkImporter2 = ImageImportType::New(); itkExporter = ImageExportType::New(); writerITK = ImageWriter::New(); itkExporter->SetInput(itkImporter->GetOutput()); ConnectPipelines(vtkExporter, itkImporter); ConnectPipelines(vtkExporter2, itkImporter2); ConnectPipelines(itkExporter, vtkImporter); itkImporter->Update(); itkImporter2->Update(); itkExporter->Update(); writerITK->SetFileName("test_itk_write.vtk"); itk::VTKImageIO::Pointer vtkWriter = itk::VTKImageIO::New(); vtkWriter->SetFileName( "LOCAL" ); vtkWriter->SetFileTypeToBinary(); writerITK->SetImageIO( vtkWriter ); writerITK->SetInput(itkImporter->GetOutput()); writerITK->Update(); } " What could I try? Thanks Luis Ibanez wrote: > > Hi Imho, > > If you want to read the vtk image using VTK reader > you may try the following reader. > http://www.vtk.org/doc/nightly/html/classvtkDataSetReader.html > > I tried both image that you send, and they appear to be > corrupted. > > What error did you encounter while building the viewer ? > > The viewer will help you a lot since with it you can see > images in multiple formats: MetaImage, GIPL, Analyze, VTK... > > > > > Luis > > > > -------------------- > imho wrote: > >> Hi Luis, >> >> I have saved the data into a .mdh metaImage file, and it has a non >> null size. >> I've tried to compile the imageViewer but I have a linking error so >> I've tried to save it into a VTK format, but I can't open it with my >> polyDataReader of course ( ERROR: In >> C:\martink\vtk40\VTK\IO\vtkPolyDataReader.cxx, line 167 >> vtkPolyDataReader (0x057D3900): Cannot read dataset type: >> structured_points). But it seems that the importer in itk is ok, it's >> the last part of the pipe-line that I've to check out, the >> itkExporter->vtkImporter. >> >> I send you the output files, maybe it could help. >> >> thanks >> >> > > . > From lara.vigneron@ulg.ac.be Thu Jul 17 15:25:26 2003 From: lara.vigneron@ulg.ac.be (Lara Vigneron) Date: Thu, 17 Jul 2003 16:25:26 +0200 Subject: [Insight-users] ITK+FLTK Message-ID: <00aa01c34c6f$4479ce20$3010a58b@SIGNAL05> This is a multi-part message in MIME format. ------=_NextPart_000_00A7_01C34C80.07F35BE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Luis and Mathieu, Thanks for your answer. The 3D image has a correct format because I = display it with the MetaImageViewer without problem. Anyway, it is just = when I start the progam with the DistanceMapFilter.exe command line and = when I click the Load button that the program bugs. The error I get is: File: dbghheap.c Line: 1044 Expression:_CrtIsValidHeapPointer(pUserData) When I work on a Linux platform with (I think) the same ITK+FLTK+VTK = configuration, I don't have problem with this program. And I use the = same FLTK version for Linux and Windows, that is the 1.1 one. And I have exactly the same problem with the GaussianFilter :-( Thanks, Lara ------=_NextPart_000_00A7_01C34C80.07F35BE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Luis and Mathieu,
 
Thanks for your answer. The  3D image has a = correct=20 format because I display it with the MetaImageViewer without problem. = Anyway, it=20 is just when I start the progam with the DistanceMapFilter.exe = command line=20 and when I click the Load button that the program = bugs.
 
The error I get is:
File: dbghheap.c
Line: 1044
Expression:_CrtIsValidHeapPointer(pUserData)
 
When I work on a Linux platform with (I think) the = same=20 ITK+FLTK+VTK configuration, I don't have problem with this program. And = I use=20 the same FLTK version for Linux and Windows, that is the 1.1 = one.
 
And I have exactly the same problem with the = GaussianFilter=20 :-(
 
Thanks, Lara
 
------=_NextPart_000_00A7_01C34C80.07F35BE0-- From jjomier@cs.unc.edu Thu Jul 17 15:34:41 2003 From: jjomier@cs.unc.edu (Julien Jomier) Date: Thu, 17 Jul 2003 10:34:41 -0400 Subject: [Insight-users] ITK+FLTK In-Reply-To: <00aa01c34c6f$4479ce20$3010a58b@SIGNAL05> Message-ID: <003801c34c70$8f1dd150$5d691398@pissarro> Lara, I had the same problem when mixing release and debug modes with FLTK. Are you using the FLTK libraries compiled in the same mode as ITK? If you compile ITK in Release you should use the release version of the = FLTK libraries. Julien -----Original Message----- From: insight-users-admin@itk.org [mailto:insight-users-admin@itk.org] = On Behalf Of Lara Vigneron Sent: Thursday, July 17, 2003 10:25 AM To: ITK Subject: [Insight-users] ITK+FLTK Hi Luis and Mathieu, Thanks for your answer. The 3D image has a correct format because I = display it with the MetaImageViewer without problem. Anyway, it is just when I = start the progam with the DistanceMapFilter.exe command line and when I click = the Load button that the program bugs. The error I get is: File: dbghheap.c Line: 1044 Expression:_CrtIsValidHeapPointer(pUserData) When I work on a Linux platform with (I think) the same ITK+FLTK+VTK configuration, I don't have problem with this program. And I use the = same FLTK version for Linux and Windows, that is the 1.1 one. And I have exactly the same problem with the GaussianFilter :-( Thanks, Lara From Mathieu.Malaterre@creatis.insa-lyon.fr Thu Jul 17 15:25:12 2003 From: Mathieu.Malaterre@creatis.insa-lyon.fr (Mathieu Malaterre) Date: Thu, 17 Jul 2003 16:25:12 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F16B132.4000000@bephp.com> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> <3F1330F1.2040902@kitware.com> <3F140721.3020109@bephp.com> <3F1417E0.8080300@kitware.com> <3F1519C3.9050800@bephp.com> <3F15E4D5.4090705@kitware.com> <3F16B132.4000000@bephp.com> Message-ID: <3F16B1C8.4040707@creatis.insa-lyon.fr> You'll find the file here: http://public.kitware.com/cgi-bin/cvsweb.cgi/Insight/Utilities/GlutMaster/Attic/?cvsroot=Insight But as you can see this is no longer supported. HTH mathieu imho wrote: > Hi Luis, > I have a linking error > > " > Compiling... > itkImageViewer.cxx > C:\itk\itksrc\Code\IO\itkImageViewerWindow.h(23) : fatal error C1083: > Cannot open include file: 'itkGlutMaster.h': No such file or directory > Error executing cl.exe. > > NewProject.exe - 1 error(s), 0 warning(s) > " > and I cant' find this in my itk folders. > > So if the image files were corrupted, I have a problem with the > vtkExport ---> itkImport or I've writed the files badly. > The conversion polyData->ImageData->polyData in VTK is OK witout the > connection to itk. > the files : > vtk stuff > " > polyToImage->SetInput(poly[0]); // implicitModeller to do a > polyData -> ImageData conversion > polyLiveToImage->SetInput(polyLive); > polyToImage->SetSampleDimensions(10, 10, 10); > polyToImage->SetMaximumDistance(0.25); > // polyToImage->SetModelBounds(poly[0]->GetBounds()); > polyLiveToImage->SetSampleDimensions(10, 10, 10); > // polyLiveToImage->SetSampleDimensions(110, 40, 20); > polyLiveToImage->SetMaximumDistance(0.25); > // polyLiveToImage->SetModelBounds(polyLive->GetBounds()); > imageModel = polyToImage->GetOutput(); // getting the > ImageData > imageModelLive = polyLiveToImage->GetOutput(); > vtkExporter4->SetInput(imageModel); > vtkExporter5->SetInput(imageModelLive); > > regITK = new registrationITK(vtkImporter4, vtkExporter4, > vtkExporter5); > > cast->SetInput(vtkImporter4->GetOutput()); > castTo3D->SetInput(vtkImporter4->GetOutput()); > > isRegITK = true; > > " > > itk stuff > in registrationITK.h > " > ... > typedef float PixelType; > typedef itk::Image ImageType; > > typedef itk::VTKImageImport ImageImportType; > typedef itk::VTKImageImport ImageImportType2; > typedef itk::VTKImageExport ImageExportType; > typedef itk::ImageFileWriter ImageWriter; > > private : > > > ImageImportType::Pointer itkImporter; > ImageImportType::Pointer itkImporter2; > ImageExportType::Pointer itkExporter; > ImageWriter::Pointer writerITK; > > }; > " > in itkRegistration.cpp > " > registrationITK::registrationITK(vtkImageImport* vtkImporter, > vtkImageExport *vtkExporter, vtkImageExport *vtkExporter2) > { itkImporter = ImageImportType::New(); > itkImporter2 = ImageImportType::New(); > itkExporter = ImageExportType::New(); > writerITK = ImageWriter::New(); > > itkExporter->SetInput(itkImporter->GetOutput()); > > ConnectPipelines(vtkExporter, itkImporter); > ConnectPipelines(vtkExporter2, itkImporter2); > ConnectPipelines(itkExporter, vtkImporter); > itkImporter->Update(); > itkImporter2->Update(); > itkExporter->Update(); > writerITK->SetFileName("test_itk_write.vtk"); > itk::VTKImageIO::Pointer vtkWriter = itk::VTKImageIO::New(); > vtkWriter->SetFileName( "LOCAL" ); > vtkWriter->SetFileTypeToBinary(); > > writerITK->SetImageIO( vtkWriter ); > writerITK->SetInput(itkImporter->GetOutput()); > writerITK->Update(); > } > " > What could I try? > > Thanks > > > > Luis Ibanez wrote: > >> >> Hi Imho, >> >> If you want to read the vtk image using VTK reader >> you may try the following reader. >> http://www.vtk.org/doc/nightly/html/classvtkDataSetReader.html >> >> I tried both image that you send, and they appear to be >> corrupted. >> >> What error did you encounter while building the viewer ? >> >> The viewer will help you a lot since with it you can see >> images in multiple formats: MetaImage, GIPL, Analyze, VTK... >> >> >> >> >> Luis >> >> >> >> -------------------- >> imho wrote: >> >>> Hi Luis, >>> >>> I have saved the data into a .mdh metaImage file, and it has a non >>> null size. >>> I've tried to compile the imageViewer but I have a linking error so >>> I've tried to save it into a VTK format, but I can't open it with my >>> polyDataReader of course ( ERROR: In >>> C:\martink\vtk40\VTK\IO\vtkPolyDataReader.cxx, line 167 >>> vtkPolyDataReader (0x057D3900): Cannot read dataset type: >>> structured_points). But it seems that the importer in itk is ok, it's >>> the last part of the pipe-line that I've to check out, the >>> itkExporter->vtkImporter. >>> >>> I send you the output files, maybe it could help. >>> >>> thanks >>> >>> >> >> . >> > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From lara.vigneron@ulg.ac.be Thu Jul 17 16:07:02 2003 From: lara.vigneron@ulg.ac.be (Lara Vigneron) Date: Thu, 17 Jul 2003 17:07:02 +0200 Subject: [Insight-users] ITK+FLTK References: <003801c34c70$8f1dd150$5d691398@pissarro> Message-ID: <00fe01c34c75$13d95280$3010a58b@SIGNAL05> Hi Julien, You are right! I have mixed modes... I begin a new compilation... Lara ----- Original Message ----- From: "Julien Jomier" To: "'Lara Vigneron'" ; "'ITK'" Sent: Thursday, July 17, 2003 4:34 PM Subject: RE: [Insight-users] ITK+FLTK Lara, I had the same problem when mixing release and debug modes with FLTK. Are you using the FLTK libraries compiled in the same mode as ITK? If you compile ITK in Release you should use the release version of the FLTK libraries. Julien -----Original Message----- From: insight-users-admin@itk.org [mailto:insight-users-admin@itk.org] On Behalf Of Lara Vigneron Sent: Thursday, July 17, 2003 10:25 AM To: ITK Subject: [Insight-users] ITK+FLTK Hi Luis and Mathieu, Thanks for your answer. The 3D image has a correct format because I display it with the MetaImageViewer without problem. Anyway, it is just when I start the progam with the DistanceMapFilter.exe command line and when I click the Load button that the program bugs. The error I get is: File: dbghheap.c Line: 1044 Expression:_CrtIsValidHeapPointer(pUserData) When I work on a Linux platform with (I think) the same ITK+FLTK+VTK configuration, I don't have problem with this program. And I use the same FLTK version for Linux and Windows, that is the 1.1 one. And I have exactly the same problem with the GaussianFilter :-( Thanks, Lara From luis.ibanez@kitware.com Thu Jul 17 16:49:59 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 17 Jul 2003 11:49:59 -0400 Subject: [Insight-users] vtk polydata import / export References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> <3F1330F1.2040902@kitware.com> <3F140721.3020109@bephp.com> <3F1417E0.8080300@kitware.com> <3F1519C3.9050800@bephp.com> <3F15E4D5.4090705@kitware.com> <3F16B132.4000000@bephp.com> Message-ID: <3F16C5A7.8000600@kitware.com> Hi Imho, You probably have enabled the CMake variable: USE_GLUT Please set this variable to OFF, in that way you will not need to build the GlutMaster components. This components have been deprecated. http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Code/IO/Attic/itkImageViewerWindow.cxx?cvsroot=Insight Regards, Luis ----------------------- imho wrote: > Hi Luis, > I have a linking error > > " > Compiling... > itkImageViewer.cxx > C:\itk\itksrc\Code\IO\itkImageViewerWindow.h(23) : fatal error C1083: > Cannot open include file: 'itkGlutMaster.h': No such file or directory > Error executing cl.exe. > > NewProject.exe - 1 error(s), 0 warning(s) > " > and I cant' find this in my itk folders. > > So if the image files were corrupted, I have a problem with the > vtkExport ---> itkImport or I've writed the files badly. > The conversion polyData->ImageData->polyData in VTK is OK witout the > connection to itk. > the files : > vtk stuff > " > polyToImage->SetInput(poly[0]); // implicitModeller to do a > polyData -> ImageData conversion > polyLiveToImage->SetInput(polyLive); > polyToImage->SetSampleDimensions(10, 10, 10); > polyToImage->SetMaximumDistance(0.25); > // polyToImage->SetModelBounds(poly[0]->GetBounds()); > polyLiveToImage->SetSampleDimensions(10, 10, 10); > // polyLiveToImage->SetSampleDimensions(110, 40, 20); > polyLiveToImage->SetMaximumDistance(0.25); > // polyLiveToImage->SetModelBounds(polyLive->GetBounds()); > imageModel = polyToImage->GetOutput(); // getting the > ImageData > imageModelLive = polyLiveToImage->GetOutput(); > vtkExporter4->SetInput(imageModel); > vtkExporter5->SetInput(imageModelLive); > > regITK = new registrationITK(vtkImporter4, vtkExporter4, > vtkExporter5); > > cast->SetInput(vtkImporter4->GetOutput()); > castTo3D->SetInput(vtkImporter4->GetOutput()); > > isRegITK = true; > > " > > itk stuff > in registrationITK.h > " > ... > typedef float PixelType; > typedef itk::Image ImageType; > > typedef itk::VTKImageImport ImageImportType; > typedef itk::VTKImageImport ImageImportType2; > typedef itk::VTKImageExport ImageExportType; > typedef itk::ImageFileWriter ImageWriter; > > private : > > > ImageImportType::Pointer itkImporter; > ImageImportType::Pointer itkImporter2; > ImageExportType::Pointer itkExporter; > ImageWriter::Pointer writerITK; > > }; > " > in itkRegistration.cpp > " > registrationITK::registrationITK(vtkImageImport* vtkImporter, > vtkImageExport *vtkExporter, vtkImageExport *vtkExporter2) > { itkImporter = ImageImportType::New(); > itkImporter2 = ImageImportType::New(); > itkExporter = ImageExportType::New(); > writerITK = ImageWriter::New(); > > itkExporter->SetInput(itkImporter->GetOutput()); > > ConnectPipelines(vtkExporter, itkImporter); > ConnectPipelines(vtkExporter2, itkImporter2); > ConnectPipelines(itkExporter, vtkImporter); > itkImporter->Update(); > itkImporter2->Update(); > itkExporter->Update(); > writerITK->SetFileName("test_itk_write.vtk"); > itk::VTKImageIO::Pointer vtkWriter = itk::VTKImageIO::New(); > vtkWriter->SetFileName( "LOCAL" ); > vtkWriter->SetFileTypeToBinary(); > > writerITK->SetImageIO( vtkWriter ); > writerITK->SetInput(itkImporter->GetOutput()); > writerITK->Update(); > } > " > What could I try? > > Thanks > > > > Luis Ibanez wrote: > >> >> Hi Imho, >> >> If you want to read the vtk image using VTK reader >> you may try the following reader. >> http://www.vtk.org/doc/nightly/html/classvtkDataSetReader.html >> >> I tried both image that you send, and they appear to be >> corrupted. >> >> What error did you encounter while building the viewer ? >> >> The viewer will help you a lot since with it you can see >> images in multiple formats: MetaImage, GIPL, Analyze, VTK... >> >> >> >> >> Luis >> >> >> >> -------------------- >> imho wrote: >> >>> Hi Luis, >>> >>> I have saved the data into a .mdh metaImage file, and it has a non >>> null size. >>> I've tried to compile the imageViewer but I have a linking error so >>> I've tried to save it into a VTK format, but I can't open it with my >>> polyDataReader of course ( ERROR: In >>> C:\martink\vtk40\VTK\IO\vtkPolyDataReader.cxx, line 167 >>> vtkPolyDataReader (0x057D3900): Cannot read dataset type: >>> structured_points). But it seems that the importer in itk is ok, it's >>> the last part of the pipe-line that I've to check out, the >>> itkExporter->vtkImporter. >>> >>> I send you the output files, maybe it could help. >>> >>> thanks >>> >>> >> >> . >> > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From doumit.daou13@fnac.net Thu Jul 17 17:44:14 2003 From: doumit.daou13@fnac.net (Doumit Daou) Date: Thu, 17 Jul 2003 18:44:14 +0200 Subject: [Insight-users] Help get Message-ID: <004001c34c82$a85ef240$75e0273e@doumitdaou> This is a multi-part message in MIME format. ------=_NextPart_000_003D_01C34C93.6BC01600 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hello, I am looking to get an executable ITK file (all done) for medical image = registration to run it on windows . I will appreciate if somebody has it = already compiled ... and ready for use on windows PC and can send it to = me? Thank you Doumit ------=_NextPart_000_003D_01C34C93.6BC01600 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
hello,
I am looking to get an executable ITK = file (all=20 done) for medical image registration to run it = on windows . I=20 will appreciate if somebody has it already compiled ... and ready = for use=20 on windows PC and can send it to me?
Thank you
Doumit
 
------=_NextPart_000_003D_01C34C93.6BC01600-- From itk@stmoser.ch Thu Jul 17 17:51:42 2003 From: itk@stmoser.ch (itk@stmoser.ch) Date: Thu, 17 Jul 2003 18:51:42 +0200 (MEST) Subject: [Insight-users] ccmake on cvs version: "VXL configure script failed" In-Reply-To: <004001c34c82$a85ef240$75e0273e@doumitdaou> References: <004001c34c82$a85ef240$75e0273e@doumitdaou> Message-ID: Hi there, I'm trying to run ccmake for ITK on REd Hat Linux, but can't get rid of the message "VXL configure script failed". I got a cvs checkout yesterday. I'm using: gcc 3.2.2 cmake 1.6 toggling BUILD_SHARED_LIBS ON/OFF doesn't help Any suggestions? Thanks, Stephan From luis.ibanez@kitware.com Thu Jul 17 18:07:26 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 17 Jul 2003 13:07:26 -0400 Subject: [Insight-users] Help get: Registration application for windows. References: <004001c34c82$a85ef240$75e0273e@doumitdaou> Message-ID: <3F16D7CE.7050605@kitware.com> Hi Doumit, You may want to download the 3D Registration tool http://caddlab.rad.unc.edu/software/index.html#registration3D from the CADDlab at UNC http://caddlab.rad.unc.edu/ This application is built using ITK + FLTK. The sources are available as well as binary versions for windows and linux. Luis ----------------------- Doumit Daou wrote: > hello, > I am looking to get an executable ITK file (all done) for medical image > registration to run it on windows . I will appreciate if somebody has it > already compiled ... and ready for use on windows PC and can send it to me? > Thank you > Doumit > From lng@insightful.com Fri Jul 18 00:17:11 2003 From: lng@insightful.com (Lydia Ng) Date: Thu, 17 Jul 2003 16:17:11 -0700 Subject: [Insight-users] Image deformation filter question Message-ID: This is a multi-part message in MIME format. ------_=_NextPart_001_01C34CB9.8CE2D04A Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Phillip, As per your suggestion, I've added a SetCoefficientImage() API so that the B-spline coefficients can be set as an array images. Let me know you run into any problems with it. I've attached a small program that illustrates how to go from vector field images to the B-spline coefficients images required by the transform. If you are interested, the end of the code shows how to create a higher resolution field by from the B-spline coefficient images using the ResampleImageFilter. Hope this helps, Lydia > -----Original Message----- > From: Phillip Cheng [mailto:pmcheng@u.washington.edu] > Sent: Friday, July 11, 2003 4:41 PM > To: insight-users@public.kitware.com > Subject: [Insight-users] Image deformation filter question >=20 > Hello, >=20 > I would like to perform the following simple image deformation using > ITK. >=20 > 1. Generate a 3D mesh containing a vector displacement in mm for each > grid point. > 2. Apply the displacements to an image whose resolution is finer than > the mesh, using B-splines for interpolation. >=20 > I'm having difficulty connecting these steps efficiently in ITK. In > particular, it seems I need to use itkBSplineDecompositionFilter to > generate spline coefficients for each vector dimension in the mesh, and > then copy all these coefficients to a 3x3D concatenated array for use > in itkBSplineDeformableTransform (probably inverting things somewhere > so that I have an output->input mapping). But the copying step wastes > time and memory, especially if the mesh is large and I need to generate > many such transforms. Is there a way to connect these pieces without > copying the 3x3D arrays? >=20 > I looked at itkBSplineDeformableTransformTest.cxx which wraps the > parameter array into several itkImages, and that seems close to what I > need, but I'm a little unclear as to how to direct the output of > itkBSplineDecompositionFilter into the parameter images for the > deformable transform. >=20 > Thanks, >=20 > Phillip Cheng >=20 > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users ------_=_NextPart_001_01C34CB9.8CE2D04A Content-Type: application/octet-stream; name="BSplineDeformableTransformExample2.cxx" Content-Transfer-Encoding: base64 Content-Description: BSplineDeformableTransformExample2.cxx Content-Disposition: attachment; filename="BSplineDeformableTransformExample2.cxx" DQojaW5jbHVkZSAiaXRrQlNwbGluZURlZm9ybWFibGVUcmFuc2Zvcm0uaCINCiNpbmNsdWRlICJp dGtCU3BsaW5lRGVjb21wb3NpdGlvbkltYWdlRmlsdGVyLmgiDQojaW5jbHVkZSAiaXRrUmVzYW1w bGVJbWFnZUZpbHRlci5oIg0KI2luY2x1ZGUgIml0a0JTcGxpbmVSZXNhbXBsZUltY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mlsZU5h bWUoIGZpbGVOYW1lLmNfc3RyKCkgKTsNCiAgICB3cml0ZXItPlNldElucHV0KCB1cHNhbXBsZWRG aWVsZFtqXSApOw0KICAgIHdyaXRlci0+V3JpdGUoKTsNCg0KICAgIH0NCiovDQoNCiAgcmV0dXJu IEVYSVRfU1VDQ0VTUzsNCn0= ------_=_NextPart_001_01C34CB9.8CE2D04A-- From tejas9090@yahoo.com Fri Jul 18 00:40:21 2003 From: tejas9090@yahoo.com (tejas mehta) Date: Thu, 17 Jul 2003 16:40:21 -0700 (PDT) Subject: [Insight-users] problem building insight application Message-ID: <20030717234021.5290.qmail@web21507.mail.yahoo.com> --0-1620882532-1058485221=:4303 Content-Type: text/plain; charset=us-ascii Hi, I am trying to build the Geodisic Active Contour Application. I use CMake to configure the itk applications: Source: C:\itk\InsightApplications-1.2.0 Bin: C:\temp_app After this I use VC++ to build all the classes Next, I copy the files from the GeodisisActiveContour directory into another directory and try to configure using CMake. I add the following lines to the CMakeLists.txt : FIND_PACKAGE(FLTK) IF(FLTK_FOUND) INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR}) ENDIF(FLTK_FOUND) Next, I build the Project.dsw file in VC++. This is where I get the following errors: C:/itk_bin/GeodesicActiveContourGUI.h(7) : fatal error C1083: Cannot open include file: 'GeodesicActiveContourBase.h': No such file or directory GeodesicActiveContour.cxx C:\itk_source\GeodesicActiveContour.cxx(18) : fatal error C1083: Cannot open include file: 'GeodesicActiveContour.h': No such file or directory GeodesicActiveContourBase.cxx C:\itk_source\GeodesicActiveContourBase.h(20) : fatal error C1083: Cannot open include file: 'itkImageFileReader.h': No such file or directory I would really appreciate if somenody would help me out. Tejas --------------------------------- Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! --0-1620882532-1058485221=:4303 Content-Type: text/html; charset=us-ascii
Hi,
 
I am trying to build the Geodisic Active Contour Application.  I use CMake to configure the itk applications:
 
Source: C:\itk\InsightApplications-1.2.0
Bin: C:\temp_app
 
After this I use VC++ to build all the classes
 
Next, I copy the files from the GeodisisActiveContour directory into another directory and try to configure using CMake. I add the following lines to the CMakeLists.txt :
 
FIND_PACKAGE(FLTK)
 IF(FLTK_FOUND)
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
ENDIF(FLTK_FOUND)
 
Next, I build the Project.dsw file in VC++. This is where I get the following errors:
 
C:/itk_bin/GeodesicActiveContourGUI.h(7) : fatal error C1083: Cannot open include file: 'GeodesicActiveContourBase.h': No such file or directory
GeodesicActiveContour.cxx
C:\itk_source\GeodesicActiveContour.cxx(18) : fatal error C1083: Cannot open include file: 'GeodesicActiveContour.h': No such file or directory
GeodesicActiveContourBase.cxx
C:\itk_source\GeodesicActiveContourBase.h(20) : fatal error C1083: Cannot open include file: 'itkImageFileReader.h': No such file or directory
I would really appreciate if somenody would help me out.
 
 
Tejas

 
 


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month! --0-1620882532-1058485221=:4303-- From rfloca@stud.fh-heilbronn.de Fri Jul 18 12:49:16 2003 From: rfloca@stud.fh-heilbronn.de (Ralf o Floca) Date: Fri, 18 Jul 2003 13:49:16 +0200 Subject: [Insight-users] How to observe a FEM-based registration? Message-ID: <001b01c34d22$a339b200$6b02a8c0@storyteller> This is a multi-part message in MIME format. ------=_NextPart_000_0018_01C34D33.60EA8940 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, =20 I have a question regarding the observation of a FEM-based registration. = The itk manual shows the way of observing the iteration process (7.3) = and how to get aware of level changes in a multi resolution registration = (7.6.1). But all examples are basing on a rigid registration. I would = like to know, if there is a possibility to observe the iteration steps = and the level changes, when using an itkFEMRegistrationFilter. And when = it's possible, how to manage it. Where must I register the itkcommand = derivates then? =20 Thank you for your help, Ralf o Floca ------=_NextPart_000_0018_01C34D33.60EA8940 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hello,

 

I have a=20 question regarding the observation of a FEM-based registration. The itk = manual=20 shows the way of observing the iteration process (7.3) and how to get = aware of=20 level changes in a multi resolution registration (7.6.1). But all = examples are=20 basing on a rigid registration. I would like to know, if there is a = possibility=20 to observe the iteration steps and the level changes, when using an=20 itkFEMRegistrationFilter. And when it=92s possible, how to manage it. = Where must I=20 register the itkcommand derivates then?

 

Thank you=20 for your help,

Ralf o=20 Floca

------=_NextPart_000_0018_01C34D33.60EA8940-- From c.p.botha@ewi.tudelft.nl Fri Jul 18 15:39:30 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: 18 Jul 2003 16:39:30 +0200 Subject: [Insight-users] Python wrapping + exceptions In-Reply-To: <3F149FEC.9030504@kitware.com> References: <3F148650.1030902@ewi.tudelft.nl> <3F149FEC.9030504@kitware.com> Message-ID: <1058539170.10076.41.camel@dutidad> Hi Luis and ITK Python People, On Wed, 2003-07-16 at 02:44, Luis Ibanez wrote: > Your observation is correct, > ITK is throwing a C++ exception that is not being catched. > The ideal fix would be to figure out a mechanism for catching > C++ exceptions and translate them into Python exceptions. This is possible with swig: http://www.swig.org/Doc1.1/HTML/Exceptions.html and also see SWIG/Examples/python/except* I've been studying the CableSwig sourcecode, obviously primarily CableSwig.cxx and specifically CreatSwigMethod. One would have to set the "throws" attribute of the Swig method node correctly (I have no idea how to do this yet) and this would be the beginning of having C++ exceptions translated to Python exceptions. I could probably spend some time on this, but I have the feeling that the CableSwig experts would be able to implement this functionality in far less time. Any takers? If not, some more advice would be greatly appreciated. The documentation for SWIG is relative straightforward (i.e. doing it the normal way with .i interface files and all that) but CableSwig is obviously doing it differently (via the gccxml-generated XML) and this is taking time to figure out. Any help would be greatly appreciated. Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From luis.ibanez@kitware.com Fri Jul 18 15:59:59 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Fri, 18 Jul 2003 10:59:59 -0400 Subject: [Insight-users] problem building insight application References: <20030717234021.5290.qmail@web21507.mail.yahoo.com> Message-ID: <3F180B6F.4000502@kitware.com> Hi Tejas, Please add the following lines to your CMakeLists.txt file INCLUDE_DIRECTORIES( ${myApplicationName_SOURCE_DIR} ) Where "myApplicationName" is the name you gave to your project at the beginning of the CMakeLists.txt file with the command PROJECT() These lines add the source directory of your project to the list of directories to search for header files. Please take a look at the previous posting http://www.itk.org/pipermail/insight-users/2003-July/004278.html regarding the CMake configuration of projects using ITK, VTK and FLTK. Regards, Luis ------------------ tejas mehta wrote: > Hi, > > I am trying to build the Geodisic Active Contour Application. I use > CMake to configure the itk applications: > > Source: C:\itk\InsightApplications-1.2.0 > Bin: C:\temp_app > > After this I use VC++ to build all the classes > > Next, I copy the files from the GeodisisActiveContour directory into > another directory and try to configure using CMake. I add the following > lines to the CMakeLists.txt : > > /FIND_PACKAGE(FLTK) > // IF(FLTK_FOUND) > //INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR}) > //ENDIF(FLTK_FOUND)/ > // > Next, I build the Project.dsw file in VC++. This is where I get the > following errors: > > C:/itk_bin/GeodesicActiveContourGUI.h(7) : fatal error C1083: Cannot > open include file: 'GeodesicActiveContourBase.h': No such file or directory > GeodesicActiveContour.cxx > C:\itk_source\GeodesicActiveContour.cxx(18) : fatal error C1083: Cannot > open include file: 'GeodesicActiveContour.h': No such file or directory > GeodesicActiveContourBase.cxx > C:\itk_source\GeodesicActiveContourBase.h(20) : fatal error C1083: > Cannot open include file: 'itkImageFileReader.h': No such file or directory > I would really appreciate if somenody would help me out. > > > Tejas > > > > > ------------------------------------------------------------------------ > Do you Yahoo!? > SBC Yahoo! DSL > > - Now only $29.95 per month! From imho@bephp.com Fri Jul 18 16:30:50 2003 From: imho@bephp.com (imho) Date: Fri, 18 Jul 2003 17:30:50 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F16B1C8.4040707@creatis.insa-lyon.fr> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> <3F1330F1.2040902@kitware.com> <3F140721.3020109@bephp.com> <3F1417E0.8080300@kitware.com> <3F1519C3.9050800@bephp.com> <3F15E4D5.4090705@kitware.com> <3F16B132.4000000@bephp.com> <3F16B1C8.4040707@creatis.insa-lyon.fr> Message-ID: <3F1812AA.8040501@bephp.com> Hi all, I have finally compiled it with the glut stuff but I have nothing at the execution on windows... (no message, nothing) Anyway, I'll try to resolve my pipe-line problem, and if I find out I'll let you know. But the conversion vtkPolyData -> vtkImageData with the vtkImplicitModeller is so slow (and I've two models to convert), I don't know if the demons algorithm in ITK will be enough accurate. Is there any other way to do a connection vtk-itk-vtk? Thanks for your help. Mathieu Malaterre wrote: > You'll find the file here: > > http://public.kitware.com/cgi-bin/cvsweb.cgi/Insight/Utilities/GlutMaster/Attic/?cvsroot=Insight > > But as you can see this is no longer supported. > > HTH > mathieu > > imho wrote: > >> Hi Luis, >> I have a linking error >> >> " >> Compiling... >> itkImageViewer.cxx >> C:\itk\itksrc\Code\IO\itkImageViewerWindow.h(23) : fatal error C1083: >> Cannot open include file: 'itkGlutMaster.h': No such file or directory >> Error executing cl.exe. >> >> NewProject.exe - 1 error(s), 0 warning(s) >> " >> and I cant' find this in my itk folders. >> >> So if the image files were corrupted, I have a problem with the >> vtkExport ---> itkImport or I've writed the files badly. >> The conversion polyData->ImageData->polyData in VTK is OK witout the >> connection to itk. >> the files : >> vtk stuff >> " >> polyToImage->SetInput(poly[0]); // implicitModeller to do a >> polyData -> ImageData conversion >> polyLiveToImage->SetInput(polyLive); >> polyToImage->SetSampleDimensions(10, 10, 10); >> polyToImage->SetMaximumDistance(0.25); >> // polyToImage->SetModelBounds(poly[0]->GetBounds()); >> polyLiveToImage->SetSampleDimensions(10, 10, 10); >> // polyLiveToImage->SetSampleDimensions(110, 40, 20); >> polyLiveToImage->SetMaximumDistance(0.25); >> // polyLiveToImage->SetModelBounds(polyLive->GetBounds()); >> imageModel = polyToImage->GetOutput(); // getting the >> ImageData >> imageModelLive = polyLiveToImage->GetOutput(); >> vtkExporter4->SetInput(imageModel); >> vtkExporter5->SetInput(imageModelLive); >> >> regITK = new registrationITK(vtkImporter4, vtkExporter4, >> vtkExporter5); >> >> cast->SetInput(vtkImporter4->GetOutput()); >> castTo3D->SetInput(vtkImporter4->GetOutput()); >> >> isRegITK = true; >> >> " >> >> itk stuff >> in registrationITK.h >> " >> ... >> typedef float PixelType; >> typedef itk::Image ImageType; >> >> typedef itk::VTKImageImport ImageImportType; >> typedef itk::VTKImageImport ImageImportType2; >> typedef itk::VTKImageExport ImageExportType; >> typedef itk::ImageFileWriter ImageWriter; >> >> private : >> >> >> ImageImportType::Pointer itkImporter; >> ImageImportType::Pointer itkImporter2; >> ImageExportType::Pointer itkExporter; >> ImageWriter::Pointer writerITK; >> >> }; >> " >> in itkRegistration.cpp >> " >> registrationITK::registrationITK(vtkImageImport* vtkImporter, >> vtkImageExport *vtkExporter, vtkImageExport *vtkExporter2) >> { itkImporter = ImageImportType::New(); >> itkImporter2 = ImageImportType::New(); >> itkExporter = ImageExportType::New(); >> writerITK = ImageWriter::New(); >> >> itkExporter->SetInput(itkImporter->GetOutput()); >> >> ConnectPipelines(vtkExporter, itkImporter); >> ConnectPipelines(vtkExporter2, itkImporter2); >> ConnectPipelines(itkExporter, vtkImporter); >> itkImporter->Update(); >> itkImporter2->Update(); >> itkExporter->Update(); >> writerITK->SetFileName("test_itk_write.vtk"); >> itk::VTKImageIO::Pointer vtkWriter = itk::VTKImageIO::New(); >> vtkWriter->SetFileName( "LOCAL" ); >> vtkWriter->SetFileTypeToBinary(); >> >> writerITK->SetImageIO( vtkWriter ); >> writerITK->SetInput(itkImporter->GetOutput()); >> writerITK->Update(); >> } >> " >> What could I try? >> >> Thanks >> >> >> >> Luis Ibanez wrote: >> >>> >>> Hi Imho, >>> >>> If you want to read the vtk image using VTK reader >>> you may try the following reader. >>> http://www.vtk.org/doc/nightly/html/classvtkDataSetReader.html >>> >>> I tried both image that you send, and they appear to be >>> corrupted. >>> >>> What error did you encounter while building the viewer ? >>> >>> The viewer will help you a lot since with it you can see >>> images in multiple formats: MetaImage, GIPL, Analyze, VTK... >>> >>> >>> >>> >>> Luis >>> >>> >>> >>> -------------------- >>> imho wrote: >>> >>>> Hi Luis, >>>> >>>> I have saved the data into a .mdh metaImage file, and it has a non >>>> null size. >>>> I've tried to compile the imageViewer but I have a linking error so >>>> I've tried to save it into a VTK format, but I can't open it with >>>> my polyDataReader of course ( ERROR: In >>>> C:\martink\vtk40\VTK\IO\vtkPolyDataReader.cxx, line 167 >>>> vtkPolyDataReader (0x057D3900): Cannot read dataset type: >>>> structured_points). But it seems that the importer in itk is ok, >>>> it's the last part of the pipe-line that I've to check out, the >>>> itkExporter->vtkImporter. >>>> >>>> I send you the output files, maybe it could help. >>>> >>>> thanks >>>> >>>> >>> >>> . >>> >> >> _______________________________________________ >> Insight-users mailing list >> Insight-users@itk.org >> http://www.itk.org/mailman/listinfo/insight-users >> > > From luis.ibanez@kitware.com Fri Jul 18 16:39:22 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Fri, 18 Jul 2003 11:39:22 -0400 Subject: [Insight-users] vtk polydata import / export References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> <3F1330F1.2040902@kitware.com> <3F140721.3020109@bephp.com> <3F1417E0.8080300@kitware.com> <3F1519C3.9050800@bephp.com> <3F15E4D5.4090705@kitware.com> <3F16B132.4000000@bephp.com> <3F16B1C8.4040707@creatis.insa-lyon.fr> <3F1812AA.8040501@bephp.com> Message-ID: <3F1814AA.1000709@kitware.com> Hi Imho, The viewer that you may want to use is the one in InsightApplications/ImageViewer/ It doesn't reguire GLUT, it does require FLTK. --- The conversion from vtkPolyData to vtkImage is natually a slow process, you are generating a volume from a surface. You don't want to do this each time. Simply write a separate program that do the conversion and save the images in files. Then use the images for running the Demons registration process. Question: How did you get this vtkPolyData models of the liver ? Presumably you got them from a segmentation of actual volumetric data.... If this is the case, you better use this original volumetric data for performing the Demons registration, instead of going the long way through a geometrical model. Demons is based on a concept of optical flow, its precision will be in the order of one-pixel, assuming that the gradients in the image borders have profiles with linear sections. Regards, Luis -------------- imho wrote: > Hi all, > I have finally compiled it with the glut stuff but I have nothing at the > execution on windows... > (no message, nothing) > > Anyway, I'll try to resolve my pipe-line problem, and if I find out I'll > let you know. > But the conversion vtkPolyData -> vtkImageData with the > vtkImplicitModeller is so slow (and I've two models to convert), I don't > know if the demons algorithm in ITK will be enough accurate. > > Is there any other way to do a connection vtk-itk-vtk? > > Thanks for your help. > > Mathieu Malaterre wrote: > >> You'll find the file here: >> >> http://public.kitware.com/cgi-bin/cvsweb.cgi/Insight/Utilities/GlutMaster/Attic/?cvsroot=Insight >> >> >> But as you can see this is no longer supported. >> >> HTH >> mathieu >> >> imho wrote: >> >>> Hi Luis, >>> I have a linking error >>> >>> " >>> Compiling... >>> itkImageViewer.cxx >>> C:\itk\itksrc\Code\IO\itkImageViewerWindow.h(23) : fatal error C1083: >>> Cannot open include file: 'itkGlutMaster.h': No such file or directory >>> Error executing cl.exe. >>> >>> NewProject.exe - 1 error(s), 0 warning(s) >>> " >>> and I cant' find this in my itk folders. >>> >>> So if the image files were corrupted, I have a problem with the >>> vtkExport ---> itkImport or I've writed the files badly. >>> The conversion polyData->ImageData->polyData in VTK is OK witout the >>> connection to itk. >>> the files : >>> vtk stuff >>> " >>> polyToImage->SetInput(poly[0]); // implicitModeller to do a >>> polyData -> ImageData conversion >>> polyLiveToImage->SetInput(polyLive); >>> polyToImage->SetSampleDimensions(10, 10, 10); >>> polyToImage->SetMaximumDistance(0.25); >>> // polyToImage->SetModelBounds(poly[0]->GetBounds()); >>> polyLiveToImage->SetSampleDimensions(10, 10, 10); >>> // polyLiveToImage->SetSampleDimensions(110, 40, 20); >>> polyLiveToImage->SetMaximumDistance(0.25); >>> // polyLiveToImage->SetModelBounds(polyLive->GetBounds()); >>> imageModel = polyToImage->GetOutput(); // getting the >>> ImageData >>> imageModelLive = polyLiveToImage->GetOutput(); >>> vtkExporter4->SetInput(imageModel); >>> vtkExporter5->SetInput(imageModelLive); >>> >>> regITK = new registrationITK(vtkImporter4, vtkExporter4, >>> vtkExporter5); >>> >>> cast->SetInput(vtkImporter4->GetOutput()); >>> castTo3D->SetInput(vtkImporter4->GetOutput()); >>> >>> isRegITK = true; >>> >>> " >>> >>> itk stuff >>> in registrationITK.h >>> " >>> ... >>> typedef float PixelType; >>> typedef itk::Image ImageType; >>> >>> typedef itk::VTKImageImport ImageImportType; >>> typedef itk::VTKImageImport ImageImportType2; >>> typedef itk::VTKImageExport ImageExportType; >>> typedef itk::ImageFileWriter ImageWriter; >>> >>> private : >>> >>> >>> ImageImportType::Pointer itkImporter; >>> ImageImportType::Pointer itkImporter2; >>> ImageExportType::Pointer itkExporter; >>> ImageWriter::Pointer writerITK; >>> >>> }; >>> " >>> in itkRegistration.cpp >>> " >>> registrationITK::registrationITK(vtkImageImport* vtkImporter, >>> vtkImageExport *vtkExporter, vtkImageExport *vtkExporter2) >>> { itkImporter = ImageImportType::New(); >>> itkImporter2 = ImageImportType::New(); >>> itkExporter = ImageExportType::New(); >>> writerITK = ImageWriter::New(); >>> >>> itkExporter->SetInput(itkImporter->GetOutput()); >>> >>> ConnectPipelines(vtkExporter, itkImporter); >>> ConnectPipelines(vtkExporter2, itkImporter2); >>> ConnectPipelines(itkExporter, vtkImporter); >>> itkImporter->Update(); >>> itkImporter2->Update(); >>> itkExporter->Update(); >>> writerITK->SetFileName("test_itk_write.vtk"); >>> itk::VTKImageIO::Pointer vtkWriter = itk::VTKImageIO::New(); >>> vtkWriter->SetFileName( "LOCAL" ); >>> vtkWriter->SetFileTypeToBinary(); >>> >>> writerITK->SetImageIO( vtkWriter ); >>> writerITK->SetInput(itkImporter->GetOutput()); >>> writerITK->Update(); >>> } >>> " >>> What could I try? >>> >>> Thanks >>> >>> >>> >>> Luis Ibanez wrote: >>> >>>> >>>> Hi Imho, >>>> >>>> If you want to read the vtk image using VTK reader >>>> you may try the following reader. >>>> http://www.vtk.org/doc/nightly/html/classvtkDataSetReader.html >>>> >>>> I tried both image that you send, and they appear to be >>>> corrupted. >>>> >>>> What error did you encounter while building the viewer ? >>>> >>>> The viewer will help you a lot since with it you can see >>>> images in multiple formats: MetaImage, GIPL, Analyze, VTK... >>>> >>>> >>>> >>>> >>>> Luis >>>> >>>> >>>> >>>> -------------------- >>>> imho wrote: >>>> >>>>> Hi Luis, >>>>> >>>>> I have saved the data into a .mdh metaImage file, and it has a non >>>>> null size. >>>>> I've tried to compile the imageViewer but I have a linking error so >>>>> I've tried to save it into a VTK format, but I can't open it with >>>>> my polyDataReader of course ( ERROR: In >>>>> C:\martink\vtk40\VTK\IO\vtkPolyDataReader.cxx, line 167 >>>>> vtkPolyDataReader (0x057D3900): Cannot read dataset type: >>>>> structured_points). But it seems that the importer in itk is ok, >>>>> it's the last part of the pipe-line that I've to check out, the >>>>> itkExporter->vtkImporter. >>>>> >>>>> I send you the output files, maybe it could help. >>>>> >>>>> thanks >>>>> >>>>> >>>> >>>> . >>>> >>> >>> _______________________________________________ >>> Insight-users mailing list >>> Insight-users@itk.org >>> http://www.itk.org/mailman/listinfo/insight-users >>> >> >> > > From imho@bephp.com Fri Jul 18 17:17:22 2003 From: imho@bephp.com (imho) Date: Fri, 18 Jul 2003 18:17:22 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F1814AA.1000709@kitware.com> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> <3F1330F1.2040902@kitware.com> <3F140721.3020109@bephp.com> <3F1417E0.8080300@kitware.com> <3F1519C3.9050800@bephp.com> <3F15E4D5.4090705@kitware.com> <3F16B132.4000000@bephp.com> <3F16B1C8.4040707@creatis.insa-lyon.fr> <3F1812AA.8040501@bephp.com> <3F1814AA.1000709@kitware.com> Message-ID: <3F181D92.9010008@bephp.com> Hi Luis, I don't understand, I've found the imageViewer where you said. I've a too old version I guess. what I'm trying to do is a registration between a liver reconstructed from slices and a "live liver", who will be digitalised (I don't know how already) in the chirurgical room. But I've to simulate this live digitalisation, so I load a polyData saved before, and deform it a bit. I don't know the structure that will have the digitalised one, but I can have the reconstructed one as imageData (originally) and polyData. I already do a point-based registration and a ICP registration with these two polyData (with vtk, using vtkLandmarkTransform, vtkTransform, vtkTransformPolyDataFilter and vtkIterativeClosestPointTransform) So I've first preferably continued using polyData, but I guess I can change all of this to imageData? I'll look in this way. Thanks Imho. Luis Ibanez wrote: > > Hi Imho, > > The viewer that you may want to use is the one in > > InsightApplications/ImageViewer/ > > It doesn't reguire GLUT, it does require FLTK. > > --- > > The conversion from vtkPolyData to vtkImage is natually > a slow process, you are generating a volume from a > surface. You don't want to do this each time. > Simply write a separate program that do the conversion > and save the images in files. Then use the images > for running the Demons registration process. > > > > Question: How did you get this vtkPolyData models > of the liver ? > > > Presumably you got them from a segmentation of actual > volumetric data.... > > If this is the case, you better use this original volumetric > data for performing the Demons registration, instead of > going the long way through a geometrical model. > > Demons is based on a concept of optical flow, its precision > will be in the order of one-pixel, assuming that the gradients > in the image borders have profiles with linear sections. > > > Regards, > > > Luis > > > > -------------- > imho wrote: > >> Hi all, >> I have finally compiled it with the glut stuff but I have nothing at >> the execution on windows... >> (no message, nothing) >> >> Anyway, I'll try to resolve my pipe-line problem, and if I find out >> I'll let you know. >> But the conversion vtkPolyData -> vtkImageData with the >> vtkImplicitModeller is so slow (and I've two models to convert), I >> don't know if the demons algorithm in ITK will be enough accurate. >> >> Is there any other way to do a connection vtk-itk-vtk? >> >> Thanks for your help. >> >> Mathieu Malaterre wrote: >> >>> You'll find the file here: >>> >>> http://public.kitware.com/cgi-bin/cvsweb.cgi/Insight/Utilities/GlutMaster/Attic/?cvsroot=Insight >>> >>> But as you can see this is no longer supported. >>> >>> HTH >>> mathieu >>> >>> imho wrote: >>> >>>> Hi Luis, >>>> I have a linking error >>>> >>>> " >>>> Compiling... >>>> itkImageViewer.cxx >>>> C:\itk\itksrc\Code\IO\itkImageViewerWindow.h(23) : fatal error >>>> C1083: Cannot open include file: 'itkGlutMaster.h': No such file or >>>> directory >>>> Error executing cl.exe. >>>> >>>> NewProject.exe - 1 error(s), 0 warning(s) >>>> " >>>> and I cant' find this in my itk folders. >>>> >>>> So if the image files were corrupted, I have a problem with the >>>> vtkExport ---> itkImport or I've writed the files badly. >>>> The conversion polyData->ImageData->polyData in VTK is OK witout >>>> the connection to itk. >>>> the files : >>>> vtk stuff >>>> " >>>> polyToImage->SetInput(poly[0]); // implicitModeller to do a >>>> polyData -> ImageData conversion >>>> polyLiveToImage->SetInput(polyLive); >>>> polyToImage->SetSampleDimensions(10, 10, 10); >>>> polyToImage->SetMaximumDistance(0.25); >>>> // polyToImage->SetModelBounds(poly[0]->GetBounds()); >>>> polyLiveToImage->SetSampleDimensions(10, 10, 10); >>>> // polyLiveToImage->SetSampleDimensions(110, 40, 20); >>>> polyLiveToImage->SetMaximumDistance(0.25); >>>> // polyLiveToImage->SetModelBounds(polyLive->GetBounds()); >>>> imageModel = polyToImage->GetOutput(); // getting the >>>> ImageData >>>> imageModelLive = polyLiveToImage->GetOutput(); >>>> vtkExporter4->SetInput(imageModel); >>>> vtkExporter5->SetInput(imageModelLive); >>>> >>>> regITK = new registrationITK(vtkImporter4, vtkExporter4, >>>> vtkExporter5); >>>> >>>> cast->SetInput(vtkImporter4->GetOutput()); >>>> castTo3D->SetInput(vtkImporter4->GetOutput()); >>>> >>>> isRegITK = true; >>>> >>>> " >>>> >>>> itk stuff >>>> in registrationITK.h >>>> " >>>> ... >>>> typedef float PixelType; >>>> typedef itk::Image ImageType; >>>> >>>> typedef itk::VTKImageImport ImageImportType; >>>> typedef itk::VTKImageImport ImageImportType2; >>>> typedef itk::VTKImageExport ImageExportType; >>>> typedef itk::ImageFileWriter ImageWriter; >>>> >>>> private : >>>> >>>> >>>> ImageImportType::Pointer itkImporter; >>>> ImageImportType::Pointer itkImporter2; >>>> ImageExportType::Pointer itkExporter; >>>> ImageWriter::Pointer writerITK; >>>> >>>> }; >>>> " >>>> in itkRegistration.cpp >>>> " >>>> registrationITK::registrationITK(vtkImageImport* vtkImporter, >>>> vtkImageExport *vtkExporter, vtkImageExport *vtkExporter2) >>>> { itkImporter = ImageImportType::New(); >>>> itkImporter2 = ImageImportType::New(); >>>> itkExporter = ImageExportType::New(); >>>> writerITK = ImageWriter::New(); >>>> >>>> itkExporter->SetInput(itkImporter->GetOutput()); >>>> >>>> ConnectPipelines(vtkExporter, itkImporter); >>>> ConnectPipelines(vtkExporter2, itkImporter2); >>>> ConnectPipelines(itkExporter, vtkImporter); >>>> itkImporter->Update(); >>>> itkImporter2->Update(); >>>> itkExporter->Update(); >>>> writerITK->SetFileName("test_itk_write.vtk"); >>>> itk::VTKImageIO::Pointer vtkWriter = itk::VTKImageIO::New(); >>>> vtkWriter->SetFileName( "LOCAL" ); >>>> vtkWriter->SetFileTypeToBinary(); >>>> >>>> writerITK->SetImageIO( vtkWriter ); >>>> writerITK->SetInput(itkImporter->GetOutput()); >>>> writerITK->Update(); >>>> } >>>> " >>>> What could I try? >>>> >>>> Thanks >>>> >>>> >>>> >>>> Luis Ibanez wrote: >>>> >>>>> >>>>> Hi Imho, >>>>> >>>>> If you want to read the vtk image using VTK reader >>>>> you may try the following reader. >>>>> http://www.vtk.org/doc/nightly/html/classvtkDataSetReader.html >>>>> >>>>> I tried both image that you send, and they appear to be >>>>> corrupted. >>>>> >>>>> What error did you encounter while building the viewer ? >>>>> >>>>> The viewer will help you a lot since with it you can see >>>>> images in multiple formats: MetaImage, GIPL, Analyze, VTK... >>>>> >>>>> >>>>> >>>>> >>>>> Luis >>>>> >>>>> >>>>> >>>>> -------------------- >>>>> imho wrote: >>>>> >>>>>> Hi Luis, >>>>>> >>>>>> I have saved the data into a .mdh metaImage file, and it has a >>>>>> non null size. >>>>>> I've tried to compile the imageViewer but I have a linking error >>>>>> so I've tried to save it into a VTK format, but I can't open it >>>>>> with my polyDataReader of course ( ERROR: In >>>>>> C:\martink\vtk40\VTK\IO\vtkPolyDataReader.cxx, line 167 >>>>>> vtkPolyDataReader (0x057D3900): Cannot read dataset type: >>>>>> structured_points). But it seems that the importer in itk is ok, >>>>>> it's the last part of the pipe-line that I've to check out, the >>>>>> itkExporter->vtkImporter. >>>>>> >>>>>> I send you the output files, maybe it could help. >>>>>> >>>>>> thanks >>>>>> >>>>>> >>>>> >>>>> . >>>>> >>>> >>>> _______________________________________________ >>>> Insight-users mailing list >>>> Insight-users@itk.org >>>> http://www.itk.org/mailman/listinfo/insight-users >>>> >>> >>> >> >> > > > > . > From luis.ibanez@kitware.com Fri Jul 18 18:15:07 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Fri, 18 Jul 2003 13:15:07 -0400 Subject: [Insight-users] vtk polydata import / export: Image to Model registration References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> <3F0E5E21.3080902@bephp.com> <3F0EBEDA.7020906@kitware.com> <3F1048E0.80606@bephp.com> <3F1330F1.2040902@kitware.com> <3F140721.3020109@bephp.com> <3F1417E0.8080300@kitware.com> <3F1519C3.9050800@bephp.com> <3F15E4D5.4090705@kitware.com> <3F16B132.4000000@bephp.com> <3F16B1C8.4040707@creatis.insa-lyon.fr> <3F1812AA.8040501@bephp.com> <3F1814AA.1000709@kitware.com> <3F181D92.9010008@bephp.com> Message-ID: <3F182B1B.9010500@kitware.com> Hi Imho, Thanks for clarifying your final application. If your goal is to perform image guided surgery, I'm affraid that Demons registration will not be able to deliver the speed you need. You probably need the registration to be performed in a matter of seconds. In particular if the intra-surgery model is represented as a geometrical model, the step of generating a volume from the geometrical model will be a bottleneck in the whole process. I would suggest you to take a look at the PointSetToImage registration methods, and/or to the SpatialObjectToImage methods. The first method registers an itkPointSet with an itkImage. The ideal point set is generated as a band around the edges of the object. There is a new filter that you can use for generating the point set from a binary mask (segmented image). http://www.itk.org/Insight/Doxygen/html/classitk_1_1BinaryMaskToNarrowBandPointSetFilter.html Then you can use a PointSetToImage registration method. http://www.itk.org/Insight/Doxygen/html/classitk_1_1PointSetToImageRegistrationMethod.html The second methods registers an itkSpatialObject with an itkImage. An example is available in the SoftwareGuide.pdf. Section 7.14, Model Based Registration, pdf-page 286. The itkSpatialObject is in fact designed for representing models of anatomical organs. You can group spatial objects in order to model complex shapes. Regards, Luis ---------------- imho wrote: > Hi Luis, > > I don't understand, I've found the imageViewer where you said. > I've a too old version I guess. > > what I'm trying to do is a registration between a liver reconstructed > from slices and a "live liver", who will be digitalised (I don't know > how already) in the chirurgical room. > But I've to simulate this live digitalisation, so I load a polyData > saved before, and deform it a bit. > I don't know the structure that will have the digitalised one, but I can > have the reconstructed one as imageData (originally) and polyData. > I already do a point-based registration and a ICP registration with > these two polyData (with vtk, using vtkLandmarkTransform, vtkTransform, > vtkTransformPolyDataFilter and vtkIterativeClosestPointTransform) > > So I've first preferably continued using polyData, but I guess I can > change all of this to imageData? > I'll look in this way. > Thanks > > Imho. > > From tejas9090@yahoo.com Fri Jul 18 20:03:53 2003 From: tejas9090@yahoo.com (tejas mehta) Date: Fri, 18 Jul 2003 12:03:53 -0700 (PDT) Subject: [Insight-users] problem building insight application In-Reply-To: <3F180B6F.4000502@kitware.com> Message-ID: <20030718190353.33710.qmail@web21511.mail.yahoo.com> --0-1566541269-1058555033=:33614 Content-Type: text/plain; charset=us-ascii Thanks Luis. I included all the directories in CMakeLists.txt file. When building in VC++ I get the following error: \itk\InsightApplications-1.2.0\Auxiliary\VtkFltk\fltkVTKImageViewer.h(20) : fatal error C1083: Cannot open include file: 'fltkVTKImageViewerGUI.h': No such file or directory I could not find the file : 'fltkVTKImageViewerGUI.h' anywhere ???? Tejas Luis Ibanez wrote: Hi Tejas, Please add the following lines to your CMakeLists.txt file INCLUDE_DIRECTORIES( ${myApplicationName_SOURCE_DIR} ) Where "myApplicationName" is the name you gave to your project at the beginning of the CMakeLists.txt file with the command PROJECT() These lines add the source directory of your project to the list of directories to search for header files. Please take a look at the previous posting http://www.itk.org/pipermail/insight-users/2003-July/004278.html regarding the CMake configuration of projects using ITK, VTK and FLTK. Regards, Luis ------------------ tejas mehta wrote: > Hi, > > I am trying to build the Geodisic Active Contour Application. I use > CMake to configure the itk applications: > > Source: C:\itk\InsightApplications-1.2.0 > Bin: C:\temp_app > > After this I use VC++ to build all the classes > > Next, I copy the files from the GeodisisActiveContour directory into > another directory and try to configure using CMake. I add the following > lines to the CMakeLists.txt : > > /FIND_PACKAGE(FLTK) > // IF(FLTK_FOUND) > //INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR}) > //ENDIF(FLTK_FOUND)/ > // > Next, I build the Project.dsw file in VC++. This is where I get the > following errors: > > C:/itk_bin/GeodesicActiveContourGUI.h(7) : fatal error C1083: Cannot > open include file: 'GeodesicActiveContourBase.h': No such file or directory > GeodesicActiveContour.cxx > C:\itk_source\GeodesicActiveContour.cxx(18) : fatal error C1083: Cannot > open include file: 'GeodesicActiveContour.h': No such file or directory > GeodesicActiveContourBase.cxx > C:\itk_source\GeodesicActiveContourBase.h(20) : fatal error C1083: > Cannot open include file: 'itkImageFileReader.h': No such file or directory > I would really appreciate if somenody would help me out. > > > Tejas > > > > > ------------------------------------------------------------------------ > Do you Yahoo!? > SBC Yahoo! DSL > > - Now only $29.95 per month! --------------------------------- Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! --0-1566541269-1058555033=:33614 Content-Type: text/html; charset=us-ascii
Thanks Luis. I included all the directories in CMakeLists.txt file. When building in VC++ I get the following error:
 
\itk\InsightApplications-1.2.0\Auxiliary\VtkFltk\fltkVTKImageViewer.h(20) : fatal error C1083: Cannot open include file: 'fltkVTKImageViewerGUI.h': No such file or directory
 
I could not find the file : 'fltkVTKImageViewerGUI.h' anywhere ????
 
Tejas 


Luis Ibanez <luis.ibanez@kitware.com> wrote:

Hi Tejas,

Please add the following lines to your CMakeLists.txt
file

INCLUDE_DIRECTORIES(
${myApplicationName_SOURCE_DIR}
)

Where "myApplicationName" is the name you gave to
your project at the beginning of the CMakeLists.txt
file with the command PROJECT()

These lines add the source directory of your project
to the list of directories to search for header files.


Please take a look at the previous posting
http://www.itk.org/pipermail/insight-users/2003-July/004278.html
regarding the CMake configuration of projects using
ITK, VTK and FLTK.


Regards,


Luis



------------------
tejas mehta wrote:
> Hi,
>
> I am trying to build the Geodisic Active Contour Application. I use
> CMake to configure the itk applications:
>
> Source: C:\itk\InsightApplications-1.2.0
> Bin: C:\temp_app
>
> After this I use VC++ to build all the classes
>
> Next, I copy the files from the GeodisisActiveContour directory into
> another directory and try to configure using CMake. I add the following
> lines to the CMakeLists.txt :
>
> /FIND_PACKAGE(FLTK)
> // IF(FLTK_FOUND)
> //INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
> //ENDIF(FLTK_FOUND)/
> //
> Next, I build the Project.dsw file in VC++. This is where I get the
> following errors:
>
> C:/itk_bin/GeodesicActiveContourGUI.h(7) : fatal error C1083: Cannot
> open include file: 'GeodesicActiveContourBase.h': No such file or directory
> GeodesicActiveContour.cxx
> C:\itk_source\GeodesicActiveContour.cxx(18) : fatal error C1083: Cannot
> open include file: 'GeodesicActiveContour.h': No such file or directory
> GeodesicActiveContourBase.cxx
> C:\itk_source\GeodesicActiveContourBase.h(20) : fatal error C1083:
> Cannot open include file: 'itkImageFileReader.h': No such file or directory
> I would really appreciate if somenody would help me out.
>
>
> Tejas
>
>
>
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL
>
> - Now only $29.95 per month!



Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month! --0-1566541269-1058555033=:33614-- From luis.ibanez@kitware.com Fri Jul 18 20:21:20 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Fri, 18 Jul 2003 15:21:20 -0400 Subject: [Insight-users] problem building insight application References: <20030718190353.33710.qmail@web21511.mail.yahoo.com> Message-ID: <3F1848B0.4060107@kitware.com> Hi Tejas, The file 'fltkVTKImageViewerGUI.h' is generated by FLTK-fluid under CMake control. It will be located in the Binary directory where you built InsightApplications/Auxiliary/FltkImageViewer. The fact is that the GeodesicActiveContours (and many other FLTK applications in InsightApplications) is depending on this FltkImageViewer library. You will have to decide if you build this library on your own, and indicate to your project where the headers and the library are located, or you could simply copy all those files into your project and get a monolitic application. It all depends on who far do you plan to go with it. For example, A) If you just want to play with this application, you better use it inside the source tree of InsightApplication, and compile the whole set of applications. This is already configured to be easy to build. B) If you want to experiment with it as a prototype of an ITK + FLTK application, you better extract the FltkImageViewer project too and use it for generating a library. Then link your app to this library. C) If you want to go really far with this code, you are better of using VTK for visualizing the images. In that case you may want to use the vtkFlRenderWindowInterator class available in InsightApplications/Auxiliary/VtkFltk. I would suggest you to start with (A), that is, do not move the project out of the InsightApplications tree, just build all the applications from the top. Regards, Luis --------------------- tejas mehta wrote: > Thanks Luis. I included all the directories in CMakeLists.txt file. When > building in VC++ I get the following error: > > \itk\InsightApplications-1.2.0\Auxiliary\VtkFltk\fltkVTKImageViewer.h(20) > : fatal error C1083: Cannot open include file: > 'fltkVTKImageViewerGUI.h': No such file or directory > > I could not find the file : 'fltkVTKImageViewerGUI.h' anywhere ???? > > Tejas > > > */Luis Ibanez /* wrote: > > > Hi Tejas, > > Please add the following lines to your CMakeLists.txt > file > > INCLUDE_DIRECTORIES( > ${myApplicationName_SOURCE_DIR} > ) > > Where "myApplicationName" is the name you gave to > your project at the beginning of the CMakeLists.txt > file with the command PROJECT() > > These lines add the source directory of your project > to the list of directories to search for header files. > > > Please take a look at the previous posting > http://www.itk.org/pipermail/insight-users/2003-July/004278.html > regarding the CMake configuration of projects using > ITK, VTK and FLTK. > > > Regards, > > > Luis > > > > ------------------ > tejas mehta wrote: > > Hi, > > > > I am trying to build the Geodisic Active Contour Application. I use > > CMake to configure the itk applications: > > > > Source: C:\itk\InsightApplications-1.2.0 > > Bin: C:\temp_app > > > > After this I use VC++ to build all the classes > > > > Next, I copy the files from the GeodisisActiveContour directory into > > another directory and try to configure using CMake. I add the > following > > lines to the CMakeLists.txt : > > > > /FIND_PACKAGE(FLTK) > > // IF(FLTK_FOUND) > > //INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR}) > > //ENDIF(FLTK_FOUND)/ > > // > > Next, I build the Project.dsw file in VC++. This is where I get the > > following errors: > > > > C:/itk_bin/GeodesicActiveContourGUI.h(7) : fatal error C1083: Cannot > > open include file: 'GeodesicActiveContourBase.h': No such file or > directory > > GeodesicActiveContour.cxx > > C:\itk_source\GeodesicActiveContour.cxx(18) : fatal error C1083: > Cannot > > open include file: 'GeodesicActiveContour.h': No such file or > directory > > GeodesicActiveContourBase.cx! x > > C:\itk_source\GeodesicActiveContourBase.h(20) : fatal error C1083: > > Cannot open include file: 'itkImageFileReader.h': No such file or > directory > > I would really appreciate if somenody would help me out. > > > > > > Tejas > > > > > > > > > > > ------------------------------------------------------------------------ > > Do you Yahoo!? > > SBC Yahoo! DSL > > > > - Now only $29.95 per month! > > > ------------------------------------------------------------------------ > Do you Yahoo!? > SBC Yahoo! DSL > > - Now only $29.95 per month! From Carolyn.Johnston@vexcel.com Fri Jul 18 20:21:20 2003 From: Carolyn.Johnston@vexcel.com (Carolyn Johnston) Date: Fri, 18 Jul 2003 13:21:20 -0600 Subject: [Insight-users] a bug in ImportImageFilter? Message-ID: <5.0.0.25.2.20030718125443.03453718@mail.vexcel.com> Could there be a bug in SetImportPointer? I noted while debugging that although passing the value LetSourceManageMemory = true is supposed to, well, allow the source to manage the memory according to the manual, delete is called on the import pointer if m_SourceManageMemory == true, and stepping through the code I note m_SourceManageMemory is reset to LetSourceManageMemory (code snippet included). I note also that the destructor deletes the memory if m_SourceManageMemory is true. I thought it was possible this is a bug that slipped through testing, since this may be a part of ITK that isn't used as frequently as the standard image readers. This is apparently what was causing the shift problem I posted a couple of days ago. :) Carolyn ________________________________________________________________________________________ ImportImageFilter ::SetImportPointer(TPixel *ptr, unsigned long num, bool LetSourceManageMemory) { if (ptr != m_ImportPointer) { if (m_ImportPointer && m_SourceManageMemory) { delete [] m_ImportPointer; } m_ImportPointer = ptr; this->Modified(); } m_SourceManageMemory = ; m_Size = num; } From millerjv@crd.ge.com Fri Jul 18 20:50:14 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Fri, 18 Jul 2003 15:50:14 -0400 Subject: [Insight-users] a bug in ImportImageFilter? Message-ID: This might be a naming/doc issue. Here "Source" refers to the ImportImageFilter. It is considered a "source" since it produces output but doesn't take an input in the tradition pipeline sense. "Source" is the generic name of an object that produces output. This is in contrast to a "filter". "Source" does not mean your application rather it means the ImportImageFilter. > -----Original Message----- > From: Carolyn Johnston [mailto:Carolyn.Johnston@vexcel.com] > Sent: Friday, July 18, 2003 3:21 PM > To: insight-users@public.kitware.com > Subject: [Insight-users] a bug in ImportImageFilter? > > > Could there be a bug in SetImportPointer? I noted while > debugging that > although passing the value LetSourceManageMemory = true is > supposed to, > well, allow the source to manage the memory according to the > manual, delete > is called on the import pointer if m_SourceManageMemory == true, and > stepping through the code I note m_SourceManageMemory is reset to > LetSourceManageMemory (code snippet included). I note also that the > destructor deletes the memory if m_SourceManageMemory is true. > > I thought it was possible this is a bug that slipped through > testing, since > this may be a part of ITK that isn't used as frequently as > the standard > image readers. This is apparently what was causing the shift > problem I > posted a couple of days ago. > > :) Carolyn > > ______________________________________________________________ > __________________________ > ImportImageFilter > ::SetImportPointer(TPixel *ptr, unsigned long num, bool > LetSourceManageMemory) > { > if (ptr != m_ImportPointer) > { > if (m_ImportPointer && m_SourceManageMemory) > { > delete [] m_ImportPointer; > } > m_ImportPointer = ptr; > this->Modified(); > } > m_SourceManageMemory = ; > m_Size = num; > } > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From Carolyn.Johnston@vexcel.com Fri Jul 18 20:54:15 2003 From: Carolyn.Johnston@vexcel.com (Carolyn Johnston) Date: Fri, 18 Jul 2003 13:54:15 -0600 Subject: [Insight-users] a bug in ImportImageFilter? In-Reply-To: Message-ID: <5.0.0.25.2.20030718135259.0345a008@mail.vexcel.com> From the manual:

The buffer is passed to the itk::ImportImageFilter with the SetImportPointer(). Note that the last argument
of this method specifies who will be responsible for deleting the memory block once it is no longer in use. A
true
value indicates that the itk::ImportImageFilter will not try to delete the buffer when its destructor is called. A
false on the other hand will allow the filter to delete the memory block.

I think that is pretty clearly the opposite of what is actually in the code.

At 03:50 PM 7/18/2003 -0400, Miller, James V (Research) wrote:
This might be a naming/doc issue.  Here "Source" refers to the
ImportImageFilter.
It is considered a "source" since it produces output but doesn't take an
input
in the tradition pipeline sense. "Source" is the generic name of an object
that
produces output.  This is in contrast to a "filter".

"Source" does not mean your application rather it means the
ImportImageFilter.
From luis.ibanez@kitware.com Fri Jul 18 21:11:34 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Fri, 18 Jul 2003 16:11:34 -0400 Subject: [Insight-users] a bug in ImportImageFilter? References: <5.0.0.25.2.20030718125443.03453718@mail.vexcel.com> Message-ID: <3F185476.5050202@kitware.com> Hi Carolyn, Thanks for pointing this out. You are right, there is an inconsistency between the documentation and the actual accion performed in the ImportImageFilter. We could solve this by changing the documentation or by changing the code. At this point it seems to be better for users, to fix the documentation, since in this way we will not break applications that are currently using this filter. So the member variable name was changed from : m_SourceManageMemory to: m_ThisImportImageFilterWillOwnTheMemory The documentation of the SetImportPointer() method was modified accordingly. The description on the SoftwareGuide was correct though. That certainly may have been the cause of the shift problem you reported previously. Our apologies for that. Please let us know if you encounter further problems, Thanks Luis ------------------------ Carolyn Johnston wrote: > Could there be a bug in SetImportPointer? I noted while debugging that > although passing the value LetSourceManageMemory = true is supposed to, > well, allow the source to manage the memory according to the manual, > delete is called on the import pointer if m_SourceManageMemory == true, > and stepping through the code I note m_SourceManageMemory is reset to > LetSourceManageMemory (code snippet included). I note also that the > destructor deletes the memory if m_SourceManageMemory is true. > > I thought it was possible this is a bug that slipped through testing, > since this may be a part of ITK that isn't used as frequently as the > standard image readers. This is apparently what was causing the shift > problem I posted a couple of days ago. > > :) Carolyn > > ________________________________________________________________________________________ > > ImportImageFilter > ::SetImportPointer(TPixel *ptr, unsigned long num, bool > LetSourceManageMemory) > { > if (ptr != m_ImportPointer) > { > if (m_ImportPointer && m_SourceManageMemory) > { > delete [] m_ImportPointer; > } > m_ImportPointer = ptr; > this->Modified(); > } > m_SourceManageMemory = ; > m_Size = num; > } > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Fri Jul 18 21:23:44 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Fri, 18 Jul 2003 16:23:44 -0400 Subject: [Insight-users] a bug in ImportImageFilter? References: <5.0.0.25.2.20030718135259.0345a008@mail.vexcel.com> Message-ID: <3F185750.1070203@kitware.com> Hi Carolyn, You may have a not so recent version of the SoftwareGuide.pdf document. As you pointed out, the passage that you cite doesn't describe correctly what the code is doing. This description was fixed on the SoftwareGuide on June 7th. http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Examples/DataRepresentation/Image/Image5.cxx?cvsroot=Insight You may want to download the current version of the PDF document (generated in July 14th). http://www.itk.org/ItkSoftwareGuide.pdf The changes to the ImportImageFilter have been commited to the repository. Things should be consistent now between the code, the variable names, the Doxygen documentation and the SoftwareGuide. Please let us know if you notice that something is not matching. (note that the Doxygen documentation will not be updated on the Web until tomorrow. This is built nightly). Thanks Luis ------------------------------- Carolyn Johnston wrote: > From the manual: > > The buffer is passed to the itk::ImportImageFilter with the > SetImportPointer(). Note that the last argument > of this method specifies who will be responsible for deleting the memory > block once it is no longer in use. A true > value indicates that the itk::ImportImageFilter will not try to delete > the buffer when its destructor is called. A > false on the other hand will allow the filter to delete the memory block. > > I think that is pretty clearly the opposite of what is actually in the > code. > > At 03:50 PM 7/18/2003 -0400, Miller, James V (Research) wrote: > >> This might be a naming/doc issue. Here "Source" refers to the >> ImportImageFilter. >> It is considered a "source" since it produces output but doesn't take an >> input >> in the tradition pipeline sense. "Source" is the generic name of an object >> that >> produces output. This is in contrast to a "filter". >> >> "Source" does not mean your application rather it means the >> ImportImageFilter. > > _______________________________________________ Insight-users mailing > list Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users From Carolyn.Johnston@vexcel.com Fri Jul 18 22:05:10 2003 From: Carolyn.Johnston@vexcel.com (Carolyn Johnston) Date: Fri, 18 Jul 2003 15:05:10 -0600 Subject: [Insight-users] registration non-convergence? Message-ID: <5.0.0.25.2.20030718145505.0345a008@mail.vexcel.com> Hi Luis et al, I actually do have another question (I guess this is just my day). I am performing a standard registration with the mean squares metric and the reg step gradient descent optimizer. I have set my fixed image region to be 1000 by 1000 for speed (on a 3600 by 3600 fixed image). My moving image is just the same as the fixed image with a translation I've added. I begin with initial parameters 0,0. 0 = 2185.867696: [0.000052, -0.000019] 1 = 2123.551007: [0.000104, -0.000039] 2 = 2072.931500: [0.000156, -0.000058] 3 = 2033.078306: [0.000209, -0.000077] 4 = 2003.966331: [0.000261, -0.000097] ... ... Now right about here, I pass through a metric minimum and keep on going for some reason... 76 = 467.887291: [0.003999, -0.001529] 77 = 467.045557: [0.004051, -0.001549] 78 = 466.963944: [0.004103, -0.001569] 79 = 467.642714: [0.004154, -0.001589] 80 = 469.093127: [0.004206, -0.001609] ... ... and I end up here, with a metric value significantly higher than the lowest one I achieved during the registration. Any idea what might be causing this? I thought the registration would try to converge around the minimum by reducing the stepsize. 95 = 502.706704: [0.004986, -0.001905] 96 = 508.162350: [0.005038, -0.001925] 97 = 512.621524: [0.005090, -0.001944] 98 = 517.175693: [0.005142, -0.001964] 99 = 520.728025: [0.005194, -0.001984] *** Report for registration of dem 1 *** Translation parameter along X: 0.005194 Translation parameter along Y: -0.001984 Iterations to reach optimal value of metric: 100 Optimal value of metric: 520.728025 From mathias.seitel@igd.fhg.de Sat Jul 19 09:37:12 2003 From: mathias.seitel@igd.fhg.de (Mathias Seitel) Date: Sat, 19 Jul 2003 10:37:12 +0200 Subject: [Insight-users] RequestedRegion vs RegionOfInterestImageFilter Message-ID: <3F190338.9060805@igd.fhg.de> Hello all, I'm currently looking for a way to force any image filter not to use the whole of it's input image, but only a user-defined portion of it. So far I understood that the RequestedRegion of an image could be used or this purpose but I just found that this approach doesn't work in all cases, e.g. the ConnectedThresholdImageFilter automatically sets the RequestedRegion to its LargestPossibleRegion. Am I right? What I now have in mind is to interpose an ExtractImageFilter or an RegionOfInterestImageFilter between the concerned image and the filter. One obvious drawback here is the additional memory consumption. Is it possible to preserve any specified RequestedRegion, or is there some other way to address the above problem? Btw. the reason why I want to implement this is to have a simple way to limit a segmentation algorithm, e.g. region growing, to a strict area. Thanks, Mathias From c.p.botha@ewi.tudelft.nl Sun Jul 20 22:42:47 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Sun, 20 Jul 2003 23:42:47 +0200 Subject: [Insight-users] [PATCH] Getting itk::exceptions through to Python Message-ID: <20030720214247.GB2245@dutidad.twi.tudelft.nl> --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Dear lists, As I've mentioned previously, ITK error handling is done by throwing exceptions and this is causing trouble in the CableSwig wrappings. At the moment, the CableSwig wrapping code does not catch these exceptions, meaning that when the wrapped ITK code throws an exception, the whole calling process is terminated. For example: cpbotha@dutidad:/tmp$ python cannyEdgeDetectionImageFilter.py Aborted We have no clue what went wrong or where it went wrong. In a larger Python application, this is quite debilitating. Due to this, I've made some changes to the CableSwig.cxx wrapping code so that itk exceptions are handled and the exceptions are propagated through to Python. Note the difference: cpbotha@crabtree:/tmp$ python cannyEdgeDetectionImageFilter.py Traceback (most recent call last): File "cannyEdgeDetectionImageFilter.py", line 16, in ? writer.Update() File "/data1/home/cpbotha/build/Insight/bin/itkImageFileWriter.py", line 166, in Update def Update(*args): return apply(_itkImageFileWriter.itkImageFileWriterUS2_Pointer_Update,args) RuntimeError: ITK Exception at /data1/home/cpbotha/build/Insight/Code/IO/itkImageFileReader.txx:101: Could not create IO object for file c:/Hoffman/InsightNew/Testing/Data/Input/cthead1.png Now we finally see that it was actually just a "file not found" error. Of course, these exceptions can easily be caught and handled in Python. I would be very glad if someone could check and hopefully apply my patch. As I don't know Cable and CableSwig that well, a sanity check would be much appreciated. The patch is attached. Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="CableSwig-PythonExceptions-v1.diff" Index: Executables/CableSwig.cxx =================================================================== RCS file: /cvsroot/CableSwig/CableSwig/Executables/CableSwig.cxx,v retrieving revision 1.6 diff -u -r1.6 CableSwig.cxx --- Executables/CableSwig.cxx 28 May 2003 21:55:34 -0000 1.6 +++ Executables/CableSwig.cxx 20 Jul 2003 19:51:22 -0000 @@ -314,6 +314,42 @@ { Setattr(m, "access", access); } + + // The following clause will instruct SWIG to let ITK C++ exceptions + // propagate through as Python exceptions. Suggestions and improvements + // are welcome. -- Charl P. Botha + if (m_WrapLanguage == "python") + { + if (strncmp(mth->GetQualifiedName().c_str(), "itk::", 5) == 0) + { + // attaching this node as "throws" attribute to the method object + // will cause the swig emit code to add an exception handler + // the node only has to have a type-attribute with the type of the + // object that will be thrown + Node *catchNode = NewHash(); + Setattr(catchNode, "type", "itk::ExceptionObject"); + Setattr(m, "throws", catchNode); + + // this has to be added to the swig typemap... when hitting a + // method with a "throws" attribute, it will look up the "type" + // attribute of that "throws" attribute, once again look up the + // "throws" of that result, and use the "code" attribute of the + // final result as + // handler (catch) code - we should only have to do this registration + // once, but for now it's much clearer here and it does no real harm + // being called multiple times + char *code = + "char emsg[512];\n" + "snprintf(emsg, 511, \"ITK Exception at %s:%d: %s\", " + "_e.GetFile(), _e.GetLine(), _e.GetDescription());\n" + "PyErr_SetString(PyExc_RuntimeError, emsg); SWIG_fail;\n"; + Swig_typemap_register("throws", catchNode, code, + NULL, NULL); + + // take care of the memory + Delete(catchNode); + } + } ParmList* parms = 0; Parm* pp = 0; --Kj7319i9nmIyA2yE-- From mathias.seitel@igd.fhg.de Mon Jul 21 09:18:16 2003 From: mathias.seitel@igd.fhg.de (Mathias Seitel) Date: Mon, 21 Jul 2003 10:18:16 +0200 Subject: [Insight-users] FloodFilledFunctionConditionalConstIterator Message-ID: <3F1BA1C8.2020202@igd.fhg.de> Hello all, I came across another bug in FloodFilledFunctionConditionalConstIterator. When checking if the new index in DoFloodStep() is valid, not only the size but also the index of the image should be taken into account, something like const long int* m_ImageIndex; InitializeIterator() { //... m_ImageIndex = m_Image->GetLargestPossibleRegion().GetIndex().m_Index; //... } DoFloodStep() { //... if ((tempIndex.m_Index[k] < static_cast(m_ImageIndex[k])) || (tempIndex.m_Index[k] >= static_cast(m_ImageIndex[k] + m_ImageSize[k]))) { //... } //... } Regards, Mathias From millerjv@crd.ge.com Mon Jul 21 14:23:36 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Mon, 21 Jul 2003 09:23:36 -0400 Subject: [Insight-users] RequestedRegion vs RegionOfInterestImageFilte r Message-ID: Mathias, You are correct that a filter may override the setting of RequestedRegion. A filter is allowed to do this if it cannot guarentee that it can produce the correct result by processing just the original RequestedRegion. For instance, the connectivity based filters cannot guarentee they will get the correct segmentation if they are restricted to a particular requested region. The segmentation could conceivable leave the RequestedRegion and loop back in. What you are trying to do, however, is reasonable since you are allowing the user or application to apply soem higher level knowledge of how big the object of interest is. So in this case, an ExtractImageFilter or RegionOfInterestImageFilter can be used to pull out just the piece of the image you want to operate on. In either case, the memory will have to be copied. Jim > -----Original Message----- > From: Mathias Seitel [mailto:mathias.seitel@igd.fhg.de] > Sent: Saturday, July 19, 2003 4:37 AM > To: ITK Mailing List > Subject: [Insight-users] RequestedRegion vs > RegionOfInterestImageFilter > > > Hello all, > > I'm currently looking for a way to force any image filter not > to use the > whole of it's input image, but only a user-defined portion of > it. So far > I understood that the RequestedRegion of an image could be > used or this > purpose but I just found that this approach doesn't work in > all cases, > e.g. the ConnectedThresholdImageFilter automatically sets the > RequestedRegion to its LargestPossibleRegion. Am I right? > > What I now have in mind is to interpose an ExtractImageFilter or an > RegionOfInterestImageFilter between the concerned image and > the filter. > One obvious drawback here is the additional memory consumption. Is it > possible to preserve any specified RequestedRegion, or is there some > other way to address the above problem? Btw. the reason why I want to > implement this is to have a simple way to limit a segmentation > algorithm, e.g. region growing, to a strict area. > > Thanks, > Mathias > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From brad.king@kitware.com Mon Jul 21 14:50:48 2003 From: brad.king@kitware.com (Brad King) Date: Mon, 21 Jul 2003 09:50:48 -0400 (EDT) Subject: [Insight-users] [PATCH] Getting itk::exceptions through to Python In-Reply-To: <20030720214247.GB2245@dutidad.twi.tudelft.nl> Message-ID: Charl, > I would be very glad if someone could check and hopefully apply my > patch. As I don't know Cable and CableSwig that well, a sanity check > would be much appreciated. The patch is attached. CableSwig has no knowledge of ITK, and is therefore not the proper place to put the change. However, until it matures more, it is hard to specify the exceptions in a configuration file. I've added your change for now. If throw specifications are ever added to ITK, then it can be made automatic anyway. Thanks, -Brad From c.p.botha@ewi.tudelft.nl Mon Jul 21 15:26:52 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: 21 Jul 2003 16:26:52 +0200 Subject: [Insight-users] [PATCH] Getting itk::exceptions through to Python In-Reply-To: References: Message-ID: <1058797612.1009.3.camel@dutidad> On Mon, 2003-07-21 at 15:50, Brad King wrote: > > I would be very glad if someone could check and hopefully apply my > > patch. As I don't know Cable and CableSwig that well, a sanity check > > would be much appreciated. The patch is attached. > > CableSwig has no knowledge of ITK, and is therefore not the proper place > to put the change. However, until it matures more, it is hard to specify > the exceptions in a configuration file. I've added your change for now. > If throw specifications are ever added to ITK, then it can be made > automatic anyway. Thank you very much Brad! Now onto the next point... working observers for the Python wrapping (in a separate mail). -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From brad.king@kitware.com Mon Jul 21 15:31:12 2003 From: brad.king@kitware.com (Brad King) Date: Mon, 21 Jul 2003 10:31:12 -0400 (EDT) Subject: [Insight-users] ccmake on cvs version: "VXL configure script failed" In-Reply-To: Message-ID: > I'm trying to run ccmake for ITK on REd Hat Linux, but can't get rid of > the message "VXL configure script failed". I got a cvs checkout > yesterday. > > I'm using: > gcc 3.2.2 > cmake 1.6 What is the exact command line you're using to run ccmake on ITK? -Brad From c.p.botha@ewi.tudelft.nl Mon Jul 21 15:34:32 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: 21 Jul 2003 16:34:32 +0200 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code Message-ID: <1058798072.1042.12.camel@dutidad> Dear list, Currently, there is no way to get observers working in CableSwig wrapped Python. The problem on the Tcl side was solved by creating a itk::TclCommand itk::Command derivative that can take a Tcl string that will be interpreted when the Observer is called. I'm doing the same for Python (itk::PyCommand) but I would like to do it somewhat more flexibly by passing a callable Python object instead of a string. However, the CableSwig wrapping is mangling my PyObject* parameter. In traditional Swig, something like this would be appropriate: %typemap(python, in) PyObject * { $target = $source; } This tells swig to pass the PyObjects through unaltered, which would enable me to do things like the following: def handler(object, eventString): print "Hello world" a = itk.itkPyCommand_Pointer() a.SetPythonCallable(handler) and then use this Command in an AddObserver() call. I'm guessing that a call to Swig_typemap_register() in CableSwig.cxx should do the trick, although I would appreciate any guidance in this, as I have no idea yet what this call should register. Comments? Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From luis.ibanez@kitware.com Mon Jul 21 15:48:24 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 21 Jul 2003 10:48:24 -0400 Subject: [Insight-users] FloodFilledFunctionConditionalConstIterator References: <3F1BA1C8.2020202@igd.fhg.de> Message-ID: <3F1BFD38.1090909@kitware.com> Hi Mathias, Thanks for pointing this out. You are right, the starting index should be taken into account. The code was modified in order to use a m_ImageRegion instead of the Index and Size independently. The ImageRegion already provides a method "IsInside()" which returns whether an index is inside the region or not. InitializeIterator() { ... m_ImageRegion = image->GetBufferedRegion(); ... } DoFloodStep() { ... if( !m_ImageRegion.IsInside( tempIndex ) ) ... } This changes have been commited to the repository. Please let us know if you find further problems, Thanks Luis -------------------------- Mathias Seitel wrote: > Hello all, > > I came across another bug in > FloodFilledFunctionConditionalConstIterator. When checking if the new > index in DoFloodStep() is valid, not only the size but also the index of > the image should be taken into account, something like > > const long int* m_ImageIndex; > > InitializeIterator() > { > //... > m_ImageIndex = m_Image->GetLargestPossibleRegion().GetIndex().m_Index; > //... > } > > DoFloodStep() > { > //... > if ((tempIndex.m_Index[k] < static_cast(m_ImageIndex[k])) || > (tempIndex.m_Index[k] >= static_cast(m_ImageIndex[k] + > m_ImageSize[k]))) > { > //... > } > //... > } > > Regards, > Mathias > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Mon Jul 21 16:20:08 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 21 Jul 2003 11:20:08 -0400 Subject: [Insight-users] registration non-convergence? References: <5.0.0.25.2.20030718145505.0345a008@mail.vexcel.com> Message-ID: <3F1C04A8.3050502@kitware.com> Hi Carolyn, When the optimizer is set to MinimizeOn() it should walk towards lower values of the metric. Occassionaly it may happens that the optimizer walks uphill if the step length is too large and the function to optimize have tortuose passages, but this should only happen in an isolated step, and the next step should continue going downhill. However in your case, the optmizer is walking in a straight line and the metric values are still going up-hill after iteration 78... Something is definetly going wrong there.... Could you please send me the entire file with the iterations output (not only the iterations that you posted). Plotting this traces (as we do in the Software Guide) sometimes help to figure out the source of miss-behavior. If you could also post the parameters of the optimizer that will be great. (In particular the maximum and mimimum step lengths) Thanks Luis ------------------------ Carolyn Johnston wrote: > Hi Luis et al, > > I actually do have another question (I guess this is just my day). > > I am performing a standard registration with the mean squares metric and > the reg step gradient descent optimizer. I have set my fixed image > region to be 1000 by 1000 for speed (on a 3600 by 3600 fixed image). My > moving image is just the same as the fixed image with a translation I've > added. > > I begin with initial parameters 0,0. > > 0 = 2185.867696: [0.000052, -0.000019] > > 1 = 2123.551007: [0.000104, -0.000039] > > 2 = 2072.931500: [0.000156, -0.000058] > > 3 = 2033.078306: [0.000209, -0.000077] > > 4 = 2003.966331: [0.000261, -0.000097] > > ... ... > > > Now right about here, I pass through a metric minimum and keep on going > for some reason... > > > 76 = 467.887291: [0.003999, -0.001529] > > 77 = 467.045557: [0.004051, -0.001549] > > 78 = 466.963944: [0.004103, -0.001569] > > 79 = 467.642714: [0.004154, -0.001589] > > 80 = 469.093127: [0.004206, -0.001609] > > ... ... > > > and I end up here, with a metric value significantly higher than the > lowest one I achieved during the registration. Any idea what might be > causing this? I thought the registration would try to converge around > the minimum by reducing the stepsize. > > 95 = 502.706704: [0.004986, -0.001905] > > 96 = 508.162350: [0.005038, -0.001925] > > 97 = 512.621524: [0.005090, -0.001944] > > 98 = 517.175693: [0.005142, -0.001964] > > 99 = 520.728025: [0.005194, -0.001984] > > > *** Report for registration of dem 1 *** > Translation parameter along X: 0.005194 > Translation parameter along Y: -0.001984 > Iterations to reach optimal value of metric: 100 > Optimal value of metric: 520.728025 > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From mathias.seitel@igd.fhg.de Mon Jul 21 16:29:49 2003 From: mathias.seitel@igd.fhg.de (Mathias Seitel) Date: Mon, 21 Jul 2003 17:29:49 +0200 Subject: [Insight-users] FloodFilledFunctionConditionalConstIterator References: <3F1BA1C8.2020202@igd.fhg.de> <3F1BFD38.1090909@kitware.com> Message-ID: <3F1C06ED.2070101@igd.fhg.de> Hi Luis, I've got another question related to my previous, about images with a region index != 0. Some filters which require the specification of seed points or alike, e.g. ConnectedThresholdImageFilter, take into account the region index when dealing with the seed points, while others, e.g. FastMarchingImageFilter, do not. For example, assume an image with index (0, 0, 8) and size (256, 256, 5). A seed point at (100, 100, 10) specified for a ConnectedThresholdImageFilter lies within the correct range. The same seed point used as a trial point for a FastMarchingImageFilter, however, does not, and is discarded by the filter. (100, 100, 3) has to be specified here to address the desired pixel. This makes sense since FastMarchingImageFilter only provides a SetOutputSize() method, but no SetOutputIndex() method. It would seem reasonable to me to also use an index for FastMarchingImageFilter (and possibly others), for making things more consistent. Another drawback of the output of FastMarchingImageFilter always having an index of 0 is that the index has to be set manually, if the output is to be used together with an image which has an index != 0. I hope my reasoning makes sense :-) Mathias Luis Ibanez wrote: > > Hi Mathias, > > Thanks for pointing this out. > > You are right, the starting index should be taken into account. > > The code was modified in order to use a m_ImageRegion instead > of the Index and Size independently. The ImageRegion already > provides a method "IsInside()" which returns whether an index > is inside the region or not. > > InitializeIterator() > { > ... > m_ImageRegion = image->GetBufferedRegion(); > ... > } > > > DoFloodStep() > { > ... > if( !m_ImageRegion.IsInside( tempIndex ) ) > ... > } > > > This changes have been commited to the repository. > > > Please let us know if you find further problems, > > > Thanks > > > Luis > > > > -------------------------- > Mathias Seitel wrote: > >> Hello all, >> >> I came across another bug in >> FloodFilledFunctionConditionalConstIterator. When checking if the new >> index in DoFloodStep() is valid, not only the size but also the index >> of the image should be taken into account, something like >> >> const long int* m_ImageIndex; >> >> InitializeIterator() >> { >> //... >> m_ImageIndex = m_Image->GetLargestPossibleRegion().GetIndex().m_Index; >> //... >> } >> >> DoFloodStep() >> { >> //... >> if ((tempIndex.m_Index[k] < static_cast(m_ImageIndex[k])) || >> (tempIndex.m_Index[k] >= static_cast(m_ImageIndex[k] + >> m_ImageSize[k]))) >> { >> //... >> } >> //... >> } >> >> Regards, >> Mathias >> >> >> _______________________________________________ >> Insight-users mailing list >> Insight-users@itk.org >> http://www.itk.org/mailman/listinfo/insight-users >> > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From Carolyn.Johnston@vexcel.com Mon Jul 21 17:37:33 2003 From: Carolyn.Johnston@vexcel.com (Carolyn Johnston) Date: Mon, 21 Jul 2003 10:37:33 -0600 Subject: [Insight-users] Re: registration non-convergence Message-ID: <5.0.0.25.2.20030721103231.00a56160@mail.vexcel.com> Hi Luis and everyone, I'm appending the entire output from the run I posted snippets of on Friday. Here are the parameters I used: maxSteplength: .0000556 minStepLength: .000001 The pixel spacing is: .000278 physical units so you can see I drove the initial steplength way down to try to stabilize the registration's behavior. It may well be that there is something I am misunderstanding about the steplengths. Oh... finally, the optimizer is regular step gradient descent, the metric is meansquares. The stepsize doesn't seem to be dropping near the metric minimum as it ought to. :) Carolyn Performing registration 0 = 2185.867696: [0.000052, -0.000019] 1 = 2123.551007: [0.000104, -0.000039] 2 = 2072.931500: [0.000156, -0.000058] 3 = 2033.078306: [0.000209, -0.000077] 4 = 2003.966331: [0.000261, -0.000097] 5 = 1985.579199: [0.000313, -0.000116] 6 = 1940.038059: [0.000365, -0.000135] 7 = 1886.751889: [0.000417, -0.000155] 8 = 1844.197187: [0.000469, -0.000174] 9 = 1812.368526: [0.000521, -0.000194] 10 = 1791.268519: [0.000573, -0.000213] 11 = 1761.702440: [0.000625, -0.000232] 12 = 1705.768898: [0.000677, -0.000252] 13 = 1660.557738: [0.000730, -0.000271] 14 = 1626.082405: [0.000782, -0.000291] 15 = 1600.292140: [0.000834, -0.000310] 16 = 1584.974016: [0.000886, -0.000330] 17 = 1524.506984: [0.000938, -0.000350] 18 = 1474.785515: [0.000990, -0.000369] 19 = 1435.782025: [0.001042, -0.000389] 20 = 1407.476743: [0.001094, -0.000408] 21 = 1389.858740: [0.001146, -0.000428] 22 = 1345.473747: [0.001198, -0.000448] 23 = 1293.201855: [0.001250, -0.000467] 24 = 1251.620955: [0.001302, -0.000487] 25 = 1220.730861: [0.001354, -0.000507] 26 = 1200.539247: [0.001406, -0.000527] 27 = 1172.836523: [0.001458, -0.000546] 28 = 1118.024880: [0.001510, -0.000566] 29 = 1072.199823: [0.001562, -0.000586] 30 = 1036.818545: [0.001614, -0.000606] 31 = 1012.107587: [0.001665, -0.000626] 32 = 998.041786: [0.001717, -0.000646] 33 = 940.142559: [0.001769, -0.000666] 34 = 891.596111: [0.001821, -0.000686] 35 = 853.707596: [0.001873, -0.000706] 36 = 826.461752: [0.001925, -0.000726] 37 = 809.853284: [0.001977, -0.000746] 38 = 769.417401: [0.002028, -0.000767] 39 = 718.475480: [0.002080, -0.000787] 40 = 678.167964: [0.002132, -0.000807] 41 = 648.498841: [0.002184, -0.000827] 42 = 629.480009: [0.002235, -0.000848] 43 = 618.212452: [0.002287, -0.000868] 44 = 608.816764: [0.002339, -0.000889] 45 = 600.163617: [0.002391, -0.000909] 46 = 592.226347: [0.002442, -0.000929] 47 = 584.986726: [0.002494, -0.000950] 48 = 578.437412: [0.002546, -0.000970] 49 = 570.860870: [0.002598, -0.000990] 50 = 563.768378: [0.002649, -0.001010] 51 = 557.379971: [0.002701, -0.001030] 52 = 551.697664: [0.002753, -0.001051] 53 = 546.735104: [0.002805, -0.001071] 54 = 541.458457: [0.002857, -0.001091] 55 = 535.937062: [0.002909, -0.001111] 56 = 531.134793: [0.002960, -0.001131] 57 = 524.740108: [0.003012, -0.001151] 58 = 519.468721: [0.003064, -0.001171] 59 = 514.583317: [0.003116, -0.001191] 60 = 508.796624: [0.003168, -0.001211] 61 = 503.762458: [0.003220, -0.001231] 62 = 499.465205: [0.003272, -0.001251] 63 = 495.897303: [0.003324, -0.001271] 64 = 493.062647: [0.003375, -0.001291] 65 = 489.398615: [0.003427, -0.001311] 66 = 486.106820: [0.003479, -0.001331] 67 = 483.553898: [0.003531, -0.001351] 68 = 481.752750: [0.003583, -0.001371] 69 = 480.726231: [0.003635, -0.001390] 70 = 479.064837: [0.003687, -0.001410] 71 = 475.634403: [0.003739, -0.001430] 72 = 473.007571: [0.003791, -0.001450] 73 = 471.157552: [0.003843, -0.001470] 74 = 470.065493: [0.003895, -0.001490] 75 = 469.494684: [0.003947, -0.001510] 76 = 467.887291: [0.003999, -0.001529] 77 = 467.045557: [0.004051, -0.001549] 78 = 466.963944: [0.004103, -0.001569] 79 = 467.642714: [0.004154, -0.001589] 80 = 469.093127: [0.004206, -0.001609] 81 = 469.692840: [0.004258, -0.001628] 82 = 470.546900: [0.004310, -0.001648] 83 = 472.165704: [0.004362, -0.001668] 84 = 474.223090: [0.004414, -0.001688] 85 = 475.723018: [0.004466, -0.001707] 86 = 477.035058: [0.004518, -0.001727] 87 = 477.830104: [0.004570, -0.001747] 88 = 479.414878: [0.004622, -0.001767] 89 = 481.771161: [0.004674, -0.001786] 90 = 484.888701: [0.004726, -0.001806] 91 = 488.597884: [0.004778, -0.001826] 92 = 490.988388: [0.004830, -0.001846] 93 = 494.134218: [0.004882, -0.001865] 94 = 498.037073: [0.004934, -0.001885] 95 = 502.706704: [0.004986, -0.001905] 96 = 508.162350: [0.005038, -0.001925] 97 = 512.621524: [0.005090, -0.001944] 98 = 517.175693: [0.005142, -0.001964] 99 = 520.728025: [0.005194, -0.001984] From michakuhn@gmx.ch Mon Jul 21 17:50:57 2003 From: michakuhn@gmx.ch (Michael Kuhn) Date: Mon, 21 Jul 2003 10:50:57 -0600 Subject: [Insight-users] ITK-VTK pipeline connection Message-ID: <3F1C19F1.8000801@gmx.ch> This is a multi-part message in MIME format. --------------000102090503050207000202 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, I have a problem concerning the size/extent when I try to connect the pipeline between itk and vtk. I tried to connect the pipelines using the itk::ImageToVTKImageFilter (found in applications/auxilary/vtk) (method 1, refer to the comments in the attached code) as well as by explicitly instantiating a itk::VTKImageExport and a vtkImageImport (method 2). With both methods, the extent of the vtk data is -1, -1, -1 (using int *extent = vtkImporter->GetOutput()->GetWholeExtent(); (I've tried GetExtent() as well)) (method 1) and the attempt to afterwards visualize the data in vtk fails. However, when I explicitely set the extent to the size of the itk data (method 2), the visualization works fine. Is it necessary that I explicitely set this extent, or is there a way to have it updated automatically? Thanks, Michael --------------000102090503050207000202 Content-Type: text/plain; name="DebugProject.cxx" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="DebugProject.cxx" #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkMetaImageIO.h" #include "vtkAIMReader.h" #include "vtkPNGReader.h" #include "vtkPointData.h" #include "itkVTKImageToImageFilter.h" #include "itkImageToVTKImageFilter.h" #include "vtkPipelineConnectorITK2VTK.h" #include "vtkImageConstantPad.h" #include "vtkMarchingCubes.h" #include "vtkPolyDataMapper.h" #include "vtkActor.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderWindow.h" #include "vtkProperty.h" #include "vtkRenderer.h" #include int main(int argc, char** argv) { typedef itk::MetaImageIO MetaReaderType; MetaReaderType ::Pointer metaReader = MetaReaderType::New(); typedef unsigned short PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; typedef itk::ImageFileWriter WriterType; ReaderType::Pointer reader = ReaderType::New(); reader->SetImageIO( metaReader ); reader->SetFileName("d:\\regProjectData\\MHAs\\brainweb1.mha"); try { reader->Update(); } catch (itk::ExceptionObject e) { cerr << e << endl; } // ##### method 1 to connect the pipelines ##### typedef itk::VTKImageExport ImageExportType; ImageExportType::Pointer itkExporter = ImageExportType::New(); itkExporter->SetInput(reader->GetOutput()); vtkImageImport* vtkImporter = vtkImageImport::New(); vtkPipelineConnectorITK2VTK:: ConnectPipelines(itkExporter, vtkImporter); /* // ##### method 2 to connect the pipelines ##### typedef itk::ImageToVTKImageFilter ITK2VTKType; ITK2VTKType::Pointer vtkImporter = ITK2VTKType::New(); vtkImporter->SetInput(reader->GetOutput()); */ vtkImageConstantPad *pad = vtkImageConstantPad::New(); pad->SetInput(vtkImporter->GetOutput()); /* // ##### method 1 to get the extent ##### int *extent = vtkImporter->GetOutput()->GetWholeExtent(); */ // ##### method 2 to get the extent ##### ImageType::SizeType size = reader->GetOutput()->GetBufferedRegion().GetSize(); int *extent = new int[6]; extent[0] = 0; extent[1] = size[0]; extent[2] = 0; extent[3] = size[1]; extent[4] = 0; extent[5] = size[2]; pad->SetOutputWholeExtent(extent[0]-1, extent[1] + 1 , extent[2]-1, extent[3]+1, extent[4]-1, extent[5] +1 ); pad->SetConstant(0); vtkMarchingCubes *mc = vtkMarchingCubes::New(); mc->SetInput(pad->GetOutput()); mc->SetValue(0,128); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); mapper->SetInput(mc->GetOutput()); mapper->ScalarVisibilityOff(); vtkActor *actor= vtkActor::New(); actor->SetMapper(mapper); actor->GetProperty()->SetColor(0,1,0); vtkRenderer *aRenderer = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(aRenderer); renWin->SetSize(200,200); renWin->SetWindowName("MyWindow"); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); aRenderer->SetBackground(0.0, 0.0, 1); aRenderer->AddActor(actor); aRenderer->ResetCamera(); renWin->Render(); iren->Start(); return 0; } --------------000102090503050207000202-- From luis.ibanez@kitware.com Mon Jul 21 20:18:28 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 21 Jul 2003 15:18:28 -0400 Subject: [Insight-users] Re: registration non-convergence References: <5.0.0.25.2.20030721103231.00a56160@mail.vexcel.com> Message-ID: <3F1C3C84.5050007@kitware.com> Hi Carolyn, Thanks for posting the full trace of the registration. After plotting your data with GNUPlot is became apparent that your steplength is much lower than the image resolution. Unless I'm missing something, your max step length is 1/5 of the pixel spacing, while the min step length is 1/278 of the pixel spacing. In general you would like to rather have something like max step length = 10 X pixel spacing min step lenght = 1/2 X pixel spacing The max step length is the step that the optimizer will use for starting the optimization. Usually you want to move fast, so a relatively long step is desirable. Note that this is also limited by the expected translation you are trying to resolve. You don't want the initial step to be comparable to the miss-registration since you may easily go into other secondary minima in the metric cost function. For example, if you estimate that the miss registration is on the order of 100xPixelSpacing (e.g. 100 pixels), then you may want to start with a max step length of 20 x PixelSpacing. Note that any sub-pixel precision registration is strongly dependent of the quality of the interpolator you are using. For linear interpolation it may not be worth to go below 1/2 pixel size, specially is the transform is a pure translation. It is true though that the optimizer should work at any pixel step, my guess is that something is failing in the computation of the metric derivatives at the sub-pixel levels. A primary suspect is that the derivative computation is not interpolating at the same degree of detail as the metric value. The derivative is not computed here as simply the finite difference between two metric values, it is computed as the product of the image gradient and the transform jacobian. The metric derivative may be flat at subpixel levels, while the metric value has actual intermediate values. Since the gradient descent algorithm is following the direction of the metric derivative, the optimizer keep going along the constant direction of the derivative, ignoring the fact that local minima of the metric value have been already found. You could easily verify this hypotesis by adding print outs in the metric Derivative computation. In any case, the registration method is not intended to be used at the small sub-pixel range. --- Could you please try your registration using a longer step length ? I would suggest, the following: max step length = 10 X .000278 = 0.00278 min step length = 1/2 X .000278 = 0.000139 Please let us know what you find, Thanks Luis ---------------------------- Carolyn Johnston wrote: > Hi Luis and everyone, > > I'm appending the entire output from the run I posted snippets of on > Friday. > > Here are the parameters I used: > > maxSteplength: .0000556 > minStepLength: .000001 > > The pixel spacing is: .000278 physical units so you can see I drove the > initial steplength way > down to try to stabilize the registration's behavior. > It may well be that there is something I am misunderstanding about the > steplengths. > > Oh... finally, the optimizer is regular step gradient descent, the > metric is meansquares. > The stepsize doesn't seem to be dropping near the metric minimum as it > ought to. > > :) Carolyn > From itk@stmoser.ch Mon Jul 21 20:41:50 2003 From: itk@stmoser.ch (itk@stmoser.ch) Date: Mon, 21 Jul 2003 21:41:50 +0200 (MEST) Subject: [Insight-users] ITK-VTK pipeline connection Message-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --------------000102090503050207000202 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; FORMAT=flowed Hi I have done some debugging on the code that Michael posted this morning. I found out that the extent of the vtkImageData is not correct at the time when it is accessed. If an update() is done on the image data itself in: // ##### method 1 to get the extent ##### ---> vtkImporter->GetOutput()->Update(); int *extent = vtkImporter->GetOutput()->GetWholeExtent(); then the extent is updated and correct. Is this a legitimate workaround? I thought that Update() methods should only be invoked on filters rather than on the image data itself. The reason to access the extent data is that in order to run a marching cube on the data in VTK, the image is extended by one pixel in every dimension using a vtkConstantPad filter, which requires the extent to explicitely be set, so interference with the dataflow is inevitable. Stephan --------------000102090503050207000202 Content-Type: TEXT/PLAIN; NAME="DebugProject.cxx" Content-Description: Content-Disposition: INLINE; FILENAME="DebugProject.cxx" #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkMetaImageIO.h" #include "vtkAIMReader.h" #include "vtkPNGReader.h" #include "vtkPointData.h" #include "itkVTKImageToImageFilter.h" #include "itkImageToVTKImageFilter.h" #include "vtkPipelineConnectorITK2VTK.h" #include "vtkImageConstantPad.h" #include "vtkMarchingCubes.h" #include "vtkPolyDataMapper.h" #include "vtkActor.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderWindow.h" #include "vtkProperty.h" #include "vtkRenderer.h" #include int main(int argc, char** argv) { typedef itk::MetaImageIO MetaReaderType; MetaReaderType ::Pointer metaReader = MetaReaderType::New(); typedef unsigned short PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; typedef itk::ImageFileWriter WriterType; ReaderType::Pointer reader = ReaderType::New(); reader->SetImageIO( metaReader ); reader->SetFileName("d:\\regProjectData\\MHAs\\brainweb1.mha"); try { reader->Update(); } catch (itk::ExceptionObject e) { cerr << e << endl; } // ##### method 1 to connect the pipelines ##### typedef itk::VTKImageExport ImageExportType; ImageExportType::Pointer itkExporter = ImageExportType::New(); itkExporter->SetInput(reader->GetOutput()); vtkImageImport* vtkImporter = vtkImageImport::New(); vtkPipelineConnectorITK2VTK:: ConnectPipelines(itkExporter, vtkImporter); /* // ##### method 2 to connect the pipelines ##### typedef itk::ImageToVTKImageFilter ITK2VTKType; ITK2VTKType::Pointer vtkImporter = ITK2VTKType::New(); vtkImporter->SetInput(reader->GetOutput()); */ vtkImageConstantPad *pad = vtkImageConstantPad::New(); pad->SetInput(vtkImporter->GetOutput()); /* // ##### method 1 to get the extent ##### int *extent = vtkImporter->GetOutput()->GetWholeExtent(); */ // ##### method 2 to get the extent ##### ImageType::SizeType size = reader->GetOutput()->GetBufferedRegion().GetSize(); int *extent = new int[6]; extent[0] = 0; extent[1] = size[0]; extent[2] = 0; extent[3] = size[1]; extent[4] = 0; extent[5] = size[2]; pad->SetOutputWholeExtent(extent[0]-1, extent[1] + 1 , extent[2]-1, extent[3]+1, extent[4]-1, extent[5] +1 ); pad->SetConstant(0); vtkMarchingCubes *mc = vtkMarchingCubes::New(); mc->SetInput(pad->GetOutput()); mc->SetValue(0,128); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); mapper->SetInput(mc->GetOutput()); mapper->ScalarVisibilityOff(); vtkActor *actor= vtkActor::New(); actor->SetMapper(mapper); actor->GetProperty()->SetColor(0,1,0); vtkRenderer *aRenderer = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(aRenderer); renWin->SetSize(200,200); renWin->SetWindowName("MyWindow"); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); aRenderer->SetBackground(0.0, 0.0, 1); aRenderer->AddActor(actor); aRenderer->ResetCamera(); renWin->Render(); iren->Start(); return 0; } --------------000102090503050207000202-- From luis.ibanez@kitware.com Mon Jul 21 21:23:08 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 21 Jul 2003 16:23:08 -0400 Subject: [Insight-users] ITK-VTK pipeline connection References: Message-ID: <3F1C4BAC.80307@kitware.com> Hi Stephan, The output of an ITK or VTK filter is only valid after the Update() method has been invoked on it. It is normal for the output of vtkImporter to have an invalid extent, since no Update() call has been invoked in this filter so far. The extent on the output of the reader, on the other hand, is valid because an Update() call has been done there. You should be ok by calling vtkImporter->GetImporter()->Update(); instead of vtkImporter->GetOutput()->Update(); Note also the the classes itkImageToVTKImage itkVTKImageToImage are not really filters in themselves. They are simply holders of an ITK and VTK importer and exporter. An artificial Update() call has been added now to these classes in order to make them look more like a filter. The Update() call simply delegates to the internal importer. Thanks for pointing this out. Regards, Luis ----------------------- itk@stmoser.ch wrote: > Hi > > I have done some debugging on the code that Michael posted this morning. > I found out that the extent of the vtkImageData is not correct at the > time when it is accessed. If an update() is done on the image data > itself in: > > // ##### method 1 to get the extent ##### > ---> vtkImporter->GetOutput()->Update(); > int *extent = vtkImporter->GetOutput()->GetWholeExtent(); > > then the extent is updated and correct. > > Is this a legitimate workaround? I thought that Update() methods should > only be invoked on filters rather than on the image data itself. > > The reason to access the extent data is that in order to run a marching > cube on the data in VTK, the image is extended by one pixel in every > dimension using a vtkConstantPad filter, which requires the extent to > explicitely be set, so interference with the dataflow is inevitable. > > Stephan > >------------------------------------------------------------------------ > >#include "itkImage.h" >#include "itkImageFileReader.h" >#include "itkImageFileWriter.h" >#include "itkMetaImageIO.h" > >#include "vtkAIMReader.h" > >#include "vtkPNGReader.h" >#include "vtkPointData.h" > >#include "itkVTKImageToImageFilter.h" >#include "itkImageToVTKImageFilter.h" > >#include "vtkPipelineConnectorITK2VTK.h" >#include "vtkImageConstantPad.h" >#include "vtkMarchingCubes.h" >#include "vtkPolyDataMapper.h" >#include "vtkActor.h" >#include "vtkRenderWindowInteractor.h" >#include "vtkRenderWindow.h" >#include "vtkProperty.h" >#include "vtkRenderer.h" > > >#include > >int main(int argc, char** argv) { > typedef itk::MetaImageIO MetaReaderType; > MetaReaderType ::Pointer metaReader = MetaReaderType::New(); > > typedef unsigned short PixelType; > typedef itk::Image ImageType; > typedef itk::ImageFileReader ReaderType; > typedef itk::ImageFileWriter WriterType; > > ReaderType::Pointer reader = ReaderType::New(); > reader->SetImageIO( metaReader ); > reader->SetFileName("d:\\regProjectData\\MHAs\\brainweb1.mha"); > try { > reader->Update(); > } catch (itk::ExceptionObject e) { > cerr << e << endl; > } > > > // ##### method 1 to connect the pipelines ##### > typedef itk::VTKImageExport ImageExportType; > ImageExportType::Pointer itkExporter = ImageExportType::New(); > itkExporter->SetInput(reader->GetOutput()); > vtkImageImport* vtkImporter = vtkImageImport::New(); > vtkPipelineConnectorITK2VTK:: > ConnectPipelines(itkExporter, vtkImporter); > > > /* > // ##### method 2 to connect the pipelines ##### > typedef itk::ImageToVTKImageFilter ITK2VTKType; > ITK2VTKType::Pointer vtkImporter = ITK2VTKType::New(); > vtkImporter->SetInput(reader->GetOutput()); > */ > > > vtkImageConstantPad *pad = vtkImageConstantPad::New(); > pad->SetInput(vtkImporter->GetOutput()); > > > /* > > // ##### method 1 to get the extent ##### > int *extent = vtkImporter->GetOutput()->GetWholeExtent(); > > */ > > > // ##### method 2 to get the extent ##### > ImageType::SizeType size = > reader->GetOutput()->GetBufferedRegion().GetSize(); > int *extent = new int[6]; > extent[0] = 0; > extent[1] = size[0]; > extent[2] = 0; > extent[3] = size[1]; > extent[4] = 0; > extent[5] = size[2]; > > > > pad->SetOutputWholeExtent(extent[0]-1, extent[1] + 1 , extent[2]-1, > extent[3]+1, extent[4]-1, extent[5] +1 ); > pad->SetConstant(0); > > > vtkMarchingCubes *mc = vtkMarchingCubes::New(); > mc->SetInput(pad->GetOutput()); > mc->SetValue(0,128); > > vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); > mapper->SetInput(mc->GetOutput()); > mapper->ScalarVisibilityOff(); > > vtkActor *actor= vtkActor::New(); > actor->SetMapper(mapper); > actor->GetProperty()->SetColor(0,1,0); > > vtkRenderer *aRenderer = vtkRenderer::New(); > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->AddRenderer(aRenderer); > renWin->SetSize(200,200); > renWin->SetWindowName("MyWindow"); > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > aRenderer->SetBackground(0.0, 0.0, 1); > aRenderer->AddActor(actor); > aRenderer->ResetCamera(); > renWin->Render(); > iren->Start(); > > > return 0; >} > > From c.p.botha@ewi.tudelft.nl Mon Jul 21 22:41:47 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Mon, 21 Jul 2003 23:41:47 +0200 Subject: [Insight-users] [PATCH-SET #2] itkPyCommand - a working observer mechanism for ITK Python Message-ID: <20030721214147.GA29179@dutidad.twi.tudelft.nl> --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Dear list, especially Brad and Bill, I have solved my previous problem of being able to pass a PyObject* unaltered through to wrapped code. The reason that I was trying to change this, is that I wished to create an itk::PyCommand class, analogous to TclCommand for the Tcl wrapping but able to take an arbitrary Python function object. I have now completed this work. My changes consist of: 1. two new files, itkPyCommand.h and itkPyCommand.cxx, that should be added to Insight/Wrapping/CSwig/Common (i.e. where itkTclCommand.* lives), 2. a patch, itkPyObject-integration.diff, that modifies all the necessary meta-sources in that directory (e.g. CMakeLists) so that the PyCommand is built when applicable, 3. another patch to CableSwig that changes the code so that the Swig typemap is adapted to let PyObject* pointers through unaltered and finally 4. an example, cannyEdgeDetectionImageFilter-PyCommand.py, that illustrates the use of the PyCommand (have a look, it's nice and easy!). Please review and apply these changes. I believe that they make the Python ITK bindings even more useful, as without them there is no way to use any kind of observer object from pure Python. Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ --GvXjxJ+pjyke8COw Content-Type: text/x-chdr; charset=us-ascii Content-Disposition: attachment; filename="itkPyCommand.h" /*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile: itkPyCommand.h,v $ Language: C++ Date: $Date: 2003/06/06 15:04:28 $ Version: $Revision: 1.1 $ Copyright (c) 2002 Insight Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef _itkPyCommand_h #define _itkPyCommand_h #include "itkCommand.h" #include namespace itk { /** \Class PyCommand * \brief Command subclass that calls a Python callable object, e.g. * a Python function. * * With this class, arbitrary Python callable objects (e.g. functions) * can be associated with an instance to be used in AddObserver calls. * This is analogous to itk::TclCommand, but then a tad more flexible. ;) * * This class was contributed by Charl P. Botha */ class PyCommand : public Command { public: ///! Standard "Self" typedef. typedef PyCommand Self; ///! Smart pointer typedef support. typedef SmartPointer Pointer; ///! Run-time type information (and related methods). itkTypeMacro(PyCommand,Command); ///! Method for creation through the object factory. itkNewMacro(Self); void SetCommandCallable(PyObject *obj); void Execute(Object *, const EventObject&); void Execute(const Object *, const EventObject&); protected: PyCommand(); ~PyCommand(); void PyExecute(); PyCommand(const Self&); // Not implemented. void operator=(const Self&); // Not implemented. private: PyObject *obj; }; } // namespace itk #endif // _itkPyCommand_h --GvXjxJ+pjyke8COw Content-Type: text/x-c++src; charset=us-ascii Content-Disposition: attachment; filename="itkPyCommand.cxx" /*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile: itkPyCommand.cxx,v $ Language: C++ Date: $Date: 2003/06/06 15:04:28 $ Version: $Revision: 1.1 $ Copyright (c) 2002 Insight Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "itkPyCommand.h" namespace itk { PyCommand::PyCommand() { this->obj = NULL; } PyCommand::~PyCommand() { if (this->obj) { Py_DECREF(this->obj); } this->obj = NULL; } void PyCommand::SetCommandCallable(PyObject *obj) { this->obj = obj; } ///! Execute the callback to the Tcl interpreter. void PyCommand::Execute(Object *, const EventObject&) { this->PyExecute(); } ///! Execute the callback to the Tcl interpreter with a const LightObject void PyCommand::Execute(const Object*, const EventObject&) { this->PyExecute(); } void PyCommand::PyExecute() { PyObject *result; result = PyEval_CallObject(this->obj, (PyObject *)NULL); if (result) { Py_DECREF(result); } else { PyErr_Print(); } } } // namespace itk --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="itkPyCommand-integration.diff" Index: Wrapping/CSwig/Common/CMakeLists.txt =================================================================== RCS file: /cvsroot/Insight/Insight/Wrapping/CSwig/Common/CMakeLists.txt,v retrieving revision 1.15 diff -u -r1.15 CMakeLists.txt --- Wrapping/CSwig/Common/CMakeLists.txt 10 Jul 2003 19:34:59 -0000 1.15 +++ Wrapping/CSwig/Common/CMakeLists.txt 21 Jul 2003 21:24:27 -0000 @@ -41,7 +41,7 @@ SET(INDEX_FILE_CONTENT "${INDEX_FILE_CONTENT}${WrapITK_BINARY_DIR}/Common/${Source}.idx\n") ENDFOREACH(Source) SET(WRAP_TCL_SOURCES ${WRAP_TCL_SOURCES} wrap_ITKCommonTclTcl.cxx wrap_ITKUtilsTcl.cxx) -SET(WRAP_PYTHON_SOURCES ${WRAP_PYTHON_SOURCES} wrap_ITKCommonPythonPython.cxx) +SET(WRAP_PYTHON_SOURCES ${WRAP_PYTHON_SOURCES} wrap_ITKCommonPythonPython.cxx wrap_ITKPyUtilsPython.cxx) CONFIGURE_FILE( ${WrapITK_SOURCE_DIR}/Master.mdx.in @@ -72,9 +72,10 @@ ENDIF(ITK_CSWIG_TCL) -IF(ITK_CSWIG_PYTHON) +IF(ITK_CSWIG_PYTHON) + SET(SWIG_INC ${SWIG_INC} -I${PYTHON_INCLUDE_PATH}) SET_SOURCE_FILES_PROPERTIES(SwigExtras_wrapPython.cxx GENERATED) - ADD_LIBRARY(_ITKCommonPython MODULE ${WRAP_PYTHON_SOURCES} itkStringStream.cxx SwigExtras_wrapPython.cxx ) + ADD_LIBRARY(_ITKCommonPython MODULE ${WRAP_PYTHON_SOURCES} itkStringStream.cxx itkPyCommand.cxx SwigExtras_wrapPython.cxx ) ADD_CUSTOM_COMMAND( COMMENT "run native swig on SwigExtras.i" SOURCE ${ITK_TOP}/Wrapping/CSwig/Common/SwigExtras.i @@ -150,5 +151,7 @@ # python WRAP_PYTHON_SOURCES(${ITK_TOP}/Wrapping/CSwig/Common ${WrapITK_BINARY_DIR}/Common wrap_ITKCommonPython _ITKCommonPython "${MASTER_INDEX_FILES}" "${ALL_IDX_FILES}") + WRAP_PYTHON_SOURCES(${ITK_TOP}/Wrapping/CSwig/Common ${WrapITK_BINARY_DIR}/Common + wrap_ITKPyUtils _ITKCommonPython "${MASTER_INDEX_FILES}" "${ALL_IDX_FILES}") ENDIF(ITK_CSWIG_PYTHON) Index: Wrapping/CSwig/Common/wrap_ITKCommon.cxx =================================================================== RCS file: /cvsroot/Insight/Insight/Wrapping/CSwig/Common/wrap_ITKCommon.cxx,v retrieving revision 1.9 diff -u -r1.9 wrap_ITKCommon.cxx --- Wrapping/CSwig/Common/wrap_ITKCommon.cxx 14 Jul 2003 12:30:49 -0000 1.9 +++ Wrapping/CSwig/Common/wrap_ITKCommon.cxx 21 Jul 2003 21:24:27 -0000 @@ -49,6 +49,9 @@ #ifdef ITK_TCL_WRAP ITK_WRAP_GROUP(ITKUtils), #endif +#ifdef ITK_PYTHON_WRAP + ITK_WRAP_GROUP(ITKPyUtils), +#endif "SwigExtras", ITK_WRAP_GROUP(itkVector), ITK_WRAP_GROUP(itkVersorTransform) Index: Wrapping/CSwig/Common/wrap_ITKCommonPython.cxx =================================================================== RCS file: /cvsroot/Insight/Insight/Wrapping/CSwig/Common/wrap_ITKCommonPython.cxx,v retrieving revision 1.1 diff -u -r1.1 wrap_ITKCommonPython.cxx --- Wrapping/CSwig/Common/wrap_ITKCommonPython.cxx 13 May 2003 20:28:38 -0000 1.1 +++ Wrapping/CSwig/Common/wrap_ITKCommonPython.cxx 21 Jul 2003 21:24:27 -0000 @@ -1,2 +1,3 @@ #define ITK_WRAP_PACKAGE "ITKCommonPython" +#define ITK_PYTHON_WRAP #include "wrap_ITKCommon.cxx" --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="CableSwig-PyObject-GoesThrough.diff" Index: Executables/CableSwig.cxx =================================================================== RCS file: /cvsroot/CableSwig/CableSwig/Executables/CableSwig.cxx,v retrieving revision 1.7 diff -u -r1.7 CableSwig.cxx --- Executables/CableSwig.cxx 21 Jul 2003 13:48:38 -0000 1.7 +++ Executables/CableSwig.cxx 21 Jul 2003 21:26:00 -0000 @@ -1160,6 +1160,29 @@ appendChild(top, header); appendChild(top, init); } + + // This instructs SWIG to leave PyObject * parameters alone + // -- Charl P. Botha + if(pythonWrap) + { + // first we create a node with "type" == "p._object", because that's + // how CableSwig sees a PyObject* + Node* PyObjectNode = NewHash(); + Setattr(PyObjectNode, "type", "p._object"); + // this code will tell Swig to pass PyObject* straight through without + // trying to unpack or convert + char *code = "$1 = $input;"; + // we also need to tell it that it shouldn't ignore the PyObject* param + // if we don't do the kwargs bit (see lang.cxx:typemapDirective()) + Hash* kwargs = NewHash(); + Setattr(kwargs, "name", "numinputs"); + Setattr(kwargs, "value", "1"); + // register it all + Swig_typemap_register("in", PyObjectNode, code, NULL, kwargs); + // get rid of our tracks + Delete(kwargs); + Delete(PyObjectNode); + } // collect up all classes to be included or imported this->DetermineClassesToWrap(cns); --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="cannyEdgeDetectionImageFilter-PyCommand.py" from InsightToolkit import * reader = itkImageFileReaderF2_New() canny = itkCannyEdgeDetectionImageFilterF2F2_New() def progressCallback(): print canny.GetProgress() command = itkPyCommand_New() command.SetCommandCallable(progressCallback) canny.AddObserver(itkProgressEvent(), command.GetPointer()) rescaler = itkRescaleIntensityImageFilterF2US2_New() writer = itkImageFileWriterUS2_New() canny.SetInput(reader.GetOutput()) rescaler.SetInput(canny.GetOutput()) writer.SetInput(rescaler.GetOutput()) rescaler.SetOutputMinimum(0) rescaler.SetOutputMaximum(65535) reader.SetFileName("/home/cpbotha/build/Insight/Testing/Data/Input/cthead1.png") writer.SetFileName("./testout.png") writer.Update() --GvXjxJ+pjyke8COw-- From michakuhn@gmx.ch Tue Jul 22 02:03:07 2003 From: michakuhn@gmx.ch (Michael Kuhn) Date: Mon, 21 Jul 2003 19:03:07 -0600 Subject: [Insight-users] VersorTransform takes 6 parameters? Message-ID: <3F1C8D4B.5050905@gmx.ch> Hi, in the doxygen documentation of the SetParameters() method of the versor transform is written, that the versor transform takes 6 parameters. Obviously, the last 3 parameters represent an offset. Unfortunately I only found the explanation of the first 3 parameters in the itk users guide. Can anyone explain me, what this offset means? Thanks, Michael From rsiitd@yahoo.com Tue Jul 22 11:31:03 2003 From: rsiitd@yahoo.com (ravi sharma) Date: Tue, 22 Jul 2003 03:31:03 -0700 (PDT) Subject: [Insight-users] Registration3D Message-ID: <20030722103103.82595.qmail@web10507.mail.yahoo.com> Well I have a strange problem with my 3D multimodality registration program.My program is able to correct translations but after correcting translations it starts to misregister...the rotations just go haywire(optimizer goes to a minimum value and translations are corrected but at this point the rotations start to occur and optimizer wrongly moves to maximize cost function).It doesnot correct any rotations and even if I take the same image as fixed and moving it starts to rotate the moving image.I am using Euler3D transform and MattesMutualInformation.After running the program with various test cases I think it is a problem with the way I set the centers of the images perhaps. I read the fixed and moving images then Using ChangeInformationImageFilter I do the following FixedCentererType::Pointer fixedcenterer = FixedCentererType::New(); MovingCentererType::Pointer movingcenterer = MovingCentererType::New(); fixedcenterer->CenterImageOn(); movingcenterer->CenterImageOn(); fixedcenterer->SetInput(fixedImageReader->GetOutput()); movingcenterer->SetInput(movingImageReader->GetOutput()); After this I cast the outputs of thes to float and set those images as registration images.After this I use simply the Transform and dont do anything with the centers.What could be the problem. __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From salah@gris.uni-tuebingen.de Tue Jul 22 12:45:56 2003 From: salah@gris.uni-tuebingen.de (salah) Date: Tue, 22 Jul 2003 13:45:56 +0200 Subject: [Insight-users] Saving the currently viewed slice as an image file Message-ID: <4B943954DD289E47958BCEC8C32269BE1FA6D8@wsi-server2.wsi-gris.uni-tuebingen.de> Hello all, I am using a viewer based on the GlSliceView class. It shows a 3D meta image with several overlays of several colors. I need someway to same the currently=20 viewed slice as an image file. In other words, I need to save what I see on the screen in a 2D image file of any known format. Can anybody tell me how I can do that? Many thanks, Zein =20 From bill.hoffman@kitware.com Tue Jul 22 17:10:37 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Tue, 22 Jul 2003 12:10:37 -0400 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <1058798072.1042.12.camel@dutidad> Message-ID: <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> You may want to look at Wrapping/CSwig/Common/SwigExtras.i. This is a traditional swig input file that is used in the build of CSwig wrapped ITK. You may be able to add your typemap code there, or do something similar. -Bill At 10:34 AM 7/21/2003, Charl P. Botha wrote: >Dear list, > >Currently, there is no way to get observers working in CableSwig wrapped >Python. The problem on the Tcl side was solved by creating a >itk::TclCommand itk::Command derivative that can take a Tcl string that >will be interpreted when the Observer is called. > >I'm doing the same for Python (itk::PyCommand) but I would like to do it >somewhat more flexibly by passing a callable Python object instead of a >string. However, the CableSwig wrapping is mangling my PyObject* >parameter. > >In traditional Swig, something like this would be appropriate: >%typemap(python, in) PyObject * { > $target = $source; >} > >This tells swig to pass the PyObjects through unaltered, which would >enable me to do things like the following: >def handler(object, eventString): > print "Hello world" > >a = itk.itkPyCommand_Pointer() >a.SetPythonCallable(handler) >and then use this Command in an AddObserver() call. > >I'm guessing that a call to Swig_typemap_register() in CableSwig.cxx >should do the trick, although I would appreciate any guidance in this, >as I have no idea yet what this call should register. > >Comments? > >Thanks, >Charl > >-- >charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users From c.p.botha@ewi.tudelft.nl Tue Jul 22 17:26:20 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: 22 Jul 2003 18:26:20 +0200 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> References: <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> Message-ID: <1058891179.13793.38.camel@dutidad> Hi Bill, On Tue, 2003-07-22 at 18:10, Bill Hoffman wrote: > You may want to look at Wrapping/CSwig/Common/SwigExtras.i. > This is a traditional swig input file that is used in the > build of CSwig wrapped ITK. You may be able to add your typemap > code there, or do something similar. Please see a later mail by me with the subject "[PATCH-SET #2] itkPyCommand - a working observer mechanism for ITK Python" where all of this has been resolved. I hope that you can integrate itkPyCommand! Embarrassingly enough, I didn't run into SwigExtras.i during my analysis of the wrapping code and solved the problem differently. Maybe my PREVIOUS patch (the one adding the exception handling for itk::ExceptionObject) can be moved here, which would be much cleaner. I'm interested to hear your opinion. Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From c.p.botha@ewi.tudelft.nl Tue Jul 22 18:31:41 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Tue, 22 Jul 2003 19:31:41 +0200 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <1058891179.13793.38.camel@dutidad> References: <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> Message-ID: <20030722173141.GA24722@dutidad.twi.tudelft.nl> On Tue, Jul 22, 2003 at 06:26:20PM +0200, Charl P. Botha wrote: > Embarrassingly enough, I didn't run into SwigExtras.i during my analysis > of the wrapping code and solved the problem differently. Maybe my > PREVIOUS patch (the one adding the exception handling for > itk::ExceptionObject) can be moved here, which would be much cleaner. > I'm interested to hear your opinion. Okay, I just checked. I don't think that my itk::ExceptionObject handler changes or my PyObject* passing-through changes can be integrated there. For the PyObject* thingy I could probably write a helper function in SwigExtras.i, but the way I have it now, with a small typemap modification in CableSwig.cxx, seems to be better UNTIL there's an easier way to configure global typemap changes to CableSwig. Thanks again, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From bill.hoffman@kitware.com Tue Jul 22 18:33:09 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Tue, 22 Jul 2003 13:33:09 -0400 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <1058891179.13793.38.camel@dutidad> References: <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> Message-ID: <5.2.0.9.0.20030722132801.04dedf40@pop.biz.rr.com> We have integrated the PATCH-SET 1 with some minor modifications that allow it to work with the std::exception and not be an ITK specific solution, and also we added the code for tcl wrapping as well. So, we catch all std::exceptions which ITK exceptions are a sub-class of. Could you take a look at re-working PATCH2 with SwigExtras.i in mind? I would like to avoid putting ITK specific code into CableSwig. Thanks. -Bill At 12:26 PM 7/22/2003, Charl P. Botha wrote: >Hi Bill, > >On Tue, 2003-07-22 at 18:10, Bill Hoffman wrote: >> You may want to look at Wrapping/CSwig/Common/SwigExtras.i. >> This is a traditional swig input file that is used in the >> build of CSwig wrapped ITK. You may be able to add your typemap >> code there, or do something similar. > >Please see a later mail by me with the subject "[PATCH-SET #2] >itkPyCommand - a working observer mechanism for ITK Python" where all of >this has been resolved. > >I hope that you can integrate itkPyCommand! > >Embarrassingly enough, I didn't run into SwigExtras.i during my analysis >of the wrapping code and solved the problem differently. Maybe my >PREVIOUS patch (the one adding the exception handling for >itk::ExceptionObject) can be moved here, which would be much cleaner. >I'm interested to hear your opinion. > >Thanks, >Charl > >-- >charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From bill.hoffman@kitware.com Tue Jul 22 18:41:22 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Tue, 22 Jul 2003 13:41:22 -0400 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <20030722173141.GA24722@dutidad.twi.tudelft.nl> References: <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> Message-ID: <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> I would still rather not have ITK specific code in CableSwig.cxx. A small helper function might be a better way to go. Alternatively, if you could figure out how to call the swig parser again we could add .i files to the process as an extra option. Currently in cableSwigMain.cxx it looks like something like this: Node *top = Swig_cparse(cpps); CableSwig cswig; cswig.ParseFile(input_file, top, typemap_lang); It would be good, if Swig_cparse could be called again with a new .i file that could be processed in the context of the swig setup, and the CableSwig parse. Then we could do something like this; cswig -swig_extras swig.i wrap_foo.cxx -Bill At 01:31 PM 7/22/2003, Charl P. Botha wrote: >On Tue, Jul 22, 2003 at 06:26:20PM +0200, Charl P. Botha wrote: >> Embarrassingly enough, I didn't run into SwigExtras.i during my analysis >> of the wrapping code and solved the problem differently. Maybe my >> PREVIOUS patch (the one adding the exception handling for >> itk::ExceptionObject) can be moved here, which would be much cleaner. >> I'm interested to hear your opinion. > >Okay, I just checked. I don't think that my itk::ExceptionObject handler >changes or my PyObject* passing-through changes can be integrated there. > >For the PyObject* thingy I could probably write a helper function in >SwigExtras.i, but the way I have it now, with a small typemap modification >in CableSwig.cxx, seems to be better UNTIL there's an easier way to >configure global typemap changes to CableSwig. > >Thanks again, >Charl > >-- >charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users From c.p.botha@ewi.tudelft.nl Tue Jul 22 18:45:10 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Tue, 22 Jul 2003 19:45:10 +0200 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <5.2.0.9.0.20030722132801.04dedf40@pop.biz.rr.com> References: <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <5.2.0.9.0.20030722132801.04dedf40@pop.biz.rr.com> Message-ID: <20030722174510.GB24722@dutidad.twi.tudelft.nl> Hi Bill, On Tue, Jul 22, 2003 at 01:33:09PM -0400, Bill Hoffman wrote: > We have integrated the PATCH-SET 1 with some minor modifications > that allow it to work with the std::exception and not be an ITK specific > solution, and also we added the code for tcl wrapping as well. So, > we catch all std::exceptions which ITK exceptions are a sub-class of. Great, thank you very much! Unfortunately, we're losing file and line number information however. In the light of this and of other potential advantages, is it not better to modify itkExceptionObject::what() to return a compination of GetFile(), GetLine() and GetDescription() instead of just GetDescription()? This has no drawbacks as far as I can see. If you think this is a good idea, I could whip up a patch for itkExceptionObject. > Could you take a look at re-working PATCH2 with SwigExtras.i in mind? > I would like to avoid putting ITK specific code into CableSwig. As I said in a previous mail, typemap specifications in SwigExtras.i are local to SwigExtras, unless you meant that I should use SwigExtras to create helper functions to unwrap a wrapped PyObject. In addition, passing PyObject * through unaltered is definitely not ITK specific. Swig, in its default configuration, also does this. See this extract from python.swg: /* ------------------------------------------------------------ * PyObject * - Just pass straight through unmodified * ------------------------------------------------------------ */ %typemap(in) PyObject * "$1 = $input;"; %typemap(out) PyObject * "$result = $1;"; Comments? Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From c.p.botha@ewi.tudelft.nl Tue Jul 22 18:49:52 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Tue, 22 Jul 2003 19:49:52 +0200 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> References: <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> Message-ID: <20030722174952.GC24722@dutidad.twi.tudelft.nl> Hi again Bill, On Tue, Jul 22, 2003 at 01:41:22PM -0400, Bill Hoffman wrote: > I would still rather not have ITK specific code in CableSwig.cxx. > A small helper function might be a better way to go. Alternatively, Whoops, we're having email synchronisation problems. This answers my question that's posed in a mail you'll receive shortly before this. :) For now, I'll try and code helper functions in SwigExtras.i to do what I want and back out the changes from CableSwig.cxx. > if you could figure out how to call the swig parser again we could > add .i files to the process as an extra option. > > cswig -swig_extras swig.i wrap_foo.cxx This would probably be the best solution. While I'm still getting my feet wet though, I'm going to opt for the helper function one above, as that seems to be used by TclCommand as well. Okay, my only other outstanding issue is the modification to itkExceptionObject where ::what() could perhaps return a parsed combination of GetFile(), GetLine() and GetDescription() instead of just GetDescription(). Should I make a patch? Thanks again, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From luis.ibanez@kitware.com Tue Jul 22 19:05:55 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 22 Jul 2003 14:05:55 -0400 Subject: [Insight-users] VersorTransform takes 6 parameters? References: <3F1C8D4B.5050905@gmx.ch> Message-ID: <3F1D7D03.30808@kitware.com> Hi Michael, The VersorTransform class represents a Rigid Transform in 3D. The rotational part is represented by a Versor (a unit quaternion) while the translational part is represented by a Vector. The Six parameters are: 1) the first 3 are the components of the Versor representing the rotation 2) the last 3 are the components of the Vector representing the translation. --- We have to update this on the SoftwareGuide, Thanks for pointing this out, Regards, Luis ------------------------ Michael Kuhn wrote: > Hi, > > in the doxygen documentation of the SetParameters() method of the versor > transform is written, that the versor transform takes 6 parameters. > Obviously, the last 3 parameters represent an offset. Unfortunately I > only found the explanation of the first 3 parameters in the itk users > guide. Can anyone explain me, what this offset means? > > Thanks, > > Michael > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Tue Jul 22 19:14:13 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 22 Jul 2003 14:14:13 -0400 Subject: [Insight-users] Saving the currently viewed slice as an image file References: <4B943954DD289E47958BCEC8C32269BE1FA6D8@wsi-server2.wsi-gris.uni-tuebingen.de> Message-ID: <3F1D7EF5.6030602@kitware.com> Hi Zein, You may want to use the ExtractImageFilter if you want to get a 2D slice, or the RegionOfInterestImageFilter if you want to get a degenerate 3D volume (1 pixel thick) With the ExtractRegion() or the RegionOfInterest() you select the same slice that is being shown in the viewer. Then you plug the output of this filter (Extract or RegionOfInterest) to a ImageFileWriter. Regards, Luis ----------------------------- salah wrote: > Hello all, > > I am using a viewer based on the GlSliceView class. > It shows a 3D meta image with several overlays of > several colors. I need someway to same the currently > viewed slice as an image file. In other words, I need to > save what I see on the screen in a 2D image file of any > known format. > > Can anybody tell me how I can do that? > > Many thanks, > > Zein > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From bill.hoffman@kitware.com Tue Jul 22 19:14:15 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Tue, 22 Jul 2003 14:14:15 -0400 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <20030722174952.GC24722@dutidad.twi.tudelft.nl> References: <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> Message-ID: <5.2.0.9.0.20030722141204.04e08850@pop.biz.rr.com> We noticed that as well, and checked in a change to the what() at the same time as the change the wrapper code. So, you should be set now. Thanks for the patches. -Bill At 01:49 PM 7/22/2003, Charl P. Botha wrote: >Okay, my only other outstanding issue is the modification to >itkExceptionObject where ::what() could perhaps return a parsed combination >of GetFile(), GetLine() and GetDescription() instead of just >GetDescription(). Should I make a patch? > >Thanks again, >Charl From c.p.botha@ewi.tudelft.nl Tue Jul 22 19:15:46 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Tue, 22 Jul 2003 20:15:46 +0200 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> References: <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> Message-ID: <20030722181546.GD24722@dutidad.twi.tudelft.nl> Hi Bill, Sorry for all the mails, but I've just discovered something very interesting. This also leads to a more elegant solution to all current difficulties (I hope). Please bear with me. On Tue, Jul 22, 2003 at 01:41:22PM -0400, Bill Hoffman wrote: > Node *top = Swig_cparse(cpps); > CableSwig cswig; > cswig.ParseFile(input_file, top, typemap_lang); Also in this code, we see the following: Printf(fs,"%%include \"swig.swg\"\n"); if (lang_config) { Printf(fs,"\n%%include \"%s\"\n", lang_config); } lang_config is set by python.cxx (part of swig) to python.swg and by tcl8.cxx to tcl8.swg. This means that swig IS seeing the following typemap: %typemap(in) PyObject * "$1 = $input;"; %typemap(out) PyObject * "$result = $1;"; Which means it SHOULDN'T be touching PyObject* parameter or return types! However, Cable doesn't see these as "PyObject *"s, but as "p._object", due to the fact that PyObject is actually a typedef'ed _object in the system global python.h. So, the typemap is being set, but Cable is presenting PyObjects with another name, so Swig isn't recognising them and consequently PyObject*s are being mangled. Should python.swg be patched? Or should we create a global python-cable.swg and tcl8-cable.swg with corrections for CableSwig specific behaviour? My idea would be to create a global itk.swg that always gets parsed (after the language specific .swg) with corrections/global additions. It should be possible to move the exception handling there as well as the corrected type mappings. What say you? Would you like me to implement a proof-of-concept? Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From c.p.botha@ewi.tudelft.nl Tue Jul 22 19:16:36 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Tue, 22 Jul 2003 20:16:36 +0200 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <5.2.0.9.0.20030722141204.04e08850@pop.biz.rr.com> References: <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> <5.2.0.9.0.20030722141204.04e08850@pop.biz.rr.com> Message-ID: <20030722181636.GE24722@dutidad.twi.tudelft.nl> On Tue, Jul 22, 2003 at 02:14:15PM -0400, Bill Hoffman wrote: > We noticed that as well, and checked in a change to the what() > at the same time as the change the wrapper code. So, you should Wow, excellent! > be set now. Thanks for the patches. It's a pleasure of course. Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From luis.ibanez@kitware.com Tue Jul 22 19:29:32 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 22 Jul 2003 14:29:32 -0400 Subject: [Insight-users] Registration3D References: <20030722103103.82595.qmail@web10507.mail.yahoo.com> Message-ID: <3F1D828C.4040609@kitware.com> Hi Ravi, Your code for centering the images looks fine. You can always double check if the new origin is correct by printing out the image information with something like fixedcenterer->GetIOutput()->Print( std::cout ); movingenterer->GetIOutput()->Print( std::cout ); --- What values are you using for the translationScaling ? Keep in mind that the Euler3D transform represents rotations as three angles in radians, so their dynamic range is much lower than the translations dynamic range. A new balance between the learningRate and the translationScaling may help to make the optimization more stable. You may also break the process in two stages: a first one in which you do only translations at big steps. (using translation transform), followed by a second registration in which you use a rigid transform with small steps, for fine tunning the translation and correct for rotation. This approach may make sense if the image miss-registration is composed by a small rotation and a large translation. Regards, Luis -------------------- ravi sharma wrote: > Well I have a strange problem with my 3D multimodality > registration program.My program is able to correct > translations but after correcting translations it > starts to misregister...the rotations just go > haywire(optimizer goes to a minimum value and > translations are corrected but at this point the > rotations start to occur and optimizer wrongly moves > to maximize cost function).It doesnot correct any > rotations and even if I take the same image as fixed > and moving it starts to rotate the moving image.I am > using Euler3D transform and > MattesMutualInformation.After running the program with > various test cases I think it is a problem with the > way I set the centers of the images perhaps. > I read the fixed and moving images then Using > ChangeInformationImageFilter I do the following > > > > FixedCentererType::Pointer fixedcenterer = > FixedCentererType::New(); > MovingCentererType::Pointer movingcenterer = > MovingCentererType::New(); > fixedcenterer->CenterImageOn(); > movingcenterer->CenterImageOn(); > > fixedcenterer->SetInput(fixedImageReader->GetOutput()); > > movingcenterer->SetInput(movingImageReader->GetOutput()); > > After this I cast the outputs of thes to float and set > those images as registration images.After this I use > simply the Transform and dont do anything with the > centers.What could be the problem. > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From bill.hoffman@kitware.com Tue Jul 22 19:33:40 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Tue, 22 Jul 2003 14:33:40 -0400 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <20030722181546.GD24722@dutidad.twi.tudelft.nl> References: <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> Message-ID: <5.2.0.9.0.20030722142920.04decdb8@pop.biz.rr.com> That sounds like a good idea. I guess it could be added as another command line option to cswig. cswig -cfg_file itk.cfg Then we just have to change the CMakeLists.txt files to reference a common itk.cfg file that has all the itk fixes in it. The only issue is that you can not refer to itk objects in the itk.cfg file since it is parsed first, but we could put the exception stuff in there which would be better than the current approach. Please try a proof of concept. -Bill At 02:15 PM 7/22/2003, Charl P. Botha wrote: >Hi Bill, > >Sorry for all the mails, but I've just discovered something very >interesting. This also leads to a more elegant solution to all current >difficulties (I hope). > >Please bear with me. > >On Tue, Jul 22, 2003 at 01:41:22PM -0400, Bill Hoffman wrote: >> Node *top = Swig_cparse(cpps); >> CableSwig cswig; >> cswig.ParseFile(input_file, top, typemap_lang); > >Also in this code, we see the following: >Printf(fs,"%%include \"swig.swg\"\n"); >if (lang_config) { > Printf(fs,"\n%%include \"%s\"\n", lang_config); >} > >lang_config is set by python.cxx (part of swig) to python.swg and by >tcl8.cxx to tcl8.swg. This means that swig IS seeing the following typemap: > >%typemap(in) PyObject * "$1 = $input;"; >%typemap(out) PyObject * "$result = $1;"; > >Which means it SHOULDN'T be touching PyObject* parameter or return types! >However, Cable doesn't see these as "PyObject *"s, but as "p._object", due >to the fact that PyObject is actually a typedef'ed _object in the system >global python.h. So, the typemap is being set, but Cable is presenting >PyObjects with another name, so Swig isn't recognising them and consequently >PyObject*s are being mangled. > >Should python.swg be patched? Or should we create a global python-cable.swg >and tcl8-cable.swg with corrections for CableSwig specific behaviour? > >My idea would be to create a global itk.swg that always gets parsed (after >the language specific .swg) with corrections/global additions. It should be >possible to move the exception handling there as well as the corrected type >mappings. > >What say you? Would you like me to implement a proof-of-concept? > >Thanks, >Charl > >-- >charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users From Carolyn.Johnston@vexcel.com Tue Jul 15 19:41:02 2003 From: Carolyn.Johnston@vexcel.com (Carolyn Johnston) Date: Tue, 15 Jul 2003 12:41:02 -0600 Subject: [Insight-users] problems with median filter Message-ID: <5.0.0.25.2.20030715122904.00b02e98@mail.vexcel.com> Hello all, I am using ITK to run some experiments with registration of digital elevation models. I have run into a confusing problem using the median filter class. I read in a digital elevation model and convert it to an itk float image using a conversion class. I set the image region, the origin, and the spacing for the image. I then write the resulting image out in raw format, and confirm that it is identical to what I read in. I then filter the image, and again write the raw output. I have tested the gradient magnitude filter, the threshold filter, and the median filter. Median filtering seems to introduce a sizeable deterministic shift into the output: the other filters I have tried don't do this. The shift is on the order of 500 pixels in Y and around 10 or so in X (for a 3600 by 3600 image). Rows and columns of zeros are introduced as well -- around 15 columns of zeros and 5 rows of zeros at the boundaries of the original image. Other than that, the image wraps at the boundaries. I suspect there is some parameter I am not setting, or am not setting correctly. I stepped through the median filtering code with gdb but did not find an uninitialized or default parameter read. What might be causing this problem? thanks, Carolyn Johnston Sr. Engineer, Vexcel Corporation From doumit.daou13@fnac.net Wed Jul 16 15:37:50 2003 From: doumit.daou13@fnac.net (Doumit Daou) Date: Wed, 16 Jul 2003 16:37:50 +0200 Subject: [Insight-users] help getting executable file on windows for registration of images Message-ID: <003201c34ba7$d574f760$90dc273e@doumitdaou> This is a multi-part message in MIME format. ------=_NextPart_000_002F_01C34BB8.98E25020 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hello, I am looking to get an executable ITK file (all done) for medical image = registration to run it on windows . I will appreciate if somebody has it = already compiled and ready for use on windows PC and can it send it to = me? Thank you Doumit ------=_NextPart_000_002F_01C34BB8.98E25020 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
hello,
I am looking to get an executable ITK = file (all=20 done) for medical image registration to run it = on windows . I=20 will appreciate if somebody has it already compiled and ready for = use on=20 windows PC and can it send it to me?
Thank you
Doumit
 
------=_NextPart_000_002F_01C34BB8.98E25020-- From stepmose@ee.ethz.ch Mon Jul 21 20:40:40 2003 From: stepmose@ee.ethz.ch (Stephan Moser) Date: Mon, 21 Jul 2003 21:40:40 +0200 (MEST) Subject: [Insight-users] ITK-VTK pipeline connection In-Reply-To: <3F1C19F1.8000801@gmx.ch> References: <3F1C19F1.8000801@gmx.ch> Message-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --------------000102090503050207000202 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; FORMAT=flowed Hi I have done some debugging on the code that Michael posted this morning. I found out that the extent of the vtkImageData is not correct at the time when it is accessed. If an update() is done on the image data itself in: // ##### method 1 to get the extent ##### ---> vtkImporter->GetOutput()->Update(); int *extent = vtkImporter->GetOutput()->GetWholeExtent(); then the extent is updated and correct. Is this a legitimate workaround? I thought that Update() methods should only be invoked on filters rather than on the image data itself. The reason to access the extent data is that in order to run a marching cube on the data in VTK, the image is extended by one pixel in every dimension using a vtkConstantPad filter, which requires the extent to explicitely be set, so interference with the dataflow is inevitable. Stephan --------------000102090503050207000202 Content-Type: TEXT/PLAIN; NAME="DebugProject.cxx" Content-Description: Content-Disposition: INLINE; FILENAME="DebugProject.cxx" #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkMetaImageIO.h" #include "vtkAIMReader.h" #include "vtkPNGReader.h" #include "vtkPointData.h" #include "itkVTKImageToImageFilter.h" #include "itkImageToVTKImageFilter.h" #include "vtkPipelineConnectorITK2VTK.h" #include "vtkImageConstantPad.h" #include "vtkMarchingCubes.h" #include "vtkPolyDataMapper.h" #include "vtkActor.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderWindow.h" #include "vtkProperty.h" #include "vtkRenderer.h" #include int main(int argc, char** argv) { typedef itk::MetaImageIO MetaReaderType; MetaReaderType ::Pointer metaReader = MetaReaderType::New(); typedef unsigned short PixelType; typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; typedef itk::ImageFileWriter WriterType; ReaderType::Pointer reader = ReaderType::New(); reader->SetImageIO( metaReader ); reader->SetFileName("d:\\regProjectData\\MHAs\\brainweb1.mha"); try { reader->Update(); } catch (itk::ExceptionObject e) { cerr << e << endl; } // ##### method 1 to connect the pipelines ##### typedef itk::VTKImageExport ImageExportType; ImageExportType::Pointer itkExporter = ImageExportType::New(); itkExporter->SetInput(reader->GetOutput()); vtkImageImport* vtkImporter = vtkImageImport::New(); vtkPipelineConnectorITK2VTK:: ConnectPipelines(itkExporter, vtkImporter); /* // ##### method 2 to connect the pipelines ##### typedef itk::ImageToVTKImageFilter ITK2VTKType; ITK2VTKType::Pointer vtkImporter = ITK2VTKType::New(); vtkImporter->SetInput(reader->GetOutput()); */ vtkImageConstantPad *pad = vtkImageConstantPad::New(); pad->SetInput(vtkImporter->GetOutput()); /* // ##### method 1 to get the extent ##### int *extent = vtkImporter->GetOutput()->GetWholeExtent(); */ // ##### method 2 to get the extent ##### ImageType::SizeType size = reader->GetOutput()->GetBufferedRegion().GetSize(); int *extent = new int[6]; extent[0] = 0; extent[1] = size[0]; extent[2] = 0; extent[3] = size[1]; extent[4] = 0; extent[5] = size[2]; pad->SetOutputWholeExtent(extent[0]-1, extent[1] + 1 , extent[2]-1, extent[3]+1, extent[4]-1, extent[5] +1 ); pad->SetConstant(0); vtkMarchingCubes *mc = vtkMarchingCubes::New(); mc->SetInput(pad->GetOutput()); mc->SetValue(0,128); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); mapper->SetInput(mc->GetOutput()); mapper->ScalarVisibilityOff(); vtkActor *actor= vtkActor::New(); actor->SetMapper(mapper); actor->GetProperty()->SetColor(0,1,0); vtkRenderer *aRenderer = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(aRenderer); renWin->SetSize(200,200); renWin->SetWindowName("MyWindow"); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); aRenderer->SetBackground(0.0, 0.0, 1); aRenderer->AddActor(actor); aRenderer->ResetCamera(); renWin->Render(); iren->Start(); return 0; } --------------000102090503050207000202-- From luis.ibanez@kitware.com Tue Jul 22 19:48:33 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 22 Jul 2003 14:48:33 -0400 Subject: [Insight-users] VersorTransform takes 6 parameters? References: <3F1C8D4B.5050905@gmx.ch> <3F1D7D03.30808@kitware.com> <3F1D8089.2030105@gmx.ch> Message-ID: <3F1D8701.7040600@kitware.com> Hi Michael, My apologies, I missed the point in the previous email. The VersorTransform I actually implementing pure rotations in 3D space (no translation at all). This transform is using 3 parameters only. The parameters are the three components of the Versor. The bug was in the Doxygen documentation which was wrongly making mention of 6 parameters and an offset. There are only 3 parameters in this transform. The VersorRigid3DTransform on the other hand is applying a rigid 3D transform using a Versor for representing rotation and a Vector for representing translations. Something we will unify in the short future is that the VersorRigid3DTransform has an option for setting the Center of rotation while the VersorTransform uses the default image origin of coordinates. Due to that the VersorRigid3DTransform end up having 9 effective parameters. This will probably change, so both transforms allow users to set the rotation center, and none of them uses the center of rotation coordinates as part of its parameters. Hope this is less obscure now, Thanks Luis BTW: The doxygen documentation for the itkVesorTransform has been fixed. It will not show up in the web until tomorrow though. --------------------- Michael Kuhn wrote: > Hi Luis, > > I am a bit confused as far as the distinction of the different > transforms is concerned. I thought a versor is the rotational part of a > quaternion and a VersorTransform only does a rotation. Isn't there the > VersorRigid3DTransform to "add" a translation to the VersorTransform? Or > what's the difference between a VersorTransform and a > VersorRigid3DTransform? > > Thanks, > > Michael > > > > Luis Ibanez wrote: > >> >> Hi Michael, >> >> >> The VersorTransform class represents >> a Rigid Transform in 3D. >> >> The rotational part is represented by >> a Versor (a unit quaternion) while the >> translational part is represented by a >> Vector. >> >> The Six parameters are: >> >> 1) the first 3 are the components >> of the Versor representing the rotation >> >> 2) the last 3 are the components >> of the Vector representing the translation. >> >> >> --- >> >> We have to update this on the SoftwareGuide, >> >> Thanks for pointing this out, >> >> >> Regards, >> >> >> Luis >> >> >> >> >> ------------------------ >> Michael Kuhn wrote: >> >>> Hi, >>> >>> in the doxygen documentation of the SetParameters() method of the >>> versor transform is written, that the versor transform takes 6 >>> parameters. Obviously, the last 3 parameters represent an offset. >>> Unfortunately I only found the explanation of the first 3 parameters >>> in the itk users guide. Can anyone explain me, what this offset means? >>> >>> Thanks, >>> >>> Michael >>> >>> _______________________________________________ >>> Insight-users mailing list >>> Insight-users@itk.org >>> http://www.itk.org/mailman/listinfo/insight-users >>> >> >> >> >> _______________________________________________ >> Insight-users mailing list >> Insight-users@itk.org >> http://www.itk.org/mailman/listinfo/insight-users >> >> > > > From c.p.botha@ewi.tudelft.nl Tue Jul 22 22:19:47 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Tue, 22 Jul 2003 23:19:47 +0200 Subject: [Insight-users] Getting PyObject* through to wrapped C++ code In-Reply-To: <5.2.0.9.0.20030722142920.04decdb8@pop.biz.rr.com> References: <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> <5.2.0.9.0.20030722142920.04decdb8@pop.biz.rr.com> Message-ID: <20030722211947.GA547@dutidad.twi.tudelft.nl> --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Dear Bill and list, On Tue, Jul 22, 2003 at 02:33:40PM -0400, Bill Hoffman wrote: > Please try a proof of concept. It's worked better than we expected. There is now an itk.swg file in Insight/Wrapping/CSwig. It's taking care of the PyObject* mapping, as well as the actual "throws" typemap for the std::exception exception. The amount of code now left in CableSwig with regards to this is minimal: only attaching the "throws" attribute to the method node. This should remain, as eventually gcc_xml will give CableSwig correct throws type information. What I did was to move the "-l" library handling out of the NoCable clause of cableSwigMain and adapted all the Wrapping/CSwig top-level CMakeLists.txt file to make use of this by passing in itk.swg. The advantage of this, is that we can pass in more swig files than just itk.swg: e.g. per package or per-class specific interface files! I've attached a bunch of patches and new files. It was a bit difficult to separate out the PyCommand changes, so they're included. I'm hoping they can go in with this lot, as they also constitute a nice test-case for the new functionality. So, here we go: 1. CableSwig-itk.swg.diff - a patch to the top-level CableSwig directory which adapts cableSwigMain.cxx to enable library files and backs out most of my "throws" typemap code from CableSwig.cxx, as this is now implicitly in itk.swg. 2. itk.swg - this new file must go in Insight/Wrapping/CSwig (remember to cvs add ;) It handles exceptions for all languages now, not only Python and Tcl8. 3. Insight-itk.swg-PyCommand.diff - a patch to top-level Insight that adapts the Wrapping/CSwig/CmakeLists files so that cswig makes use of itk.swg. This patch also adapts Wrapping/CSwig/Common/CMakeLists to integrate the PyCommand class. 4. wrap_ITKPyUtils.cxx, itkPyCommand.h and itkPyCommand.cxx - these should be copied into Wrapping/CSwig/Common and cvs add'ed. They enable the use of AddObserver from Python. 5. cannyEdgeDetectionImageFilter-PyCommand.py - this illustrates the use of PyCommand and also of the new exception handling if the filename isn't correctly set. :) I hope that this is satisfactory. Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="CableSwig-itk.swg.diff" Index: Executables/CableSwig.cxx =================================================================== RCS file: /cvsroot/CableSwig/CableSwig/Executables/CableSwig.cxx,v retrieving revision 1.8 diff -u -r1.8 CableSwig.cxx --- Executables/CableSwig.cxx 22 Jul 2003 17:04:14 -0000 1.8 +++ Executables/CableSwig.cxx 22 Jul 2003 20:55:13 -0000 @@ -318,40 +318,23 @@ // The following clause will instruct SWIG to let standard C++ // exceptions propagate through as Python exceptions. Original // version contributed by Charl P. Botha - + // // attaching this node as "throws" attribute to the method object // will cause the swig emit code to add an exception handler the // node only has to have a type-attribute with the type of the - // object that will be thrown + // object that will be thrown - in itk.swg the actual typemaps + // live that map from the type of the throws to the catch code + // that will actually be emited + // + // As soon as CableSwig gets proper throw() types from gcc_xml, + // this little piece of code has to be adapted ever so slightly. Node *catchNode = NewHash(); + // for now we assume that every method could throw a std::exception Setattr(catchNode, "type", "std::exception"); Setattr(m, "throws", catchNode); - - // this has to be added to the swig typemap... when hitting a method - // with a "throws" attribute, it will look up the "type" attribute - // of that "throws" attribute, once again look up the "throws" of - // that result, and use the "code" attribute of the final result as - // handler (catch) code - we should only have to do this - // registration once, but for now it's much clearer here and it does - // no real harm being called multiple times - if (m_WrapLanguage == "python") - { - char code[] = - "PyErr_SetString(PyExc_RuntimeError, _e.what());\n" - "SWIG_fail;"; - Swig_typemap_register("throws", catchNode, code, NULL, NULL); - - } - else if(m_WrapLanguage == "tcl8") - { - char code[] = - "Tcl_SetObjResult(interp, Tcl_NewStringObj(_e.what(), -1));\n" - "SWIG_fail;"; - Swig_typemap_register("throws", catchNode, code, NULL, NULL); - } // take care of the memory Delete(catchNode); - + ParmList* parms = 0; Parm* pp = 0; std::string allParams; @@ -1162,7 +1145,7 @@ appendChild(top, header); appendChild(top, init); } - + // collect up all classes to be included or imported this->DetermineClassesToWrap(cns); // first process imported classes Index: Executables/cableSwigMain.cxx =================================================================== RCS file: /cvsroot/CableSwig/CableSwig/Executables/cableSwigMain.cxx,v retrieving revision 1.5 diff -u -r1.5 cableSwigMain.cxx --- Executables/cableSwigMain.cxx 28 May 2003 21:55:34 -0000 1.5 +++ Executables/cableSwigMain.cxx 22 Jul 2003 20:55:13 -0000 @@ -543,11 +543,14 @@ if(NoCable) { Printf(fs,"%%include \"%s\"\n", Swig_last_file()); - for (i = 0; i < Len(libfiles); i++) - { - Printf(fs,"\n%%include \"%s\"\n", Getitem(libfiles,i)); - } } + // But still do the -l libraries, as these are used to perform some + // application-specific changes + for (i = 0; i < Len(libfiles); i++) + { + Printf(fs,"\n%%include \"%s\"\n", Getitem(libfiles,i)); + } + Seek(fs,0,SEEK_SET); cpps = Preprocessor_parse(fs); if (Swig_error_count()) { --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="itk.swg" /* This is an itk-specific typemap used by CableSwig. Also see comments * and "throws" code in CableSwig.cxx. * -- Charl P. Botha */ #ifdef SWIGPYTHON /* ------------------------------------------------------------ * PyObject * - Just pass straight through unmodified * This is default behaviour for python.swg, but Cable passes * a PyObject * through as a "p._object", so we redo the typemap * ------------------------------------------------------------ */ %typemap(in) p._object "$1 = $input;"; %typemap(out) p._object "$result = $1;"; #endif %include exception.i /* A "throws" attribute with the "std::exception" type is added synthetically * to each method node by CableSwig.cxx. When gcc_xml starts passing through * correct throws types, this typemap could be optionally extended to * account for more different types. This should work fine for now though. */ %typemap(throws) std::exception { SWIG_exception(SWIG_RuntimeError, _e.what()); } --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="Insight-itk.swg-PyCommand.diff" Index: Wrapping/CSwig/CMakeLists.txt =================================================================== RCS file: /cvsroot/Insight/Insight/Wrapping/CSwig/CMakeLists.txt,v retrieving revision 1.18 diff -u -r1.18 CMakeLists.txt --- Wrapping/CSwig/CMakeLists.txt 14 Jul 2003 12:51:07 -0000 1.18 +++ Wrapping/CSwig/CMakeLists.txt 22 Jul 2003 21:01:23 -0000 @@ -172,7 +172,8 @@ COMMENT "${OutputTclCxx} from " SOURCE ${Bin}/${InputIdx} COMMAND ${CSWIG} - ARGS -c ${CINDEX} ${IGNORE_WARNINGS} -depend ${Bin}/${InputXml}.depend + ARGS -l${ITK_TOP}/Wrapping/CSwig/itk.swg + -c ${CINDEX} ${IGNORE_WARNINGS} -depend ${Bin}/${InputXml}.depend -o ${Bin}/${OutputTclCxx} -tcl -pkgversion "${ITK_VERSION_STRING}" -c++ ${Bin}/${InputXml} TARGET ${Library} OUTPUTS ${Bin}/${OutputTclCxx} @@ -189,7 +190,8 @@ COMMENT "${OutputTclCxx} from " SOURCE ${Bin}/${InputIdx} COMMAND ${CSWIG} - ARGS -c ${CINDEX} ${IGNORE_WARNINGS} -depend ${Bin}/${InputXml}.depend + ARGS -l${ITK_TOP}/Wrapping/CSwig/itk.swg + -c ${CINDEX} ${IGNORE_WARNINGS} -depend ${Bin}/${InputXml}.depend -bindir "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}" -o ${Bin}/${OutputTclCxx} -python -c++ ${Bin}/${InputXml} TARGET ${Library} @@ -207,7 +209,8 @@ COMMENT "${OutputTclCxx} from " SOURCE ${Bin}/${InputIdx} COMMAND ${CSWIG} - ARGS -c ${CINDEX} ${IGNORE_WARNINGS} -depend ${Bin}/${InputXml}.depend + ARGS -l${ITK_TOP}/Wrapping/CSwig/itk.swg + -c ${CINDEX} ${IGNORE_WARNINGS} -depend ${Bin}/${InputXml}.depend -bindir "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}" -o ${Bin}/${OutputTclCxx} -java -c++ ${Bin}/${InputXml} TARGET ${Library} Index: Wrapping/CSwig/Common/CMakeLists.txt =================================================================== RCS file: /cvsroot/Insight/Insight/Wrapping/CSwig/Common/CMakeLists.txt,v retrieving revision 1.15 diff -u -r1.15 CMakeLists.txt --- Wrapping/CSwig/Common/CMakeLists.txt 10 Jul 2003 19:34:59 -0000 1.15 +++ Wrapping/CSwig/Common/CMakeLists.txt 22 Jul 2003 21:01:23 -0000 @@ -41,7 +41,7 @@ SET(INDEX_FILE_CONTENT "${INDEX_FILE_CONTENT}${WrapITK_BINARY_DIR}/Common/${Source}.idx\n") ENDFOREACH(Source) SET(WRAP_TCL_SOURCES ${WRAP_TCL_SOURCES} wrap_ITKCommonTclTcl.cxx wrap_ITKUtilsTcl.cxx) -SET(WRAP_PYTHON_SOURCES ${WRAP_PYTHON_SOURCES} wrap_ITKCommonPythonPython.cxx) +SET(WRAP_PYTHON_SOURCES ${WRAP_PYTHON_SOURCES} wrap_ITKCommonPythonPython.cxx wrap_ITKPyUtilsPython.cxx) CONFIGURE_FILE( ${WrapITK_SOURCE_DIR}/Master.mdx.in @@ -72,9 +72,10 @@ ENDIF(ITK_CSWIG_TCL) -IF(ITK_CSWIG_PYTHON) +IF(ITK_CSWIG_PYTHON) + SET(SWIG_INC ${SWIG_INC} -I${PYTHON_INCLUDE_PATH}) SET_SOURCE_FILES_PROPERTIES(SwigExtras_wrapPython.cxx GENERATED) - ADD_LIBRARY(_ITKCommonPython MODULE ${WRAP_PYTHON_SOURCES} itkStringStream.cxx SwigExtras_wrapPython.cxx ) + ADD_LIBRARY(_ITKCommonPython MODULE ${WRAP_PYTHON_SOURCES} itkStringStream.cxx itkPyCommand.cxx SwigExtras_wrapPython.cxx ) ADD_CUSTOM_COMMAND( COMMENT "run native swig on SwigExtras.i" SOURCE ${ITK_TOP}/Wrapping/CSwig/Common/SwigExtras.i @@ -150,5 +151,7 @@ # python WRAP_PYTHON_SOURCES(${ITK_TOP}/Wrapping/CSwig/Common ${WrapITK_BINARY_DIR}/Common wrap_ITKCommonPython _ITKCommonPython "${MASTER_INDEX_FILES}" "${ALL_IDX_FILES}") + WRAP_PYTHON_SOURCES(${ITK_TOP}/Wrapping/CSwig/Common ${WrapITK_BINARY_DIR}/Common + wrap_ITKPyUtils _ITKCommonPython "${MASTER_INDEX_FILES}" "${ALL_IDX_FILES}") ENDIF(ITK_CSWIG_PYTHON) Index: Wrapping/CSwig/Common/wrap_ITKCommon.cxx =================================================================== RCS file: /cvsroot/Insight/Insight/Wrapping/CSwig/Common/wrap_ITKCommon.cxx,v retrieving revision 1.9 diff -u -r1.9 wrap_ITKCommon.cxx --- Wrapping/CSwig/Common/wrap_ITKCommon.cxx 14 Jul 2003 12:30:49 -0000 1.9 +++ Wrapping/CSwig/Common/wrap_ITKCommon.cxx 22 Jul 2003 21:01:23 -0000 @@ -49,6 +49,9 @@ #ifdef ITK_TCL_WRAP ITK_WRAP_GROUP(ITKUtils), #endif +#ifdef ITK_PYTHON_WRAP + ITK_WRAP_GROUP(ITKPyUtils), +#endif "SwigExtras", ITK_WRAP_GROUP(itkVector), ITK_WRAP_GROUP(itkVersorTransform) Index: Wrapping/CSwig/Common/wrap_ITKCommonPython.cxx =================================================================== RCS file: /cvsroot/Insight/Insight/Wrapping/CSwig/Common/wrap_ITKCommonPython.cxx,v retrieving revision 1.1 diff -u -r1.1 wrap_ITKCommonPython.cxx --- Wrapping/CSwig/Common/wrap_ITKCommonPython.cxx 13 May 2003 20:28:38 -0000 1.1 +++ Wrapping/CSwig/Common/wrap_ITKCommonPython.cxx 22 Jul 2003 21:01:24 -0000 @@ -1,2 +1,3 @@ #define ITK_WRAP_PACKAGE "ITKCommonPython" +#define ITK_PYTHON_WRAP #include "wrap_ITKCommon.cxx" --HlL+5n6rz5pIUxbD Content-Type: text/x-c++src; charset=us-ascii Content-Disposition: attachment; filename="wrap_ITKPyUtils.cxx" /*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile: wrap_ITKUtils.cxx,v $ Language: C++ Date: $Date: 2003/06/24 22:17:07 $ Version: $Revision: 1.2 $ Copyright (c) 2002 Insight Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "itkPyCommand.h" #ifdef CABLE_CONFIGURATION #include "itkCSwigMacros.h" namespace _cable_ { const char* const group = ITK_WRAP_GROUP(ITKPyUtils); namespace wrappers { ITK_WRAP_OBJECT(PyCommand); } } #endif --HlL+5n6rz5pIUxbD Content-Type: text/x-chdr; charset=us-ascii Content-Disposition: attachment; filename="itkPyCommand.h" /*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile: itkPyCommand.h,v $ Language: C++ Date: $Date: 2003/06/06 15:04:28 $ Version: $Revision: 1.1 $ Copyright (c) 2002 Insight Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef _itkPyCommand_h #define _itkPyCommand_h #include "itkCommand.h" #include namespace itk { /** \Class PyCommand * \brief Command subclass that calls a Python callable object, e.g. * a Python function. * * With this class, arbitrary Python callable objects (e.g. functions) * can be associated with an instance to be used in AddObserver calls. * This is analogous to itk::TclCommand, but then a tad more flexible. ;) * * This class was contributed by Charl P. Botha */ class PyCommand : public Command { public: ///! Standard "Self" typedef. typedef PyCommand Self; ///! Smart pointer typedef support. typedef SmartPointer Pointer; ///! Run-time type information (and related methods). itkTypeMacro(PyCommand,Command); ///! Method for creation through the object factory. itkNewMacro(Self); void SetCommandCallable(PyObject *obj); void Execute(Object *, const EventObject&); void Execute(const Object *, const EventObject&); protected: PyCommand(); ~PyCommand(); void PyExecute(); PyCommand(const Self&); // Not implemented. void operator=(const Self&); // Not implemented. private: PyObject *obj; }; } // namespace itk #endif // _itkPyCommand_h --HlL+5n6rz5pIUxbD Content-Type: text/x-c++src; charset=us-ascii Content-Disposition: attachment; filename="itkPyCommand.cxx" /*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile: itkPyCommand.cxx,v $ Language: C++ Date: $Date: 2003/06/06 15:04:28 $ Version: $Revision: 1.1 $ Copyright (c) 2002 Insight Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "itkPyCommand.h" namespace itk { PyCommand::PyCommand() { this->obj = NULL; } PyCommand::~PyCommand() { if (this->obj) { Py_DECREF(this->obj); } this->obj = NULL; } void PyCommand::SetCommandCallable(PyObject *obj) { this->obj = obj; } ///! Execute the callback to the Tcl interpreter. void PyCommand::Execute(Object *, const EventObject&) { this->PyExecute(); } ///! Execute the callback to the Tcl interpreter with a const LightObject void PyCommand::Execute(const Object*, const EventObject&) { this->PyExecute(); } void PyCommand::PyExecute() { PyObject *result; result = PyEval_CallObject(this->obj, (PyObject *)NULL); if (result) { Py_DECREF(result); } else { PyErr_Print(); } } } // namespace itk --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="cannyEdgeDetectionImageFilter-PyCommand.py" from InsightToolkit import * reader = itkImageFileReaderF2_New() canny = itkCannyEdgeDetectionImageFilterF2F2_New() def progressCallback(): print canny.GetProgress() command = itkPyCommand_New() command.SetCommandCallable(progressCallback) canny.AddObserver(itkProgressEvent(), command.GetPointer()) rescaler = itkRescaleIntensityImageFilterF2US2_New() writer = itkImageFileWriterUS2_New() canny.SetInput(reader.GetOutput()) rescaler.SetInput(canny.GetOutput()) writer.SetInput(rescaler.GetOutput()) rescaler.SetOutputMinimum(0) rescaler.SetOutputMaximum(65535) reader.SetFileName("/home/cpbotha/build/Insight/Testing/Data/Input/cthead1.png") writer.SetFileName("./testout.png") writer.Update() --HlL+5n6rz5pIUxbD-- From luis.ibanez@kitware.com Wed Jul 23 01:47:38 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 22 Jul 2003 20:47:38 -0400 Subject: [Insight-users] Registration and Spacing : Bug Message-ID: <3F1DDB2A.8090006@kitware.com> Hi Michael, Carolyn We were finally able to duplicate the problem you both reported concerning the registration of image data with non-unit spacing. http://www.itk.org/pipermail/insight-users/2003-July/004215.html http://www.itk.org/pipermail/insight-users/2003-July/004314.html Using a simple registration case with translation transform, we found that a very small spacing causes the optimizer to become erratic. We are tracking this problem in order to find a fix. Our guess is that the spacing is not correctly considered when computing the metric derivatives in the registration method. A bug report has been filed in GNATS. Thanks for pointing this out. Luis From luis.ibanez@kitware.com Wed Jul 23 02:58:08 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 22 Jul 2003 21:58:08 -0400 Subject: [Insight-users] Re: Image Format References: <468D78E4EE5C6A4093A4C00F29DF513D0377CCBE@VS2.hdi.tvcabo> Message-ID: <3F1DEBB0.8050407@kitware.com> This is a multi-part message in MIME format. --------------040907000700080304000606 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hi P3rdigao, Please do the following 0) cd to the directory where your tiff images are 1) mogrify -format pgm pelvis*.tiff 2) then adapt the attached MetaImage header file in order to add all the pgm files you have. Note that you will have to fix the spacing in this header, as well as the number of slices in Z according to the number of files you add at the bottom. You should be able to open this MetaImage header with the new version of the Segmentation editor available in InsightApplications/SegmentationEditorFltkGui Please beware that your slices are quite large (1415x1407), so the total volume may have a respectful size. Regards, Luis ------------------ p3rdigao wrote: >-----Original Message----- > >From: p3rdigao [mailto:p3rdigao@civil.ist.utl.pt ] > >Sent: quarta-feira, 23 de Julho de 2003 1:22 > >To: 'Joshua Cates' > >Subject: RE: [Insight-users] Re: Image Format > >I already intalled ImageMagic, then run convert like this > >C:\ convert plvis1.tiff pelvis.001 > >It creates the file but deep inside nothing occurs, because if you use notepad the file inside stills the same....if fact if RENAME to pelvis1.tiff you are able to view the image > >Which means it stills as an header file.. > >Am I forgeting some flag in [options]... > >There is another way ??? > >the first sugestion I dont get it! > >I sendo you an original file pelvis.tiff that i want to convert to pelvis.001 > >It is extremely urgent!!! > > > >Thanks a lot once again! > > > > > >Hi P3rdigao, > >In the SegmentationEditor application, the data > >is being read using VTK. > >You can specify a "sprintf" pattern for generating > >the filenames of the slices in a sequence. > >This program assumes that your slices are raw > >data stored one slice per file. > >If you need to convert your slices from .gif, > >.tiff, or .bmp into raw, you may want to use > >the ImageMagick tools. In particular: > > > >1) "convert" will convert the files one by one > >2) "mogrify" will convert all of them at once > >If you are running in Windows, please be careful > >since there is a system utility "convert" that > >will transform your file system into NT, so make > >sure that you are running the binary from > >ImageMagick and not the system tool. > > > >Regards, > > > >Luis > > > >--------------- > >p3rdigao wrote: > > > >>Hi >> >> > > > > > > >>In the tumorbase (the brain) used for the Segmentation Editor example, >> >> > > > >>the image data have extension *.01, *.02, *.03 and so on >> >> > > > > > > >>My question is: In my own image files that are *.gif, *.tiff , >> >> > > > >>*.bmp....how do I converte them to *.01...*.0n ? >> >> > > > > > > >>Thanks a lot >> >> > > > >>p3 >> >> > > > > > > > > > > > > > > > > --------------040907000700080304000606 Content-Type: text/plain; name="pelvis.mhd" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pelvis.mhd" NDims = 3 DimSize = 1415 1407 5 ElementSpacing = 1 1 1 Position = 0 0 0 ElementByteOrderMSB = False ElementType = MET_UCHAR HeaderSize = -1 ElementDataFile = LIST 2 pelvis1.pgm pelvis2.pgm pelvis3.pgm pelvis4.pgm pelvis5.pgm --------------040907000700080304000606-- From realstyx@web.de Wed Jul 23 10:35:12 2003 From: realstyx@web.de (thomas jejkal) Date: Wed, 23 Jul 2003 11:35:12 +0200 Subject: [Insight-users] Similarity Transform Message-ID: <200307230935.h6N9ZCQ21595@mailgate5.cinetic.de> Hi! I have an question about the similarity transform at "itk". Is it possible that there are some problems with the parameters? The results i got and the according transformation do not match because the final parameter 5 (xTranslation?) and 6 (yTranslation?) are about 100 or 200 millimeters and this isn't possible at image sizes of about 100 pixels. But if i ignore the translation it is nearly correct. So, can you tell me what it could be and why it also works quite well if the parameters 1 (Rotation?) and 2 (Scalation?) are permuted!? Thanks for your help! Greetings, Thomas. ______________________________________________________________________________ ComputerBild (15-03) empfiehlt den besten Spam-Schutz: WEB.DE FreeMail - Deutschlands beste E-Mail - http://s.web.de/?mc=021125 From affable@hd2.dot.net.in Wed Jul 23 14:20:12 2003 From: affable@hd2.dot.net.in (CSPL) Date: Wed, 23 Jul 2003 18:50:12 +0530 Subject: [Insight-users] Split based on Shape Message-ID: <001b01c3511d$25d58ec0$01000001@macinfo.net> This is a multi-part message in MIME format. ------=_NextPart_000_0018_01C3514B.3F6F4640 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear Mr.Luis, We placed two images on the web: http://www.comsols.com/mvis-images.htm Our Requirement is to split clustered objects using convex split = algorithm. First image is the original image shows the objects identified with in = the given grayscale range. Second image is after splitting the objects (This splitting is done = using an existing application) We want to similar splitting using ITK Regards, Srivalli ------=_NextPart_000_0018_01C3514B.3F6F4640 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear Mr.Luis,
 
We placed two images on the = web:
http://www.comsols.com/mv= is-images.htm
 
 Our Requirement is to split = clustered objects=20 using convex split algorithm.
First image is the original image shows = the objects=20 identified with in the given grayscale range.
Second image is after splitting the = objects (This=20 splitting is done using an existing application)
We want to similar splitting using = ITK
 
Regards,
Srivalli
 
------=_NextPart_000_0018_01C3514B.3F6F4640-- From p.klotz@icoserve.com Wed Jul 23 15:05:36 2003 From: p.klotz@icoserve.com (p.klotz@icoserve.com) Date: Wed, 23 Jul 2003 16:05:36 +0200 Subject: [Insight-users] ITK 1.2.0 and Visual Studio .NET 7.1 2003 Message-ID: After several unsuccessful attempts of compilation here my simple questions: Is there any way to compile ITK 1.2.0 with VS.NET 2003? Is there any other version of ITK (Beta, CVS) that compiles with VS.NET 2003? Best regards, Peter. From Mathieu.Malaterre@creatis.insa-lyon.fr Wed Jul 23 15:26:08 2003 From: Mathieu.Malaterre@creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 23 Jul 2003 16:26:08 +0200 Subject: [Insight-users] ITK 1.2.0 and Visual Studio .NET 7.1 2003 In-Reply-To: References: Message-ID: <3F1E9B00.1010809@creatis.insa-lyon.fr> Peter, Which version of CMake are you using ? Correct me if I am wrong but only CMake 1.6.7 handle VC.NET 2003 Also make sure you selected "VC NET 2003" (and not VC++ 6) in the top right of CMakeSetup.exe. Finally please include all the errors messages you are getting this is very usefull for us to help you. HTH mathieu p.klotz@icoserve.com wrote: > > > > After several unsuccessful attempts of compilation here my simple > questions: > > Is there any way to compile ITK 1.2.0 with VS.NET 2003? > Is there any other version of ITK (Beta, CVS) that compiles with VS.NET > 2003? > > Best regards, Peter. > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From p.klotz@icoserve.com Wed Jul 23 16:24:30 2003 From: p.klotz@icoserve.com (p.klotz@icoserve.com) Date: Wed, 23 Jul 2003 17:24:30 +0200 Subject: [Insight-users] ITK 1.2.0 and Visual Studio .NET 7.1 2003 In-Reply-To: <3F1E9B00.1010809@creatis.insa-lyon.fr> Message-ID: Hi Mathieu > Which version of CMake are you using ? > Correct me if I am wrong but only CMake 1.6.7 handle VC.NET 2003 I am using CMake 1.6.7. > Also make sure you selected "VC NET 2003" (and not VC++ 6) in the top > right of CMakeSetup.exe. I prefer the generation of nmake Makefiles but VS.NET 2003 project files also don't work. > Finally please include all the errors messages you are getting this is > very usefull for us to help you. I get tons of error messages from all areas of the code. * Microsoft made changes to the Math library and therefore several abs() and pow() calls no longer work. * Strict checking of the typename keyword breaks code where types depend on template classes. I fixed a lot of issues but I am for example stuck with the following. Building object file itkFEMElement2DC0LinearLine.obj... itkFEMElement2DC0LinearLine.cxx c:\ITK\InsightToolkit-1.2.0\Code\Numerics\FEM\itkFEMPArray.h(153) : error C2440: 'static_cast' : cannot convert from 'const std::allocator<_Ty>::value_type *' to 'std::vector<_Ty>::const_iterator' with [ _Ty=itk::fem::FEMP ] and [ _Ty=itk::fem::FEMP ] No constructor could take the source type, or constructor overload resolution was ambiguous Best regards, Peter. From holmesd3@yahoo.com Wed Jul 23 16:49:04 2003 From: holmesd3@yahoo.com (David Holmes) Date: Wed, 23 Jul 2003 08:49:04 -0700 (PDT) Subject: [Insight-users] Registration and Spacing : Bug In-Reply-To: <3F1DDB2A.8090006@kitware.com> Message-ID: <20030723154904.1706.qmail@web13103.mail.yahoo.com> Luis- I am not sure that it is simply an issue with non-unit spacing. I have had this problem for some time (refer to http://www.itk.org/pipermail/insight-users/2003-February/002637.html). To confirm the problem again, I used the ImageRegistration8.cxx example with a very simple dataset and show the same results (i.e. the cost value increases). In my case, the spacing is [1,1,1] for both fixed and moving. I've fooled with parameters. That is not the problem. I've run both simple and multi-resolution registration. That is not the problem. thanks david --- Luis Ibanez wrote: > > Hi Michael, Carolyn > > We were finally able to duplicate the problem you > both > reported concerning the registration of image data > with > non-unit spacing. > > http://www.itk.org/pipermail/insight-users/2003-July/004215.html > http://www.itk.org/pipermail/insight-users/2003-July/004314.html > > Using a simple registration case with translation > transform, > we found that a very small spacing causes the > optimizer to > become erratic. > > We are tracking this problem in order to find a fix. > > Our guess is that the spacing is not correctly > considered > when computing the metric derivatives in the > registration > method. A bug report has been filed in GNATS. > > > Thanks for pointing this out. > > > Luis > > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From stepmose@ee.ethz.ch Wed Jul 23 03:53:57 2003 From: stepmose@ee.ethz.ch (Stephan Moser) Date: Wed, 23 Jul 2003 04:53:57 +0200 (MEST) Subject: [Insight-users] Registration and Spacing : Bug In-Reply-To: <3F1DDB2A.8090006@kitware.com> References: <3F1DDB2A.8090006@kitware.com> Message-ID: Hi Luis Thanks for your effort. Michael and I have studied the code today as well and we are not sure whether the GradientFilter has its influence on the problem, since at the moment it does not take into consideration the spacing. We assume that the derivative is therefore calculated for a unit spacing. Using 40*40*40 sized images in one case with spacing 1.0 and in a second case with 2.0, we have not been able to scale the registration process correctly so that it would yield the same result; we would like to do this to obtain 'generally applicable' parameters for registration of bone images. Do you think it might be a good idea to set the spacing of the images to 1.0 and always perform the registration that way? We have the impression that registration can be done without considering world coordinates, as long as the images are spaced the same, or is there a fundamental mistake in our thought? Thanks, Stephan On Tue, 22 Jul 2003, Luis Ibanez wrote: > > Hi Michael, Carolyn > > We were finally able to duplicate the problem you both > reported concerning the registration of image data with > non-unit spacing. > > http://www.itk.org/pipermail/insight-users/2003-July/004215.html > http://www.itk.org/pipermail/insight-users/2003-July/004314.html > > Using a simple registration case with translation transform, > we found that a very small spacing causes the optimizer to > become erratic. > > We are tracking this problem in order to find a fix. > > Our guess is that the spacing is not correctly considered > when computing the metric derivatives in the registration > method. A bug report has been filed in GNATS. > > > Thanks for pointing this out. > > > Luis > > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Wed Jul 23 18:30:11 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 23 Jul 2003 13:30:11 -0400 Subject: [Insight-users] Re: Image Format References: <000601c35115$23844560$1b01a8c0@DOB3RMAN> Message-ID: <3F1EC623.6070409@kitware.com> Hi P3, 1) The notion of image spacing is described in the SoftwareGuide http://www.itk.org/ItkSoftwareGuide.pdf Section 4.1.4, pdf-page 54. It is the separation in millimeters between the centers of consecutive pixels along each dimension. Note that we say millimeters just because it is the usual measure in medical imaging, but you could actually use the number for representing any other unit. 2) yes, open the header file using the fltk GUI applications 3) if the files expected by slicer are simply raw files, you could use the 'tail' unix command for extracting the last past of the PGM which actually contains the binary pixel data. You will have to compute the amounts of bytes to extract, using the image size and the number of bytes per pixel. Regards, Luis ------------------------------------- perdigao wrote: > Thanks I already have the pgm files > > 3 questions > > 1) how should I adopt the spacing information, what did this information > tell me? You write 1 1 1 , that does this mean? > > 2) and then I should run/open the header in the SEfltkGui application? > > 3) I am also using the 3d slicer that uses the files .001....00N... > > Can I convert this pgm files in .001 ... .00N? > > What is the instruction to do that? > > > Thanks a lot once again. > P3 > > > > > -----Original Message----- > From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > Sent: quarta-feira, 23 de Julho de 2003 1:58 > To: p3rdigao > Cc: cates@sci.utah.edu; insight-users@itk.org > Subject: Re: [Insight-users] Re: Image Format > > Hi P3rdigao, > > Please do the following > > 0) cd to the directory where your tiff images are > > 1) mogrify -format pgm pelvis*.tiff > > 2) then adapt the attached MetaImage header file > in order to add all the pgm files you have. > Note that you will have to fix the spacing in > this header, as well as the number of slices in Z > according to the number of files you add at the > bottom. > > You should be able to open this MetaImage header > with the new version of the Segmentation editor > available in > > InsightApplications/SegmentationEditorFltkGui > > Please beware that your slices are quite large > (1415x1407), so the total volume may have > a respectful size. > > > Regards, > > > Luis > > > ------------------ > p3rdigao wrote: > > >>-----Original Message----- >> >>From: p3rdigao [mailto:p3rdigao@civil.ist.utl.pt > > ] > >>Sent: quarta-feira, 23 de Julho de 2003 1:22 >> >>To: 'Joshua Cates' >> >>Subject: RE: [Insight-users] Re: Image Format >> >>I already intalled ImageMagic, then run convert like this >> >>C:\ convert plvis1.tiff pelvis.001 >> >>It creates the file but deep inside nothing occurs, because if you use > > notepad the file inside stills the same....if fact if RENAME to > pelvis1.tiff you are able to view the image > >>Which means it stills as an header file.. >> >>Am I forgeting some flag in [options]... >> >>There is another way ??? >> >>the first sugestion I dont get it! >> >>I sendo you an original file pelvis.tiff that i want to convert to > > pelvis.001 > >>It is extremely urgent!!! >> >> >> >>Thanks a lot once again! >> >> >> >> >> >>Hi P3rdigao, >> >>In the SegmentationEditor application, the data >> >>is being read using VTK. >> >>You can specify a "sprintf" pattern for generating >> >>the filenames of the slices in a sequence. >> >>This program assumes that your slices are raw >> >>data stored one slice per file. >> >>If you need to convert your slices from .gif, >> >>.tiff, or .bmp into raw, you may want to use >> >>the ImageMagick tools. In particular: >> >> >> >>1) "convert" will convert the files one by one >> >>2) "mogrify" will convert all of them at once >> >>If you are running in Windows, please be careful >> >>since there is a system utility "convert" that >> >>will transform your file system into NT, so make >> >>sure that you are running the binary from >> >>ImageMagick and not the system tool. >> >> >> >>Regards, >> >> >> >>Luis >> >> >> >>--------------- >> >>p3rdigao wrote: >> >> >> >> >>>Hi >>> >>> >> >> >> >> >> >> >> >>>In the tumorbase (the brain) used for the Segmentation Editor example, >> > >>> >>> >> >> >> >> >>>the image data have extension *.01, *.02, *.03 and so on >>> >>> >> >> >> >> >> >> >> >>>My question is: In my own image files that are *.gif, *.tiff , >>> >>> >> >> >> >> >>>*.bmp....how do I converte them to *.01...*.0n ? >>> >>> >> >> >> >> >> >> >> >>>Thanks a lot >>> >>> >> >> >> >> >>>p3 >>> >>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > > > > > From luis.ibanez@kitware.com Wed Jul 23 18:46:01 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 23 Jul 2003 13:46:01 -0400 Subject: [Insight-users] Registration and Spacing : Bug References: <3F1DDB2A.8090006@kitware.com> Message-ID: <3F1EC9D9.1080601@kitware.com> Hi Stephan, According to the tests we ran with Carolyn, using unit spacing will be the easiest way to get around the problem for now. However, the registration framework is intended to work with non-unit spacing. Most medical images have anisotropic spacing, it is then quite important to take the spacing into consideration. In other words, this is something that we have to track down and fix. Having images with equal spacing also set you in an easiest case. However, most multi-modality registration problems will bring different spacings in both modalities. That's part of the reason for performing the registration in world coordinates. It would also be nice to setup the registration parameters in a way that is independent from the image characteristics. This is relatively easy when pure Translation transforms are used, but is less trivial with transforms whose parameters mix angles, translations and scales. Luis ------------------------- Stephan Moser wrote: > Hi Luis > > Thanks for your effort. Michael and I have studied the code today as > well and we are not sure whether the GradientFilter has its influence on > the problem, since at the moment it does not take into consideration the > spacing. We assume that the derivative is therefore calculated for a > unit spacing. > > Using 40*40*40 sized images in one case with spacing 1.0 > and in a second case with 2.0, we have not been able to scale the > registration process correctly so that it would yield the same result; > we would like to do this to obtain 'generally applicable' parameters for > registration of bone images. Do you think it might be a good idea to > set the spacing of the images to 1.0 and always perform the registration > that way? We have the impression that registration can be done without > considering world coordinates, as long as the images are spaced the > same, or is there a fundamental mistake in our thought? > > Thanks, Stephan > > > On Tue, 22 Jul 2003, Luis Ibanez wrote: > > >>Hi Michael, Carolyn >> >>We were finally able to duplicate the problem you both >>reported concerning the registration of image data with >>non-unit spacing. >> >>http://www.itk.org/pipermail/insight-users/2003-July/004215.html >>http://www.itk.org/pipermail/insight-users/2003-July/004314.html >> >>Using a simple registration case with translation transform, >>we found that a very small spacing causes the optimizer to >>become erratic. >> >>We are tracking this problem in order to find a fix. >> >>Our guess is that the spacing is not correctly considered >>when computing the metric derivatives in the registration >>method. A bug report has been filed in GNATS. >> >> >> Thanks for pointing this out. >> >> >> Luis >> >> >> >> >>_______________________________________________ >>Insight-users mailing list >>Insight-users@itk.org >>http://www.itk.org/mailman/listinfo/insight-users >> > > From luis.ibanez@kitware.com Wed Jul 23 22:56:23 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 23 Jul 2003 17:56:23 -0400 Subject: [Insight-users] Similarity Transform References: <200307230935.h6N9ZCQ21595@mailgate5.cinetic.de> Message-ID: <3F1F0487.9070607@kitware.com> Hi Thomas, The Similarity2DTransform is encoding parameters as follows: parameter[0] = scale parameter[1] = rotation angle parameter[2] = X coordinate of rotation center parameter[3] = Y coordinate of rotation center parameter[4] = Translation along X parameter[5] = Translation along Y It is possible for the transform to have translations that are larger than the images. In such cases you probably will receive messages (from itk exceptions) saying that the moving image does not overlap the fixed image anymore. That will indicate a failed registration, and you probably will have to reconsider the registration parameters, in particular the initial step length and the learning rate (depending on the optimizer you are using). But,... before going too far you may want do the following checks: 1) Check the origin coordinates of the fixed and moving images. This is returned by the method image->GetOrigin(). 2) Check the pixel spacing of the fixed and moving images. This is returned by the method image->GetSpacing(). 3) Check the dimensions (number of pixels) of both images. Combining this information you may want to verify the overlap between both images in physical space (world coordinates) before and after the registration. Details on this are described in the SoftwareGuide http://www.itk.org/ItkSoftwareGuide.pdf Section 5.7.1, pdf-page 163: Resample Image Filter The concepts of resampling are fundamental for understanding the registration framework in ITK. --- It is a bit surprising that the registration works better if you permute rotation and translation... rotation is measured in radians, while the scale is a multiplicative factor. I would suspect that the center of rotation has not been set correctly.... Did you used the Center initializer for defining the rotation center before starting the registration process ? Note that this transform having customized center of rotation, its effect may be quite counter intuitive. It is usually a good exercise to manually transform a couple of points, in order to get a better feeling of the effect of the transform parameters. For example, the selection of the center of rotation allows to induce any arbitrary translation. To be formal, this transform doesn't need to have a explicit translation since any translation can be obtained a the secondary effect of a rotation around a carefully selected center of rotation. It may help you to print out the matrix + offset as returned by the base class Rigid2DTransform with the methods transform->GetRotationMatrix() transform->GetOffset() You will notice that the Offset is not the same as the translation returned by the Similarity transform simply because it now combines the translation induced by the rotation. It is sometimes easier to evaluate the transform by simply using it for resampling the moving image, instead of trying to interpret the transform parameters. This is done in most of the examples in Insight/Examples/Registration. Regards, Luis -------------------------- thomas jejkal wrote: > Hi! > > I have an question about the similarity transform at "itk". > Is it possible that there are some problems with the parameters? > The results i got and the according transformation do not match because > the final parameter 5 (xTranslation?) and 6 (yTranslation?) are about > 100 or 200 millimeters and this isn't possible at image sizes of about 100 pixels. > But if i ignore the translation it is nearly correct. So, can you tell me what it could > be and why it also works quite well if the parameters 1 (Rotation?) and 2 (Scalation?) > are permuted!? > > Thanks for your help! > Greetings, Thomas. > ______________________________________________________________________________ > ComputerBild (15-03) empfiehlt den besten Spam-Schutz: > WEB.DE FreeMail - Deutschlands beste E-Mail - http://s.web.de/?mc=021125 > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Wed Jul 23 23:04:13 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 23 Jul 2003 18:04:13 -0400 Subject: [Insight-users] Registration and Spacing : Bug References: <20030723154904.1706.qmail@web13103.mail.yahoo.com> Message-ID: <3F1F065D.5010605@kitware.com> Hi David, Another possible suspect is the computation of Jacobians in the transforms. However, the translation transform used by Carolyn and Michael have a quite simple Jacobian, which leaves few room for error. In the case you mention, the VersorRigid3DTransform is used, this transform has a rather complex Jacobian, which make it a better candidate for failure. It is not clear at this point if both effects of increasing cost-function are originated from a single error. Would you observe the same miss-behavior of the optimizer if you replace the VersorRigid3DTransform with a simple Translation ? Regards, Luis --------------------- David Holmes wrote: > Luis- > > I am not sure that it is simply an issue with non-unit > spacing. I have had this problem for some time (refer > to > http://www.itk.org/pipermail/insight-users/2003-February/002637.html). > To confirm the problem again, I used the > ImageRegistration8.cxx example with a very simple > dataset and show the same results (i.e. the cost value > increases). In my case, the spacing is [1,1,1] for > both fixed and moving. I've fooled with parameters. > That is not the problem. I've run both simple and > multi-resolution registration. That is not the > problem. > > thanks > > david > > > --- Luis Ibanez wrote: > >>Hi Michael, Carolyn >> >>We were finally able to duplicate the problem you >>both >>reported concerning the registration of image data >>with >>non-unit spacing. >> >> > > http://www.itk.org/pipermail/insight-users/2003-July/004215.html > > http://www.itk.org/pipermail/insight-users/2003-July/004314.html > >>Using a simple registration case with translation >>transform, >>we found that a very small spacing causes the >>optimizer to >>become erratic. >> >>We are tracking this problem in order to find a fix. >> >>Our guess is that the spacing is not correctly >>considered >>when computing the metric derivatives in the >>registration >>method. A bug report has been filed in GNATS. >> >> >> Thanks for pointing this out. >> >> >> Luis >> >> >> >> >>_______________________________________________ >>Insight-users mailing list >>Insight-users@itk.org >>http://www.itk.org/mailman/listinfo/insight-users > > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > From luis.ibanez@kitware.com Wed Jul 23 23:16:58 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 23 Jul 2003 18:16:58 -0400 Subject: [Insight-users] Split based on Shape References: <001b01c3511d$25d58ec0$01000001@macinfo.net> Message-ID: <3F1F095A.5090807@kitware.com> Hi Srivalli, Thanks for posting your images, It is now much clearer what you intended to do. We were quite off with the assumption that you were spliting clusters in a parametric space... We probably don't have in ITK an algorithm that implements this splitting. However, if you are willing to give it a try, the classes recently added by John Galeotti may be the best way to go. These classes are intended to represent closed/open paths in images. Starting from a representation of your contours as itk::Paths you could test for left/right turns in order to identify the places where the figure must be split. You may want to take a look at the classes: http://www.itk.org/Insight/Doxygen/html/classitk_1_1Path.html http://www.itk.org/Insight/Doxygen/html/classitk_1_1ChainCodePath2D.html http://www.itk.org/Insight/Doxygen/html/classitk_1_1PolyLineParametricPath.html http://www.itk.org/Insight/Doxygen/html/classitk_1_1FourierSeriesPath.html http://www.itk.org/Insight/Doxygen/html/classitk_1_1PathIterator.html Regards, Luis ------------- CSPL wrote: > Dear Mr.Luis, > > We placed two images on the web: > http://www.comsols.com/mvis-images.htm > > Our Requirement is to split clustered objects using convex split algorithm. > First image is the original image shows the objects identified with in > the given grayscale range. > Second image is after splitting the objects (This splitting is done > using an existing application) > We want to similar splitting using ITK > > Regards, > Srivalli > From tejas9090@yahoo.com Thu Jul 24 01:36:27 2003 From: tejas9090@yahoo.com (tejas mehta) Date: Wed, 23 Jul 2003 17:36:27 -0700 (PDT) Subject: [Insight-users] read and writing images - basic example Message-ID: <20030724003627.53442.qmail@web21501.mail.yahoo.com> --0-1222484305-1059006987=:52389 Content-Type: text/plain; charset=us-ascii Hi, I am trying to run c:\Examples\IO\ImageReadWrite.exe and getting an error. The file I am reading is a dicom file. The error I get is : ExceptionObject Caught! No ImageIO Set or none could be created Please help Thanks, Tejas ps: Luis I got the application running, thanks!!!!! --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software --0-1222484305-1059006987=:52389 Content-Type: text/html; charset=us-ascii
Hi,
 
I am trying to run c:\Examples\IO\ImageReadWrite.exe and getting an error. The file I am reading is a dicom file. The error I get is :
 
ExceptionObject Caught!  
No ImageIO Set or none could be created
 
 
Please help
 
Thanks,
Tejas
ps: Luis I got the application running, thanks!!!!!


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software --0-1222484305-1059006987=:52389-- From luis.ibanez@kitware.com Thu Jul 24 01:44:16 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 23 Jul 2003 20:44:16 -0400 Subject: [Insight-users] read and writing images - basic example References: <20030724003627.53442.qmail@web21501.mail.yahoo.com> Message-ID: <3F1F2BE0.90600@kitware.com> Hi Tejas, ITK ImageIO objects recognize formats by the extension of the filename. Your DICOM file must have extension ".dcm" in order to be recognized by the ITK DICOM reader. Note that, in addition to the filename extension, some further checking is done by the readers in order to verify that the file complies with the expected format. Regards, Luis ------------------------ tejas mehta wrote: > Hi, > > I am trying to run c:\Examples\IO\ImageReadWrite.exe and getting an > error. The file I am reading is a dicom file. The error I get is : > > ExceptionObject Caught! > No ImageIO Set or none could be created > > > Please help > > Thanks, > Tejas > ps: Luis I got the application running, thanks!!!!! > > ------------------------------------------------------------------------ > Do you Yahoo!? > Yahoo! SiteBuilder > - Free, > easy-to-use web site design software From holmesd3@yahoo.com Thu Jul 24 17:33:54 2003 From: holmesd3@yahoo.com (David Holmes) Date: Thu, 24 Jul 2003 09:33:54 -0700 (PDT) Subject: [Insight-users] Registration and Spacing : Bug In-Reply-To: <3F1F065D.5010605@kitware.com> Message-ID: <20030724163354.11883.qmail@web13113.mail.yahoo.com> Luis- I apologize. I may be slow but eventually I catch on. I just realized that I had a major blunder that better explains why I am having trouble. So I moved to the translation transform per your suggestion and started fooling around with it. It was still failing, but I realized that I am just dumb. I was using multi-resolution because it is so much quicker. Given that the spacing of my data is [1,1,1] and registration is in real-world coordinates, then my pyramid isn't going to work because of the spacing on the lower resloution levels. If I get rid of the pyramid, the translation works. So, all of this time, I have been trying to fix the lowest-resolution pass of the multi-res registration, instead of looking at the full resolution. I'm going to take a look at the versor one now and see if that is similar. Thanks david --- Luis Ibanez wrote: > > Hi David, > > Another possible suspect is the computation of > Jacobians > in the transforms. However, the translation > transform > used by Carolyn and Michael have a quite simple > Jacobian, > which leaves few room for error. > > In the case you mention, the VersorRigid3DTransform > is used, > this transform has a rather complex Jacobian, which > make it > a better candidate for failure. > > It is not clear at this point if both effects of > increasing > cost-function are originated from a single error. > > Would you observe the same miss-behavior of the > optimizer > if you replace the VersorRigid3DTransform with a > simple > Translation ? > > > > Regards, > > > > Luis > > > > --------------------- > David Holmes wrote: > > Luis- > > > > I am not sure that it is simply an issue with > non-unit > > spacing. I have had this problem for some time > (refer > > to > > > http://www.itk.org/pipermail/insight-users/2003-February/002637.html). > > To confirm the problem again, I used the > > ImageRegistration8.cxx example with a very simple > > dataset and show the same results (i.e. the cost > value > > increases). In my case, the spacing is [1,1,1] > for > > both fixed and moving. I've fooled with > parameters. > > That is not the problem. I've run both simple and > > multi-resolution registration. That is not the > > problem. > > > > thanks > > > > david > > > > > > --- Luis Ibanez wrote: > > > >>Hi Michael, Carolyn > >> > >>We were finally able to duplicate the problem you > >>both > >>reported concerning the registration of image data > >>with > >>non-unit spacing. > >> > >> > > > > > http://www.itk.org/pipermail/insight-users/2003-July/004215.html > > > > > http://www.itk.org/pipermail/insight-users/2003-July/004314.html > > > >>Using a simple registration case with translation > >>transform, > >>we found that a very small spacing causes the > >>optimizer to > >>become erratic. > >> > >>We are tracking this problem in order to find a > fix. > >> > >>Our guess is that the spacing is not correctly > >>considered > >>when computing the metric derivatives in the > >>registration > >>method. A bug report has been filed in GNATS. > >> > >> > >> Thanks for pointing this out. > >> > >> > >> Luis > >> > >> > >> > >> > >>_______________________________________________ > >>Insight-users mailing list > >>Insight-users@itk.org > >>http://www.itk.org/mailman/listinfo/insight-users > > > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From michakuhn@gmx.ch Thu Jul 24 17:35:07 2003 From: michakuhn@gmx.ch (Michael Kuhn) Date: Thu, 24 Jul 2003 10:35:07 -0600 Subject: [Insight-users] direction of rotation Message-ID: <3F200ABB.2060301@gmx.ch> Hi, I'm trying to transform an object with a QuaternionRigidTransfrom as well as with an Euler3DTransform. I'm feeding the transforms with the same angle, axis and translation. The output of the two transforms differs in the direction of the rotation. Using the Quaternion transform, the object is rotated by phi degrees to the left (when the z-Axis points towards me) and using the Euler3DTransform, its rotated by phi degress to the right. Below the code that calculates the paramters. Is there something wrong with my calculation of the transform parameters? double* CalculateQuaternionTransformParameters(double phi, double nx, double ny, double nz, double x, double y, double z) { double* params = new double[7]; double mag = sqrt (nx * nx + ny * ny + nz * nz); // convert phi from degrees to rad double angle = phi * PI / 180; params[0] = nx / mag * sin(angle / 2); params[1] = ny / mag * sin(angle / 2); params[2] = nz / mag * sin(angle / 2); params[3] = cos(angle / 2); params[4] = x; params[5] = y; params[6] = z; return params; } double* CalculateVersorTransformParameters(double phi, double nx, double ny, double nz) { double* params = new double[3]; double abs = sqrt (nx * nx + ny * ny + nz * nz); double angle = phi * PI / 180; params[0] = nx / abs * angle; params[1] = ny / abs * angle; params[2] = nz / abs * angle; return params; } double* CalculateEuler3DTransformParameters(double phi, double nx, double ny, double nz, double tx, double ty, double tz) { double* params = new double[6]; double* versor = CalculateVersorTransformParameters(phi, nx, ny, nz); params[0] = versor[0]; params[1] = versor[1]; params[2] = versor[2]; params[3] = tx; params[4] = ty; params[5] = tz; return params; } From luis.ibanez@kitware.com Thu Jul 24 22:45:50 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 24 Jul 2003 17:45:50 -0400 Subject: [Insight-users] reading and writing images - basic example References: <20030724190437.68982.qmail@web21511.mail.yahoo.com> Message-ID: <3F20538E.7060504@kitware.com> Hi Tejas, If the data in your Dicom files was stored in 16bits/pixel chances are that the viewer you are using for PNG is not normalizing the image data at view time. With the default dinamic range you image may look as blank even if it contains information. You may try a viewer like ImageMagick display which has an option for normalizing intensities, or you could use the ImageViewer application in InsightApplications/ImageViewer. JPEG is not supported by ITK at this point. Please take a look at the FAQ entries http://www.itk.org/cgi-bin/InsightFAQ/InsightFAQ?req=show&file=faq01.007.htp http://www.itk.org/cgi-bin/InsightFAQ/InsightFAQ?req=show&file=faq01.008.htp Regards Luis ------------------ tejas mehta wrote: > Luis, > > I tried doing two things: > > 1) reading ".dcm" and writing to ".png" - works but my new image is blank > > 2) reading ".jpg" and writing to ".jpg" - doesn't work, doesn't even > read the file > The error: > itk::exceptionobject > location:"unknown" > file:c:\......\code\IO\itkanalyseimageIO.cxx > line: 1002 > description: file cannot be read > > > Tejas > > */Luis Ibanez /* wrote: > > > Hi Tejas, > > ITK ImageIO objects recognize formats > by the extension of the filename. > > Your DICOM file must have extension ".dcm" > in order to be recognized by the ITK DICOM > reader. > > Note that, in addition to the filename extension, > some further checking is done by the readers in > order to verify that the file complies with the > expected format. > > > Regards, > > > Luis > > > ------------------------ > tejas mehta wrote: > > Hi, > > > > I am trying to run c:\Examples\IO\ImageReadWrite.exe and getting an > > error. The file I am reading is a dicom file. The error I get is : > > > > ExceptionObject Caught! > > No ImageIO Set or none could be created > > > > > > Please help > > > > Thanks, > > Tejas > > ps: Luis I got the application running, thanks!!!!! > > > ! > > ------------------------------------------------------------------------ > > Do you Yahoo!? > > Yahoo! SiteBuilder > > - Free, > > easy-to-use web site design software > > > ------------------------------------------------------------------------ > Do you Yahoo!? > Yahoo! SiteBuilder > - Free, > easy-to-use web site design software From michakuhn@gmx.ch Fri Jul 25 03:49:39 2003 From: michakuhn@gmx.ch (Michael Kuhn) Date: Thu, 24 Jul 2003 20:49:39 -0600 Subject: [Insight-users] Registration and Euler3DTransform Message-ID: <3F209AC3.7060705@gmx.ch> Hi, does anyone have any experience using the Euler3DTransform for a registration? Which one would be a suitable optimizer for it? Thanks, Michael From millerjv@crd.ge.com Fri Jul 25 14:17:17 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Fri, 25 Jul 2003 09:17:17 -0400 Subject: [Insight-users] Wrapping warnings on .NET Message-ID: This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C352AF.12585B5A Content-Type: text/plain; charset="iso-8859-1" I think the recent changes to CableSwig.cxx are causing an enormous number of warnings on Visual Studio .NET (not 2003). The warnings are of the type wrap_vnl_vectorPython.cxx(1301) : warning C4297: '_wrap_vnl_vector_uchar_data_block__SWIG_1' : function assumed not to throw an exception but does The function is extern "C" and /EHc was specified wrap_vnl_vectorPython.cxx(1294) : warning C4101: '_e' : unreferenced local variable There are so many of these warnings (I killed the build at 6000 warnings) that I need to turn wrapping off in order to build in a reasonable time. I am guessing this has to do with passing exceptions from the C++ layer to the Swig layer. Could the wrapping guys take a look at this and deteremine how we should address these warnings (either turn off the particular warning, lower the warning level globally, or best yet fix the code so the warning does not occur). Jim Miller _____________________________________ Visualization & Computer Vision GE Research Bldg. KW, Room C218B P.O. Box 8, Schenectady NY 12301 millerjv@research.ge.com james.miller@research.ge.com (518) 387-4005, Dial Comm: 8*833-4005, Cell: (518) 505-7065, Fax: (518) 387-6981 ------_=_NextPart_001_01C352AF.12585B5A Content-Type: text/html; charset="iso-8859-1"
I think the recent changes to CableSwig.cxx are causing an enormous number of warnings on Visual Studio .NET (not 2003).  The warnings are of the type
 

wrap_vnl_vectorPython.cxx(1301) : warning C4297: '_wrap_vnl_vector_uchar_data_block__SWIG_1' : function assumed not to throw an exception but does

The function is extern "C" and /EHc was specified

wrap_vnl_vectorPython.cxx(1294) : warning C4101: '_e' : unreferenced local variable

There are so many of these warnings (I killed the build at 6000 warnings) that I need to turn wrapping off in order to build in a reasonable time.  I am guessing this has to do with passing exceptions from the C++ layer to the Swig layer.  Could the wrapping guys take a look at this and deteremine how we should address these warnings (either turn off the particular warning, lower the warning level globally, or best yet fix the code so the warning does not occur).
 
 
 

Jim Miller
_____________________________________
Visualization & Computer Vision
GE Research
Bldg. KW, Room C218B
P.O. Box 8, Schenectady NY 12301

millerjv@research.ge.com

james.miller@research.ge.com
(518) 387-4005, Dial Comm: 8*833-4005,
Cell: (518) 505-7065, Fax: (518) 387-6981

 
------_=_NextPart_001_01C352AF.12585B5A-- From c.p.botha@ewi.tudelft.nl Fri Jul 25 14:36:54 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: 25 Jul 2003 15:36:54 +0200 Subject: [Insight-users] Wrapping warnings on .NET In-Reply-To: References: Message-ID: <1059140214.27064.18.camel@dutidad> On Fri, 2003-07-25 at 15:17, Miller, James V (Research) wrote: > I think the recent changes to CableSwig.cxx are causing an enormous > number of warnings on Visual Studio .NET (not 2003). The warnings are > of the type > > > wrap_vnl_vectorPython.cxx(1301) : warning C4297: > '_wrap_vnl_vector_uchar_data_block__SWIG_1' : function assumed not to > throw an exception but does Urgh! That because of the catch(...){throw;} clause at the very end. This rethrows the exception if it wasn't handled and is automatically added by the existing swig code. Technically, this shouldn't be a warning... if there is no throw() specifier for a method/function, it is allowed to throw any exceptions, at least as far as my ISO C++ 1998 specification says. Do you have any other ideas? Is the compiler just broken? In that case, I guess the best thing to do is just to deactivate that warning. > The function is extern "C" and /EHc was specified > > wrap_vnl_vectorPython.cxx(1294) : warning C4101: '_e' : unreferenced > local variable This I don't get... the _e is ALWAYS used by the subsequent SWIG_exception(SWIG_RuntimeError, _e.what()); Could you perhaps post the few lines of code before and after your line 1294? Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From bill.hoffman@kitware.com Fri Jul 25 15:57:23 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Fri, 25 Jul 2003 10:57:23 -0400 Subject: [Insight-users] Wrapping warnings on .NET In-Reply-To: <1059140214.27064.18.camel@dutidad> References: Message-ID: <5.2.0.9.0.20030725105642.0500c200@pop.biz.rr.com> Well, it is saying that the function is extern "C". I don't think C functions are allowed to throw exceptions are they? -Bill At 09:36 AM 7/25/2003, Charl P. Botha wrote: >On Fri, 2003-07-25 at 15:17, Miller, James V (Research) wrote: >> I think the recent changes to CableSwig.cxx are causing an enormous >> number of warnings on Visual Studio .NET (not 2003). The warnings are >> of the type >> >> >> wrap_vnl_vectorPython.cxx(1301) : warning C4297: >> '_wrap_vnl_vector_uchar_data_block__SWIG_1' : function assumed not to >> throw an exception but does > >Urgh! That because of the catch(...){throw;} clause at the very end. >This rethrows the exception if it wasn't handled and is automatically >added by the existing swig code. > >Technically, this shouldn't be a warning... if there is no throw() >specifier for a method/function, it is allowed to throw any exceptions, >at least as far as my ISO C++ 1998 specification says. > >Do you have any other ideas? Is the compiler just broken? In that >case, I guess the best thing to do is just to deactivate that warning. > >> The function is extern "C" and /EHc was specified >> >> wrap_vnl_vectorPython.cxx(1294) : warning C4101: '_e' : unreferenced >> local variable > >This I don't get... the _e is ALWAYS used by the subsequent >SWIG_exception(SWIG_RuntimeError, _e.what()); Could you perhaps post >the few lines of code before and after your line 1294? > >Thanks, >Charl > >-- >charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users From bill.hoffman@kitware.com Fri Jul 25 16:12:33 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Fri, 25 Jul 2003 11:12:33 -0400 Subject: [Insight-users] Wrapping warnings on .NET In-Reply-To: <5.2.0.9.0.20030725105642.0500c200@pop.biz.rr.com> References: <1059140214.27064.18.camel@dutidad> Message-ID: <5.2.0.9.0.20030725110408.05034120@pop.biz.rr.com> I think the problem is here: #ifdef __cplusplus extern "C" { #endif static PyObject *_wrap_itkVectorD3_GetNorm(PyObject *self, PyObject *args) { ... #ifdef __cplusplus } #endif I am not sure why swig is doing this. Looks like a change in CableSwig/SWIG/Source/Modules1.1/python.cxx should be able to remove the extern "C" code. --- around line 233 ---- Printf(f_wrappers,"#ifdef __cplusplus\n"); Printf(f_wrappers,"extern \"C\" {\n"); Printf(f_wrappers,"#endif\n"); Can you think of why this would have to be extern "C" ?? Can you try the change Jim, and see if it works? -Bill At 10:57 AM 7/25/2003, Bill Hoffman wrote: >Well, it is saying that the function is extern "C". >I don't think C functions are allowed to throw exceptions are they? > >-Bill > > >At 09:36 AM 7/25/2003, Charl P. Botha wrote: >>On Fri, 2003-07-25 at 15:17, Miller, James V (Research) wrote: >>> I think the recent changes to CableSwig.cxx are causing an enormous >>> number of warnings on Visual Studio .NET (not 2003). The warnings are >>> of the type >>> >>> >>> wrap_vnl_vectorPython.cxx(1301) : warning C4297: >>> '_wrap_vnl_vector_uchar_data_block__SWIG_1' : function assumed not to >>> throw an exception but does >> >>Urgh! That because of the catch(...){throw;} clause at the very end. >>This rethrows the exception if it wasn't handled and is automatically >>added by the existing swig code. >> >>Technically, this shouldn't be a warning... if there is no throw() >>specifier for a method/function, it is allowed to throw any exceptions, >>at least as far as my ISO C++ 1998 specification says. >> >>Do you have any other ideas? Is the compiler just broken? In that >>case, I guess the best thing to do is just to deactivate that warning. >> >>> The function is extern "C" and /EHc was specified >>> >>> wrap_vnl_vectorPython.cxx(1294) : warning C4101: '_e' : unreferenced >>> local variable >> >>This I don't get... the _e is ALWAYS used by the subsequent >>SWIG_exception(SWIG_RuntimeError, _e.what()); Could you perhaps post >>the few lines of code before and after your line 1294? >> >>Thanks, >>Charl >> >>-- >>charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ >>_______________________________________________ >>Insight-users mailing list >>Insight-users@itk.org >>http://www.itk.org/mailman/listinfo/insight-users > > > >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users From millerjv@crd.ge.com Fri Jul 25 16:17:49 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Fri, 25 Jul 2003 11:17:49 -0400 Subject: [Insight-users] Wrapping warnings on .NET Message-ID: All give it shot. > -----Original Message----- > From: Bill Hoffman [mailto:bill.hoffman@kitware.com] > Sent: Friday, July 25, 2003 11:13 AM > To: Charl P. Botha; Miller, James V " "(Research) > Cc: Insight-users (E-mail) > Subject: Re: [Insight-users] Wrapping warnings on .NET > > > I think the problem is here: > #ifdef __cplusplus > extern "C" { > #endif > static PyObject *_wrap_itkVectorD3_GetNorm(PyObject *self, > PyObject *args) { > ... > #ifdef __cplusplus > } > #endif > > > I am not sure why swig is doing this. > Looks like a change in > CableSwig/SWIG/Source/Modules1.1/python.cxx should > be able to remove the extern "C" code. > > --- around line 233 ---- > Printf(f_wrappers,"#ifdef __cplusplus\n"); > Printf(f_wrappers,"extern \"C\" {\n"); > Printf(f_wrappers,"#endif\n"); > > > Can you think of why this would have to be extern "C" ?? > Can you try the change Jim, and see if it works? > > -Bill > > At 10:57 AM 7/25/2003, Bill Hoffman wrote: > >Well, it is saying that the function is extern "C". > >I don't think C functions are allowed to throw exceptions are they? > > > >-Bill > > > > > >At 09:36 AM 7/25/2003, Charl P. Botha wrote: > >>On Fri, 2003-07-25 at 15:17, Miller, James V (Research) wrote: > >>> I think the recent changes to CableSwig.cxx are causing > an enormous > >>> number of warnings on Visual Studio .NET (not 2003). The > warnings are > >>> of the type > >>> > >>> > >>> wrap_vnl_vectorPython.cxx(1301) : warning C4297: > >>> '_wrap_vnl_vector_uchar_data_block__SWIG_1' : function > assumed not to > >>> throw an exception but does > >> > >>Urgh! That because of the catch(...){throw;} clause at the > very end. > >>This rethrows the exception if it wasn't handled and is > automatically > >>added by the existing swig code. > >> > >>Technically, this shouldn't be a warning... if there is no throw() > >>specifier for a method/function, it is allowed to throw any > exceptions, > >>at least as far as my ISO C++ 1998 specification says. > >> > >>Do you have any other ideas? Is the compiler just broken? In that > >>case, I guess the best thing to do is just to deactivate > that warning. > >> > >>> The function is extern "C" and /EHc was specified > >>> > >>> wrap_vnl_vectorPython.cxx(1294) : warning C4101: '_e' : > unreferenced > >>> local variable > >> > >>This I don't get... the _e is ALWAYS used by the subsequent > >>SWIG_exception(SWIG_RuntimeError, _e.what()); Could you > perhaps post > >>the few lines of code before and after your line 1294? > >> > >>Thanks, > >>Charl > >> > >>-- > >>charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ > >>_______________________________________________ > >>Insight-users mailing list > >>Insight-users@itk.org > >>http://www.itk.org/mailman/listinfo/insight-users > > > > > > > >_______________________________________________ > >Insight-users mailing list > >Insight-users@itk.org > >http://www.itk.org/mailman/listinfo/insight-users > > > From millerjv@crd.ge.com Fri Jul 25 17:17:26 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Fri, 25 Jul 2003 12:17:26 -0400 Subject: [Insight-users] Wrapping warnings on .NET Message-ID: Removing those lines (and few around line 251) seem to have removed the warnings. I have an anonymous checkout of CableSwig. Does someone else want to check this in? > -----Original Message----- > From: Bill Hoffman [mailto:bill.hoffman@kitware.com] > Sent: Friday, July 25, 2003 11:13 AM > To: Charl P. Botha; Miller, James V " "(Research) > Cc: Insight-users (E-mail) > Subject: Re: [Insight-users] Wrapping warnings on .NET > > > I think the problem is here: > #ifdef __cplusplus > extern "C" { > #endif > static PyObject *_wrap_itkVectorD3_GetNorm(PyObject *self, > PyObject *args) { > ... > #ifdef __cplusplus > } > #endif > > > I am not sure why swig is doing this. > Looks like a change in > CableSwig/SWIG/Source/Modules1.1/python.cxx should > be able to remove the extern "C" code. > > --- around line 233 ---- > Printf(f_wrappers,"#ifdef __cplusplus\n"); > Printf(f_wrappers,"extern \"C\" {\n"); > Printf(f_wrappers,"#endif\n"); > > > Can you think of why this would have to be extern "C" ?? > Can you try the change Jim, and see if it works? > > -Bill > > At 10:57 AM 7/25/2003, Bill Hoffman wrote: > >Well, it is saying that the function is extern "C". > >I don't think C functions are allowed to throw exceptions are they? > > > >-Bill > > > > > >At 09:36 AM 7/25/2003, Charl P. Botha wrote: > >>On Fri, 2003-07-25 at 15:17, Miller, James V (Research) wrote: > >>> I think the recent changes to CableSwig.cxx are causing > an enormous > >>> number of warnings on Visual Studio .NET (not 2003). The > warnings are > >>> of the type > >>> > >>> > >>> wrap_vnl_vectorPython.cxx(1301) : warning C4297: > >>> '_wrap_vnl_vector_uchar_data_block__SWIG_1' : function > assumed not to > >>> throw an exception but does > >> > >>Urgh! That because of the catch(...){throw;} clause at the > very end. > >>This rethrows the exception if it wasn't handled and is > automatically > >>added by the existing swig code. > >> > >>Technically, this shouldn't be a warning... if there is no throw() > >>specifier for a method/function, it is allowed to throw any > exceptions, > >>at least as far as my ISO C++ 1998 specification says. > >> > >>Do you have any other ideas? Is the compiler just broken? In that > >>case, I guess the best thing to do is just to deactivate > that warning. > >> > >>> The function is extern "C" and /EHc was specified > >>> > >>> wrap_vnl_vectorPython.cxx(1294) : warning C4101: '_e' : > unreferenced > >>> local variable > >> > >>This I don't get... the _e is ALWAYS used by the subsequent > >>SWIG_exception(SWIG_RuntimeError, _e.what()); Could you > perhaps post > >>the few lines of code before and after your line 1294? > >> > >>Thanks, > >>Charl > >> > >>-- > >>charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ > >>_______________________________________________ > >>Insight-users mailing list > >>Insight-users@itk.org > >>http://www.itk.org/mailman/listinfo/insight-users > > > > > > > >_______________________________________________ > >Insight-users mailing list > >Insight-users@itk.org > >http://www.itk.org/mailman/listinfo/insight-users > > > From bill.hoffman@kitware.com Fri Jul 25 17:47:22 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Fri, 25 Jul 2003 12:47:22 -0400 Subject: [Insight-users] Wrapping warnings on .NET In-Reply-To: Message-ID: <5.2.0.9.0.20030725124622.0503d7e8@pop.biz.rr.com> OK, I removed the lines, can you give it a try? At 12:17 PM 7/25/2003, Miller, James V (Research) wrote: >Removing those lines (and few around line 251) seem to have removed the >warnings. > >I have an anonymous checkout of CableSwig. Does someone else want to check >this in? > > > >> -----Original Message----- >> From: Bill Hoffman [mailto:bill.hoffman@kitware.com] >> Sent: Friday, July 25, 2003 11:13 AM >> To: Charl P. Botha; Miller, James V " "(Research) >> Cc: Insight-users (E-mail) >> Subject: Re: [Insight-users] Wrapping warnings on .NET >> >> >> I think the problem is here: >> #ifdef __cplusplus >> extern "C" { >> #endif >> static PyObject *_wrap_itkVectorD3_GetNorm(PyObject *self, >> PyObject *args) { >> ... >> #ifdef __cplusplus >> } >> #endif >> >> >> I am not sure why swig is doing this. >> Looks like a change in >> CableSwig/SWIG/Source/Modules1.1/python.cxx should >> be able to remove the extern "C" code. >> >> --- around line 233 ---- >> Printf(f_wrappers,"#ifdef __cplusplus\n"); >> Printf(f_wrappers,"extern \"C\" {\n"); >> Printf(f_wrappers,"#endif\n"); >> >> >> Can you think of why this would have to be extern "C" ?? >> Can you try the change Jim, and see if it works? >> >> -Bill >> >> At 10:57 AM 7/25/2003, Bill Hoffman wrote: >> >Well, it is saying that the function is extern "C". >> >I don't think C functions are allowed to throw exceptions are they? >> > >> >-Bill >> > >> > >> >At 09:36 AM 7/25/2003, Charl P. Botha wrote: >> >>On Fri, 2003-07-25 at 15:17, Miller, James V (Research) wrote: >> >>> I think the recent changes to CableSwig.cxx are causing >> an enormous >> >>> number of warnings on Visual Studio .NET (not 2003). The >> warnings are >> >>> of the type >> >>> >> >>> >> >>> wrap_vnl_vectorPython.cxx(1301) : warning C4297: >> >>> '_wrap_vnl_vector_uchar_data_block__SWIG_1' : function >> assumed not to >> >>> throw an exception but does >> >> >> >>Urgh! That because of the catch(...){throw;} clause at the >> very end. >> >>This rethrows the exception if it wasn't handled and is >> automatically >> >>added by the existing swig code. >> >> >> >>Technically, this shouldn't be a warning... if there is no throw() >> >>specifier for a method/function, it is allowed to throw any >> exceptions, >> >>at least as far as my ISO C++ 1998 specification says. >> >> >> >>Do you have any other ideas? Is the compiler just broken? In that >> >>case, I guess the best thing to do is just to deactivate >> that warning. >> >> >> >>> The function is extern "C" and /EHc was specified >> >>> >> >>> wrap_vnl_vectorPython.cxx(1294) : warning C4101: '_e' : >> unreferenced >> >>> local variable >> >> >> >>This I don't get... the _e is ALWAYS used by the subsequent >> >>SWIG_exception(SWIG_RuntimeError, _e.what()); Could you >> perhaps post >> >>the few lines of code before and after your line 1294? >> >> >> >>Thanks, >> >>Charl >> >> >> >>-- >> >>charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ >> >>_______________________________________________ >> >>Insight-users mailing list >> >>Insight-users@itk.org >> >>http://www.itk.org/mailman/listinfo/insight-users >> > >> > >> > >> >_______________________________________________ >> >Insight-users mailing list >> >Insight-users@itk.org >> >http://www.itk.org/mailman/listinfo/insight-users >> >> >> >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users From john-dill@uiowa.edu Fri Jul 25 19:23:54 2003 From: john-dill@uiowa.edu (Dill, John) Date: Fri, 25 Jul 2003 13:23:54 -0500 Subject: [Insight-users] MI rigid registration Message-ID: I have been having problems trying to find parameters to use MI registration on DRR and portfilm images with MutualInformationEuler2DRegistration. I was wondering if there were any hints on how to find parameters. The combinations that I've tried do not seem to lock onto anything but continue to float farther and farther away as more iterations are used. I am trying to register a DRR image and a portfilm, which is similar to DRR but with less contrast. Are there any intensity distribution considerations that I am not aware of? If anyone is willing to take a closer look, I can send images to an email. Thanks for any help. John From luis.ibanez@kitware.com Fri Jul 25 22:42:01 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Fri, 25 Jul 2003 17:42:01 -0400 Subject: [Insight-users] direction of rotation References: <3F200ABB.2060301@gmx.ch> Message-ID: <3F21A429.4020306@kitware.com> Hi Michael, The Versor components should be computed as you do for Quaternions, that is, you should use : sin( angle/2 ) instead of just the angle, the function should be: double* CalculateVersorTransformParameters(double phi, double nx, double > ny, double nz) { > double* params = new double[3]; > double abs = sqrt (nx * nx + ny * ny + nz * nz); > double angle = phi * PI / 180; > params[0] = nx / abs * sin( angle / 2 ); > params[1] = ny / abs * sin( angle / 2 ); > params[2] = nz / abs * sin( angle / 2) ; > return params; > } Not > params[0] = nx / abs * angle; ... A Versor is simply a unit Quaternion. For the Euler angles, there is not equivalence to the angle, as you are computing it right now. That's actually one of the great disadvantages of using Euler angles. It is an ambiguous specification for rotations. You cannot get the three Euler angles by projecting a rotation angle along the axis of coordinates. It is infact quite difficult to get the euler angles from a quaternion since the Euler angles (as implemented in this transform) are the equivalent of : 1) rotate around axis X by angle = angleX, then 2) rotate around axis Y by angle = angleY, then 3) rotate around axis Z by angle = angleZ So, it is actually the composition of three orthogonal Versors. If you were finding your way back it will be simpler to just use the three angles angleX, angleY and angleZ for computing the rotation matrix, and then from the matrix compute the equivalent versor. Note however that what you have to set as paramters of the Euler3D transfrorm is not the components of the versor, but just the direct values of angleX, angleY and angle Z Regards, Luis -------------------- Michael Kuhn wrote: > Hi, > > I'm trying to transform an object with a QuaternionRigidTransfrom as > well as with an Euler3DTransform. I'm feeding the transforms with the > same angle, axis and translation. The output of the two transforms > differs in the direction of the rotation. Using the Quaternion > transform, the object is rotated by phi degrees to the left (when the > z-Axis points towards me) and using the Euler3DTransform, its rotated by > phi degress to the right. Below the code that calculates the paramters. > Is there something wrong with my calculation of the transform parameters? > > double* CalculateQuaternionTransformParameters(double phi, double nx, > double ny, double nz, double x, double y, double z) > { > double* params = new double[7]; > double mag = sqrt (nx * nx + ny * ny + nz * nz); > // convert phi from degrees to rad > double angle = phi * PI / 180; > params[0] = nx / mag * sin(angle / 2); > params[1] = ny / mag * sin(angle / 2); > params[2] = nz / mag * sin(angle / 2); > params[3] = cos(angle / 2); > params[4] = x; > params[5] = y; > params[6] = z; > return params; > } > > double* CalculateVersorTransformParameters(double phi, double nx, double > ny, double nz) { > double* params = new double[3]; > double abs = sqrt (nx * nx + ny * ny + nz * nz); > double angle = phi * PI / 180; > params[0] = nx / abs * angle; > params[1] = ny / abs * angle; > params[2] = nz / abs * angle; > return params; > } > > double* CalculateEuler3DTransformParameters(double phi, double nx, > double ny, double nz, double tx, double ty, double tz) > { > double* params = new double[6]; > double* versor = CalculateVersorTransformParameters(phi, nx, ny, nz); > params[0] = versor[0]; > params[1] = versor[1]; > params[2] = versor[2]; > params[3] = tx; > params[4] = ty; > params[5] = tz; > return params; > } > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Fri Jul 25 22:45:05 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Fri, 25 Jul 2003 17:45:05 -0400 Subject: [Insight-users] Registration and Euler3DTransform References: <3F209AC3.7060705@gmx.ch> Message-ID: <3F21A4E1.9050101@kitware.com> Hi Michael, The Euler3DTransform is only appropriate for small rotations. In that conditions you could use any of the GradientDescent optimizers. Please keep in mind that this parameterization of the transform is very non-linear. What the optimizer is doing is to perform a linear approximation at every step. So, try keeping the step length at a very conservative value. Regards, Luis -------------------- Michael Kuhn wrote: > Hi, > > does anyone have any experience using the Euler3DTransform for a > registration? Which one would be a suitable optimizer for it? > > Thanks, > > Michael > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Fri Jul 25 22:53:56 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Fri, 25 Jul 2003 17:53:56 -0400 Subject: [Insight-users] MI rigid registration References: Message-ID: <3F21A6F4.1000600@kitware.com> Hi John, It seems to be a good practice to normalize the intensities of your images before using them for registration with MI. This is a statistical normalization, not a range one. So the goal is to obtain an image with mean intensity value equal to zero, and standard deviation of intensities equal to 1.0. You may use the itk::NormalizeImageFilter for this purpose. http://www.itk.org/Insight/Doxygen/html/classitk_1_1NormalizeImageFilter.html Then, start your registration with *very* small values of the step length and try using a simple transform first (e.g. just translation) until you get a better feeling on the parameters appropriate for your images. Plotting the trace of the metric values, and the paramters of the transform as the registration progresses is in general a great help for getting insight in how to tune the parameters. You may want to take a closer look at the registration chapter that Lydia Ng setup in the SoftwareGuide: http://www.itk.org/ItkSoftwareGuide.pdf Section 7.4, pdf-page 218 to 225. You will find, for example, the use of normalization filters there. Regards, Luis ------------------------------------ Dill, John wrote: > I have been having problems trying to find parameters to use MI registration > on DRR and portfilm images with MutualInformationEuler2DRegistration. I was > wondering if there were any hints on how to find parameters. The > combinations that I've tried do not seem to lock onto anything but continue > to float farther and farther away as more iterations are used. I am trying > to register a DRR image and a portfilm, which is similar to DRR but with > less contrast. Are there any intensity distribution considerations that I > am not aware of? > > If anyone is willing to take a closer look, I can send images to an email. > > Thanks for any help. > John > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From pll@sjtu.edu.cn Sun Jul 27 09:42:28 2003 From: pll@sjtu.edu.cn (pll) Date: Sun, 27 Jul 2003 16:42:28 +0800 Subject: [Insight-users] (no subject) Message-ID: <001d01c3541b$03365b50$bb0f10ac@PLL> This is a multi-part message in MIME format. ------=_NextPart_000_001A_01C3545E.11070E80 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 SGkhDQoNCiAgICBJIGFtIGEgbmV3IGNvbWVyIHRvIElUSy4NCg0KICAgIEkgYW0gdmVyeSBpbnRl cnN0ZWQgaW4gUHJpbmNpcGFsQXhlc1Jlc2FtcGxlciBpbiBJbnNpZ2h0QXBwbGljYXRpb25zLTEu Mi4wLkkgaGF2ZSBtYWRlIGEgcHJvamVjdCB0aHJvdWdoIENNYWtlLkJ1dCB3aGVuIEkgY29tcGls ZWQgdGhlIHByb2plY3Qsc29tZXRoaW5nIHdyb25nIGhhcHBlbmVkLlRoZSBvdXRwdXQgb2YgdGhl IERlYnVnIFdpbmRvd3MgaXM6DQoNCiAgICBFOlxJbnNpZ2h0QXBwbGljYXRpb25zLTEuMi4wXFBy aW5jaXBhbEF4ZXNcaXRrUHJpbmNpcGFsQXhlc1Jlc2FtcGxlci5jeHgoNTEpIDogZXJyb3IgQzIw Mzk6ICdUcmFuc2Zvcm1UeXBlJyA6IGlzIG5vdCBhIG1lbWJlciBvZiAnSW1hZ2U8dW5zaWduZWQg c2hvcnQsMz4nDQoNCiAgICBFOlxJbnNpZ2h0QXBwbGljYXRpb25zLTEuMi4wXFByaW5jaXBhbEF4 ZXNcaXRrUHJpbmNpcGFsQXhlc1Jlc2FtcGxlci5jeHgoNTEpIDogZXJyb3IgQzIxNDY6IHN5bnRh eCBlcnJvciA6IG1pc3NpbmcgJzsnIGJlZm9yZSBpZGVudGlmaWVyICdDb29yZFJlcFR5cGUnDQoN CiAgICBFOlxJbnNpZ2h0QXBwbGljYXRpb25zLTEuMi4wXFByaW5jaXBhbEF4ZXNcaXRrUHJpbmNp cGFsQXhlc1Jlc2FtcGxlci5jeHgoNTEpIDogZmF0YWwgZXJyb3IgQzEwMDQ6IHVuZXhwZWN0ZWQg ZW5kIG9mIGZpbGUgZm91bmQNCkVycm9yIGV4ZWN1dGluZyBjbC5leGUuDQogICAgDQogICAgSSBh bSBub3QgZmFtaWxpYXIgd2l0aCBJVEssYW5kIEkgY2FuIG5vdCBldmVuIGZpbmQgdGhlIGRlZmlu aXRpb24gb2YgdGhlIENsYXNzIGFib3V0IHRoaXMgU3ltYm9sLkNvdWxkIHlvdSB0ZWxsIG1lIGhv dyBjYW4gSSByZXNvbHZlIHRoaXMgcHJvYmxlbT8NCiAgICANCiAgICBNeSBzeXN0ZW06V2luZG93 cyAyMDAwLlRoZSBjb21waWxlcjpWQzYgDQogICAgDQoNCiAgICAgICAgUmVnYXJkIQ== ------=_NextPart_000_001A_01C3545E.11070E80 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgaHR0cC1lcXVpdj1Db250ZW50LVR5cGUgY29udGVu dD0idGV4dC9odG1sOyBjaGFyc2V0PWdiMjMxMiI+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNi4w MC4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yZuYnNwOyZuYnNwOyBNeSBzeXN0ZW06 V2luZG93cyAyMDAwLjwvRk9OVD48Rk9OVCANCnNpemU9Mj5UaGUgY29tcGlsZXI6VkM2Jm5ic3A7 PC9GT05UPjwvRElWPg0KPERJVj4NCjxESVY+PEZPTlQgc2l6ZT0yPjwvRk9OVD48L0RJVj48Rk9O VCBzaXplPTI+Jm5ic3A7Jm5ic3A7Jm5ic3A7IDwvRk9OVD48L0RJVj4NCjxESVY+PEZPTlQgc2l6 ZT0yPjwvRk9OVD4mbmJzcDs8L0RJVj4NCjxESVY+PEZPTlQgc2l6ZT0yPiZuYnNwOyZuYnNwOyZu YnNwOyAmbmJzcDsmbmJzcDsmbmJzcDsgDQpSZWdhcmQhPC9GT05UPjwvRElWPjwvRElWPjwvQk9E WT48L0hUTUw+DQo= ------=_NextPart_000_001A_01C3545E.11070E80-- From Marc.Traina@sophia.inria.fr Mon Jul 28 10:32:02 2003 From: Marc.Traina@sophia.inria.fr (Marc Traina) Date: Mon, 28 Jul 2003 11:32:02 +0200 Subject: [Insight-users] CSWIG Java Wrapping Message-ID: <3F24ED92.70709@sophia.inria.fr> Hi, I have seen you are doing a great job on CSwig. It already works well for Python wrapping. But what's about Java wrapping ?? I have found some stuff for java wrapping but it seems that it's not yet usable. There's no answer to the Chunyan's question. http://www.itk.org/pipermail/insight-users/2003-July/004243.html 1 - So what's your plans about CSWIG Java Wrapping ?? 2 - Does CSWIG is the future of CABLE as a separated product used by ITK and VTK ? Thanks Marc From jiang@TI.Uni-Trier.DE Mon Jul 28 10:46:40 2003 From: jiang@TI.Uni-Trier.DE (jiang) Date: Mon, 28 Jul 2003 11:46:40 +0200 Subject: AW: [Insight-users] CSWIG Java Wrapping In-Reply-To: <3F24ED92.70709@sophia.inria.fr> Message-ID: Hi, Marc, I'm happy to know you also have interesting about ITK java wrapping. There must be many other persons interested in it. I hope ITK team will responds this topic. Thanks a lot! Chunyan -----Ursprngliche Nachricht----- Von: insight-users-admin@itk.org [mailto:insight-users-admin@itk.org]Im Auftrag von Marc Traina Gesendet: Montag, 28. Juli 2003 11:32 An: insight-users@itk.org Betreff: [Insight-users] CSWIG Java Wrapping Hi, I have seen you are doing a great job on CSwig. It already works well for Python wrapping. But what's about Java wrapping ?? I have found some stuff for java wrapping but it seems that it's not yet usable. There's no answer to the Chunyan's question. http://www.itk.org/pipermail/insight-users/2003-July/004243.html 1 - So what's your plans about CSWIG Java Wrapping ?? 2 - Does CSWIG is the future of CABLE as a separated product used by ITK and VTK ? Thanks Marc _______________________________________________ Insight-users mailing list Insight-users@itk.org http://www.itk.org/mailman/listinfo/insight-users From c.p.botha@ewi.tudelft.nl Mon Jul 28 11:10:09 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: 28 Jul 2003 12:10:09 +0200 Subject: [Insight-users] Re: VTK ITK tcl/python connection In-Reply-To: <5.2.0.9.0.20030723115432.04f29748@pop.biz.rr.com> References: <5.2.0.9.0.20030723112844.04f23718@pop.biz.rr.com> <5.2.0.9.0.20030723105422.04cd0220@pop.biz.rr.com> <5.2.0.9.0.20030722142920.04decdb8@pop.biz.rr.com> <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> <5.2.0.9.0.20030722142920.04decdb8@pop.biz.rr.com> <5.2.0.9.0.20030723105422.04cd0220@pop.biz.rr.com> <5.2.0.9.0.20030723112844.04f23718@pop.biz.rr.com> <5.2.0.9.0.20030723115432.04f29748@pop.biz.rr.com> Message-ID: <1059387009.7725.32.camel@dutidad> --=-6p7bFtenSftQ42Xd38pl Content-Type: text/plain Content-Transfer-Encoding: 7bit On Wed, 2003-07-23 at 17:58, Bill Hoffman wrote: > I would like to introduce you to Charl Botha. He has > already implemented a python itk/vtk integration. > He is looking into a more general solution based on the > same information I sent you. You may want to try Okay, it's all done. Bill, I have built and tested it on Windows VC++ 6.0 and on g++ 2.95.4 on Debian Linux and then went and committed it. I had to make more changes to CableSwig.cxx to make the CableSwig and NoCable wrappings compatible: see CableSwig::TemplateName(). These changes have more advantages: it means in future we will be able to add similar pure Swig interface files to Insight and have the generated wrappings interact with and operate on CableSwig wrapped objects. I have attached a Python sample illustrating a pipeline that loads data in using VTK, processes it with ITK and then writes it away using VTK again. Where in the Insight tree could I add this? I had to add some code to the top-level CMakeLists.txt to add the ITK_CSWIG_CONNECTVTKITK option (if CSWIG wrapping is active) and to mark it as advanced. In addition, if this option is ON, the CMakeLists in Wrapping/CSwig has to make use of FindVTK.cmake as well. Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ --=-6p7bFtenSftQ42Xd38pl Content-Disposition: attachment; filename=cannyEdgeDetectionImageFilter-ConnectVTKITK.py Content-Type: text/x-python; name=cannyEdgeDetectionImageFilter-ConnectVTKITK.py; charset=us-ascii Content-Transfer-Encoding: 7bit # This file demonstrates how to connect VTK and ITK pipelines together # in scripted languages with the new ConnectVTKITK wrapping functionality. # Data is loaded in with VTK, processed with ITK and written back to disc # with VTK. # # Note that this will only work if your ITK was compiled with # ITK_CSWIG_CONNECTVTKITK set to ON # # -- Charl P. Botha import os import InsightToolkit as itk import vtk reader = vtk.vtkPNGReader() ITK_TOP = "/home/cpbotha/build/Insight" reader.SetFileName(os.path.join(ITK_TOP, "Testing/Data/Input/cthead1.png")) # it has to be a single component, itk::VTKImageImport doesn't support more lum = vtk.vtkImageLuminance() lum.SetInput(reader.GetOutput()) # let's cast the output to float imageCast = vtk.vtkImageCast() imageCast.SetOutputScalarTypeToFloat() imageCast.SetInput(lum.GetOutput()) # the end-point of this VTK pipeline segment is a vtkImageExport vtkExporter = vtk.vtkImageExport() vtkExporter.SetInput(imageCast.GetOutput()) # it connects to the itk::VTKImageImport at the beginning of # the subsequent ITK pipeline; two-dimensional float type itkImporter = itk.itkVTKImageImportF2_New() # call the magic function that connects the two itk.ConnectVTKToITKF2(vtkExporter, itkImporter.GetPointer()) canny = itk.itkCannyEdgeDetectionImageFilterF2F2_New() rescaler = itk.itkRescaleIntensityImageFilterF2US2_New() canny.SetInput(itkImporter.GetOutput()) rescaler.SetInput(canny.GetOutput()) rescaler.SetOutputMinimum(0) rescaler.SetOutputMaximum(65535) # this is to show off the new PyCommand functionality. :) def progressEvent(): print canny.GetProgress() pc = itk.itkPyCommand_New() pc.SetCommandCallable(progressEvent) canny.AddObserver(itk.itkProgressEvent(), pc.GetPointer()) # end of show-off # this will form the end-point of the ITK pipeline segment itkExporter = itk.itkVTKImageExportUS2_New() itkExporter.SetInput(rescaler.GetOutput()) # the vtkImageImport will bring our data back into VTK-land vtkImporter = vtk.vtkImageImport() # do the magic connection call itk.ConnectITKUS2ToVTK(itkExporter.GetPointer(), vtkImporter) # finally write the image to disk using VTK writer = vtk.vtkPNGWriter() writer.SetFileName('maatjie.png') writer.SetInput(vtkImporter.GetOutput()) # before we call Write() on the writer, it is prudent to give # our ITK pipeline an Update() call... this is not necessary # for normal error-less operation, but ensures that exceptions # thrown by ITK get through to us in the case of an error; # This is because the VTK wrapping system does not support # C++ exceptions. rescaler.Update() # write the file to disk... writer.Write() --=-6p7bFtenSftQ42Xd38pl-- From luis.ibanez@kitware.com Mon Jul 28 14:34:48 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 28 Jul 2003 09:34:48 -0400 Subject: [Insight-users] Re: [Insight-users](no subject) : Building PrinciplasAxesResampler in InsightApplications References: <001d01c3541b$03365b50$bb0f10ac@PLL> Message-ID: <3F252678.7090208@kitware.com> Hi Pll, It seems that you are trying to build one of the applications in InsightApplications independently of the others. The applications are currently configured to be build from the top directory "InsightApplications", not from the individual subdirectories. All the subdirectories are sharing configuration parameters that are set at the top level. For example the location of FLTK and VTK libraries. Please run CMake at the top level and then open the InsightApplications.dsw file that will be created in your binary directory. >From the VC++ IDE you will be able to select the PrincipasAxesResampler project. Regards, Luis ------------- pll wrote: > Hi! > > I am a new comer to ITK. > > I am very intersted in PrincipalAxesResampler in > InsightApplications-1.2.0.I have made a project through CMake.But when I > compiled the project,something wrong happened.The output of the > Debug Windows is: > > > E:\InsightApplications-1.2.0\PrincipalAxes\itkPrincipalAxesResampler.cxx(51) > : error C2039: 'TransformType' : is not a member of 'Image short,3>' > > E:\InsightApplications-1.2.0\PrincipalAxes\itkPrincipalAxesResampler.cxx(51) > : error C2146: syntax error : missing ';' before identifier 'CoordRepType' > > E:\InsightApplications-1.2.0\PrincipalAxes\itkPrincipalAxesResampler.cxx(51) > : fatal error C1004: unexpected end of file found > Error executing cl.exe. > > I am not familiar with ITK,and I can not even find the definition of > the Class about this Symbol.Could you tell me how can I resolve this > problem? > > My system:Windows 2000.The compiler:VC6 > > > Regard! From luis.ibanez@kitware.com Mon Jul 28 14:47:55 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 28 Jul 2003 09:47:55 -0400 Subject: [Insight-users] Re: VTK ITK tcl/python connection References: <5.2.0.9.0.20030723112844.04f23718@pop.biz.rr.com> <5.2.0.9.0.20030723105422.04cd0220@pop.biz.rr.com> <5.2.0.9.0.20030722142920.04decdb8@pop.biz.rr.com> <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722120849.04cca2a0@pop.biz.rr.com> <1058891179.13793.38.camel@dutidad> <5.2.0.9.0.20030722133548.04dc1528@pop.biz.rr.com> <5.2.0.9.0.20030722142920.04decdb8@pop.biz.rr.com> <5.2.0.9.0.20030723105422.04cd0220@pop.biz.rr.com> <5.2.0.9.0.20030723112844.04f23718@pop.biz.rr.com> <5.2.0.9.0.20030723115432.04f29748@pop.biz.rr.com> <1059387009.7725.32.camel@dutidad> Message-ID: <3F25298B.1090108@kitware.com> Hi Charl, That's great news, We just created a directory "Visualization" under Insight/Examples Please feel free to add the file there. I would suggest to use a different name, in order to match the naming style of the other files in the Examples directory. For example: CannyEdgeDetectionImageFilterAndViewer.cxx We are adding a section on ITK+VTK integration to the SoftwareGuide. Your example will fit well in this section. Other C++ examples will be in the same section. Thanks Luis ------------------------------ Charl P. Botha wrote: > On Wed, 2003-07-23 at 17:58, Bill Hoffman wrote: > >>I would like to introduce you to Charl Botha. He has >>already implemented a python itk/vtk integration. >>He is looking into a more general solution based on the >>same information I sent you. You may want to try > > > Okay, it's all done. Bill, I have built and tested it on Windows VC++ > 6.0 and on g++ 2.95.4 on Debian Linux and then went and committed it. I > had to make more changes to CableSwig.cxx to make the CableSwig and > NoCable wrappings compatible: see CableSwig::TemplateName(). These > changes have more advantages: it means in future we will be able to add > similar pure Swig interface files to Insight and have the generated > wrappings interact with and operate on CableSwig wrapped objects. > > I have attached a Python sample illustrating a pipeline that loads data > in using VTK, processes it with ITK and then writes it away using VTK > again. Where in the Insight tree could I add this? > > I had to add some code to the top-level CMakeLists.txt to add the > ITK_CSWIG_CONNECTVTKITK option (if CSWIG wrapping is active) and to mark > it as advanced. In addition, if this option is ON, the CMakeLists in > Wrapping/CSwig has to make use of FindVTK.cmake as well. > > Thanks, > Charl > > > > ------------------------------------------------------------------------ > > # This file demonstrates how to connect VTK and ITK pipelines together > # in scripted languages with the new ConnectVTKITK wrapping functionality. > # Data is loaded in with VTK, processed with ITK and written back to disc > # with VTK. > # > # Note that this will only work if your ITK was compiled with > # ITK_CSWIG_CONNECTVTKITK set to ON > # > # -- Charl P. Botha > > import os > import InsightToolkit as itk > import vtk > > reader = vtk.vtkPNGReader() > ITK_TOP = "/home/cpbotha/build/Insight" > reader.SetFileName(os.path.join(ITK_TOP, "Testing/Data/Input/cthead1.png")) > > # it has to be a single component, itk::VTKImageImport doesn't support more > lum = vtk.vtkImageLuminance() > lum.SetInput(reader.GetOutput()) > > # let's cast the output to float > imageCast = vtk.vtkImageCast() > imageCast.SetOutputScalarTypeToFloat() > imageCast.SetInput(lum.GetOutput()) > > # the end-point of this VTK pipeline segment is a vtkImageExport > vtkExporter = vtk.vtkImageExport() > vtkExporter.SetInput(imageCast.GetOutput()) > > # it connects to the itk::VTKImageImport at the beginning of > # the subsequent ITK pipeline; two-dimensional float type > itkImporter = itk.itkVTKImageImportF2_New() > > # call the magic function that connects the two > itk.ConnectVTKToITKF2(vtkExporter, itkImporter.GetPointer()) > > canny = itk.itkCannyEdgeDetectionImageFilterF2F2_New() > rescaler = itk.itkRescaleIntensityImageFilterF2US2_New() > canny.SetInput(itkImporter.GetOutput()) > rescaler.SetInput(canny.GetOutput()) > rescaler.SetOutputMinimum(0) > rescaler.SetOutputMaximum(65535) > > # this is to show off the new PyCommand functionality. :) > def progressEvent(): > print canny.GetProgress() > > pc = itk.itkPyCommand_New() > pc.SetCommandCallable(progressEvent) > canny.AddObserver(itk.itkProgressEvent(), pc.GetPointer()) > # end of show-off > > # this will form the end-point of the ITK pipeline segment > itkExporter = itk.itkVTKImageExportUS2_New() > itkExporter.SetInput(rescaler.GetOutput()) > > # the vtkImageImport will bring our data back into VTK-land > vtkImporter = vtk.vtkImageImport() > # do the magic connection call > itk.ConnectITKUS2ToVTK(itkExporter.GetPointer(), vtkImporter) > > # finally write the image to disk using VTK > writer = vtk.vtkPNGWriter() > writer.SetFileName('maatjie.png') > writer.SetInput(vtkImporter.GetOutput()) > > # before we call Write() on the writer, it is prudent to give > # our ITK pipeline an Update() call... this is not necessary > # for normal error-less operation, but ensures that exceptions > # thrown by ITK get through to us in the case of an error; > # This is because the VTK wrapping system does not support > # C++ exceptions. > rescaler.Update() > > # write the file to disk... > writer.Write() From luis.ibanez@kitware.com Mon Jul 28 15:00:52 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 28 Jul 2003 10:00:52 -0400 Subject: [Insight-users] Re: ITK Processing + VTK Visualization References: Message-ID: <3F252C94.2040307@kitware.com> Hi Marcellus, The viewers provided in InsightApplications are not intended to be used for complex applications. They only serve the purpose of making possible to illustrate the use of ITK in demo applications of the InsightApplications directory. If you want to develop a full fledged application integrating processing and visualization you should combine ITK and VTK pipelines using the filter adaptors available in InsightApplications/Auxiliary/vtk Please look at the classes: - itkImageToVTKImage - itkVTKImageToImage Regards, Luis ---------------------------- marcellus walace wrote: > > HI Luis, > I've another question. > In vtk we use Mapper and Actor to view dicoms images, or images in > general. Can I visualize a dicom image of itk using the Mapper and Actor > of Vtk? OR do you know how I can visualize more than > 1 dicom images in the same window by using image viewer of itk? > > > please I need an answer please I need help? > > > Regards, > > Marcellus > > _________________________________________________________________ > Tired of spam? Get advanced junk mail protection with MSN 8. > http://join.msn.com/?page=features/junkmail > > From millerjv@crd.ge.com Mon Jul 28 15:04:35 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Mon, 28 Jul 2003 10:04:35 -0400 Subject: [Insight-users] Re: VTK ITK tcl/python connection Message-ID: In reference to adding an example using VTK to the ITK tree: We had been trying to keep the ITK distribution separate from any external dependencies. This is to ensure that people's first experience with ITK (configuring and build) is as smooth as we can make it. Obviously, when we throw wrapping into the mix, we have to "loosen" this constraint to at least include CSwig and some interpretor (Tcl, Python). But should this constraint be loosened to include VTK when wrapping is enabled? When we had examples that included VTK, FLTK, ... it was very difficult for new users to build ITK. New users have a tendency to turn everything on and are confused about messages of missing "components". Perhaps such an example is better suited for InsightApplications. > -----Original Message----- > From: Luis Ibanez [mailto:luis.ibanez@kitware.com] > Sent: Monday, July 28, 2003 9:48 AM > To: Charl P. Botha > Cc: Bill Hoffman; Raul San Jose Estepar; ITK Users > Subject: Re: [Insight-users] Re: VTK ITK tcl/python connection > > > > Hi Charl, > > That's great news, > > We just created a directory "Visualization" under > Insight/Examples > > Please feel free to add the file there. I would > suggest to use a different name, in order to match > the naming style of the other files in the Examples > directory. > > For example: > > CannyEdgeDetectionImageFilterAndViewer.cxx > > We are adding a section on ITK+VTK integration to > the SoftwareGuide. Your example will fit well in > this section. Other C++ examples will be in the > same section. > > > Thanks > > > Luis > > > > ------------------------------ > Charl P. Botha wrote: > > On Wed, 2003-07-23 at 17:58, Bill Hoffman wrote: > > > >>I would like to introduce you to Charl Botha. He has > >>already implemented a python itk/vtk integration. > >>He is looking into a more general solution based on the > >>same information I sent you. You may want to try > > > > > > Okay, it's all done. Bill, I have built and tested it on > Windows VC++ > > 6.0 and on g++ 2.95.4 on Debian Linux and then went and > committed it. I > > had to make more changes to CableSwig.cxx to make the CableSwig and > > NoCable wrappings compatible: see CableSwig::TemplateName(). These > > changes have more advantages: it means in future we will be > able to add > > similar pure Swig interface files to Insight and have the generated > > wrappings interact with and operate on CableSwig wrapped objects. > > > > I have attached a Python sample illustrating a pipeline > that loads data > > in using VTK, processes it with ITK and then writes it away > using VTK > > again. Where in the Insight tree could I add this? > > > > I had to add some code to the top-level CMakeLists.txt to add the > > ITK_CSWIG_CONNECTVTKITK option (if CSWIG wrapping is > active) and to mark > > it as advanced. In addition, if this option is ON, the > CMakeLists in > > Wrapping/CSwig has to make use of FindVTK.cmake as well. > > > > Thanks, > > Charl > > > > > > > > > -------------------------------------------------------------- > ---------- > > > > # This file demonstrates how to connect VTK and ITK > pipelines together > > # in scripted languages with the new ConnectVTKITK wrapping > functionality. > > # Data is loaded in with VTK, processed with ITK and > written back to disc > > # with VTK. > > # > > # Note that this will only work if your ITK was compiled with > > # ITK_CSWIG_CONNECTVTKITK set to ON > > # > > # -- Charl P. Botha > > > > import os > > import InsightToolkit as itk > > import vtk > > > > reader = vtk.vtkPNGReader() > > ITK_TOP = "/home/cpbotha/build/Insight" > > reader.SetFileName(os.path.join(ITK_TOP, > "Testing/Data/Input/cthead1.png")) > > > > # it has to be a single component, itk::VTKImageImport > doesn't support more > > lum = vtk.vtkImageLuminance() > > lum.SetInput(reader.GetOutput()) > > > > # let's cast the output to float > > imageCast = vtk.vtkImageCast() > > imageCast.SetOutputScalarTypeToFloat() > > imageCast.SetInput(lum.GetOutput()) > > > > # the end-point of this VTK pipeline segment is a vtkImageExport > > vtkExporter = vtk.vtkImageExport() > > vtkExporter.SetInput(imageCast.GetOutput()) > > > > # it connects to the itk::VTKImageImport at the beginning of > > # the subsequent ITK pipeline; two-dimensional float type > > itkImporter = itk.itkVTKImageImportF2_New() > > > > # call the magic function that connects the two > > itk.ConnectVTKToITKF2(vtkExporter, itkImporter.GetPointer()) > > > > canny = itk.itkCannyEdgeDetectionImageFilterF2F2_New() > > rescaler = itk.itkRescaleIntensityImageFilterF2US2_New() > > canny.SetInput(itkImporter.GetOutput()) > > rescaler.SetInput(canny.GetOutput()) > > rescaler.SetOutputMinimum(0) > > rescaler.SetOutputMaximum(65535) > > > > # this is to show off the new PyCommand functionality. :) > > def progressEvent(): > > print canny.GetProgress() > > > > pc = itk.itkPyCommand_New() > > pc.SetCommandCallable(progressEvent) > > canny.AddObserver(itk.itkProgressEvent(), pc.GetPointer()) > > # end of show-off > > > > # this will form the end-point of the ITK pipeline segment > > itkExporter = itk.itkVTKImageExportUS2_New() > > itkExporter.SetInput(rescaler.GetOutput()) > > > > # the vtkImageImport will bring our data back into VTK-land > > vtkImporter = vtk.vtkImageImport() > > # do the magic connection call > > itk.ConnectITKUS2ToVTK(itkExporter.GetPointer(), vtkImporter) > > > > # finally write the image to disk using VTK > > writer = vtk.vtkPNGWriter() > > writer.SetFileName('maatjie.png') > > writer.SetInput(vtkImporter.GetOutput()) > > > > # before we call Write() on the writer, it is prudent to give > > # our ITK pipeline an Update() call... this is not necessary > > # for normal error-less operation, but ensures that exceptions > > # thrown by ITK get through to us in the case of an error; > > # This is because the VTK wrapping system does not support > > # C++ exceptions. > > rescaler.Update() > > > > # write the file to disk... > > writer.Write() > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From c.p.botha@ewi.tudelft.nl Mon Jul 28 15:13:03 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: 28 Jul 2003 16:13:03 +0200 Subject: [Insight-users] Re: VTK ITK tcl/python connection In-Reply-To: References: Message-ID: <1059401583.7725.52.camel@dutidad> On Mon, 2003-07-28 at 16:04, Miller, James V (Research) wrote: > When we had examples that included VTK, FLTK, ... it was very > difficult for new users to build ITK. New users have a tendency > to turn everything on and are confused about messages of > missing "components". > > Perhaps such an example is better suited for InsightApplications. VTK is only linked for the wrapping if ITK_CSWIG_CONNECTVTKITK has been explicitly set to ON. This CMake option is ADVANCED and set to OFF by default. Examples demonstrating the new CSwig ConnectVTKITK functionality I added are by definition scripted (i.e. Python, Tcl and later Java) so there should be no problems with builds "breaking". I haven't committed the example yet, I'll await the rest of this discussion. :) Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From luis.ibanez@kitware.com Mon Jul 28 15:22:49 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 28 Jul 2003 10:22:49 -0400 Subject: [Insight-users] Re: VTK ITK tcl/python connection References: Message-ID: <3F2531B9.9070504@kitware.com> Jim, I agree with you in that we don't want to add dependencies to VTK or FLTK to the source tree. The Insight/Examples/Visualization directory will be configured to be built outside the source tree. Just like the HelloWorld example in Examples/Installation. The examples in the Visualization directory will not be built by default. In this way we will avoid adding dependencies to ITK. The main reason for placing this file in the Examples directory is to reference it in the SoftwareGuide, along with other C++ examples to be added there soon. Luis ---------------------------------- Miller, James V (Research) wrote: > In reference to adding an example using VTK to the ITK tree: > > We had been trying to keep the ITK distribution separate from > any external dependencies. This is to ensure that people's first > experience with ITK (configuring and build) is as smooth as we > can make it. Obviously, when we throw wrapping into the mix, > we have to "loosen" this constraint to at least include CSwig and > some interpretor (Tcl, Python). But should this constraint be > loosened to include VTK when wrapping is enabled? > > When we had examples that included VTK, FLTK, ... it was very > difficult for new users to build ITK. New users have a tendency > to turn everything on and are confused about messages of > missing "components". > > Perhaps such an example is better suited for InsightApplications. > > > > > > >>-----Original Message----- >>From: Luis Ibanez [mailto:luis.ibanez@kitware.com] >>Sent: Monday, July 28, 2003 9:48 AM >>To: Charl P. Botha >>Cc: Bill Hoffman; Raul San Jose Estepar; ITK Users >>Subject: Re: [Insight-users] Re: VTK ITK tcl/python connection >> >> >> >>Hi Charl, >> >>That's great news, >> >>We just created a directory "Visualization" under >>Insight/Examples >> >>Please feel free to add the file there. I would >>suggest to use a different name, in order to match >>the naming style of the other files in the Examples >>directory. >> >>For example: >> >> CannyEdgeDetectionImageFilterAndViewer.cxx >> >>We are adding a section on ITK+VTK integration to >>the SoftwareGuide. Your example will fit well in >>this section. Other C++ examples will be in the >>same section. >> >> >>Thanks >> >> >> Luis >> >> >> >>------------------------------ >>Charl P. Botha wrote: >> >>>On Wed, 2003-07-23 at 17:58, Bill Hoffman wrote: >>> >>> >>>>I would like to introduce you to Charl Botha. He has >>>>already implemented a python itk/vtk integration. >>>>He is looking into a more general solution based on the >>>>same information I sent you. You may want to try >>> >>> >>>Okay, it's all done. Bill, I have built and tested it on >> >>Windows VC++ >> >>>6.0 and on g++ 2.95.4 on Debian Linux and then went and >> >>committed it. I >> >>>had to make more changes to CableSwig.cxx to make the CableSwig and >>>NoCable wrappings compatible: see CableSwig::TemplateName(). These >>>changes have more advantages: it means in future we will be >> >>able to add >> >>>similar pure Swig interface files to Insight and have the generated >>>wrappings interact with and operate on CableSwig wrapped objects. >>> >>>I have attached a Python sample illustrating a pipeline >> >>that loads data >> >>>in using VTK, processes it with ITK and then writes it away >> >>using VTK >> >>>again. Where in the Insight tree could I add this? >>> >>>I had to add some code to the top-level CMakeLists.txt to add the >>>ITK_CSWIG_CONNECTVTKITK option (if CSWIG wrapping is >> >>active) and to mark >> >>>it as advanced. In addition, if this option is ON, the >> >>CMakeLists in >> >>>Wrapping/CSwig has to make use of FindVTK.cmake as well. >>> >>>Thanks, >>>Charl >>> >>> >>> >>> >> >>-------------------------------------------------------------- >>---------- >> >>># This file demonstrates how to connect VTK and ITK >> >>pipelines together >> >>># in scripted languages with the new ConnectVTKITK wrapping >> >>functionality. >> >>># Data is loaded in with VTK, processed with ITK and >> >>written back to disc >> >>># with VTK. >>># >>># Note that this will only work if your ITK was compiled with >>># ITK_CSWIG_CONNECTVTKITK set to ON >>># >>># -- Charl P. Botha >>> >>>import os >>>import InsightToolkit as itk >>>import vtk >>> >>>reader = vtk.vtkPNGReader() >>>ITK_TOP = "/home/cpbotha/build/Insight" >>>reader.SetFileName(os.path.join(ITK_TOP, >> >>"Testing/Data/Input/cthead1.png")) >> >>># it has to be a single component, itk::VTKImageImport >> >>doesn't support more >> >>>lum = vtk.vtkImageLuminance() >>>lum.SetInput(reader.GetOutput()) >>> >>># let's cast the output to float >>>imageCast = vtk.vtkImageCast() >>>imageCast.SetOutputScalarTypeToFloat() >>>imageCast.SetInput(lum.GetOutput()) >>> >>># the end-point of this VTK pipeline segment is a vtkImageExport >>>vtkExporter = vtk.vtkImageExport() >>>vtkExporter.SetInput(imageCast.GetOutput()) >>> >>># it connects to the itk::VTKImageImport at the beginning of >>># the subsequent ITK pipeline; two-dimensional float type >>>itkImporter = itk.itkVTKImageImportF2_New() >>> >>># call the magic function that connects the two >>>itk.ConnectVTKToITKF2(vtkExporter, itkImporter.GetPointer()) >>> >>>canny = itk.itkCannyEdgeDetectionImageFilterF2F2_New() >>>rescaler = itk.itkRescaleIntensityImageFilterF2US2_New() >>>canny.SetInput(itkImporter.GetOutput()) >>>rescaler.SetInput(canny.GetOutput()) >>>rescaler.SetOutputMinimum(0) >>>rescaler.SetOutputMaximum(65535) >>> >>># this is to show off the new PyCommand functionality. :) >>>def progressEvent(): >>> print canny.GetProgress() >>> >>>pc = itk.itkPyCommand_New() >>>pc.SetCommandCallable(progressEvent) >>>canny.AddObserver(itk.itkProgressEvent(), pc.GetPointer()) >>># end of show-off >>> >>># this will form the end-point of the ITK pipeline segment >>>itkExporter = itk.itkVTKImageExportUS2_New() >>>itkExporter.SetInput(rescaler.GetOutput()) >>> >>># the vtkImageImport will bring our data back into VTK-land >>>vtkImporter = vtk.vtkImageImport() >>># do the magic connection call >>>itk.ConnectITKUS2ToVTK(itkExporter.GetPointer(), vtkImporter) >>> >>># finally write the image to disk using VTK >>>writer = vtk.vtkPNGWriter() >>>writer.SetFileName('maatjie.png') >>>writer.SetInput(vtkImporter.GetOutput()) >>> >>># before we call Write() on the writer, it is prudent to give >>># our ITK pipeline an Update() call... this is not necessary >>># for normal error-less operation, but ensures that exceptions >>># thrown by ITK get through to us in the case of an error; >>># This is because the VTK wrapping system does not support >>># C++ exceptions. >>>rescaler.Update() >>> >>># write the file to disk... >>>writer.Write() >> >> >> >>_______________________________________________ >>Insight-users mailing list >>Insight-users@itk.org >>http://www.itk.org/mailman/listinfo/insight-users >> > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From bill.hoffman@kitware.com Mon Jul 28 16:01:16 2003 From: bill.hoffman@kitware.com (Bill Hoffman) Date: Mon, 28 Jul 2003 11:01:16 -0400 Subject: AW: [Insight-users] CSWIG Java Wrapping In-Reply-To: References: <3F24ED92.70709@sophia.inria.fr> Message-ID: <5.2.0.9.0.20030728105505.04e92af0@pop.biz.rr.com> The CSwig Java wrapping will not be looked at by Kitware until the next fiscal year, and possibly the next calendar year. It is planned that CSWig will be used for ITK in the foreseeable future. It will most likely not be used for VTK, since the wrapping system is already working for VTK. However, it will be possible to mix ITK/VTK scripts. If anyone is interested in Java support before then, you can send me email and I can tell you how to get started. -Bill At 05:46 AM 7/28/2003, jiang wrote: >Hi, Marc, >I'm happy to know you also have interesting about ITK java wrapping. There >must be many other persons interested in it. I hope ITK team will responds >this topic. > >Thanks a lot! > >Chunyan > >-----Ursprngliche Nachricht----- >Von: insight-users-admin@itk.org [mailto:insight-users-admin@itk.org]Im >Auftrag von Marc Traina >Gesendet: Montag, 28. Juli 2003 11:32 >An: insight-users@itk.org >Betreff: [Insight-users] CSWIG Java Wrapping > > >Hi, > >I have seen you are doing a great job on CSwig. >It already works well for Python wrapping. > >But what's about Java wrapping ?? >I have found some stuff for java wrapping but it seems that it's not yet >usable. > >There's no answer to the Chunyan's question. > http://www.itk.org/pipermail/insight-users/2003-July/004243.html > > >1 - So what's your plans about CSWIG Java Wrapping ?? > >2 - Does CSWIG is the future of CABLE as a separated product used by ITK >and VTK ? > > >Thanks > >Marc > >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users > >_______________________________________________ >Insight-users mailing list >Insight-users@itk.org >http://www.itk.org/mailman/listinfo/insight-users From itk@stmoser.ch Mon Jul 28 19:09:22 2003 From: itk@stmoser.ch (itk@stmoser.ch) Date: Mon, 28 Jul 2003 20:09:22 +0200 (MEST) Subject: [Insight-users] Registration performance / sparce data In-Reply-To: <3F21A6F4.1000600@kitware.com> References: <3F21A6F4.1000600@kitware.com> Message-ID: Hi all, Is there an efficient way of registering sparce 3D data (itkPointSet) into a 3D fixed image (type itkImage)? I figured that I might use a PointSet representation for a small but relevant subset of a 3D image. Both Images and PointSets are DataObject and in principle it should be possible to work on the data sets using interators (just as the metrics do, as I suppose). Thanks, Stephan From luis.ibanez@kitware.com Mon Jul 28 19:22:07 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 28 Jul 2003 14:22:07 -0400 Subject: [Insight-users] Registration performance / sparce data References: <3F21A6F4.1000600@kitware.com> Message-ID: <3F2569CF.3040606@kitware.com> Hi Stephan, You may want to use the PointSetToImage registration. Please take a look at http://www.itk.org/Insight/Doxygen/html/classitk_1_1PointSetToImageRegistrationMethod.html You may use as example the code in itkPointSetToImageRegistrationTest_1.cxx Under Insight/Testing/Code/Algorithms This will register a PointSet (sparse N-D data) composed of point positions + point values, against a N-D image. -- Currently only the NormalizedCorrelation metric is implemented. Regards, Luis --------------------------- itk@stmoser.ch wrote: > Hi all, > > Is there an efficient way of registering sparce 3D data (itkPointSet) > into a 3D fixed image (type itkImage)? I figured that I might use a > PointSet representation for a small but relevant subset of a 3D image. > Both Images and PointSets are DataObject and in principle it should be > possible to work on the data sets using interators (just as the metrics > do, as I suppose). > > Thanks, Stephan > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Mon Jul 28 19:29:32 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Mon, 28 Jul 2003 14:29:32 -0400 Subject: [Insight-users] Re: Building PrincipalAxesResampler References: <20030728165245.D4CA6178FAC@sjtu.edu.cn> Message-ID: <3F256B8C.5040107@kitware.com> Hi Pll, You are right, the SUBDIR() command is missing for this subdirectory in the top level CMakeLists.txt file of the InsightApplications directory. You may simply add the following lines to the CMakeLists.txt file in PrinciplaAxesResampler, and then configure it as an isolated project. FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE( ${ITK_USE_FILE}) ELSE(ITK_FOUND) ELSE(FATAL_ERROR "Please set ITK_DIR") ENDIF(ITK_FOUND) When you run CMake for configuring this project, it will ask for the location of ITK. You will then provide the ITK_DIR variable with the binary directory where you built ITK. Regards, Luis ------------- pll wrote: > Hi Ibanez: > You know that the CMakeLists.txt in the top directory of InsightApplications do not include the line "SUBDIRS (PrincipalAxes)",So I > can not find the project in IDE.I even added it by myself,and I find it.But the wrong information is just what I listed below. > I am so confused about this.My ITK and application are the same Ver.And they are the latest public version. > So what should I do? > Thanks in advance. > > > > ----- Original Message ----- > From: "Luis Ibanez" > To: "pll" > Cc: > Sent: Monday, July 28, 2003 9:34 PM > Subject: Re: [Insight-users](no subject) : Building PrinciplasAxesResampler > in InsightApplications > > > >>Hi Pll, >> >> >>It seems that you are trying to build one of the applications >>in InsightApplications independently of the others. >> >>The applications are currently configured to be build from >>the top directory "InsightApplications", not from the individual >>subdirectories. All the subdirectories are sharing configuration >>parameters that are set at the top level. For example the location >>of FLTK and VTK libraries. >> >>Please run CMake at the top level and then open the >>InsightApplications.dsw file that will be created in your >>binary directory. >> >>From the VC++ IDE you will be able to select the >>PrincipasAxesResampler project. >> >> >>Regards, >> >> >> Luis >> >> >> >>------------- >>pll wrote: >> >>>Hi! >>> >>> I am a new comer to ITK. >>> >>> I am very intersted in PrincipalAxesResampler in >>>InsightApplications-1.2.0.I have made a project through CMake.But when I >>>compiled the project,something wrong happened.The output of the >>>Debug Windows is: >>> >>> >>> >> > E:\\InsightApplications-1.2.0\\PrincipalAxes\\itkPrincipalAxesResampler.cxx(51) > >>>: error C2039: \'TransformType\' : is not a member of \'Image>>short,3>\' >>> >>> >> > E:\\InsightApplications-1.2.0\\PrincipalAxes\\itkPrincipalAxesResampler.cxx(51) > > >>>: error C2146: syntax error : missing \';\' before identifier >> > \'CoordRepType\' > >>> > E:\\InsightApplications-1.2.0\\PrincipalAxes\\itkPrincipalAxesResampler.cxx(51) > >>>: fatal error C1004: unexpected end of file found >>>Error executing cl.exe. >>> >>> I am not familiar with ITK,and I can not even find the definition of >>>the Class about this Symbol.Could you tell me how can I resolve this >>>problem? >>> >>> My system:Windows 2000.The compiler:VC6 >>> >>> >>> Regard! >> >> >> >> >> > > From koen.vanleemput@hus.fi Tue Jul 29 11:52:57 2003 From: koen.vanleemput@hus.fi (Koen Van Leemput) Date: Tue, 29 Jul 2003 13:52:57 +0300 Subject: [Insight-users] itkAnalyzeImageIO bugs/problems Message-ID: <200307291352.57585.koen.vanleemput@hus.fi> Hi, When I was trying to read images written with ITK's Analyze writer (CVS version) into SPM and vice versa, I came across the following problems: -- Problem 1: Images of pixel type "unsigned short" cannot be exchanged between ITK and SPM. I quickly checked the Analyze format, and it would appear that Analyze simply doesn't support images of this pixel type. In ITK, the pixel type field for unsigned short is set to "6", whereas this is "132" in SPM. Is there a specific reason why ITK has chosen 6? And if not, would it be possible to use SPM's definition? Aside from "unsigned short", also "unsigned int" seems different between ITK (defined as 12) and SPM (defined as 136). In case it is decided to change ITK's Analyze image IO, the following lines should be changed: itkAnalyzeDbh.h, line 51-52: ANALYZE_DT_UNSIGNED_SHORT =6 ANALYZE_DT_UNSIGNED_INT =12 into: ANALYZE_DT_UNSIGNED_SHORT =132 ANALYZE_DT_UNSIGNED_INT =136 -- Problem 2: Analyze images of pixel type "unsigned char" get read as "char" in ITK. This is simply a bug: itkAnalyzeImageIO.cxx, line 888-891 case ANALYZE_DT_UNSIGNED_CHAR: m_ComponentType = CHAR; m_PixelType = CHAR; should be case ANALYZE_DT_UNSIGNED_CHAR: m_ComponentType = UCHAR; m_PixelType = UCHAR; -- Problem 3: the FileOriginator field, (ab)used in SPM to store the origin, doesn't get read properly on my machine (gcc 3.2 on Linux Mandrake 9.1) itkAnalyzeImageIO.cxx, line 977-979 strncpy(temp,this->m_hdr.hist.originator,10); temp[10]='\0'; itk::EncapsulateMetaData(thisDic,ITK_FileOriginator,std::string(temp)); should be itk::EncapsulateMetaData(thisDic,ITK_FileOriginator,std::string(this->m_hdr.hist.originator,10)); This also applies to the many other fields in the MetaDataDictionary for itkAnalyzeImageIO. -- That's all ;-) - Koen From koen.vanleemput@hus.fi Tue Jul 29 14:08:43 2003 From: koen.vanleemput@hus.fi (Koen Van Leemput) Date: Tue, 29 Jul 2003 16:08:43 +0300 Subject: [Insight-users] Bug in itkVector Message-ID: <200307291608.43126.koen.vanleemput@hus.fi> Hi, When using a DLL build of ITK, I couldn't use such things as the cross product of two ITK Vectors. The reason is the occurrence of "ITK_EXPORT" where it should be "ITKCommon_EXPORT" in itkVector.h and itkVector.cxx. - Koen From avi.barshalev@med.ge.com Tue Jul 29 14:52:41 2003 From: avi.barshalev@med.ge.com (Bar-shalev, Avi (MED)) Date: Tue, 29 Jul 2003 15:52:41 +0200 Subject: [Insight-users] Bad start Message-ID: I am new user of ITK. Not being a programmer, you may regard me as "just looking". I am using Win2000 with MSDEV 6. I have installed ITK under "C:\Program Files". I run the successfully the "C:\Program Files\ITK\InsightToolkit-1.2.0\Code" part using CMakesetup with this entry as the "Where is the source code". Compilation run OK to completion. I intend to go with "ItkSoftweareGuide" chapter by chapter, so I am trying to build "C:\Program Files\ITK\InsightToolkit-1.2.0\Examples\DataRepresentation\Image". I tried CMakeSetup with this directory, and I am this directory and run "cmake" (with setting ITK_SOURCE_DIr and ITK_BINARY_DIR. Everything seems OK, but trying to compile issues: C:\Program Files\ITK\InsightToolkit-1.2.0\Utilities\vxl\vnl/vnl_numeric_traits.h(31) : fatal error C1083: Cannot open include file: 'vxl_config.h': No such file or directory (I do not see any Additional Include directories in the C/C++ tab preprocessor category). What am I doing wrong? Regards, Avi Avi Bar-Shalev Applications expert GEMS, Functional Imaging Haifa avi.barshalev@med.ge.com From millerjv@crd.ge.com Tue Jul 29 16:47:54 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Tue, 29 Jul 2003 11:47:54 -0400 Subject: [Insight-users] Bad start Message-ID: You should only have to run CMakeSetup at the toplevel of the ITK source tree. So for your installation, in CMakeSetup you would set the "Where is the source code" to C:\Program Files\ITK\InsightToolkit-1.2.0\ Set your binary tree to whereever you want the object files and libraries to go. Make sure BUILD_EXAMPLES is "ON" Load up the generated workspace in DevStudio. Build. This should build all the libraries and all the examples. You do not need to run CMake on each example separately. Jim > -----Original Message----- > From: Bar-shalev, Avi (MED) [mailto:avi.barshalev@med.ge.com] > Sent: Tuesday, July 29, 2003 9:53 AM > To: insight-users@public.kitware.com > Subject: [Insight-users] Bad start > > > > I am new user of ITK. Not being a programmer, you may regard > me as "just > looking". > > I am using Win2000 with MSDEV 6. > > I have installed ITK under "C:\Program Files". > > I run the successfully the "C:\Program > Files\ITK\InsightToolkit-1.2.0\Code" > part using CMakesetup > with this entry as the "Where is the source code". > Compilation run OK to > completion. > > I intend to go with "ItkSoftweareGuide" chapter by chapter, > so I am trying > to build > > "C:\Program > Files\ITK\InsightToolkit-1.2.0\Examples\DataRepresentation\Image". > > I tried CMakeSetup with this directory, and I am this > directory and run > "cmake" (with setting > ITK_SOURCE_DIr and ITK_BINARY_DIR. > > Everything seems OK, but trying to compile issues: > > C:\Program > Files\ITK\InsightToolkit-1.2.0\Utilities\vxl\vnl/vnl_numeric_t > raits.h(31) : > fatal error C1083: Cannot open include file: 'vxl_config.h': > No such file or > directory > > (I do not see any Additional Include directories in the C/C++ tab > preprocessor category). > > What am I doing wrong? > > Regards, > Avi > > Avi Bar-Shalev > Applications expert > GEMS, Functional Imaging Haifa > avi.barshalev@med.ge.com > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez@kitware.com Tue Jul 29 18:01:01 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Tue, 29 Jul 2003 13:01:01 -0400 Subject: [Insight-users] Re: itk using borland builder 6.0 References: <5.2.0.9.0.20030729165637.00a96008@pop-int.azu.nl> Message-ID: <3F26A84D.4050702@kitware.com> Hi Marius, Some time ago we started trying to adapt ITK to support Borland 6.0 with the help of several people on the users-list. However, it turned out that Borland 6.0 has lower support for templates than Borland 5.5. So the adaptation was forcing us to sacrifice a number of very basic features that are currently working in other compilers. (features that follow the C++ standard). Unless a new release/upgrade of Borland 6.0 is out there, it may not be worth to modify ITK for supporting this version of the compiler. Borland 5.5 is fully supported now, and it is actually the most active compiler in the continuous builds on the dashboard because it is quite a fast compiler. We hope Borland people will improve the support for templates of version 6.0 at some point. Regards, Luis ------------------- Marius Staring wrote: > Dear Luis Ibanez, > > I'd like to use itk using the borland 6.0 compiler, which is not > supported yet. My question is: Will it be supported soon? > > With kind regards, > > Marius Staring > Image Science Institute > University Medical Center Utrecht, room F01.703 > Phone: +31 (0)30 250 6711 Fax: +31 (0)30 258 1098 > email: marius @isi.uu.nl > website: http://www.isi.uu.nl/People/Marius/ > From hqian@imaging.robarts.ca Tue Jul 29 19:06:55 2003 From: hqian@imaging.robarts.ca (Hua Qian) Date: Tue, 29 Jul 2003 14:06:55 -0400 Subject: [Insight-users] ITK Python Wrapping Examples In-Reply-To: <3F149E46.2090802@kitware.com> References: <3F1476B7.9050006@imaging.robarts.ca> <3F149E46.2090802@kitware.com> Message-ID: <3F26B7BF.7090505@imaging.robarts.ca> Hi Luis, Following up my previous post, my rebuilding for the python wrapping went out okay and am trying out more examples. I have a question about the ImageRegistration3.py example. When I ran the example: > python ImageRegistration3.py ../Data/BrainProtonDensitySliceBorder20.png ../Data/BrainProtonDensitySliceShifted13x17y.png test1.png I got following print out Starting registration Final Registration Parameters Translation X = _28db2909_p_double Translation Y = _30db2909_p_double Traceback (most recent call last): File "ImageRegistration3.py_1.2", line 104, in ? resampler = itkResampleImageFilterF2_New() NameError: name 'itkResampleImageFilterF2_New' is not defined After I modified the code a bit (see the diff below), it generates correct output image. But the Translation X and Translation Y parameters are still printed as: Final Registration Parameters Translation X = _90db2909_p_double Translation Y = _98db2909_p_double Is there anyway to print out the parameters in plain numbers? Regards, Hua ################################################################## Index: ImageRegistration3.py =================================================================== RCS file: /cvsroot/Insight/Insight/Examples/Registration/ImageRegistration3.py,v retrieving revision 1.2 diff -r1.2 ImageRegistration3.py 104,105c104,105 < resampler = itkResampleImageFilterF2_New() < resampler.SetTransform( transform ) --- > resampler = itkResampleImageFilterF2F2_New() > resampler.SetTransform( transform.GetPointer() ) 115a116,122 > # > # Cast for output > # > outputCast = itkRescaleIntensityImageFilterF2US2_New() > outputCast.SetInput( resampler.GetOutput() ) > outputCast.SetOutputMinimum( 0 ) > outputCast.SetOutputMaximum( 65535 ) 120c127 < writer = itkImageFileWriterF2_New() --- > writer = itkImageFileWriterUS2_New() 123c130 < writer.SetInput( resampler.GetOutput() ) --- > writer.SetInput( outputCast.GetOutput() ) Luis Ibanez wrote: > > Hi Hua, > > > I just rebulid the wrapping in a Linux Debian with gcc 3.3 > and both python examples are working ok. > > Note that the finite difference solver in ITK has been > under revision in recent days. It may be that your CVS > checkout took the CurvatureFlowImageFilter in an unstable > state. > > You may want to update your CVS checkout (verify first > if the dashboard is green, since we anticipate a lot > of activity before August 1). > > In any case, Charl's observation is correct. ITK is throwing > an exception that is not being catched. That's why the > "abort" message appears. > > One possible reason for this exception being thrown is that > the time step parameter provided to the filter is too big. > > The timeStep parameter that you are using for the > CurvatureFlowImageFilter is right in the limit of the > value accepted as the bound for producing numerically > stable results. Before updating your CVS, you may want > to try with smaller values of time step. (e.g. 0.1 instead > of 0.125). > > > > Please let us know if you continue experincing any > problems, > > > Thanks > > > > Luis > > > > ------------------- > Hua Qian wrote: > >> Hi, >> >> I am trying out the Python Wrapping for ITK recently. The build >> went on every smoothly. But I had troubles running some of the >> python examples. Some examples works, some don't. >> For example, CurvatureAnisotropicDiffusionImageFilter.py ran >> without problem: >> >> > python CurvatureAnisotropicDiffusionImageFilter.py >> ../Data/BrainProtonDensitySlice.png test.png 10 0.125 3.0 >> >> But CurvatureFlowImageFilter.py aborted abnormally: >> > python CurvatureFlowImageFilter.py >> ../Data/BrainProtonDensitySlice.png test.png 10 0.125 >> Abort >> >> Am I doing something wrong? I am using Mandrake Linux 9.1, gcc 3.2.2, >> python 2.2.2, cvs ITK, cvs CMake. >> >> Thanks, >> >> Hua Qian >> >> >> >> >> _______________________________________________ >> Insight-users mailing list >> Insight-users@itk.org >> http://www.itk.org/mailman/listinfo/insight-users >> > > From blezek@crd.ge.com Tue Jul 29 19:32:20 2003 From: blezek@crd.ge.com (Blezek, Daniel J (Research)) Date: Tue, 29 Jul 2003 14:32:20 -0400 Subject: [Insight-users] itkAnalyzeImageIO bugs/problems Message-ID: Hi all, Though it took me a few days, I finally tracked down a bug in the itkAnalyzeImageIO class. It seems that the MetaDictionary was getting clobbered somewhere in my pipeline and the AnalyzeImageIO class was blindly pulling out the orientation field. If the field does not exist, the ExposeMetaData call returns false. Since the return value was not checked, garbage was returned. I added a check to the code to fix the bug. But this brings up an issue: where in the pipeline is the MetaDictionary getting lost? I have not started looking, and am hoping some smart ITK coder can help out, or tell me where to look. Thanks! -dan From millerjv@crd.ge.com Tue Jul 29 19:42:49 2003 From: millerjv@crd.ge.com (Miller, James V (Research)) Date: Tue, 29 Jul 2003 14:42:49 -0400 Subject: [Insight-users] itkAnalyzeImageIO bugs/problems Message-ID: I am guessing it is lost after the first filter. If not then, then it is lost by any subclass of UnaryFunctorImageFilter. > -----Original Message----- > From: Blezek, Daniel J (Research) [mailto:blezek@crd.ge.com] > Sent: Tuesday, July 29, 2003 2:32 PM > To: insight-users@public.kitware.com > Subject: [Insight-users] itkAnalyzeImageIO bugs/problems > > > Hi all, > > Though it took me a few days, I finally tracked down a bug in the > itkAnalyzeImageIO class. It seems that the MetaDictionary was getting > clobbered somewhere in my pipeline and the AnalyzeImageIO > class was blindly > pulling out the orientation field. If the field does not exist, the > ExposeMetaData call returns false. Since the return value > was not checked, > garbage was returned. I added a check to the code to fix the bug. > > But this brings up an issue: where in the pipeline is the > MetaDictionary > getting lost? I have not started looking, and am hoping some > smart ITK > coder can help out, or tell me where to look. > > Thanks! > -dan > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From c.p.botha@ewi.tudelft.nl Tue Jul 29 22:51:42 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Tue, 29 Jul 2003 23:51:42 +0200 Subject: [Insight-users] ITK Python Wrapping Examples In-Reply-To: <3F26B7BF.7090505@imaging.robarts.ca> References: <3F1476B7.9050006@imaging.robarts.ca> <3F149E46.2090802@kitware.com> <3F26B7BF.7090505@imaging.robarts.ca> Message-ID: <3F26EC6E.1060307@ewi.tudelft.nl> Hua Qian wrote: > Final Registration Parameters > Translation X = _90db2909_p_double > Translation Y = _98db2909_p_double > > Is there anyway to print out the parameters in plain numbers? This has to do with the way in which SWIG treats references, and GetElement() is actually returning a C++ reference to the element in question, which is why you see a _p_double. For now, you can try something like: finalParameters.get(0) finalParameters.get(1) or more generically for any _p_double: DArray_getitem(finalParameters.GetElement(0), 0) DArray_getitem(finalParameters.GetElement(1), 0) This could perhaps be done automatically by adding a few typemaps to itk.swg, but then one would lose the ability to SET an element on the returned reference by making use of *Array_setitem(). -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From holmesd3@yahoo.com Tue Jul 29 22:52:49 2003 From: holmesd3@yahoo.com (David Holmes) Date: Tue, 29 Jul 2003 14:52:49 -0700 (PDT) Subject: [Insight-users] Registration Message-ID: <20030729215249.25008.qmail@web13113.mail.yahoo.com> Well, I have been playing with registration some more and had little success. Here is what I have come across: (1) Because of problems with the meanssquared metric, I moved on to the MI metric. V&W MI work with the translation transform. I did not have any problems for a variety of mis-alignments with a variety of scales. (Used ImageRegistration2.cxx) (2) V&W MI doesn't work when I go to a transform with more parameters. Euler3D and Quaternion don't work regardless of the parameters I set. Messing with the scales doesn't help much. Often I get the "mapped outside" error. I can't comment on the spacing problem because I cannot get a consistent correct answer. For what it is worth, I am not a big fan of the optimizer because even when it gets a near optimal cost value, it runs away from it. That is a real challenge. Thanks David __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From c.p.botha@ewi.tudelft.nl Tue Jul 29 23:34:22 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Wed, 30 Jul 2003 00:34:22 +0200 Subject: [Insight-users] ITK Python Wrapping Examples In-Reply-To: <3F26EC6E.1060307@ewi.tudelft.nl> References: <3F1476B7.9050006@imaging.robarts.ca> <3F149E46.2090802@kitware.com> <3F26B7BF.7090505@imaging.robarts.ca> <3F26EC6E.1060307@ewi.tudelft.nl> Message-ID: <3F26F66E.5080207@ewi.tudelft.nl> Charl P. Botha wrote: > Hua Qian wrote: >> Is there anyway to print out the parameters in plain numbers? > > This has to do with the way in which SWIG treats references, and > GetElement() is actually returning a C++ reference to the element in > question, which is why you see a _p_double. > > For now, you can try something like: > finalParameters.get(0) > finalParameters.get(1) > > or more generically for any _p_double: > DArray_getitem(finalParameters.GetElement(0), 0) > DArray_getitem(finalParameters.GetElement(1), 0) At a second glance, if the two GetElement() declarations in itkArray.h are simply swapped around, the wrapped GetElement() that is chosen by the overloaded method resolver in SWIG should be the const one (because its first and there are no other parameter differences to resolve with) and its result will be a Python float and not a _double_p. GetElement() in Python will then just return a number. Are there any opinions with regards to this? Should these two declarations be swapped if this would be the end result? It looks like a win-win to me. Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From lng@insightful.com Wed Jul 30 00:25:41 2003 From: lng@insightful.com (Lydia Ng) Date: Tue, 29 Jul 2003 16:25:41 -0700 Subject: [Insight-users] Registration Message-ID: Hi David, > (2) V&W MI doesn't work when I go to a transform with > more parameters. Euler3D and Quaternion don't work > regardless of the parameters I set. Messing with > the scales doesn't help much. Often I get the "mapped > outside" error. I can't comment on the spacing > problem because I cannot get a consistent correct > answer. Is your testing code ITK only? If so, would you mind posting it so that we have a common test platform to at this problem with? Also, what type of images are you using and are they sharable too? - Lydia > -----Original Message----- > From: David Holmes [mailto:holmesd3@yahoo.com] > Sent: Tuesday, July 29, 2003 2:53 PM > To: insight-users@public.kitware.com > Subject: [Insight-users] Registration >=20 >=20 > Well, I have been playing with registration some more > and had little success. Here is what I have come > across: >=20 > (1) Because of problems with the meanssquared metric, > I moved on to the MI metric. >=20 > V&W MI work with the translation transform. I did not > have any problems for a variety of mis-alignments with > a variety of scales. (Used ImageRegistration2.cxx) >=20 > (2) V&W MI doesn't work when I go to a transform with > more parameters. Euler3D and Quaternion don't work > regardless of the parameters I set. Messing with > the scales doesn't help much. Often I get the "mapped > outside" error. I can't comment on the spacing > problem because I cannot get a consistent correct > answer. >=20 > For what it is worth, I am not a big fan of the > optimizer because even when it gets a near optimal > cost value, it runs away from it. That is a real > challenge. >=20 > Thanks >=20 > David >=20 >=20 > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users From hcwong@must.edu.mo Wed Jul 30 04:22:24 2003 From: hcwong@must.edu.mo (Hon-Cheng Wong) Date: Wed, 30 Jul 2003 11:22:24 +0800 Subject: [Insight-users] How to separate the ITK Applicaitons? Message-ID: <001401c35649$cbe91f80$9714020a@mustdc.edu.mo> This is a multi-part message in MIME format. ------=_NextPart_000_0011_01C3568C.D9CDA8D0 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Dear Luis and all ITK users, I have compiled the ITK Applications successfully, however, I = want to separate=20 each application, for example, GaussianFilter from the whole ITK = Applications. Then it=20 will be an independent project (has its own *.dsw instead of the = ITKApplications.dsw).=20 Making each application can be compiled independently, I have tried to = edit the=20 CMakeList.txt to do my task, however, I haven=A1=A6t succeeded. I got = the following wrong=20 message: =20 --------------------Configuration: GaussianFilter - Win32 = Release-------------------- Building Custom Rule "D:\ITK = Research\GaussianFilter\liFilterConsoleGUI.fl" Compiling... GaussianFilter.cxx D:\ITK Research\GaussianFilter\liFilterConsole.h(20) : fatal error = C1083: Cannot open=20 include file: 'fltkImageViewer.h': No such file or directory = liFilterConsole.cxx D:\ITK Research\GaussianFilter\liFilterConsole.h(20) : fatal error = C1083: Cannot open=20 include file: 'fltkImageViewer.h': No such file or directory = liFilterConsoleBase.cxx liFilterConsoleGUI.cxx D:/ITK Research/GaussianFilter/liFilterConsoleGUI.h(8) : fatal error = C1083: Cannot open=20 include file: 'fltkLightButton.h': No such file or directory Generating Code... Error executing cl.exe. =20 GaussianFilter.exe - 3 error(s), 0 warning(s) =20 And here is my CMakeList.txt =20 # This project is intended to be built outside the Insight source tree PROJECT(GAUSSIANFILTER) =20 # Find ITK. FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "Cannot build without ITK. Please set ITK_DIR.") ENDIF(ITK_FOUND) =20 # Determine what packages are available # Add an option to use or not use VTK OPTION(USE_VTK "Use VTK (The Visualization Toolkit) (some applications = need this)" OFF) IF(USE_VTK) FIND_PACKAGE(VTK) IF (VTK_FOUND) INCLUDE (${VTK_USE_FILE}) =20 # Test for VTK using std libs IF(NOT VTK_USE_ANSI_STDLIB) MESSAGE("Warning. Your VTK was not built with the = VTK_USE_ANSI_STDLIB " "option ON. Link errors may occur. Consider re-building = VTK " "with this option ON. For MSVC 6, you MUST turn on the = VTK " "option. ITK will not link otherwise.") ENDIF(NOT VTK_USE_ANSI_STDLIB) =20 # Test for VTK building Hybrid IF(NOT VTK_USE_HYBRID) MESSAGE("Your VTK was not built with the VTK_USE_HYBRID option ON. = " "Please reconfigure and recompile VTK with this option = before " "trying to use it with ITK.") SET(VTK_FOUND 0) ENDIF(NOT VTK_USE_HYBRID) ENDIF (VTK_FOUND) ENDIF(USE_VTK) =20 # Look for OpenGL. FIND_PACKAGE(OpenGL) =20 IF(OPENGL_INCLUDE_PATH) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_PATH}) ENDIF(OPENGL_INCLUDE_PATH) =20 # Add an option to use or not use FLTK (http://www.fltk.org) OPTION(USE_FLTK "Use FLTK (The Fast Light Toolkit) for GUI (some = applications need this)" OFF) IF(USE_FLTK) FIND_PACKAGE(FLTK) IF(FLTK_FOUND) INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR}) ENDIF(FLTK_FOUND) ENDIF(USE_FLTK) =20 # Applications requiring MetaImages and Fltk GUI=20 IF(FLTK_FOUND) IF(WIN32) ADD_DEFINITIONS(-DWIN32) ENDIF(WIN32) #SUBDIRS(OperatingRoom) IF(VTK_FOUND) ENDIF(VTK_FOUND) ENDIF(FLTK_FOUND) =20 INCLUDE_DIRECTORIES( ${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer ${InsightApplications_BINARY_DIR}/Auxiliary/FltkImageViewer ${InsightApplications_SOURCE_DIR}/GaussianFilter ${InsightApplications_BINARY_DIR}/GaussianFilter ) =20 ADD_EXECUTABLE(GaussianFilter liFilterConsole.cxx liFilterConsoleBase.cxx GaussianFilter.cxx) ADD_EXECUTABLE(GaussianFilter2D liFilterConsole2D.cxx liFilterConsole2DBase.cxx GaussianFilter2D.cxx) =20 FLTK_WRAP_UI(GaussianFilter liFilterConsoleGUI.fl) FLTK_WRAP_UI(GaussianFilter2D liFilterConsole2DGUI.fl) =20 TARGET_LINK_LIBRARIES(GaussianFilter ITKFltkImageViewer ITKIO = ITKBasicFilters) TARGET_LINK_LIBRARIES(GaussianFilter2D ITKFltkImageViewer ITKIO = ITKBasicFilters) =20 Could you tell me what=A1=A6s wrong in my CMakeList.txt?=20 =20 Thank you very much in advance!! Regards, Hugo Hon-Cheng Wong, Hugo Faculty of Information Technology, Macao University of Science and Technology, Macao, China ------=_NextPart_000_0011_01C3568C.D9CDA8D0 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable

Dear Luis and all ITK = users,

        =20 I have compiled the ITK Applications successfully, however,=20 I want=20 to separate

each application, for example, = GaussianFilter from=20 the whole ITK Applications. Then it

will be an independent project (has = its own *.dsw=20 instead of the ITKApplications.dsw).

Making each application can be = compiled=20 independently, I have tried to edit the

CMakeList.txt to do my task, however, = I haven=A1=A6t=20 succeeded. I got the following wrong

message:

 

--------------------Configuration: = GaussianFilter=20 - Win32 Release--------------------

Building Custom Rule "D:\ITK=20 Research\GaussianFilter\liFilterConsoleGUI.fl"

Compiling...

GaussianFilter.cxx

D:\ITK=20 Research\GaussianFilter\liFilterConsole.h(20) : fatal error C1083: = Cannot open=20

include file: 'fltkImageViewer.h': No = such file or=20 directory liFilterConsole.cxx

D:\ITK=20 Research\GaussianFilter\liFilterConsole.h(20) : fatal error C1083: = Cannot open=20

include file: 'fltkImageViewer.h': No = such file or=20 directory liFilterConsoleBase.cxx

liFilterConsoleGUI.cxx

D:/ITK=20 Research/GaussianFilter/liFilterConsoleGUI.h(8) : fatal error C1083: = Cannot open=20

include file: 'fltkLightButton.h': No = such file or=20 directory

Generating=20 Code...

Error executing = cl.exe.

 

GaussianFilter.exe - 3 error(s), 0=20 warning(s)

 

And here is my = CMakeList.txt

 

# This project is intended to be built = outside the=20 Insight source tree

PROJECT(GAUSSIANFILTER)

 

# Find ITK.

FIND_PACKAGE(ITK)

IF(ITK_FOUND)

 =20 INCLUDE(${ITK_USE_FILE})

ELSE(ITK_FOUND)

 =20 MESSAGE(FATAL_ERROR

         =20 "Cannot build without ITK. =20 Please set ITK_DIR.")

ENDIF(ITK_FOUND)

 

# Determine what packages are=20 available

# Add an option to use or not use=20 VTK

OPTION(USE_VTK "Use VTK (The = Visualization=20 Toolkit) (some applications need this)" OFF)

IF(USE_VTK)

 =20 FIND_PACKAGE(VTK)

 =20 IF (VTK_FOUND)

  =20  INCLUDE=20 (${VTK_USE_FILE})

 

    # Test for VTK = using std=20 libs

    IF(NOT=20 VTK_USE_ANSI_STDLIB)

     =20 MESSAGE("Warning.  = Your VTK=20 was not built with the VTK_USE_ANSI_STDLIB "

           &n= bsp; =20 "option ON.  Link = errors may=20 occur.  Consider = re-building VTK=20 "

              "with=20 this option ON.  For MSVC = 6, you=20 MUST turn on the VTK "

           &n= bsp; =20 "option.  ITK will = not link=20 otherwise.")

    ENDIF(NOT=20 VTK_USE_ANSI_STDLIB)

 

    # Test for VTK = building=20 Hybrid

    IF(NOT=20 VTK_USE_HYBRID)

      = MESSAGE("Your=20 VTK was not built with the VTK_USE_HYBRID option ON.  "

           &n= bsp; =20 "Please reconfigure and recompile VTK with this option before=20 "

           &n= bsp; =20 "trying to use it with ITK.")

      = SET(VTK_FOUND=20 0)

    ENDIF(NOT=20 VTK_USE_HYBRID)

 =20 ENDIF (VTK_FOUND)

ENDIF(USE_VTK)

 

# Look for OpenGL.

FIND_PACKAGE(OpenGL)

 

IF(OPENGL_INCLUDE_PATH)

 =20 INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_PATH})

ENDIF(OPENGL_INCLUDE_PATH)

 

# Add an option to use or not use FLTK = (http://www.fltk.org)

OPTION(USE_FLTK "Use FLTK (The Fast = Light Toolkit)=20 for GUI (some applications need this)" OFF)

IF(USE_FLTK)

 =20 FIND_PACKAGE(FLTK)

 =20 IF(FLTK_FOUND)

   =20 INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})

 =20 ENDIF(FLTK_FOUND)

ENDIF(USE_FLTK)

 

# Applications requiring MetaImages = and Fltk GUI=20

IF(FLTK_FOUND)

 =20 IF(WIN32)

   =20 ADD_DEFINITIONS(-DWIN32)

 =20 ENDIF(WIN32)

 =20 #SUBDIRS(OperatingRoom)

 =20 IF(VTK_FOUND)

ENDIF(VTK_FOUND)

ENDIF(FLTK_FOUND)

 

INCLUDE_DIRECTORIES(

 =20 ${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer=

 =20 ${InsightApplications_BINARY_DIR}/Auxiliary/FltkImageViewer=

 =20 ${InsightApplications_SOURCE_DIR}/GaussianFilter

 =20 ${InsightApplications_BINARY_DIR}/GaussianFilter

)

 

ADD_EXECUTABLE(GaussianFilter=20 liFilterConsole.cxx

           &n= bsp;  =20 liFilterConsoleBase.cxx = GaussianFilter.cxx)

ADD_EXECUTABLE(GaussianFilter2D=20 liFilterConsole2D.cxx

           &n= bsp;  =20 liFilterConsole2DBase.cxx = GaussianFilter2D.cxx)

 

FLTK_WRAP_UI(GaussianFilter=20 liFilterConsoleGUI.fl)

FLTK_WRAP_UI(GaussianFilter2D=20 liFilterConsole2DGUI.fl)

 

TARGET_LINK_LIBRARIES(GaussianFilter=20 ITKFltkImageViewer ITKIO ITKBasicFilters)

TARGET_LINK_LIBRARIES(GaussianFilter2D = ITKFltkImageViewer ITKIO ITKBasicFilters)

 

Could you tell me what=A1=A6s wrong in = my=20 CMakeList.txt?

 

Thank you very much in = advance!!

 

Regards,

Hugo

 

Hon-Cheng Wong, Hugo

Faculty of Information=20 Technology,

Macao University of Science and=20 Technology,

Macao,=20 China

------=_NextPart_000_0011_01C3568C.D9CDA8D0-- From tbaker@claritysolutionsllc.com Wed Jul 30 04:52:45 2003 From: tbaker@claritysolutionsllc.com (Todd Baker) Date: Tue, 29 Jul 2003 23:52:45 -0400 Subject: [Insight-users] Visual Studio .net 2003 (7.1) Message-ID: This is a multi-part message in MIME format. ------=_NextPart_000_000F_01C3562C.832EAD90 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello all: Has anyone had luck building / using ITK with Visual Studio .NET 2003 (i.e. Visual C++ 7.1)? It could be really cool to be able to use ITK and VTK with Windows Forms applications. Thanks, Todd Baker ------=_NextPart_000_000F_01C3562C.832EAD90 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message
Hello=20 all:
 
   =20 Has anyone had luck building / using ITK with Visual Studio .NET 2003 = (i.e.=20 Visual C++ 7.1)?
It = could be really=20 cool to be able to use ITK and VTK with Windows Forms=20 applications.
 
Thanks, 
 
Todd Baker
 
 
------=_NextPart_000_000F_01C3562C.832EAD90-- From persaton@sohu.com Mon Jul 28 16:57:44 2003 From: persaton@sohu.com (gray) Date: Mon, 28 Jul 2003 23:57:44 +0800 Subject: [Insight-users] How to build the documents of insight? Message-ID: <002d01c35520$fbaab910$6900a8c0@gray> SSd2ZSBkb3dubG9hZGVkIHRoZSBpbnNpZ2h0IGRvY3VtZW50cyB2aWEgY3ZzLiBCdXQgSSBmYWls ZWQgaW4gYnVpbGRpbmcgdGhlIGRvY3VtZW50cyB0byBQREYgZm9ybWF0LiBJJ3ZlIGRvd25sb2Fk IHRleCBhbmQgaW1hZ2VtYWdpYyBzb2Z0d2FyZSB3aGljaCBjYW4gc3VjY2Vzc2Z1bGx5IGZ1bmN0 aW9uLiBJbiB0aGUgQ01BS0UgcHJvZ3Jlc3MsIEkgZmFpbGVkIHRvIGZpbmQgdGhlIEZpZzJkZXYu ZXhlLiBJIHJ1biBDTWFrZSB3aXRob3V0IHRoZSBleGUsIGFuZCBnb3QgYSBUaGVvcnlCb29rLmRz dywgZm9yIHRoZSBleGFtcGxlIEkgdHJ5IHRvIGJ1aWxkIHRoZSB0aGVvcnlib29rIGluIGRvY3Vt ZW50cy4gVGhlbiBJIHVzZSBWaXN1YWwgU3R1ZGlvNiB0byBidWlsZCB0aGUgdGhpcyBkc3csIGJ1 dCBnb3QgYW4gZXJyb3IgbGlrZSB0aGlzIA0KDQpCdWlsZGluZyBDdXN0b20gUnVsZSBEOlxpdGtc SW5zaWdodERvY3VtZW50c1xUaGVvcnlCb29rXEFydFxWZXJzb3JTdW0uZmlnDQpQcm9ibGVtIHN0 YXJ0aW5nIGNvbW1hbmQNCkVycm9yIGV4ZWN1dGluZyBjOlx3aW5udFxzeXN0ZW0zMlxjbWQuZXhl Lg0KQUxMX0JVSUxEIC0gMSBlcnJvcihzKSwgMCB3YXJuaW5nKHMpIg0KDQpQbGVhc2UgaGVscCBt ZSB0byBidWlsZCB0aGUgZG9jdW1lbnRzLiB0aGFua3MuDQoNCg0K From p.klotz@icoserve.com Wed Jul 30 08:13:18 2003 From: p.klotz@icoserve.com (p.klotz@icoserve.com) Date: Wed, 30 Jul 2003 09:13:18 +0200 Subject: [Insight-users] Visual Studio .net 2003 (7.1) In-Reply-To: Message-ID: Hello Todd > Has anyone had luck building / using ITK with Visual Studio .NET > 2003 (i.e. Visual C++ 7.1)? I tried it but I failed. There were problems with missing typename keywords and no longer existent math functions. Finally I found 2 problems that seem to be compiler bugs rather than compatibility issues. When you succeed in building ITK with VS.NET 2003 please let me know. Best regards, Peter. From c.p.botha@ewi.tudelft.nl Wed Jul 30 13:34:38 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: 30 Jul 2003 14:34:38 +0200 Subject: [Insight-users] Adding Python typemap for scalars returned by reference Message-ID: <1059568478.7005.38.camel@dutidad> Dear list, As reported recently, we see things like this in the ITK Python wrappings: In [3]: registration = itk.itkImageRegistrationMethodF2F2_New() In [4]: registration.GetLastTransformParameters().GetElement(0) Out[4]: '_e8c8b708_p_double' In [5]: registration.GetLastTransformParameters().GetElement(1) Out[5]: '_f0c8b708_p_double' So, instead of just showing me the numbers, I get to see the SWIG type _p_double. This is because the C++ method itkArray::GetElement returns a TValueType&, i.e. a C++ reference. SWIG reduces this to a pointer, which is why we don't see the values themselves above. We *COULD* use DArray_getitem() to get the value, however: If I were to add typemaps such as the following to itk.swg: %typemap(out) double &, float & "$result = PyFloat_FromDouble((double) *($1));"; GetElement() will return an actual double in Python as well. The DISADVANTAGE is that we can't use DArray_setitem() anymore on that specific item. However, itkArray does have a SetElement() method, so that's no problem. Such a typemap will do the same for ALL double& and float& returns: if there's no corresponding Set*() call for a particular class, it could pose a problem. I propose adding the typemap to make the Python calls act more naturally and adding Set*() methods for those ITK classes that really need them because of the typemap change. I don't believe we'll require too much of the latter. Should I go ahead and add these typemaps? Does anyone have any other ideas? Thanks for any input, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From luis.ibanez@kitware.com Wed Jul 30 13:43:58 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 30 Jul 2003 08:43:58 -0400 Subject: [Insight-users] How to separate the ITK Applicaitons? References: <001401c35649$cbe91f80$9714020a@mustdc.edu.mo> Message-ID: <3F27BD8E.4090400@kitware.com> Hi Hon, In order to separate the Applications in independent projects you should first separate the common libraries they use. For example, most of the applications are using the classes in Auxiliary/FltkImageViewer, some others use the files in Auxiliary/vtkFLTK,... and so on. You could separate these libraries by adding the FIND_PACKAGE command lines for the packages they depend on. For example, in the CMakeLists.txt of FLTKImageViewer you should add: > FIND_PACKAGE(ITK) > IF(ITK_FOUND) > INCLUDE(${ITK_USE_FILE}) > ELSE(ITK_FOUND) > MESSAGE(FATAL_ERROR > "Cannot build InsightApplications without ITK. Please set ITK_DIR.") > ENDIF(ITK_FOUND) > and > FIND_PACKAGE(FLTK) > IF(FLTK_FOUND) > INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR}) > ENDIF(FLTK_FOUND) Once you build this libraries, you could take one of the applications, for example the GaussianFilter, and add to its CMakeLists.txt file the same lines for finding packages ITK and FLTK. In addition to that you will have to add commands for indicating where to find the FltkImageViewer library that you just created. And easy way to do so could be: > FIND_LIBRARY(FLTK_IMAGE_VIEWER_LIBRARY NAMES FltkImageViewer > PATHS /usr/lib /usr/local/lib > /usr/local/fltk/lib > /usr/X11R6/lib > ) > The paths indicated after the "PATHS" keyword indicate the tentative places to look for this library. If CMake doesn't find the library there, it will be up to you to type the path when you run the CMake GUI. The errors that you are getting now, are due to header files from the FltkImageViewer library that is located in Auxiliary. Since the isolated project doesn't know what path to search for these header files, the compiler fails in the process of locating the headers. By reorganizing the CMakeLists.txt files as described above you should be able to get around this problem. Regards, Luis --------------------------- Hon-Cheng Wong wrote: > Dear Luis and all ITK users, > > I have compiled the ITK Applications successfully, however, I > want to separate > > each application, for example, GaussianFilter from the whole ITK > Applications. Then it > > will be an independent project (has its own *.dsw instead of the > ITKApplications.dsw). > > Making each application can be compiled independently, I have tried to > edit the > > CMakeList.txt to do my task, however, I havent succeeded. I got the > following wrong > > message: > > > > --------------------Configuration: GaussianFilter - Win32 > Release-------------------- > > Building Custom Rule "D:\ITK Research\GaussianFilter\liFilterConsoleGUI.fl" > > Compiling... > > GaussianFilter.cxx > > D:\ITK Research\GaussianFilter\liFilterConsole.h(20) : fatal error > C1083: Cannot open > > include file: 'fltkImageViewer.h': No such file or directory > liFilterConsole.cxx > > D:\ITK Research\GaussianFilter\liFilterConsole.h(20) : fatal error > C1083: Cannot open > > include file: 'fltkImageViewer.h': No such file or directory > liFilterConsoleBase.cxx > > liFilterConsoleGUI.cxx > > D:/ITK Research/GaussianFilter/liFilterConsoleGUI.h(8) : fatal error > C1083: Cannot open > > include file: 'fltkLightButton.h': No such file or directory > > Generating Code... > > Error executing cl.exe. > > > > GaussianFilter.exe - 3 error(s), 0 warning(s) > > > > And here is my CMakeList.txt > > > > # This project is intended to be built outside the Insight source tree > > PROJECT(GAUSSIANFILTER) > > > > # Find ITK. > > FIND_PACKAGE(ITK) > > IF(ITK_FOUND) > > INCLUDE(${ITK_USE_FILE}) > > ELSE(ITK_FOUND) > > MESSAGE(FATAL_ERROR > > "Cannot build without ITK. Please set ITK_DIR.") > > ENDIF(ITK_FOUND) > > > > # Determine what packages are available > > # Add an option to use or not use VTK > > OPTION(USE_VTK "Use VTK (The Visualization Toolkit) (some applications > need this)" OFF) > > IF(USE_VTK) > > FIND_PACKAGE(VTK) > > IF (VTK_FOUND) > > INCLUDE (${VTK_USE_FILE}) > > > > # Test for VTK using std libs > > IF(NOT VTK_USE_ANSI_STDLIB) > > MESSAGE("Warning. Your VTK was not built with the > VTK_USE_ANSI_STDLIB " > > "option ON. Link errors may occur. Consider re-building > VTK " > > "with this option ON. For MSVC 6, you MUST turn on the VTK " > > "option. ITK will not link otherwise.") > > ENDIF(NOT VTK_USE_ANSI_STDLIB) > > > > # Test for VTK building Hybrid > > IF(NOT VTK_USE_HYBRID) > > MESSAGE("Your VTK was not built with the VTK_USE_HYBRID option ON. " > > "Please reconfigure and recompile VTK with this option > before " > > "trying to use it with ITK.") > > SET(VTK_FOUND 0) > > ENDIF(NOT VTK_USE_HYBRID) > > ENDIF (VTK_FOUND) > > ENDIF(USE_VTK) > > > > # Look for OpenGL. > > FIND_PACKAGE(OpenGL) > > > > IF(OPENGL_INCLUDE_PATH) > > INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_PATH}) > > ENDIF(OPENGL_INCLUDE_PATH) > > > > # Add an option to use or not use FLTK (http://www.fltk.org) > > OPTION(USE_FLTK "Use FLTK (The Fast Light Toolkit) for GUI (some > applications need this)" OFF) > > IF(USE_FLTK) > > FIND_PACKAGE(FLTK) > > IF(FLTK_FOUND) > > INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR}) > > ENDIF(FLTK_FOUND) > > ENDIF(USE_FLTK) > > > > # Applications requiring MetaImages and Fltk GUI > > IF(FLTK_FOUND) > > IF(WIN32) > > ADD_DEFINITIONS(-DWIN32) > > ENDIF(WIN32) > > #SUBDIRS(OperatingRoom) > > IF(VTK_FOUND) > > ENDIF(VTK_FOUND) > > ENDIF(FLTK_FOUND) > > > > INCLUDE_DIRECTORIES( > > ${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer > > ${InsightApplications_BINARY_DIR}/Auxiliary/FltkImageViewer > > ${InsightApplications_SOURCE_DIR}/GaussianFilter > > ${InsightApplications_BINARY_DIR}/GaussianFilter > > ) > > > > ADD_EXECUTABLE(GaussianFilter liFilterConsole.cxx > > liFilterConsoleBase.cxx GaussianFilter.cxx) > > ADD_EXECUTABLE(GaussianFilter2D liFilterConsole2D.cxx > > liFilterConsole2DBase.cxx GaussianFilter2D.cxx) > > > > FLTK_WRAP_UI(GaussianFilter liFilterConsoleGUI.fl) > > FLTK_WRAP_UI(GaussianFilter2D liFilterConsole2DGUI.fl) > > > > TARGET_LINK_LIBRARIES(GaussianFilter ITKFltkImageViewer ITKIO > ITKBasicFilters) > > TARGET_LINK_LIBRARIES(GaussianFilter2D ITKFltkImageViewer ITKIO > ITKBasicFilters) > > > > Could you tell me whats wrong in my CMakeList.txt? > > > > Thank you very much in advance!! > > > > Regards, > > Hugo > > > > Hon-Cheng Wong, Hugo > > Faculty of Information Technology, > > Macao University of Science and Technology, > > Macao, China > From luis.ibanez@kitware.com Wed Jul 30 14:01:03 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 30 Jul 2003 09:01:03 -0400 Subject: [Insight-users] How to build the documents of insight? References: <002d01c35520$fbaab910$6900a8c0@gray> Message-ID: <3F27C18F.80205@kitware.com> Hi Gray, The easy way to build the documentation is to do it under Linux. But,...if are tied up to MS-Windows, then the second easiest way is to use Cygwin (which is like installing Linux under Windows). Make sure that you install the full Latex packages. Once you install Cygwin, use CMake to configure the project and generate Cygwin makefiles. You need to install fig2dev in order to convert XFIG figures (those with .fig extension) into EPS files. fig2dev is part of a larger package called "transfig". You also need to have Perl in order to parse the C++ examples and extract the text that will be used for generating Latex files. Make sure to have available about 1.5G of disk space. The images in the Art directory will expand to about 400Mb, and the Postscript file will be about 700Mb. You will also need Ghostscript 8.0 in order to generate a correct PDF version, with all the URL links. --- You may find easier to download the updated PDF from http://www.itk.org/ItkSoftwareGuide.pdf Building projects with ITK, and do Image Segmentation and Registration is more fun than building the documentation, and probably a better use of your time :-) Regards, Luis ----------------- gray wrote: > I've downloaded the insight documents via cvs. But I failed in building the documents to PDF format. I've download tex and imagemagic software which can successfully function. In the CMAKE progress, I failed to find the Fig2dev.exe. I run CMake without the exe, and got a TheoryBook.dsw, for the example I try to build the theorybook in documents. Then I use Visual Studio6 to build the this dsw, but got an error like this > > Building Custom Rule D:\itk\InsightDocuments\TheoryBook\Art\VersorSum.fig > Problem starting command > Error executing c:\winnt\system32\cmd.exe. > ALL_BUILD - 1 error(s), 0 warning(s)" > > Please help me to build the documents. thanks. > > > "{"n왨x%HȠ۬z"J+m?f?X)ߣ(!rs== From mathias.seitel@igd.fhg.de Wed Jul 30 14:07:19 2003 From: mathias.seitel@igd.fhg.de (Mathias Seitel) Date: Wed, 30 Jul 2003 15:07:19 +0200 Subject: [Insight-users] FastMarchingImageFilter Message-ID: <3F27C307.6070103@igd.fhg.de> Hi all, FastMarchingImageFilter produces an initial level set, the size of which can be set manually. When using it as input for e.g. GeodesicActiveContoursImageFilter, along with a feature image of the same size a problem seems to occur if 1) the feature image has an image index != (0, 0, 0) in 3D or, 2) the feature image origin and spacing are not (0.0, 0.0, 0.0) and (1.0, 1.0, 1.0), respectively. In particular, there are no methods in FastMarchingImageFilter for setting index, origin and spacing of the output image manually. The output of FastMarchingImageFilter could be corrected accordingly, by explicitly setting the missing values. However, this does not work when Update() is called on a subsequent filter in the filter pipeline, since in this case the output of the filter is only an intermediate step and cannot be intercepted by the user. Am I missing something? Thanks, Mathias From luis.ibanez@kitware.com Wed Jul 30 14:18:22 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 30 Jul 2003 09:18:22 -0400 Subject: [Insight-users] Re: Fw: Building PrincipalAxesResampler References: <002e01c35686$4ce50630$bb0f10ac@PLL> Message-ID: <3F27C59E.4090804@kitware.com> Hi Pll, Looking closer at the error you reported, it happens that this application was removed from the tree because it became obsolete. The heart of the application though is simply the ImageMomentsCalculator class. http://public.kitware.com/Insight/Doxygen/html/classitk_1_1ImageMomentsCalculator.html For an example on the use of this class, you may want to look at its application in the CenteredTransformInitializer http://public.kitware.com/Insight/Doxygen/html/classitk_1_1CenteredTransformInitializer.html Which is described in the SoftwareGuide http://www.itk.org/ItkSoftwareGuide.pdf under the Registration Framework, in Section 7.5.1, pdf-page 237. The process of resampling images with the ResamplingImageFilter is discused in detail in section 5.7.1, pdf-pages 165-185. Please let us know if you encounter any problem using these classes. Thanks, Luis ----------------------- pll wrote: > Hi Luis: > I am afraid you have not received my mail.Now I send it again. > I once tried to do like what you said. > But the wrong is all the same. > I want to conform that the programme really can pass the compile in your > machine?If that,I think I must have chosen some wrong configurations. > Thank you very much for your help. > Regards. > >> >> > From luis.ibanez@kitware.com Wed Jul 30 14:32:19 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Wed, 30 Jul 2003 09:32:19 -0400 Subject: [Insight-users] Re: itk using borland builder 6.0 References: <5.2.0.9.0.20030729165637.00a96008@pop-int.azu.nl> <5.2.0.9.0.20030730111005.00a78280@pop-int.azu.nl> Message-ID: <3F27C8E3.2090604@kitware.com> Hi Marius, We are getting ready for the release of ITK 1.4. You may want to use the CVS version at this point, rather that struggling with 1.2 which was released in October last year. We probably will be more focused on getting 1.4 in good shape than in tracking/solving problems in the 1.2 branch (most of which have probably been solved in the current CVS version). The current CVS version is build continuously with Borland 5.5 (about ten times a day) and also a nightly build is tested. At this point is one of the better supported compilers. You may want to check the dashboard, in particular look at the continuous build in moxel1.crd and the nightly on moxel2.crd. Both the main ITK source tree and the InsightApplications are build with the bcc compiler. It would be more convenient for you to try the CVS version and report any problems you may encounter with it. If any, these problems will be solved before the 1.4 release in September. Regards, Luis ------------------------ Marius Staring wrote: > Hi Luis, > .... > > Because of the lower support of templates in Borland 6.0 (thank you for > pointing that out), we tried to compile ITK using CMake and Borland > Compiler 5.5. This resulted in a compilation error, see attached log file. > .... > > Regards, > > Ren Hui Gong > Stefan Klein > Marius Staring > > > At 13:01 29/07/03, you wrote: > >> Hi Marius, >> >> Some time ago we started trying to adapt ITK >> to support Borland 6.0 with the help of several >> people on the users-list. >> >> However, it turned out that Borland 6.0 has >> lower support for templates than Borland 5.5. >> So the adaptation was forcing us to sacrifice >> a number of very basic features that are >> currently working in other compilers. >> (features that follow the C++ standard). >> >> Unless a new release/upgrade of Borland 6.0 is >> out there, it may not be worth to modify ITK >> for supporting this version of the compiler. >> >> Borland 5.5 is fully supported now, and it is >> actually the most active compiler in the >> continuous builds on the dashboard because it >> is quite a fast compiler. >> >> We hope Borland people will improve the support >> for templates of version 6.0 at some point. >> >> >> >> Regards, >> >> >> Luis >> >> >> >> ------------------- >> Marius Staring wrote: >> >>> Dear Luis Ibanez, >>> I'd like to use itk using the borland 6.0 compiler, which is not >>> supported yet. My question is: Will it be supported soon? >>> With kind regards, >>> Marius Staring >>> Image Science Institute >>> University Medical Center Utrecht, room F01.703 >>> Phone: +31 (0)30 250 6711 Fax: +31 (0)30 258 1098 >>> email: marius @isi.uu.nl >>> website: http://www.isi.uu.nl/People/Marius/ >> >> >> > Building object file itkCommonHeaderTest.obj... > Borland C++ 5.5 for Win32 Copyright (c) 1993, 2000 Borland > C:\itk\InsightToolkit-1.2.0\Testing\Code\Common\itkCommonHeaderTest.cxx: > Error E2293 C:\itk\InsightToolkit-1.2.0\Code\Common\itkVector.h 55: ) expected > *** 1 errors in Compile *** > > ** error 1 ** deleting itkCommonHeaderTest.obj > > ** error 1 ** deleting default_target > > ** error 1 ** deleting default_target_Common > > ** error 1 ** deleting default_target > > ** error 1 ** deleting default_target_Code > > ** error 1 ** deleting default_target > > ** error 1 ** deleting default_target_Testing > > ** error 1 ** deleting default_target > > C:\itk\binary\bcb5> From lng@insightful.com Wed Jul 30 17:51:52 2003 From: lng@insightful.com (Lydia Ng) Date: Wed, 30 Jul 2003 09:51:52 -0700 Subject: [Insight-users] FastMarchingImageFilter Message-ID: Hi Mathias, You are correct in your summation that the FastMarchingImageFilter does not have methods for=20 - specifying the output origin or spacing - specifying the starting index of the output region Thanks for the bug report and we'll look into it. Thanks, Lydia > -----Original Message----- > From: Mathias Seitel [mailto:mathias.seitel@igd.fhg.de] > Sent: Wednesday, July 30, 2003 6:07 AM > To: ITK Mailing List > Subject: [Insight-users] FastMarchingImageFilter >=20 > Hi all, >=20 > FastMarchingImageFilter produces an initial level set, the size of which > can be set manually. When using it as input for e.g. > GeodesicActiveContoursImageFilter, along with a feature image of the > same size a problem seems to occur if > 1) the feature image has an image index !=3D (0, 0, 0) in 3D or, > 2) the feature image origin and spacing are not (0.0, 0.0, 0.0) and > (1.0, 1.0, 1.0), respectively. >=20 > In particular, there are no methods in FastMarchingImageFilter for > setting index, origin and spacing of the output image manually. The > output of FastMarchingImageFilter could be corrected accordingly, by > explicitly setting the missing values. However, this does not work when > Update() is called on a subsequent filter in the filter pipeline, since > in this case the output of the filter is only an intermediate step and > cannot be intercepted by the user. >=20 > Am I missing something? >=20 > Thanks, > Mathias >=20 >=20 > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users From lng@insightful.com Wed Jul 30 18:04:43 2003 From: lng@insightful.com (Lydia Ng) Date: Wed, 30 Jul 2003 10:04:43 -0700 Subject: [Insight-users] FastMarchingImageFilter: alternate solution Message-ID: Hi Mathias, I am not sure when the fixes for the FastMarchingImageFilter can be made, but if all you want is to generate a signed distance from a circle/sphere then a SphereSignedDistanceFunction and SpatialFunctionImageEvaluatorFilter could serve that purpose. Example code below: =20 typedef itk::SpatialFunctionImageEvaluatorFilter EvaluatorType; EvaluatorType::Pointer evaluator =3D EvaluatorType::New(); typedef itk::SphereSignedDistanceFunction ShapeFunctionType; ShapeFunctionType::Pointer shape =3D ShapeFunctionType::New(); ShapeFunctionType::Parameters parameters( shape->GetNumberOfParameters() ); parameters[0] =3D 5; // the radius parameters[1] =3D 50; // sphere center parameters[2] =3D 50; // sphere center =20 shape->SetParameters( parameters ); shape->Initialize(); // the input image doesn't do anything expect to provide meta information: // spacing, origin and largestpossible region evaluator->SetInput( geodesicActiveContour->GetFeatureImage() );=20 // connect up the shape function evaluator->SetFunction( shape ); =20 evaluator->Update(); Hope this helps. - Lydia > -----Original Message----- > From: Lydia Ng > Sent: Wednesday, July 30, 2003 9:52 AM > To: Mathias Seitel; ITK Mailing List > Subject: RE: [Insight-users] FastMarchingImageFilter >=20 > Hi Mathias, >=20 > You are correct in your summation that the FastMarchingImageFilter does > not have methods for > - specifying the output origin or spacing > - specifying the starting index of the output region >=20 > Thanks for the bug report and we'll look into it. >=20 > Thanks, > Lydia >=20 > > -----Original Message----- > > From: Mathias Seitel [mailto:mathias.seitel@igd.fhg.de] > > Sent: Wednesday, July 30, 2003 6:07 AM > > To: ITK Mailing List > > Subject: [Insight-users] FastMarchingImageFilter > > > > Hi all, > > > > FastMarchingImageFilter produces an initial level set, the size of > which > > can be set manually. When using it as input for e.g. > > GeodesicActiveContoursImageFilter, along with a feature image of the > > same size a problem seems to occur if > > 1) the feature image has an image index !=3D (0, 0, 0) in 3D or, > > 2) the feature image origin and spacing are not (0.0, 0.0, 0.0) and > > (1.0, 1.0, 1.0), respectively. > > > > In particular, there are no methods in FastMarchingImageFilter for > > setting index, origin and spacing of the output image manually. The > > output of FastMarchingImageFilter could be corrected accordingly, by > > explicitly setting the missing values. However, this does not work > when > > Update() is called on a subsequent filter in the filter pipeline, > since > > in this case the output of the filter is only an intermediate step and > > cannot be intercepted by the user. > > > > Am I missing something? > > > > Thanks, > > Mathias > > > > > > _______________________________________________ > > Insight-users mailing list > > Insight-users@itk.org > > http://www.itk.org/mailman/listinfo/insight-users > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users From pchandra@radonc.unc.edu Wed Jul 30 19:57:03 2003 From: pchandra@radonc.unc.edu (Parag Chandra) Date: Wed, 30 Jul 2003 14:57:03 -0400 Subject: [Insight-users] Question about itkThresholdImageFilter Message-ID: <001201c356cc$5e864200$99221398@radonc.radonc.unc.edu> This is a multi-part message in MIME format. ------=_NextPart_000_0013_01C356AA.D774A200 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hi, =20 I think I see a discrepancy between the documentation of this filter and = its actual behavior. The header file states for ::ThresholdAbove(), pixels = >=3D the threshold are set to the OutsideValue, and for ::ThresholdBelow, = pixels <=3D the threshold are set to OutsideValue. But when I examine the code, = it seems to me that this block: =20 if (m_Lower <=3D value && value <=3D m_Upper) { // pixel passes to output unchanged and is replaced by = m_OutsideValue in // the inverse output image outIt.Set( inIt.Get() ); } else { outIt.Set( m_OutsideValue ); } =20 implies that the inequalities should be strictly < or >, not <=3D or = >=3D. Am I not interpreting it correctly? =20 Thanks, -Parag Chandra =20 ------=_NextPart_000_0013_01C356AA.D774A200 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

Hi,

 

I think I see a discrepancy between the documentation = of this filter and its actual behavior. The header file states for = ::ThresholdAbove(), pixels >=3D the threshold are set to the OutsideValue, and for ::ThresholdBelow, pixels <=3D the threshold are set to OutsideValue. = But when I examine the code, it seems to me that this block:

 

    if (m_Lower <=3D value = && value <=3D m_Upper)

      {

      // pixel passes to = output unchanged and is replaced by m_OutsideValue in

      // the inverse output = image

      outIt.Set( inIt.Get() = );

      }

    else

      {

      outIt.Set( = m_OutsideValue );

      }

 

implies that the inequalities should be strictly < = or >, not <=3D or >=3D. Am I not interpreting it = correctly?

 

Thanks,

-Parag = Chandra

 

------=_NextPart_000_0013_01C356AA.D774A200-- From luis.ibanez@kitware.com Thu Jul 31 13:40:12 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 31 Jul 2003 08:40:12 -0400 Subject: [Insight-users] Re: ITK Processing + VTK Visualization References: Message-ID: <3F290E2C.4010701@kitware.com> Hi Marcellus, ITK does not provide any visualization functionality. The goal of ITK is to perform image Segmentation and Registration. You may use VTK for visualizing the image, in particular using the vtkImageViewer class. http://www.vtk.org/doc/nightly/html/classvtkImageViewer.html If what you want is to load a BMP file into ITK and do image processing with it, you may use the vtkBMPReader and then the VTKImageToImage adaptor in order to convert the vtkImageData object into and itkImage. Note that BMP is a poor format for storing medical images, in particular its mechanism form storing pixel spacing is quite unprecise since it uses an integer to store the number of pixels per meter. That is one of the reaons why BMP readers are absent in ITK. Another reason is that BMP is mostly used by MS-Windows applications and not that much by Unix applications. If you feel like writing a BMP reader, you may want to look at converting the code for writing BMPs posted on the list http://www.itk.org/pipermail/insight-users/2003-June/003952.html Regards, Luis ------------------------------- marcellus walace wrote: > > > Hi Luis, > > I have one another question. > But How can I visualize BMP file in itk? > > Regards > > _________________________________________________________________ > The new MSN 8: advanced junk mail protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > > From p.klotz@icoserve.com Thu Jul 31 14:37:29 2003 From: p.klotz@icoserve.com (p.klotz@icoserve.com) Date: Thu, 31 Jul 2003 15:37:29 +0200 Subject: [Insight-users] Visual Studio .net 2003 (7.1) In-Reply-To: <4926A5BE4AFE7C4A83D5CF5CDA7B775407138F@oxcore01.mirada-solutions.com> Message-ID: --0__=4EBBE7E7DFDB43628f9e8a93df938690918c4EBBE7E7DFDB4362 Content-type: text/plain; charset=US-ASCII Hello John > after making quite a few tweaks, main culprits being > > itkFEMPArray.h > itk_hashtable.h Sounds very familiar. The casting problem in itkFEMPArray.h and the typename issue in itk_hashtable.h. The problem in itkImageAdaptor.h looks quite like a compiler bug. It can be reproduced with the attached test program. I already got a confirmation for it in one of those Microsoft VC++.NET newsgroups at www.microsoft.com. The test program compiles without problems with gcc 3.2.2, Borland C/C++ 5.5.1 and Comeau 4.3.1. Best regards, Peter. (See attached file: array_overload.cpp) --0__=4EBBE7E7DFDB43628f9e8a93df938690918c4EBBE7E7DFDB4362 Content-type: application/octet-stream; name="array_overload.cpp" Content-Disposition: attachment; filename="array_overload.cpp" Content-transfer-encoding: base64 Y2xhc3MgQQp7CnB1YmxpYzoKICAgIHN0YXRpYyBjb25zdCBpbnQgbV92YWx1ZTsKfTsKCmNvbnN0 IGludCBBOjptX3ZhbHVlPTU7Cgp0ZW1wbGF0ZTxjbGFzcyBUPgpjbGFzcyBCCnsKcHVibGljOgog ICAgdmlydHVhbCB2b2lkIGYoY29uc3QgZG91YmxlIHhbVDo6bV92YWx1ZV0pOwogICAgdmlydHVh bCB2b2lkIGYoY29uc3QgZmxvYXQgeFtUOjptX3ZhbHVlXSk7Cn07Cgp0ZW1wbGF0ZTxjbGFzcyBU Pgp2b2lkIEI8VD46OmYoY29uc3QgZG91YmxlW1Q6Om1fdmFsdWVdKQp7Cn0KCnRlbXBsYXRlPGNs YXNzIFQ+CnZvaWQgQjxUPjo6Zihjb25zdCBmbG9hdFtUOjptX3ZhbHVlXSkKewp9CgppbnQgbWFp bih2b2lkKQp7CiAgICBCPEE+IGJhOwogICAgZmxvYXQgdlsyXT17MS4wLDIuMH07CiAgICBiYS5m KHYpOwogICAgcmV0dXJuIDA7Cn0K --0__=4EBBE7E7DFDB43628f9e8a93df938690918c4EBBE7E7DFDB4362-- From brad.king@kitware.com Thu Jul 31 15:15:16 2003 From: brad.king@kitware.com (Brad King) Date: Thu, 31 Jul 2003 10:15:16 -0400 (EDT) Subject: [Insight-users] ITK Python Wrapping Examples In-Reply-To: <3F26F66E.5080207@ewi.tudelft.nl> Message-ID: > At a second glance, if the two GetElement() declarations in itkArray.h > are simply swapped around, the wrapped GetElement() that is chosen by > the overloaded method resolver in SWIG should be the const one (because > its first and there are no other parameter differences to resolve with) > and its result will be a Python float and not a _double_p. > GetElement() in Python will then just return a number. > > Are there any opinions with regards to this? Should these two > declarations be swapped if this would be the end result? It looks like > a win-win to me. Go ahead and swap them. -Brad From luis.ibanez@kitware.com Thu Jul 31 15:25:25 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 31 Jul 2003 10:25:25 -0400 Subject: [Insight-users] Re: Reading VMR files in ITK References: Message-ID: <3F2926D5.3050703@kitware.com> Hi Marcellus, ITK does not have a reader for VMR files, but looking at the file format http://www.brainvoyager.de/BV2000OnlineHelp/BrainVoyagerWebHelp/mergedProjects/FileFormats/The_format_of_VMR_files.htm It seems that a pretty easy way to read those files is to create the MetaImage headers for them. In general, any image file format that stores the pixel data in binary at the end of the file are suitable to be read using a MetaImage header. You can create the MetaImage header by: A) using the MetaImageImporter application available in InsightApplications/MetaImageImporter. or B) you can simply edit another MetaImage header using a basic text editor. If you take option (B), assuming that your .vmr file is called Lung.vmr, and dimensions 285 in X, 335 in Y, and 150 in Z, the MetaImageHeader will look like: ------- beginning of file ---------------- ObjectType = Image NDims = 3 BinaryData = True BinaryDataByteOrderMSB = False ElementSpacing = 1.0 1.0 1.0 DimSize = 285 335 150 ElementType = MET_UCHAR HeaderSize = -1 ElementDataFile = Lung.vmr ------- end of file ---------------- The HeaderSize=-1 is quite important here, it will instruct the MetaImage reader to skip the header of the vmr file and just take the data at the end of the file. The only concern is that this files seem to lack the information about pixel spacing and origin. They probably are associated to other files providing such information. Note that using images lacking pixels spacing information makes your applications quite unsafe. You will have to recover the real pixel spacing information from some source parallel to the VMR file. Leaving the default values of 1.0, 1.0, 1.0 mm will be dangerous in a real medical application. Regards, Luis ------------------------- marcellus walace wrote: ... > But > the problem is that I don't know if itk can visualize vmr files. I > can't program an vmr myself > cause I'm here for only a month I don't have time. Do you Have a > suggestion about vmr? > > >> From: Luis Ibanez >> To: marcellus walace >> CC: ITK >> Subject: Re: ITK Processing + VTK Visualization >> Date: Thu, 31 Jul 2003 08:40:12 -0400 >> >> >> Hi Marcellus, >> >> ITK does not provide any visualization functionality. >> The goal of ITK is to perform image Segmentation and >> Registration. >> >> You may use VTK for visualizing the image, in particular >> using the vtkImageViewer class. >> http://www.vtk.org/doc/nightly/html/classvtkImageViewer.html >> >> If what you want is to load a BMP file into ITK and do >> image processing with it, you may use the vtkBMPReader >> and then the VTKImageToImage adaptor in order to convert >> the vtkImageData object into and itkImage. >> >> Note that BMP is a poor format for storing medical images, >> in particular its mechanism form storing pixel spacing is >> quite unprecise since it uses an integer to store the >> number of pixels per meter. That is one of the reaons why >> BMP readers are absent in ITK. Another reason is that BMP >> is mostly used by MS-Windows applications and not that much >> by Unix applications. >> >> If you feel like writing a BMP reader, you may want to look >> at converting the code for writing BMPs posted on the list >> http://www.itk.org/pipermail/insight-users/2003-June/003952.html >> >> >> >> Regards, >> >> >> Luis >> >> >> >> ------------------------------- >> marcellus walace wrote: >> >>> >>> >>> Hi Luis, >>> >>> I have one another question. >>> But How can I visualize BMP file in itk? >>> >>> Regards >>> >>> _________________________________________________________________ >>> The new MSN 8: advanced junk mail protection and 2 months FREE* >>> http://join.msn.com/?page=features/junkmail >>> >>> >> >> >> > > _________________________________________________________________ > Add photos to your e-mail with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > > From luis.ibanez@kitware.com Thu Jul 31 15:42:37 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 31 Jul 2003 10:42:37 -0400 Subject: [Insight-users] ITK Python Wrapping Examples References: Message-ID: <3F292ADD.1040202@kitware.com> Charl, After looking closer at the conflict between the two GetElement() methods in itkArray.h it seems that the best way to go is to simply remove the non-const version of GetElement(). The functionality is already provided by the SetElement() method. As Brad pointed out, we should encourage the use of array.SetElement( 10, value ); as oppossed to array.GetElement( 10 ) = value; So, we are voting for removing the method: > > TValueType & GetElement( unsigned int i ) > { return this->operator[]( i ); } > in line 70 of itkArray.h Would you like to give it a try to build with this method removed ? Thanks Luis -------------------- Brad King wrote: >>At a second glance, if the two GetElement() declarations in itkArray.h >>are simply swapped around, the wrapped GetElement() that is chosen by >>the overloaded method resolver in SWIG should be the const one (because >>its first and there are no other parameter differences to resolve with) >>and its result will be a Python float and not a _double_p. >>GetElement() in Python will then just return a number. >> >>Are there any opinions with regards to this? Should these two >>declarations be swapped if this would be the end result? It looks like >>a win-win to me. > > > Go ahead and swap them. > > -Brad > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users > From raman_nagarajan@vsnl.net Mon Jul 28 16:16:43 2003 From: raman_nagarajan@vsnl.net (Nagarajan) Date: Mon, 28 Jul 2003 20:46:43 +0530 Subject: [Insight-users] Problem Message-ID: <000801c3551b$44859930$467041db@MainServ> This is a multi-part message in MIME format. --Boundary_(ID_w4VlSux2H24fUeamOTTf4w) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT I downloaded the latest Insight toolkit and used the Cmake. I got a workspace called (from the examples\installation)Project.dsw(as against the one shown(itk.dsw) in the user manual). I loaded it in Visual studio 6.0 and tried building. I get an error message that the file "itkconfigure.h" is missing. On searching I could only find a file titled "itkconfigure.h.in" and not the C header. Could I be advised as to how I should proceed Thanks R.Nagarajan raman_nagarajan@vsnl.net --Boundary_(ID_w4VlSux2H24fUeamOTTf4w) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT
I downloaded the latest Insight toolkit and used the Cmake.  I got a workspace called (from the examples\installation)Project.dsw(as against the one shown(itk.dsw) in the user manual).  I loaded it in Visual studio 6.0 and tried building.  I get an error message that the file "itkconfigure.h" is missing.  On searching I could only find a file titled "itkconfigure.h.in" and not the C header.  Could I be advised as to how I should proceed
 
Thanks
 
R.Nagarajan
--Boundary_(ID_w4VlSux2H24fUeamOTTf4w)-- From persaton@sina.com.cn Mon Jul 28 16:33:13 2003 From: persaton@sina.com.cn (gray) Date: Mon, 28 Jul 2003 23:33:13 +0800 Subject: [Insight-users] How to build the documents of insight? Message-ID: <001e01c3551d$8f05a430$6900a8c0@gray> DQoNCiBJJ3ZlIGRvd25sb2FkZWQgdGhlIGluc2lnaHQgZG9jdW1lbnRzIHZpYSBjdnMuIEJ1dCBJ IGZhaWxlZCBpbiBidWlsZGluZyB0aGUgZG9jdW1lbnRzIHRvIFBERiBmb3JtYXQuIEkndmUgZG93 bmxvYWQgdGV4IGFuZCBpbWFnZW1hZ2ljIHNvZnR3YXJlIHdoaWNoIGNhbiBzdWNjZXNzZnVsbHkg ZnVuY3Rpb24uIEluIHRoZSBDTUFLRSBwcm9ncmVzcywgSSBmYWlsZWQgdG8gZmluZCB0aGUgRmln MmRldi5leGUuIEkgcnVuIENNYWtlIHdpdGhvdXQgdGhlIGV4ZSwgYW5kIGdvdCBhIFRoZW9yeUJv b2suZHN3LCBmb3IgdGhlIGV4YW1wbGUgSSB0cnkgdG8gYnVpbGQgdGhlIHRoZW9yeWJvb2sgaW4g ZG9jdW1lbnRzLiBUaGVuIEkgdXNlIFZpc3VhbCBTdHVkaW82IHRvIGJ1aWxkIHRoZSB0aGlzIGRz dywgYnV0IGdvdCBhbiBlcnJvciBsaWtlIHRoaXMgDQogDQogQnVpbGRpbmcgQ3VzdG9tIFJ1bGUg RDpcaXRrXEluc2lnaHREb2N1bWVudHNcVGhlb3J5Qm9va1xBcnRcVmVyc29yU3VtLmZpZw0KUHJv YmxlbSBzdGFydGluZyBjb21tYW5kDQpFcnJvciBleGVjdXRpbmcgYzpcd2lubnRcc3lzdGVtMzJc Y21kLmV4ZS4NCkFMTF9CVUlMRCAtIDEgZXJyb3IocyksIDAgd2FybmluZyhzKSINCiANCiBQbGVh c2UgaGVscCBtZSB0byBidWlsZCB0aGUgZG9jdW1lbnRzLiB0aGFua3MuDQogDQogDQoNCg== From hans-johnson@uiowa.edu Tue Jul 29 15:51:30 2003 From: hans-johnson@uiowa.edu (Hans J. Johnson) Date: 29 Jul 2003 09:51:30 -0500 Subject: [Insight-users] itkAnalyzeImageIO bugs/problems In-Reply-To: <200307291352.57585.koen.vanleemput@hus.fi> References: <200307291352.57585.koen.vanleemput@hus.fi> Message-ID: <1059490253.5607.16.camel@robin.psychiatry.uiowa.edu> Keon, Upon further invesitigation into the 3rd problem, I would have to disagree with your diagnosis. The suggestion you made would not be an acceptable thing to do because it would make using the field for it's intended purpose (i.e. holding a character string) potentially unsafe. We may have to change this to make it work, but that would require some more testing. If you have a small file in the SPM-Analyze file format, and a description of how you would like that field presented to you, I may be able to work through a solution for you. The m_hdr.hst.originator field is a 10byte field designated to hold a 10 consecutive characters. The extra copying into the temp variable is to explicitly add a null terminating character so that it may safely be put into a string. (PS: Your solution of string(varname,10) is more elegant, but I am not sure that it works under all compilers, and I don't want to add any more instability to code until after august 1st.) Is there a sentinal flag in the analyze header somewhere to specify that this is an SPM image? If so, we could put something like the following in: if(this->m_hdr.hist.funused==SPM_SENTINAL_FLAG) { itk::EncapsulateMetaData(thisDic,ITK_SPM_ORIGINFEILD_TAG,SPM_TYPE(this->m_hdr.hist.originator)); } else { strncpy(temp,this->m_hdr.hist.originator,10); temp[10]='\0'; itk::EncapsulateMetaData(thisDic,ITK_FileOriginator,std::string(temp)); } Regards, Hans J. Johnson hans-johnson@uiowa.edu PS: The other changes have already been made, and I will start testing them right now. Hopefully they will make it into the cvs code yet today. Since the bleeding edge version of ITK is undergoing many changes before august 1st, I would suggest that you only checkout the new Analyze files when they become available. > Problem 3: the FileOriginator field, (ab)used in SPM to store the origin, > doesn't get read properly on my machine (gcc 3.2 on Linux Mandrake 9.1) > > itkAnalyzeImageIO.cxx, line 977-979 > > strncpy(temp,this->m_hdr.hist.originator,10); > temp[10]='\0'; > itk::EncapsulateMetaData(thisDic,ITK_FileOriginator,std::string(temp)); > > should be > > itk::EncapsulateMetaData(thisDic,ITK_FileOriginator,std::string(this->m_hdr.hist.originator,10)); > > This also applies to the many other fields in the MetaDataDictionary for > itkAnalyzeImageIO. > > -- > > That's all ;-) > > - Koen > > > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users From john.biddiscombe@mirada-solutions.com Wed Jul 30 14:56:10 2003 From: john.biddiscombe@mirada-solutions.com (John Biddiscombe) Date: Wed, 30 Jul 2003 14:56:10 +0100 Subject: [Insight-users] Visual Studio .net 2003 (7.1) Message-ID: <4926A5BE4AFE7C4A83D5CF5CDA7B775407138F@oxcore01.mirada-solutions.com> I've got Build: 102 succeeded, 69 failed, 4 skipped after making quite a few tweaks, main culprits being itkFEMPArray.h=20 itk_hashtable.h and lots of ITK_TYPENAME problems solved by #define ITK_TYPENAME = typename in main header. main remaining errors seem to be caused by ImageAdaptor. Anyone had a = look at that? JB From luis.ibanez@kitware.com Thu Jul 31 15:59:58 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 31 Jul 2003 10:59:58 -0400 Subject: [Insight-users] Re: Starting with ITK References: Message-ID: <3F292EEE.50300@kitware.com> Hi Marcellus, It is time for you to get a cup of coffee and download the Software Guide http://www.itk.org/ItkSoftwareGuide.pdf Get comfortable, forget about your plans for the weekend, and start reading Section 4.1 in pdf-page 52. This describes all the details about the structure of the ITK image. Once you read up to page 64, refill your coffee and jump to the Filtering chapter, for example section 5.1 pdf-page 106. Reading and Writing images is discussed in Chapter 6, pdf-page 186. Please let us know if you have further questions. Enjoy ITK... and the coffee. Regards, Luis PS: Hot Chocolate may also work, but better results have been observed with real coffee. --------------------------- marcellus walace wrote: > > > Hi Luis, > > I really have a problem with the itk documentation. But I would like to > know what kind of image is the class TOutputImage. in fact I would like > to have the header file > where this class is defined. I know that it's a ik::image but what > a are the template parameters? > > please > > Regards > > Marcellus > > _________________________________________________________________ > The new MSN 8: advanced junk mail protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > > From luis.ibanez@kitware.com Thu Jul 31 16:07:28 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 31 Jul 2003 11:07:28 -0400 Subject: [Insight-users] Problem References: <000801c3551b$44859930$467041db@MainServ> Message-ID: <3F2930B0.8000709@kitware.com> Hi Raman, The instructions for building the examples are detailed in the Software Guide. http://www.itk.org/ItkSoftwareGuide.pdf Please look at Chapter 2, "Installation". You will find the details about the Example/Installation directory in Section 2.2.1 "Hello World", pdf-page 39. This example is designed to be built outside the ITK source tree. Please select a binary dir for building the example, run CMake, provide this binary directory and as source directory the one where the HelloWorld.cxx file is located. Then, for the ITK_DIR directory, you should provide the binary directory where you built ITK. Please let us know if you have any problems. Thanks Luis ---------------- Nagarajan wrote: > I downloaded the latest Insight toolkit and used the Cmake. I got a > workspace called (from the examples\installation)Project.dsw(as against > the one shown(itk.dsw) in the user manual). I loaded it in Visual > studio 6.0 and tried building. I get an error message that the file > "itkconfigure.h" is missing. On searching I could only find a file > titled "itkconfigure.h.in" and not the C header. Could I be advised as > to how I should proceed > > Thanks > > R.Nagarajan > raman_nagarajan@vsnl.net From c.p.botha@ewi.tudelft.nl Thu Jul 31 17:39:59 2003 From: c.p.botha@ewi.tudelft.nl (Charl P. Botha) Date: Thu, 31 Jul 2003 17:39:59 +0100 Subject: [Insight-users] ITK Python Wrapping Examples In-Reply-To: <3F292ADD.1040202@kitware.com> References: <3F292ADD.1040202@kitware.com> Message-ID: <3F29465F.8040003@ewi.tudelft.nl> Hello Luis and Brad, Luis Ibanez wrote: >> TValueType & GetElement( unsigned int i ) >> { return this->operator[]( i ); } >> > > in line 70 of itkArray.h > > > Would you like to give it a try to build with this > method removed ? It seems to be fine. I just built with ITK_CSWIG_{PYTHON,TCL} set to ON: In [4]: registration.GetLastTransformParameters() Out[4]: In [5]: registration.GetLastTransformParameters().GetElement(0) Out[5]: 0.0 In [6]: registration.GetLastTransformParameters().SetElement(0, 12.9) In [7]: registration.GetLastTransformParameters().GetElement(0) Out[7]: 12.9 The generated code in wrap_itkArrayPython.cxx is also fine. Should I commit? Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From luis.ibanez@kitware.com Thu Jul 31 16:50:21 2003 From: luis.ibanez@kitware.com (Luis Ibanez) Date: Thu, 31 Jul 2003 11:50:21 -0400 Subject: [Insight-users] ITK Python Wrapping Examples References: <3F292ADD.1040202@kitware.com> <3F29465F.8040003@ewi.tudelft.nl> Message-ID: <3F293ABD.7010509@kitware.com> Charl, Thanks for experimenting the build. If it is building fine, please commit it, Thanks Luis ------------------------- Charl P. Botha wrote: > Hello Luis and Brad, > > Luis Ibanez wrote: > >>> TValueType & GetElement( unsigned int i ) >>> { return this->operator[]( i ); } >>> >> >> in line 70 of itkArray.h >> >> >> Would you like to give it a try to build with this >> method removed ? > > > It seems to be fine. I just built with ITK_CSWIG_{PYTHON,TCL} set to ON: > > In [4]: registration.GetLastTransformParameters() > Out[4]: > In [5]: registration.GetLastTransformParameters().GetElement(0) > Out[5]: 0.0 > In [6]: registration.GetLastTransformParameters().SetElement(0, 12.9) > In [7]: registration.GetLastTransformParameters().GetElement(0) > Out[7]: 12.9 > > The generated code in wrap_itkArrayPython.cxx is also fine. Should I > commit? > > Thanks, > Charl > From holmesd3@yahoo.com Thu Jul 31 17:12:59 2003 From: holmesd3@yahoo.com (David Holmes) Date: Thu, 31 Jul 2003 09:12:59 -0700 (PDT) Subject: [Insight-users] Registration In-Reply-To: Message-ID: <20030731161259.20628.qmail@web13101.mail.yahoo.com> Lydia- Thanks for your help. I appreciate your insight and experience with this. Actually, I tried several of the steps that you mentioned. I applied a centering step but it had no effect on the result. I also played around with the scales with little progress. The bottom line difference is your choice of learning rate. Although I played with the learning rate, I only went down to 0.5. I actually looked at the code and based on the equation, I figured that a learning rate less than 0.5 wasn't particularly practical. After you divide out the scale (let's say scale=1), then in your case of 2e-4, the gradient step is pretty tiny; therefore requiring the larger number of iterations that you used. I clearly underestimated the properties of the cost function. I guess this really speaks to the advantages of multi-resolution registration because the cost-function should smooth out nicely at the lower resolutions and the solution should be reached much quicker. thanks again for your help. david --- Lydia Ng wrote: > Hi David, > > I played with the code and images that you provided and I have been > able > to get things to work for quaternion and euler3D (after some bug > fixes > on the Euler3DTransform. I actually haven't used this class before. > There were some problems in computing the Jacobian. You will need to > do > a cvs update). > > The main modifications I have made to the testing code are some > heuristics that I typically used when doing rigid registration. > > [1] Scales for the optimizer: I typically set all the rotation > parameter > scales to 1.0 and all the translation parameter scales to > 1 / vnl_math_sqr( largest dimension in mm ) > > [2] To help the optimizer along, I move the image origin to the > center > of > the image using the ChangeInformationImageFilter. > > [3] I made the number of iterations a command line parameter as well. > > Results for Quaternion: > > D:\lng\Insight\WorkDir\TestSpacingBug-VC7>Release\sReg2MI-Q.exe > BaseMedium.mha MatchMedium.mha 50 2e-4 800 Output1.mhd Output2.mhd > > .... > Result = > Iterations = 800 > Metric value = 0.623549 > Parameters = [0.00142203, 0.000212377, -0.000797665, 0.999999, > 13.1426, 12.904, 0.0624338] > Best Result = > Iterations = 305 > Metric value = 1.13265 > Parameters = [9.43452e-005, 0.00165847, -0.000179486, 0.999999, > 13.3109, 12.743, 0.139079] > > > Results for Euler angles: > > D:\lng\Insight\WorkDir\TestSpacingBug-VC7>Release\sReg2MI-EA.exe > BaseMedium.mha MatchMedium.mha 50 2e-4 800 Output1.mhd Output2.mhd > > ... > Result = > Iterations = 800 > Metric value = 0.61881 > Parameters = [-0.000621624, -0.000582881, -4.24551e-005, 13.0795, > 12.7855, 0.0902379] > > Best Result = > Iterations = 305 > Metric value = 1.139 > Parameters = [1.98307e-005, -0.00188853, 0.00095573, 13.2279, > 12.7554, > -0.01844] > > --------------------------------- > Note that as described in the software guide, the value of MI using > the > V&W implementation is very noisy. > ________________________________ > > Would you be able to generate some datasets with more rotational > misalignment so that we can also do tests on them? > ________________________________ > > - Lydia > > > -----Original Message----- > > From: David Holmes [mailto:holmesd3@yahoo.com] > > Sent: Tuesday, July 29, 2003 2:53 PM > > To: insight-users@public.kitware.com > > Subject: [Insight-users] Registration > > > > > > Well, I have been playing with registration some more > > and had little success. Here is what I have come > > across: > > > > (1) Because of problems with the meanssquared metric, > > I moved on to the MI metric. > > > > V&W MI work with the translation transform. I did not > > have any problems for a variety of mis-alignments with > > a variety of scales. (Used ImageRegistration2.cxx) > > > > (2) V&W MI doesn't work when I go to a transform with > > more parameters. Euler3D and Quaternion don't work > > regardless of the parameters I set. Messing with > > the scales doesn't help much. Often I get the "mapped > > outside" error. I can't comment on the spacing > > problem because I cannot get a consistent correct > > answer. > > > > For what it is worth, I am not a big fan of the > > optimizer because even when it gets a near optimal > > cost value, it runs away from it. That is a real > > challenge. > > > > Thanks > > > > David > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Insight-users mailing list > > Insight-users@itk.org > > http://www.itk.org/mailman/listinfo/insight-users > > ATTACHMENT part 2 application/octet-stream name=sReg2MI-Q.cxx > ATTACHMENT part 3 application/octet-stream name=sReg2MI-EA.cxx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From itkneha@yahoo.com Thu Jul 31 20:08:27 2003 From: itkneha@yahoo.com (Neha D) Date: Thu, 31 Jul 2003 12:08:27 -0700 (PDT) Subject: [Insight-users] Visualization of ITK output ? In-Reply-To: <1840259920.20031019225228@lncc.br> Message-ID: <20030731190827.11141.qmail@web80513.mail.yahoo.com> --0-1284729830-1059678507=:9367 Content-Type: text/plain; charset=us-ascii Hi all, I want to know the best choice for Visualization of ITK output. Can I use Java for Visualization as well as GUI ? Is it a smart selection to use JAVA over TCL/TK for GUI and VTK for Visualiztion? Thanks, Neha --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software --0-1284729830-1059678507=:9367 Content-Type: text/html; charset=us-ascii

Hi all,

I want to know the best choice for Visualization of ITK output. Can I use Java for Visualization as well as GUI ? Is it a smart selection to use JAVA over TCL/TK for GUI and VTK for Visualiztion?

Thanks,

Neha


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software --0-1284729830-1059678507=:9367-- From Mathieu.Malaterre at creatis.insa-lyon.fr Tue Jul 1 04:07:46 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Tue, 01 Jul 2003 10:07:46 +0200 Subject: [Insight-users] ImageIO or FILeReader or FIleWrite's problem, In-Reply-To: <20030630212157.41964.qmail@web20907.mail.yahoo.com> References: <20030630212157.41964.qmail@web20907.mail.yahoo.com> Message-ID: <3F014152.30901@creatis.insa-lyon.fr> Shunming Fang wrote: > If I just use one ImageIO to reader and > writer(supposed the input file and out file format is > the same), no problem. Only implmenting like the > following way, the segmentation happen before > writer->Update(), Yes, it is before writer->Update() Shunming, Are you sure you don't use any 'Update()' before this one ? Because setting up a pipeline doesn't do anything at all...until an 'Update()' is call on a filter. So please send us the whole code you are using. You can also send us the backtrace of a gdb session. Thanks, Mathieu > because try..Catch didn't catch the segmenataion. > I wander whether in itk, there are just one ImageIO > instance allowed? > Fang From salah at gris.uni-tuebingen.de Tue Jul 1 06:10:36 2003 From: salah at gris.uni-tuebingen.de (salah) Date: Tue, 1 Jul 2003 12:10:36 +0200 Subject: [Insight-users] WG: itk with Microsoft Visual Studio .NET 2003 Message-ID: <4B943954DD289E47958BCEC8C32269BE1EFB42@wsi-server2.wsi-gris.uni-tuebingen.de> > -----Urspr?ngliche Nachricht----- > Von: salah > Gesendet: Montag, 30. Juni 2003 18:00 > An: ITK Users (E-Mail) > Betreff: itk with Microsoft Visual Studio .NET 2003 > > Hello all, > > I am using ITK+VTK+FLTK with Windows 2000 and > Microsoft visual C++ 6.0. > > I am thinking of using the same combination with > Microsoft Visual Studio .NET 2003. > > 1. Does this combination work well? I mean equally > well (or better) than my current one? > > 2. Would the combinations > ITK+VTK+FLTK+Microsoft visual C++ 6.0 > OR > ITK+VTK+FLTK+Microsoft Visual Studio .NET 2003 > > work well with Windows XP? Which Windows is more > stable to work with ITK-based projects?? > > > Many Thanks, > Zein > > > From millerjv at crd.ge.com Tue Jul 1 11:33:11 2003 From: millerjv at crd.ge.com (Miller, James V (Research)) Date: Tue, 1 Jul 2003 11:33:11 -0400 Subject: [Insight-users] Find largest connected object in a Volume Message-ID: I just added a new filter to the ITK repository that relabels an image. The input would the output of any segmentation algorithm that creates a label map. The ConnectedComponentImageFilter would be one such filter. Watershed would another, etc. The filter is called RelabelComponentImageFilter and it changes the labels in the image such that label 1 is assigned to the largest object, label 2 is the next largest object, etc. Any single object can be extracted using BinaryThresholdImageFilter by setting the LowerThreshold and the UpperThreshold to the same value. In fact, any group of objects can be extracted using BinaryThresholdImageFilter by having the LowerThreshold and UpperThreshold span a group range (the ThresholdImageFilter can be used to extract a range of objects without changing their labels again). So using the RelabelComponentImageFilter in conjuction with a threshold filter you can extract the largest object, the second largest object, or the k largest objects. Size is defined by area/volume/number of pixels, etc. After the filter executes, you can query the number of objects, and the size of each object. Jim -----Original Message----- From: Miller, James V (Research) [mailto:millerjv at crd.ge.com] Sent: Friday, June 27, 2003 1:34 PM To: 'cspl'; insight-users at itk.org Subject: RE: [Insight-users] Find largest connected object in a Volume In Code/BasicFilters there are two classes ConnectedComponentImageFilter and HardConnectedComponentImageFilter. The former is a rewrite of the latter to use more of the ITK infrastructure. The latter may be removed soon. The ConnectedComponentImageFilter will use 6-connectivity in a volume to label the objects in the volume. Each connected object will have a unique label. However, this does not extract the largest connected object. You would need a separate filter (that does not exist yet) to scan through the label map and extract the largest object. As Luis suggested, you could a histogram of the label map to determine which object is the "largest". -----Original Message----- From: cspl [mailto:affable at hd2.dot.net.in] Sent: Friday, June 27, 2003 2:19 AM To: insight-users at itk.org Subject: [Insight-users] Find largest connected object in a Volume Hi Luis and all, I am in need of help on connectivity filter. Let me explain my requirment. I have a volume of some slices. I have to find the largest object in the entire volume. Initiallly i will threshold the image so that it will in binary format. Then i have to use 6-connectivity of find the largest object in the volume. The largest object should be labeled 1. Is there any filter which solves my problem. I should use 6-connectivity. Please do suggest me if there are other alternatives too. Please help me in this regard. Thanks in advance. -Regards, Sateesh. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.hoffman at kitware.com Tue Jul 1 13:19:52 2003 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Tue, 01 Jul 2003 13:19:52 -0400 Subject: [Insight-users] kraepelin.uiowa -- IRIX64_MIPSpro7.3.1.3m-DEBUG errors Message-ID: <5.2.0.9.0.20030701131701.04dbe578@pop.biz.rr.com> Can the maintainer of this dashboard: kraepelin.uiowa -- IRIX64_MIPSpro7.3.1.3m-DEBUG errors Please try and remove this directory: `/scratch/purify/Testing/SGI/DEBUG/Insight/Utilities/kwsys' I think the errors are caused by a bad template ii_files directory. For a quick check this could be done: cd /scratch/purify/Testing/SGI/DEBUG/Insight/Utilities rm -rf kwsys make rebuild_cache make -Bill From santosh.keni at fiu.edu Tue Jul 1 19:34:55 2003 From: santosh.keni at fiu.edu (Santosh Keni) Date: Tue, 1 Jul 2003 19:34:55 -0400 Subject: [Insight-users] image registration Message-ID: <20030701233455.FEVY16642.spn25c0@spn25c0> Hello, I have installed ITK on a windows platform with MSVC6 compiler. I built the binaries using CMake 1.6 with source directory as "c:/ITK/InsightToolkit-1.2.0" and Build directory as "c:/ITK/InsightToolkit-1.2.0/Bin" . Then opened itk.dsw in MSVC6 and built it with "release" and "Debug" options. It gave me 11 warning and 0 errors with msg as shown below; --------------------Configuration: ALL_BUILD - Win32 Debug-------------------- Building Custom Rule ALL_BUILD "Build all projects" ALL_BUILD - 0 error(s), 11 warning(s) But after compilation it did not create the libraries and executables. can someone please tell me how to go about from here? My main goal is to register two sets of SPECT images of a brain phantom using 3D rigid body image registration. Each set of images is in a single volume file in Dicom format. So can anyone suggest a way to get this done using some GUI. From zhengyuanjie at sjtu.edu.cn Wed Jul 2 03:55:57 2003 From: zhengyuanjie at sjtu.edu.cn (֣Ԫ) Date: Wed, 2 Jul 2003 15:55:57 +0800 (BEIST) Subject: [Insight-users] help!! Message-ID: <20030702075557.DA7B715A3F2@sjtu.edu.cn> Dear Sir. I am a new user of ITK with Windows 2000 and Microsoft visual C++ 6.0. Today I am trying to configure the file HelloWorld in the Insight/Examples/Installation directory with CMake. However I can?t finish the configuration , because CMake told me that it couldn?t find ITK. I don?t know what it means. I think it perhaps means the strategy for finding ITK fails, but I don?t know how to correct my operations. I am sure that the source and binary directories have been correctly placed. Would you please explain it for me? I have configured some other provided examples by ITK successfully. And I loaded the workspaces generated by CMake with Microsoft Visual c++ 6.0. Otherwise I can?t build them with vc, because there were some header files I couldn?t find. Would you mind tell me that how I can find all the header files needed quickly? Thank you in advance! Sincerely yours Zheng From mathias.seitel at igd.fhg.de Wed Jul 2 04:47:27 2003 From: mathias.seitel at igd.fhg.de (Mathias Seitel) Date: Wed, 02 Jul 2003 10:47:27 +0200 Subject: [Insight-users] Problem with FloodFilledFunctionConditionalConstIterator Message-ID: <3F029C1F.5080501@igd.fhg.de> Hello, I'm applying a connected threshold segmentation to a volume (256x256x16). For testing purposes I extract one slice, say #12, of the volume, using ExtractImageFilter. The slice has an index of (0, 0, 12) and a size of (256, 256, 1). For the region growing algorithm I add a seed point at (150, 100, 12). FloodFilledFunctionConditionalConstIterator::InitializeIterator() creates a temporary image with the same size as the original image but an index of (0, 0, 0). A set pixel method called later on this image however uses the original seed (z = 12) and thus calculates a wrong offset, which results in a runtime error. With the following lines added to InitializeIterator() everything seems to work fine (at least in my case): IndexType imageIndex = m_Image->GetLargestPossibleRegion().GetIndex(); tempRegion.SetIndex( imageIndex ); Regards, Mathias From Mathieu.Malaterre at creatis.insa-lyon.fr Wed Jul 2 05:23:13 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 02 Jul 2003 11:23:13 +0200 Subject: [Insight-users] ImageIO or FILeReader or FIleWrite's problem, In-Reply-To: <20030701211820.1432.qmail@web20907.mail.yahoo.com> References: <20030701211820.1432.qmail@web20907.mail.yahoo.com> Message-ID: <3F02A481.9090609@creatis.insa-lyon.fr> Your code is way too long, please make it as simple as possible. So that it still reproduce the bug. Furthermore: - You are using SetFilePrefix from an itkFileReader which doesn't exist: http://www.itk.org/Doxygen/html/functions.html#index_s - You are calling 'itkfilterwrap' but I don't have this code, I don't know if this allocate stuff properly, - You are also using your own classes: MRCImageIO and IMAGICImageIO but I don't know what it does, - Include all code: don't forget which '#include' you are using, - Please send me a backtrace of gdb: $ gdb myprog gdb> r [all necessary arguments] gdb> bt [cut and paste the output] Thanks mathieu Shunming Fang wrote: > Hello, Mathieu, > The following code is my code, I declare two instance > of my different specific ImageIO, one for reader and > other for writer, when I setup a pipelince form reader > -> filters->writer, the segmeantation always happen if > the two instance of ImageIO is the same, any > explanation about it?(Note: i change back for writer > using the same ImageIO instance imageIO) > Thanks, > Fang > > int main(int argc, char** argv) [snip] > > > --- Mathieu Malaterre > wrote: > >>Shunming Fang wrote: >> >>>If I just use one ImageIO to reader and >>>writer(supposed the input file and out file format >> >>is >> >>>the same), no problem. Only implmenting like the >>>following way, the segmentation happen before >>>writer->Update(), Yes, it is before >> >>writer->Update() >> >>Shunming, >> Are you sure you don't use any 'Update()' before >>this one ? >> Because setting up a pipeline doesn't do anything >>at all...until an >>'Update()' is call on a filter. >> >> So please send us the whole code you are using. You >>can also send us >>the backtrace of a gdb session. >> >>Thanks, >>Mathieu >> >> >> >> >>>because try..Catch didn't catch the segmenataion. >>>I wander whether in itk, there are just one >> >>ImageIO >> >>>instance allowed? >>>Fang >> >>_______________________________________________ >>Insight-users mailing list >>Insight-users at itk.org >>http://www.itk.org/mailman/listinfo/insight-users > > > > __________________________________ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From salah at gris.uni-tuebingen.de Wed Jul 2 10:03:08 2003 From: salah at gris.uni-tuebingen.de (salah) Date: Wed, 2 Jul 2003 16:03:08 +0200 Subject: [Insight-users] edge preserving smoothing filter Message-ID: <4B943954DD289E47958BCEC8C32269BE1EFB43@wsi-server2.wsi-gris.uni-tuebingen.de> hello all, depending on your experiments, what is the best edge- preserving smoothing filter to use with CT medical images. Speed/quality ?? Thanks, Zein From salah at gris.uni-tuebingen.de Wed Jul 2 10:06:38 2003 From: salah at gris.uni-tuebingen.de (salah) Date: Wed, 2 Jul 2003 16:06:38 +0200 Subject: [Insight-users] Is there a bug inGrayScaleErodeImageFilter?? Message-ID: <4B943954DD289E47958BCEC8C32269BE1EFB44@wsi-server2.wsi-gris.uni-tuebingen.de> Hi everybody , I have asked this question several times before and had unfortunately no answer. > The GrayScaleErodeImageFilter does not process the > margins of the image. It fills them simply with zeros!! > The GrayScaleFunctionErodeImageFilter does everything > on the other hand quite well. > Is there a bug somewhere, or is that intended to be this > way? I am using the 1.2 release, perhapse something was done in later versions?! > Thanx, > Zein > > > > ->8<------------->8<------------->8<------------->8<------------->8<------------->8<- > Zein I. Salah > University of T?bingen, WSI-GRIS, Sand 14, 72076 T?bingen > Email: salah at gris.uni-tuebingen.de > Tel.: (07071) 29 75465 (GRIS), Fax: (07071) 29 54 66 > From salah at gris.uni-tuebingen.de Wed Jul 2 10:34:48 2003 From: salah at gris.uni-tuebingen.de (salah) Date: Wed, 2 Jul 2003 16:34:48 +0200 Subject: [Insight-users] image intensity resclaing Message-ID: <4B943954DD289E47958BCEC8C32269BE1FA6CA@wsi-server2.wsi-gris.uni-tuebingen.de> Hello all, I need to do some kind of rescaling the intensities of an image in such a way like the so-called "histogram windowing". In other way, I want to rescale the intensities that lie in a range (a, b) so that they fit in the whole intesity range (say 0, 255), all values less than a are set to zero and all those greater that b are set to 255. Is there an already-made filter in itk that does this?? Thanks, Zein From pauly at cognitica.com Wed Jul 2 10:55:38 2003 From: pauly at cognitica.com (Paul Yushkevich) Date: Wed, 02 Jul 2003 10:55:38 -0400 Subject: [Insight-users] kwsys error Message-ID: <3F02F26A.2040702@cognitica.com> Hi, I updated my ITK installation this morning and I'm errors compiling in VC60 in the file Directory.cxx in Utilities\kwsys #include #include These lines are generating errors. They look a bit weird because, usually, I include just or . Is anyone else also getting this error? Paul. -- -------------------------------- Paul A. Yushkevich, Ph.D. President, Cognitica Corporation 17 Flemington Rd Chapel Hill, NC 27517 Tel: 1-919-929-7652 -------------------------------- From millerjv at crd.ge.com Wed Jul 2 11:12:04 2003 From: millerjv at crd.ge.com (Miller, James V (Research)) Date: Wed, 2 Jul 2003 11:12:04 -0400 Subject: [Insight-users] Is there a bug inGrayScaleErodeImageFilter?? Message-ID: I still have not fixed this. It does process the margins, however, the prescribed boundary condition is to treat pixels outside the image as zeros. So zero propagate into the margin of the image. The boundary condition needs to be changed to NeumannZeroFlux variety. > -----Original Message----- > From: salah [mailto:salah at gris.uni-tuebingen.de] > Sent: Wednesday, July 02, 2003 10:07 AM > To: ITK Users (E-Mail) > Subject: [Insight-users] Is there a bug inGrayScaleErodeImageFilter?? > > > > Hi everybody , > > I have asked this question several times before and had > unfortunately no answer. > > > The GrayScaleErodeImageFilter does not process the > > margins of the image. It fills them simply with zeros!! > > The GrayScaleFunctionErodeImageFilter does everything > > on the other hand quite well. > > Is there a bug somewhere, or is that intended to be this > > way? > I am using the 1.2 release, perhapse something was done > in later versions?! > > > Thanx, > > Zein > > > > > > > > > ->8<------------->8<------------->8<------------->8<---------- > --->8<------------->8<- > > Zein I. Salah > > University of Tubingen, WSI-GRIS, Sand 14, 72076 Tubingen > > Email: salah at gris.uni-tuebingen.de > > Tel.: (07071) 29 75465 (GRIS), Fax: (07071) 29 54 66 > > > _______________________________________________ > Insight-users mailing list > Insight-users at itk.org > http://www.itk.org/mailman/listinfo/insight-users > From mark_foskey at unc.edu Wed Jul 2 11:19:56 2003 From: mark_foskey at unc.edu (Mark Foskey) Date: Wed, 02 Jul 2003 11:19:56 -0400 Subject: [Insight-users] kwsys error In-Reply-To: <3F02F26A.2040702@cognitica.com> References: <3F02F26A.2040702@cognitica.com> Message-ID: <3F02F81C.4020604@unc.edu> Jean-Philippe Guyon ran into that error yesterday, I think, but didn't investigate further since he still was able to compile his app. I don't know why it's not showing up on the dashboard. Paul Yushkevich wrote: > Hi, I updated my ITK installation this morning and I'm errors compiling > in VC60 in the file Directory.cxx in Utilities\kwsys > > #include > #include > > These lines are generating errors. They look a bit weird because, > usually, I include just or . > > Is anyone else also getting this error? > > Paul. > -- Mark Foskey (919) 843-5436 Computer-Aided Diagnosis and Display Lab mark_foskey at unc.edu Department of Radiology, CB 7515, UNC http://www.cs.unc.edu/~foskey Chapel Hill, NC 27599-7515 From millerjv at crd.ge.com Wed Jul 2 11:20:43 2003 From: millerjv at crd.ge.com (Miller, James V (Research)) Date: Wed, 2 Jul 2003 11:20:43 -0400 Subject: [Insight-users] edge preserving smoothing filter Message-ID: GradientAnisotropicDiffusionImageFilter is the standard approach. The other variants like CurvatureAnisotropicDiffusionImageFilter produce images that are more "piecewise" constant which can be useful for extracting objects of interest. I have not looked at the background of the CurvatureImageFilter. So I cannot comment on its relative merits to the above diffusion operators. The BilateralImageFilter does not have the characteristic ripple (caused by sharp discontinuities) as the diffusion operators. This is appealing for some applications. But the BilateralImageFilter is very slow in comparison to the diffusion methods. Hopefully we'll have a version of Mean Shift image filtering soon. It should behave similar to the bilateral filter. We recently added some grayscale morphological operators based on geodesic erosion and dilation. These are also quite useful for removing noise. GrayscaleGeodesicErodeImageFilter GrayscaleGeodesicDilateImageFilter HMaximaImageFilter HMinimaImageFilter HConvexImageFilter HConcaveImageFilter > -----Original Message----- > From: salah [mailto:salah at gris.uni-tuebingen.de] > Sent: Wednesday, July 02, 2003 10:03 AM > To: ITK Users (E-Mail) > Subject: [Insight-users] edge preserving smoothing filter > > > hello all, > > depending on your experiments, what is the best edge- > preserving smoothing filter to use with CT medical images. > Speed/quality ?? > > Thanks, > Zein > > _______________________________________________ > Insight-users mailing list > Insight-users at itk.org > http://www.itk.org/mailman/listinfo/insight-users > From millerjv at crd.ge.com Wed Jul 2 11:27:34 2003 From: millerjv at crd.ge.com (Miller, James V (Research)) Date: Wed, 2 Jul 2003 11:27:34 -0400 Subject: [Insight-users] image intensity resclaing Message-ID: The RescaleIntensityImageFilter will rescale the intensities in the image the dynamic range on the input image is mapped to a user specified range. But it does not map a user specified input range to a user specified output range. The IntensityWindowingImageFilter does what you want but its API is not the standard window/level parameters. You set the input WindowMinimum and WindowMaximum and specify the associated OutputMinimum and OutputMaximum. I plan to add the standard window/level API to this filter (it will just remap the window/level to the above parameters). Jim > -----Original Message----- > From: salah [mailto:salah at gris.uni-tuebingen.de] > Sent: Wednesday, July 02, 2003 10:35 AM > To: ITK Users (E-Mail) > Subject: [Insight-users] image intensity resclaing > > > Hello all, > > I need to do some kind of rescaling the intensities of an > image in such a way like the so-called "histogram windowing". > In other way, I want to rescale the intensities that lie in > a range (a, b) so that they fit in the whole intesity range > (say 0, 255), all values less than a are set to zero and all > those greater that b are set to 255. > > Is there an already-made filter in itk that does this?? > > Thanks, > Zein > > > > _______________________________________________ > Insight-users mailing list > Insight-users at itk.org > http://www.itk.org/mailman/listinfo/insight-users > From GIordanescu at cc.nih.gov Wed Jul 2 13:22:43 2003 From: GIordanescu at cc.nih.gov (Iordanescu, Gheorghe (NIH/CC/DRD)) Date: Wed, 2 Jul 2003 13:22:43 -0400 Subject: [Insight-users] Dicom slice position Message-ID: <0856166C2F7DE0488BB312A2BD3D58CB075DBD94@cyan2.CC.NIH.GOV> Hi everybody, I would like to read a sequence of Dicom images in a volume. Unfortunately the images' names do not correspond to their order in space. For this I would like to read from each image header the "Image number", "Patient position", "slice thickness".and "pixel spacing". Does anybody have an example of how to read these fields from a dicom header? Thank you very much. George -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.hoffman at kitware.com Wed Jul 2 13:45:35 2003 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Wed, 02 Jul 2003 13:45:35 -0400 Subject: [Insight-users] kwsys error In-Reply-To: <3F02F81C.4020604@unc.edu> References: <3F02F26A.2040702@cognitica.com> <3F02F26A.2040702@cognitica.com> Message-ID: <5.2.0.9.0.20030702134225.04e114b0@pop.biz.rr.com> Please re-run CMakeSetup on ITK, and the files should be generated. Also, make sure you have done a complete cvs update (first), including the top level directory for ITK. -Bill At 11:19 AM 7/2/2003, Mark Foskey wrote: >Jean-Philippe Guyon ran into that error yesterday, I think, but didn't investigate further since he still was able to compile his app. I don't know why it's not showing up on the dashboard. > >Paul Yushkevich wrote: >>Hi, I updated my ITK installation this morning and I'm errors compiling in VC60 in the file Directory.cxx in Utilities\kwsys >>#include >>#include >>These lines are generating errors. They look a bit weird because, usually, I include just or . >>Is anyone else also getting this error? >>Paul. > >-- >Mark Foskey (919) 843-5436 Computer-Aided Diagnosis and Display Lab >mark_foskey at unc.edu Department of Radiology, CB 7515, UNC >http://www.cs.unc.edu/~foskey Chapel Hill, NC 27599-7515 > >_______________________________________________ >Insight-users mailing list >Insight-users at itk.org >http://www.itk.org/mailman/listinfo/insight-users From hjohnson at mail.psychiatry.uiowa.edu Wed Jul 2 09:39:05 2003 From: hjohnson at mail.psychiatry.uiowa.edu (Hans Johnson) Date: Wed, 02 Jul 2003 08:39:05 -0500 Subject: [Insight-users] kraepelin.uiowa -- IRIX64_MIPSpro7.3.1.3m-DEBUG errors In-Reply-To: <5.2.0.9.0.20030701131701.04dbe578@pop.biz.rr.com> References: <5.2.0.9.0.20030701131701.04dbe578@pop.biz.rr.com> Message-ID: <3F02E079.50208@mail.psychiatry.uiowa.edu> Bill, This has been done. I am re-running last nights nightly build right now, and hopefully this will resolve the dashboard errors. Thank you for the information. Regards, Hans Bill Hoffman wrote: >Can the maintainer of this dashboard: > >kraepelin.uiowa -- IRIX64_MIPSpro7.3.1.3m-DEBUG errors > >Please try and remove this directory: > >`/scratch/purify/Testing/SGI/DEBUG/Insight/Utilities/kwsys' > >I think the errors are caused by a bad template ii_files directory. > >For a quick check this could be done: > >cd /scratch/purify/Testing/SGI/DEBUG/Insight/Utilities >rm -rf kwsys >make rebuild_cache >make > > >-Bill > > > >_______________________________________________ >Insight-users mailing list >Insight-users at itk.org >http://www.itk.org/mailman/listinfo/insight-users > > From luis.ibanez at kitware.com Wed Jul 2 14:21:03 2003 From: luis.ibanez at kitware.com (Luis Ibanez) Date: Wed, 02 Jul 2003 14:21:03 -0400 Subject: [Insight-users] help!! References: <20030702075557.DA7B715A3F2@sjtu.edu.cn> Message-ID: <3F03228F.9050103@kitware.com> Hi Zheng, The HelloWorld example requires you to specify the binary directory where you built ITK. You must provide this path in the CMake variable "ITK_DIR" when you run CMake for configuring the HelloWorld example. If you continue experiencing any problems, please send us the CMakeCache.txt file that CMake is generating in the binary directory where you are trying to build the HelloWorld example. Thanks Luis ------------- ??? wrote: > Dear Sir. > I am a new user of ITK with Windows 2000 and Microsoft visual C++ 6.0. Today I am trying to configure the file HelloWorld in the Insight/Examples/Installation directory with CMake. However I can?t finish the configuration , because CMake told me that it couldn?t find ITK. I don?t know what it means. I think it perhaps means the strategy for finding ITK fails, but I don?t know how to correct my operations. I am sure that the source and binary directories have been correctly placed. Would you please explain it for me? > > I have configured some other provided examples by ITK successfully. And I loaded the workspaces generated by CMake with Microsoft Visual c++ 6.0. Otherwise I can?t build them with vc, because there were some header files I couldn?t find. Would you mind tell me that how I can find all the header files needed quickly? > Thank you in advance! > Sincerely yours > Zheng > > From luis.ibanez at kitware.com Wed Jul 2 14:32:49 2003 From: luis.ibanez at kitware.com (Luis Ibanez) Date: Wed, 02 Jul 2003 14:32:49 -0400 Subject: [Insight-users] image registration References: <20030701233455.FEVY16642.spn25c0@spn25c0> Message-ID: <3F032551.1000600@kitware.com> Hi Santosh, Once you are done with the building process, you should find ITK libraries and executables for the examples in the directories: c:/ITK/InsightToolkit-1.2.0/Bin/bin/Debug and c:/ITK/InsightToolkit-1.2.0/Bin/bin/Release Since you build both for Debug and Release. Note the double : /Bin/bin the first one is the "Bin" that you specified, the second "bin" is one that ITK configuration adds for your convenience. ----- Having ITK built, probably the best next step is to get some coffee and go to the SoftwareGuide http://www.itk.org/ItkSoftwareGuide.pdf and read the section on image Resampling (section 5.7), and the chapter on image registration (chapter 7th). Please read the section on resampling first, since many concepts from this section are used later on registration. Both sections will point you to associated examples available in Insight/Examples/Filtering and Insight/Examples/Registration --- If you want to try a GUI based registration tool, you may want to go directly to the UNC's CADDLab page http://caddlab.rad.unc.edu/software/index.html#registration3D and download their nice 3D registration tool. Both source code and binary versions are available (Linux and Windows). This tool is based on ITK components. Regards, Luis ---------------------- Santosh Keni wrote: > Hello, > I have installed ITK on a windows platform with MSVC6 compiler. I built the binaries using CMake 1.6 with source directory as "c:/ITK/InsightToolkit-1.2.0" and Build directory as "c:/ITK/InsightToolkit-1.2.0/Bin" . Then opened itk.dsw in MSVC6 and built it with "release" and "Debug" options. It gave me 11 warning and 0 errors with msg as shown below; > --------------------Configuration: ALL_BUILD - Win32 Debug-------------------- > Building Custom Rule ALL_BUILD > "Build all projects" > > ALL_BUILD - 0 error(s), 11 warning(s) > > But after compilation it did not create the libraries and executables. can someone please tell me how to go about from here? > > My main goal is to register two sets of SPECT images of a brain phantom using 3D rigid body image registration. Each set of images is in a single volume file in Dicom format. So can anyone suggest a way to get this done using some GUI. > > > _______________________________________________ > Insight-users mailing list > Insight-users at itk.org > http://www.itk.org/mailman/listinfo/insight-users > From tbaker at claritysolutionsllc.com Wed Jul 2 15:06:47 2003 From: tbaker at claritysolutionsllc.com (Todd Baker) Date: Wed, 2 Jul 2003 15:06:47 -0400 Subject: [Insight-users] Position Available for Medical Imaging and Visualization Developer Message-ID: Hello all: I don't mean to invade the insight-users list space... but hopefully this will be seen more as a service to the ITK community than a nuisance. This is a real job posting from the one doing the hiring. So please accept my apology in advance if this is too OT. Clarity Solutions is a software company providing leading-edge medical imaging and visualization solutions to the clinical community in a cost-effective, flexible and intuitive package. Because of our success in this area we are seeking team members with the advanced skill set and real-world experience to help us expand into new areas and to build on our current product offerings. We have the unique advantage of being backed by 20 years of solid medical imaging experience and success as well as having the flexibility and feel of a start-up company. It's the best of both worlds. A good, solid place to work with strong financial backing, great benefits and job security combined with a creative environment that allows us to be true innovators in our field. Clarity is looking for software engineers that understand the difference between high-tech, gee-whiz eye-candy and real-world usability and practicality. At the same time we strive to be technical leaders and therefore require an extensive background in clinical imaging and visualization. It will take more than the right credentials to get on this team. Applicant Requirements: - Strong educational and work background in the clinical imaging and visualization field. - In-depth knowledge of common Radiology and Nuclear Medicine modalities and image formats. - Minimum of M.S. in Computer Science, Engineering, Mathematics or other "hard science." - Bulletproof skills in C++ and OO design and implementation. (must be able to demonstrate previous applications relevant to our needs.) - Ability to function with minimal supervision. - DICOM experience is very valuable. - Experience using Qt a big plus. - Hands-on experience using imaging and visualization frameworks such as: - The Insight Toolkit for Segmentation and Registration (ITK) - The Visualization Toolkit (VTK) - Ability to function in a team environment (must play well with others). Todd Baker Project Director - R&D Lead Developer Clarity Solutions, LLC -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.ibanez at kitware.com Wed Jul 2 16:27:41 2003 From: luis.ibanez at kitware.com (Luis Ibanez) Date: Wed, 02 Jul 2003 16:27:41 -0400 Subject: [Insight-users] Problem with FloodFilledFunctionConditionalConstIterator References: <3F029C1F.5080501@igd.fhg.de> Message-ID: <3F03403D.4030806@kitware.com> Hi Mathias, Thanks for pointing this out. The code in FloodFilledFunctionConditionalConstIterator::InitializeIterator() has been modified according to your suggestion. The tempRegion is now equal to the LargestPossibleRegion(). a CVS update should give you the new version. Please let us know if you find further problems, Regards, Luis --------------------- Mathias Seitel wrote: > Hello, > > I'm applying a connected threshold segmentation to a volume > (256x256x16). For testing purposes I extract one slice, say #12, of the > volume, using ExtractImageFilter. The slice has an index of (0, 0, 12) > and a size of (256, 256, 1). For the region growing algorithm I add a > seed point at (150, 100, 12). > > FloodFilledFunctionConditionalConstIterator::InitializeIterator() > creates a temporary image with the same size as the original image but > an index of (0, 0, 0). A set pixel > method called later on this image however uses the original seed (z = > 12) and thus calculates a wrong offset, which results in a runtime error. > > With the following lines added to InitializeIterator() everything seems > to work fine (at least in my case): > > IndexType imageIndex = m_Image->GetLargestPossibleRegion().GetIndex(); > tempRegion.SetIndex( imageIndex ); > > Regards, > Mathias > > > _______________________________________________ > Insight-users mailing list > Insight-users at itk.org > http://www.itk.org/mailman/listinfo/insight-users > From sven.prevrhal at oarg.ucsf.edu Wed Jul 2 18:19:09 2003 From: sven.prevrhal at oarg.ucsf.edu (Sven Prevrhal) Date: Wed, 2 Jul 2003 15:19:09 -0700 Subject: [Insight-users] rescaling problems Message-ID: <000001c340e7$f5b6b240$7f07da0a@RORG.OARG.UCSF.EDU> I'd like to sample a CT volume onto a coarser grid and am having trouble. The resampleFilter Update throws an exception saying at least a part of the requested region is outside the maximum size, but only if I request a smaller size! Here's my code with the problem description commented: m_ResampleTransform->SetIdentity(); ImageSizeType scaledSize; ImageSizeType size = m_ImageReader->GetOutput()-> GetBufferedRegion().GetSize(); //From the GUI: this->m_SpacingFactor[0] = xValue; this->m_SpacingFactor[1] = yValue; this->m_SpacingFactor[2] = zValue; double * scaledSpacing = new double[ImageDimension]; const double * spacing = m_ImageReader->GetOutput()->GetSpacing(); for( int i = 0; i < ImageDimension; i++ ) { scaledSpacing[i] = spacing[i] * m_SpacingFactor[i]; // Here's the problem: If I leave // scaledSize[i] = size[i]; // it doesn't crash, // but I get a lot of zero voxels around. Setting scaledSize[i] = size[i] / m_SpacingFactor[i]; // should take the excess voxel out, but it crashes! } m_ResampleFilter->SetSize( scaledSize ); m_ResampleFilter->SetOutputSpacing( (const double *) scaledSpacing ); m_ResampleFilter->Modified(); // Update somewhere else, but that's when it crashes Example: I have 512x512xn input, want to resample onto 256x256xn output, I choose the m_SpacingFactors 2.0,2.0,1.0. Setting size to 256x256xn ->crash! This shouldn't be hard, but for some reason I am stuck. Any ideas totally appreciated!! sven -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.ibanez at kitware.com Thu Jul 3 01:43:37 2003 From: luis.ibanez at kitware.com (Luis Ibanez) Date: Thu, 03 Jul 2003 01:43:37 -0400 Subject: [Insight-users] rescaling problems References: <000001c340e7$f5b6b240$7f07da0a@RORG.OARG.UCSF.EDU> Message-ID: <3F03C289.4050809@kitware.com> Hi Sven, Your code looks ok, and the application of the factor scaling for reducing the size is perfectly valid. I guess that you may be experiencing a pipeline update problem. Do you have more filters after the ResampleImageFilter ? Are you calling Update() in any of those downstream filters ? I would suggest you to try calling "UpdateLargestPossibleRegion()" instead of just "Update()". For performance reasons, the pipeline only performs region negociations the first time it is executed. Calling UpdateLargestPossibleRegion() forces the pipeline to repeat the region negociation each time. This is quite important when you are changing the image size as a consequence of some parameter settings. Please let us know if you continue experiencing any problems, Thanks Luis ----------------------- Sven Prevrhal wrote: > I?d like to sample a CT volume onto a coarser grid and am having > trouble. The resampleFilter Update throws an exception saying at least a > part of the requested region is outside the maximum size, but only if I > request a smaller size! Here?s my code with the problem description > commented: > > > > m_ResampleTransform->SetIdentity(); > > > > ImageSizeType scaledSize; > > > > ImageSizeType size = m_ImageReader->GetOutput()-> > > GetBufferedRegion().GetSize(); > > > > //From the GUI: > > this->m_SpacingFactor[0] = xValue; > > this->m_SpacingFactor[1] = yValue; > > this->m_SpacingFactor[2] = zValue; > > > > double * scaledSpacing = new double[ImageDimension]; > > > > const double * spacing = m_ImageReader->GetOutput()->GetSpacing(); > > > > for( int i = 0; i < ImageDimension; i++ ) { > > > > scaledSpacing[i] = spacing[i] * m_SpacingFactor[i]; > > > > // Here?s the problem: If I leave > > // scaledSize[i] = size[i]; > > // it doesn?t crash, > > // but I get a lot of zero voxels around. Setting > > scaledSize[i] = size[i] / m_SpacingFactor[i]; > > // should take the excess voxel out, but it crashes! > > } > > > > m_ResampleFilter->SetSize( scaledSize ); > > m_ResampleFilter->SetOutputSpacing( (const double *) scaledSpacing ); > > m_ResampleFilter->Modified(); > > > > // Update somewhere else, but that?s when it crashes > > > > Example: I have 512x512xn input, want to resample onto 256x256xn output, > I choose the m_SpacingFactors 2.0,2.0,1.0. Setting size to 256x256xn ->crash! > > > > This shouldn?t be hard, but for some reason I am stuck. Any ideas > totally appreciated!! > > > > sven > > -- > > > From luis.ibanez at kitware.com Thu Jul 3 01:58:34 2003 From: luis.ibanez at kitware.com (Luis Ibanez) Date: Thu, 03 Jul 2003 01:58:34 -0400 Subject: [Insight-users] =?GB2312?B?UmU6IENvbmZpZ3VyaW5nIHRoZSBIZWxsb1dvcmxkIGV4YW1wbGU6IA==?= =?GB2312?B?IEkgc3RpbGwgY2Fuoa90IHNvbHZlIG15IHByb2JsZW0gdGlsbCBub3chIDog?= References: <20030703054120.D4D7E1C57ED@sjtu.edu.cn> Message-ID: <3F03C60A.6070802@kitware.com> HI Zheng, It seems that you haven't built ITK itself. You have to build ITK before attemting to use any of the examples. In order to build ITK, run CMake and provide as source directory E:\\zhengyuanjie\\InsightToolkit-1.2.0\\InsightToolkit-1.2.0 not E:\\zhengyuanjie\\InsightToolkit-1.2.0\\InsightToolkit-1.2.0\\Examples\\Installation Then as binary directory for building ITK, provide E:\\zhengyuanjie\\InsightBin After running CMake you will find a file "ITK.dsw" in the directory E:\\zhengyuanjie\\InsightBin Open this ITK.dsw file with VisualStudio 6 and "build" This should generate libraries and executables in the directory E:\\zhengyuanjie\\InsightBin\\bin under subdirectories "Release" or "Debug" depending on the compilation mode that you used. When the build is done (it would take about 40 minutes) you can now use the ITK libraries for building the HelloWorld example. In order to build this example please do the following Run CMakeSetup again, provide as source directory E:\\zhengyuanjie\\InsightToolkit-1.2.0\\InsightToolkit-1.2.0\\Examples\\Installation and as binary directory E:\\zhengyuanjie\\ItkExample CMake will ask you where did you build ITK, that is ?the binary directory where you built ITK?. You must provide this information in the variable ITK_DIR, in your case you should give the directory E:\\zhengyuanjie\\InsightBin With this, CMake should be able to configure the example and generate a file HelloWorld.dsw in the directory E:\\zhengyuanjie\\ItkExample Open this dsw file with VisualStudio and build That will generate the executable for the example. ---- Regards, Luis ---------------- Zheng wrote: > Dear Luis: > I still can?t solve my problem till now. You say The HelloWorld example requires you to specify the binary directory where you built ITK. I don?t know the meaning of ?the binary directory where you built ITK?. > I list my operations and the CMakeCache.txt below. > My operations is as below: > 1. Extract the files in archive InsightToolkit-1.2.0.zip to the folder E:\\zhengyuanjie\\InsightToolkit-1.2.0\\InsightToolkit-1.2.0\\ > 2. Run CMSetup167.exe, and set source and build directories respectively as E:\\zhengyuanjie\\InsightToolkit-1.2.0\\InsightToolkit-1.2.0\\Examples\\Installation and E:\\zhengyuanjie\\MyExample > 3. Select Visual Studio 6. > 4. Push the button configure. > 5. An error appears: Cannot build without ITK. Please set ITK_DIR(Press Cancel to suppress any further messages.) > 6. I push the Cancel button. > 7. I set variable ITK_DIR as E:\\zhengyuanjie\\InsightToolkit-1.2.0, and push configure button. Another error appears: > CMake Error: Error in cmake code at E:/zhengyuanjie/Cmake/Modules/FindITK.cmake:75: > INCLUDE Could not find include file: E:/zhengyuanjie/InsightToolkit-1.2.0/ITKConfig.cmake > (Press Cancel to suppress any further messages.) > 8. If I set variable ITK_DIR as E:\\zhengyuanjie\\MyExample and push configure button, an error appears: > CMake Error: Error in cmake code at E:/zhengyuanjie/Cmake/Modules/FindITK.cmake:75: > INCLUDE Could not find include file: E:/zhengyuanjie/InsightToolkit-1.2.0/ITKConfig.cmake > (Press Cancel to suppress any further messages.) > > > The CMakeCache.txt file?s content is as below: > # This is the CMakeCache file. > # For build in directory: e:/zhengyuanjie/MyExample > # You can edit this file to change values found and used by cmake. > # If you do not want to change any of the values, simply exit the editor. > # If you do want to change a value, simply edit, save, and exit the editor. > # The syntax for the file is as follows: > # KEY:TYPE=VALUE > # KEY is the name of a varible in the cache. > # TYPE is a hint to GUI\'s for the type of VALUE, DO NOT EDIT TYPE!. > # VALUE is the current value for the KEY. > > ######################## > # EXTERNAL cache entries > ######################## > > //Path to a program. > CMAKE_AR:FILEPATH=CMAKE_AR-NOTFOUND > > //For backwards compatibility, what version of CMake commands and > // syntax should this version of CMake allow. > CMAKE_BACKWARDS_COMPATIBILITY:STRING=1.6 > > //C++ compiler > CMAKE_CXX_COMPILER:STRING=cl > > //Flags used by the compiler during all build types. > CMAKE_CXX_FLAGS:STRING= /W3 /Zm1000 /GX /GR > > //Flags used by the compiler during debug builds. > CMAKE_CXX_FLAGS_DEBUG:STRING=/MDd /Zi /Od /GZ > > //Flags used by the compiler during release minsize builds. > CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1 > > //Flags used by the compiler during release builds (/MD /Ob1 /Oi > // /Ot /Oy /Gs will produce slightly less optimized but smaller > // files). > CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 > > //Flags used by the compiler during Release with Debug Info builds. > // > CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 > > //C compiler > CMAKE_C_COMPILER:STRING=cl > > //Flags for C compiler. > CMAKE_C_FLAGS:STRING= /W3 /Zm1000 > > //Flags used by the compiler during debug builds. > CMAKE_C_FLAGS_DEBUG:STRING=/MDd /Zi /Od /GZ > > //Flags used by the compiler during release minsize builds. > CMAKE_C_FLAGS_MINSIZEREL:STRING=/MD /O1 > > //Flags used by the compiler during release builds (/MD /Ob1 /Oi > // /Ot /Oy /Gs will produce slightly less optimized but smaller > // files). > CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 > > //Flags used by the compiler during Release with Debug Info builds. > // > CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 > > //Flags used by the linker. > CMAKE_EXE_LINKER_FLAGS:STRING=/STACK:10000000 /machine:I386 /INCREMENTAL:YES > > //Flags used by the linker during debug builds. > CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /pdbtype:sept > > //Flags used by the linker during release minsize builds. > CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= > > //Flags used by the linker during release builds. > CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= > > //Flags used by the linker during Release with Debug Info builds. > // > CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /pdbtype:sept > > //Install path prefix, prepended onto install directories. > CMAKE_INSTALL_PREFIX:PATH=/usr/local > > //make program > CMAKE_MAKE_PROGRAM:FILEPATH=C:/PROGRA~1/MICROS~3/Common/MSDev98/Bin/msdev.com > > //Flags used by the linker during the creation of modules. > CMAKE_MODULE_LINKER_FLAGS:STRING= > > //Flags used by the linker during debug builds. > CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= > > //Flags used by the linker during release minsize builds. > CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= > > //Flags used by the linker during release builds. > CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= > > //Flags used by the linker during Release with Debug Info builds. > // > CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /pdbtype:sept > > //Flags used by the linker during the creation of dll\'s. > CMAKE_SHARED_LINKER_FLAGS:STRING=/STACK:10000000 /machine:I386 /INCREMENTAL:YES > > //Flags used by the linker during debug builds. > CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /pdbtype:sept > > //Flags used by the linker during release minsize builds. > CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= > > //Flags used by the linker during release builds. > CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= > > //Flags used by the linker during Release with Debug Info builds. > // > CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /pdbtype:sept > > //If set, runtime paths are not added when using shared libraries. > // > CMAKE_SKIP_RPATH:BOOL=NO > > //Libraries linked by defalut with all applications. > CMAKE_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib > > //If this value is on, makefiles will be generated without the > // .SILENT directive, and all commands will be echoed to the console > // during the make. This is useful for debugging only. > CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE > > //Single output directory for building all executables. > EXECUTABLE_OUTPUT_PATH:PATH= > > //Value Computed by CMake > HelloWorld_BINARY_DIR:STATIC=E:/zhengyuanjie/MyExample > > //Value Computed by CMake > HelloWorld_SOURCE_DIR:STATIC=E:/zhengyuanjie/InsightToolkit-1.2.0/InsightToolkit-1.2.0/Examples/Installation > > //The directory containing ITKConfig.cmake. This is either the > // root of the build tree, or PREFIX/lib/InsightToolkit for an > // installation. > ITK_DIR:PATH=ITK_DIR-NOTFOUND > > //Single output directory for building all libraries. > LIBRARY_OUTPUT_PATH:PATH= > > > ######################## > # INTERNAL cache entries > ######################## > > //Advanced flag for variable: CMAKE_AR > CMAKE_AR-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_BUILD_TOOL > CMAKE_BUILD_TOOL-ADVANCED:INTERNAL=1 > //What is the target build tool cmake is generating for. > CMAKE_BUILD_TOOL:INTERNAL=C:/PROGRA~1/MICROS~3/Common/MSDev98/Bin/msdev.com > //This is the directory where this CMakeCahe.txt was created > CMAKE_CACHEFILE_DIR:INTERNAL=e:/zhengyuanjie/MyExample > //Major version of cmake used to create the current loaded cache > // > CMAKE_CACHE_MAJOR_VERSION:INTERNAL=1 > //Minor version of cmake used to create the current loaded cache > // > CMAKE_CACHE_MINOR_VERSION:INTERNAL=6 > //Major version of cmake used to create the current loaded cache > // > CMAKE_CACHE_RELEASE_VERSION:INTERNAL=patch 7 > //Path to CMake executable. > CMAKE_COMMAND:INTERNAL=E:/zhengyuanjie/CMake/bin/cmake.exe > //Advanced flag for variable: CMAKE_CXX_COMPILER > CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 > //Result of TRY_COMPILE > CMAKE_CXX_COMPILER_WORKS:INTERNAL=TRUE > //Advanced flag for variable: CMAKE_CXX_FLAGS > CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_CXX_FLAGS_DEBUG > CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_CXX_FLAGS_MINSIZEREL > CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_CXX_FLAGS_RELEASE > CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO > CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_C_COMPILER > CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 > //Result of TRY_COMPILE > CMAKE_C_COMPILER_WORKS:INTERNAL=TRUE > //Advanced flag for variable: CMAKE_C_FLAGS > CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_C_FLAGS_DEBUG > CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_C_FLAGS_MINSIZEREL > CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_C_FLAGS_RELEASE > CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_C_FLAGS_RELWITHDEBINFO > CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 > //Path to cache edit program executable. > CMAKE_EDIT_COMMAND:INTERNAL=E:/zhengyuanjie/CMake/bin/CMakeSetup.exe > //Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS > CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG > CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL > // > CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE > CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO > // > CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 > //Name of generator. > CMAKE_GENERATOR:INTERNAL=Visual Studio 6 > //Start directory with the top level CMakeLists.txt file for this > // project > CMAKE_HOME_DIRECTORY:INTERNAL=E:/zhengyuanjie/InsightToolkit-1.2.0/InsightToolkit-1.2.0/Examples/Installation > //Advanced flag for variable: CMAKE_INSTALL_PREFIX > CMAKE_INSTALL_PREFIX-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MAKE_PROGRAM > CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS > CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG > CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL > // > CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE > // > CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO > // > CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_RANLIB > CMAKE_RANLIB-ADVANCED:INTERNAL=1 > //noop for ranlib > CMAKE_RANLIB:INTERNAL=: > //Path to CMake installation. > CMAKE_ROOT:INTERNAL=E:/zhengyuanjie/CMake > //Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS > CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG > CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL > // > CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE > // > CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO > // > CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_SKIP_RPATH > CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_STANDARD_LIBRARIES > CMAKE_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 > //Advanced flag for variable: CMAKE_VERBOSE_MAKEFILE > CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 > > > Thank you in advance! > Sincerely yours > Zheng > > ----- Original Message ----- > From: Luis Ibanez > To: zhengyuanjie at sjtu.edu.cn > Cc: insight-users at itk.org > Subject: Re: [Insight-users] help!! > > > Hi Zheng, > > The HelloWorld example requires you to specify the binary > directory where you built ITK. > > You must provide this path in the CMake variable "ITK_DIR" > when you run CMake for configuring the HelloWorld example. > > If you continue experiencing any problems, please send us the > CMakeCache.txt file that CMake is generating in the binary > directory where you are trying to build the HelloWorld > example. > > > Thanks > > > > Luis > > > ------------- > ??? wrote: > >>Dear Sir. >>I am a new user of ITK with Windows 2000 and Microsoft visual C++ 6.0. Today I am trying to configure the file HelloWorld in the Insight/Examples/Installation directory with CMake. However I can?t finish the configuration , because CMake told me that it couldn?t find ITK. I don?t know what it means. I think it perhaps means the strategy for finding ITK fails, but I don?t know how to correct my operations. I am sure that the source and binary directories have been correctly placed. Would you please explain it for me? >> >>I have configured some other provided examples by ITK successfully. And I loaded the workspaces generated by CMake with Microsoft Visual c++ 6.0. Otherwise I can?t build them with vc, because there were some header files I couldn?t find. Would you mind tell me that how I can find all the header files needed quickly? >>Thank you in advance! >>Sincerely yours >>Zheng >> >> > > > > > > > From jolinda at darkwing.uoregon.edu Thu Jul 3 18:35:34 2003 From: jolinda at darkwing.uoregon.edu (Jolinda Smith) Date: Thu, 3 Jul 2003 15:35:34 -0700 Subject: [Insight-users] Dicom slice position References: <0856166C2F7DE0488BB312A2BD3D58CB075DBD94@cyan2.CC.NIH.GOV> Message-ID: <00aa01c341b3$6af57b10$d64edf80@provolone> Hi George, Just a quick note -- be very careful of the "slice thickness" and "slice spacing" fields. Slice spacing is supposed to be the center-to-center distance between slices, but in reality it's meaning is scanner-dependent. "Image number" will not necessarily help either. What you can trust are the "Image Orientation Patient" and "Image Position Patient" fields. You can use the first to calculate the slice normal, and the second to calculate the position of the slice along the slice normal (as well as the distance between adjacent slices). Or, you could use my program MRIConvert, which does all that for you. Jolinda Smith Lewis Center for NeuroImaging University of Oregon jolinda at uoregon.edu http://lcni.uoregon.edu/~jolinda/MRIConvert ----- Original Message ----- From: Iordanescu, Gheorghe (NIH/CC/DRD) To: 'insight-users at itk.org' Sent: Wednesday, July 02, 2003 10:22 AM Subject: [Insight-users] Dicom slice position Hi everybody, I would like to read a sequence of Dicom images in a volume. Unfortunately the images' names do not correspond to their order in space. For this I would like to read from each image header the "Image number", "Patient position", "slice thickness".and "pixel spacing". Does anybody have an example of how to read these fields from a dicom header? Thank you very much. George -------------- next part -------------- An HTML attachment was scrubbed... URL: From GIordanescu at cc.nih.gov Thu Jul 3 19:05:27 2003 From: GIordanescu at cc.nih.gov (Iordanescu, Gheorghe (NIH/CC/DRD)) Date: Thu, 3 Jul 2003 19:05:27 -0400 Subject: [Insight-users] Dicom slice position Message-ID: <0856166C2F7DE0488BB312A2BD3D58CB075DBD9A@cyan2.CC.NIH.GOV> Jolinda, Thank you very much for your reply. The information you gave me is very useful but I still need some help. I already have a code that reads Dicom images and finally gives me an ITK image. I was interested though in using ITK classes to do this. All the code is there - I only need some guidance on how to extract the necessary fields. Instead of writing the info from the dicom header in a txt file on the disk, I would like to use it and build the 3d ITK image. I think this would be a big improvement for our code... George -----Original Message----- From: Jolinda Smith [mailto:jolinda at darkwing.uoregon.edu] Sent: Thursday, July 03, 2003 6:36 PM To: insight-users at itk.org Subject: Re: [Insight-users] Dicom slice position Hi George, ? Just a quick note -- be very careful of the "slice thickness" and "slice spacing" fields. Slice spacing is supposed to be the center-to-center distance between slices, but in reality it's meaning is scanner-dependent. "Image number" will not necessarily help either. What you can trust are the "Image Orientation Patient" and "Image Position Patient" fields. You can use the first to calculate the slice normal, and the second to calculate the position of the slice along the slice normal (as well as the distance between adjacent slices). ? Or, you could use my program MRIConvert, which does all that for you. ? Jolinda Smith Lewis Center for NeuroImaging University of Oregon jolinda at uoregon.edu http://lcni.uoregon.edu/~jolinda/MRIConvert ----- Original Message ----- From: Iordanescu, Gheorghe (NIH/CC/DRD) To: 'insight-users at itk.org' Sent: Wednesday, July 02, 2003 10:22 AM Subject: [Insight-users] Dicom slice position Hi everybody, ? I would like to read a sequence of Dicom images in a volume. Unfortunately the images' names do not correspond to their order in space. For this I would like to read from each image header the "Image number", "Patient position", "slice thickness".and "pixel spacing". Does anybody have an example of how to read these fields from a dicom header? Thank you very much. ? George From jolinda at darkwing.uoregon.edu Thu Jul 3 20:10:53 2003 From: jolinda at darkwing.uoregon.edu (Jolinda Smith) Date: Thu, 3 Jul 2003 17:10:53 -0700 Subject: [Insight-users] Dicom slice position References: <0856166C2F7DE0488BB312A2BD3D58CB075DBD9A@cyan2.CC.NIH.GOV> Message-ID: <00c101c341c0$bbc48290$d64edf80@provolone> Hi George, As far as I know ITK does not include functions for reading arbitrary DICOM tags. Your options are to either use a dicom library such as DCMTK, or start from scratch using the DICOM standard. Having done the latter, I recommend the former! I'd give you a quick answer on how to read DICOM tags, but I'm afraid there isn't one. It's not a simple format -- the standard is over 1000 pages long. (I can give a long answer if you really want it.) If you need your application to read DICOM files directly, check out DCMTK. I haven't used it, but it's supposed to be very good. But if you can stand to read metaimage volumes instead, your life will be a lot easier. BTW, I don't know how general your application is, but there are some sequences that produce multiple images per slice. If you need to handle such sequences, you'll need to identify what slice goes with what volume. Some scanners and sequences use the "temporal position id" for this, but other cases have to be dealt with on a sequence-by-sequence basis. Jolinda ----- Original Message ----- From: "Iordanescu, Gheorghe (NIH/CC/DRD)" To: "'Jolinda Smith'" ; Sent: Thursday, July 03, 2003 4:05 PM Subject: RE: [Insight-users] Dicom slice position > Jolinda, > > Thank you very much for your reply. The information you gave me is very > useful but I still need some help. I already have a code that reads Dicom > images and finally gives me an ITK image. I was interested though in using > ITK classes to do this. All the code is there - I only need some guidance on > how to extract the necessary fields. Instead of writing the info from the > dicom header in a txt file on the disk, I would like to use it and build the > 3d ITK image. I think this would be a big improvement for our code... > > George > > > > -----Original Message----- > From: Jolinda Smith [mailto:jolinda at darkwing.uoregon.edu] > Sent: Thursday, July 03, 2003 6:36 PM > To: insight-users at itk.org > Subject: Re: [Insight-users] Dicom slice position > > Hi George, > > Just a quick note -- be very careful of the "slice thickness" and "slice > spacing" fields. Slice spacing is supposed to be the center-to-center > distance between slices, but in reality it's meaning is scanner-dependent. > "Image number" will not necessarily help either. What you can trust are the > "Image Orientation Patient" and "Image Position Patient" fields. You can use > the first to calculate the slice normal, and the second to calculate the > position of the slice along the slice normal (as well as the distance > between adjacent slices). > > Or, you could use my program MRIConvert, which does all that for you. > > Jolinda Smith > Lewis Center for NeuroImaging > University of Oregon > jolinda at uoregon.edu > http://lcni.uoregon.edu/~jolinda/MRIConvert > ----- Original Message ----- > From: Iordanescu, Gheorghe (NIH/CC/DRD) > To: 'insight-users at itk.org' > Sent: Wednesday, July 02, 2003 10:22 AM > Subject: [Insight-users] Dicom slice position > > Hi everybody, > > I would like to read a sequence of Dicom images in a volume. Unfortunately > the images' names do not correspond to their order in space. For this I > would like to read from each image header the "Image number", "Patient > position", "slice thickness".and "pixel spacing". Does anybody have an > example of how to read these fields from a dicom header? Thank you very > much. > > George > From Darren.Weber at radiology.ucsf.edu Thu Jul 3 12:41:56 2003 From: Darren.Weber at radiology.ucsf.edu (Darren Weber) Date: Thu, 3 Jul 2003 09:41:56 -0700 Subject: [Insight-users] configure for winXP other than MSVS? References: <20030703054120.D4D7E1C57ED@sjtu.edu.cn> <3F03C60A.6070802@kitware.com> Message-ID: <004a01c341cc$e0f1e970$0501000a@DARRENWEBER> Hi, Is it possible to configure Cmake for something like djgpp, the open source c-compiler for windows? Best, Darren From gavinb+xtk at cs.mu.OZ.AU Fri Jul 4 00:48:52 2003 From: gavinb+xtk at cs.mu.OZ.AU (Gavin Baker) Date: Fri, 4 Jul 2003 14:48:52 +1000 Subject: [Insight-users] Clusters and MPI Message-ID: <20030704144852.A23277@mundroo.cs.mu.OZ.AU> Hello all, What is the current state of clustering support with ITK? A few people have mentioned using ITK in clusters using MPI: http://www.itk.org/pipermail/insight-users/2003-January/002181.html http://www.itk.org/pipermail/insight-users/2003-October/003633.html Has anyone made any progress with this? Are there any official plans to add MPI support? I understand ITK has multi-threading support built in, but does not yet support MPI. I know that VTK has MPI support - how much of this could be adapted to ITK? Would it be feasible to use MPI to connect pipelines, or would it be better to adapt the multi-threading infrastructure to optionally use MPI? Thanks for any info, :: Gavin -- Gavin Baker Computer Vision Lab (CVMIL) http://www.cs.mu.oz.au/~gavinb University of Melbourne From Mathieu.Malaterre at creatis.insa-lyon.fr Fri Jul 4 03:53:41 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Fri, 04 Jul 2003 09:53:41 +0200 Subject: [Insight-users] Dicom slice position In-Reply-To: <0856166C2F7DE0488BB312A2BD3D58CB075DBD9A@cyan2.CC.NIH.GOV> References: <0856166C2F7DE0488BB312A2BD3D58CB075DBD9A@cyan2.CC.NIH.GOV> Message-ID: <3F053285.2090905@creatis.insa-lyon.fr> George, I am using gdcm to read my dicom images: http://www.creatis.insa-lyon.fr/Public/Gdcm/ The cvs version also provide a vtkGdcmReader which should be easy to pipeline in ITK. Furthermore you can access all the fields you like through a gdcmHeader. For example gdcmHeader GdcmHeader( "filename.dcm" ); GdcmHeader.GetPubElValByNumber(0x0010,0x0010); will return a std::string giving you the patient name. In the source tree you'll find: gdcm/Dict/dicomV3.dic where you can find the equivalence between patient name (or whatever) For instance: 0010 0010 PN PAT Patient Name ^^^^ ^^^^ HTH mathieu Ps: if you prefer you can use: GdcmHeader.GetPubElValRepByName Iordanescu, Gheorghe (NIH/CC/DRD) wrote: > Jolinda, > > Thank you very much for your reply. The information you gave me is very > useful but I still need some help. I already have a code that reads Dicom > images and finally gives me an ITK image. I was interested though in using > ITK classes to do this. All the code is there - I only need some guidance on > how to extract the necessary fields. Instead of writing the info from the > dicom header in a txt file on the disk, I would like to use it and build the > 3d ITK image. I think this would be a big improvement for our code... > > George > > > > -----Original Message----- > From: Jolinda Smith [mailto:jolinda at darkwing.uoregon.edu] > Sent: Thursday, July 03, 2003 6:36 PM > To: insight-users at itk.org > Subject: Re: [Insight-users] Dicom slice position > > Hi George, > > Just a quick note -- be very careful of the "slice thickness" and "slice > spacing" fields. Slice spacing is supposed to be the center-to-center > distance between slices, but in reality it's meaning is scanner-dependent. > "Image number" will not necessarily help either. What you can trust are the > "Image Orientation Patient" and "Image Position Patient" fields. You can use > the first to calculate the slice normal, and the second to calculate the > position of the slice along the slice normal (as well as the distance > between adjacent slices). > > Or, you could use my program MRIConvert, which does all that for you. > > Jolinda Smith > Lewis Center for NeuroImaging > University of Oregon > jolinda at uoregon.edu > http://lcni.uoregon.edu/~jolinda/MRIConvert > ----- Original Message ----- > From: Iordanescu, Gheorghe (NIH/CC/DRD) > To: 'insight-users at itk.org' > Sent: Wednesday, July 02, 2003 10:22 AM > Subject: [Insight-users] Dicom slice position > > Hi everybody, > > I would like to read a sequence of Dicom images in a volume. Unfortunately > the images' names do not correspond to their order in space. For this I > would like to read from each image header the "Image number", "Patient > position", "slice thickness".and "pixel spacing". Does anybody have an > example of how to read these fields from a dicom header? Thank you very > much. > > George > _______________________________________________ > Insight-users mailing list > Insight-users at itk.org > http://www.itk.org/mailman/listinfo/insight-users > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From affable at hd2.dot.net.in Fri Jul 4 04:09:55 2003 From: affable at hd2.dot.net.in (CSPL) Date: Fri, 4 Jul 2003 13:39:55 +0530 Subject: [Insight-users] Thankyou for your response References: Message-ID: <003b01c34203$a75cd580$01000001@macinfo.net> Hi Miller James, I have downloaded new version of itk and could use itkConnectedComponentImageFilter and RelabelComponentImageFilter. These two classes are working fine to get largest 3d object in a volume. I could run my application successfully. Thanks for ur response for our problem. -Regards, Sateesh. ----- Original Message ----- From: Miller, James V (Research) To: 'cspl' ; insight-users at itk.org ; Insight-developers (E-mail) Sent: Tuesday, July 01, 2003 9:03 PM Subject: RE: [Insight-users] Find largest connected object in a Volume I just added a new filter to the ITK repository that relabels an image. The input would the output of any segmentation algorithm that creates a label map. The ConnectedComponentImageFilter would be one such filter. Watershed would another, etc. The filter is called RelabelComponentImageFilter and it changes the labels in the image such that label 1 is assigned to the largest object, label 2 is the next largest object, etc. Any single object can be extracted using BinaryThresholdImageFilter by setting the LowerThreshold and the UpperThreshold to the same value. In fact, any group of objects can be extracted using BinaryThresholdImageFilter by having the LowerThreshold and UpperThreshold span a group range (the ThresholdImageFilter can be used to extract a range of objects without changing their labels again). So using the RelabelComponentImageFilter in conjuction with a threshold filter you can extract the largest object, the second largest object, or the k largest objects. Size is defined by area/volume/number of pixels, etc. After the filter executes, you can query the number of objects, and the size of each object. Jim -----Original Message----- From: Miller, James V (Research) [mailto:millerjv at crd.ge.com] Sent: Friday, June 27, 2003 1:34 PM To: 'cspl'; insight-users at itk.org Subject: RE: [Insight-users] Find largest connected object in a Volume In Code/BasicFilters there are two classes ConnectedComponentImageFilter and HardConnectedComponentImageFilter. The former is a rewrite of the latter to use more of the ITK infrastructure. The latter may be removed soon. The ConnectedComponentImageFilter will use 6-connectivity in a volume to label the objects in the volume. Each connected object will have a unique label. However, this does not extract the largest connected object. You would need a separate filter (that does not exist yet) to scan through the label map and extract the largest object. As Luis suggested, you could a histogram of the label map to determine which object is the "largest". -----Original Message----- From: cspl [mailto:affable at hd2.dot.net.in] Sent: Friday, June 27, 2003 2:19 AM To: insight-users at itk.org Subject: [Insight-users] Find largest connected object in a Volume Hi Luis and all, I am in need of help on connectivity filter. Let me explain my requirment. I have a volume of some slices. I have to find the largest object in the entire volume. Initiallly i will threshold the image so that it will in binary format. Then i have to use 6-connectivity of find the largest object in the volume. The largest object should be labeled 1. Is there any filter which solves my problem. I should use 6-connectivity. Please do suggest me if there are other alternatives too. Please help me in this regard. Thanks in advance. -Regards, Sateesh. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Mathieu.Malaterre at creatis.insa-lyon.fr Fri Jul 4 12:49:01 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Fri, 04 Jul 2003 18:49:01 +0200 Subject: [Insight-users] Dicom slice position In-Reply-To: <00aa01c341b3$6af57b10$d64edf80@provolone> References: <0856166C2F7DE0488BB312A2BD3D58CB075DBD94@cyan2.CC.NIH.GOV> <00aa01c341b3$6af57b10$d64edf80@provolone> Message-ID: <3F05AFFD.30605@creatis.insa-lyon.fr> Jolinda, I have a question about your program MRI convert. I used it to convert my set of DICOM images. And as you said it takes into account the Image Position Patient. Here is the value I extracted from my files: Patient [ -199.506987\-34.042491\255.448394] Patient [ -199.510827\-32.554461\255.259324] Patient [ -199.514667\-31.066431\255.070254] Patient [ -199.518497\-29.578401\254.881184] Patient [ -199.522337\-28.090371\254.692124] Patient [ -199.530017\-25.114311\254.313984] Patient [ -199.533847\-23.626281\254.124914] Patient [ -199.526177\-26.602341\254.503054] Patient [ -199.537687\-22.138251\253.935844] Patient [ -199.541527\-20.650221\253.746784] Patient [ -199.545367\-19.162191\253.557714] Patient [ -199.549197\-17.674161\253.368644] Patient [ -199.553037\-16.186131\253.179574] Patient [ -199.556877\-14.698111\252.990514] Patient [ -199.560717\-13.210081\252.801444] Patient [ -199.564557\-11.722051\252.612374] Patient [ -199.568387\-10.234021\252.423304] Patient [-199.572227\-8.745991\252.234234] Patient [-199.576067\-7.257961\252.045174] Patient [-199.579907\-5.769931\251.856104] Patient [-199.583737\-4.281901\251.667034] Patient [-199.587577\-2.793871\251.477964] Patient [-199.591417\-1.305841\251.288904] Patient [ -199.595257\0.182189\251.099834] Patient [ -199.599087\1.670219\250.910764] Patient [ -199.602927\3.158249\250.721694] Patient [ -199.606767\4.646279\250.532624] Patient [ -199.610607\6.134309\250.343564] Patient [ -199.614437\7.622339\250.154494] Patient [ -199.618277\9.110369\249.965424] Patient [-199.622117\10.598399\249.776354] Patient [-199.625957\12.086429\249.587284] Patient [-199.629787\13.574459\249.398224] Patient [-199.637467\16.550519\249.020084] Patient [-199.633627\15.062489\249.209154] Patient [-199.641307\18.038549\248.831014] Patient [-199.645137\19.526574\248.641954] Patient [-199.648977\21.014603\248.452884] Patient [-199.652817\22.502633\248.263814] Patient [-199.656657\23.990662\248.074744] Patient [-199.660487\25.478692\247.885674] Patient [-199.664327\26.966721\247.696614] Patient [-199.668167\28.454751\247.507544] Patient [-199.672007\29.942780\247.318474] Patient [-199.679677\32.918839\246.940334] Patient [-199.675847\31.430810\247.129404] Patient [-199.683517\34.406869\246.751274] Patient [-199.687357\35.894898\246.562204] Patient [-199.691197\37.382928\246.373134] Patient [-199.695027\38.870959\246.184064] So acquisition axe is Y (Y spacing is 1.5), but there is also a Z variation. So my questions is: - Does MRIConvert takes this Z variation also into account ? - If yes how come the result is still 512*512 ? There should be some black/white area 512 ------------- ------------- ------------- ------------- ------------- 512 <--> <--> In those two areas you don't know the value of the pixel, right ? Thanks for putting some light on it. mathieu Ps: When will the linux version be available ? From affable at hd2.dot.net.in Sat Jul 5 08:32:12 2003 From: affable at hd2.dot.net.in (CSPL) Date: Sat, 5 Jul 2003 18:02:12 +0530 Subject: [Insight-users] Unable to run ItkImageGaussianModelEstimator example Message-ID: <000c01c342f1$75ba48c0$01000001@macinfo.net> Dear Mr.Sayan, I want to split the objects on shape basis.The shape is convex.I have gone through the Itk classe ItkImageGaussianModelEstimator.I got one exmple to run .I want to know the output of the example.It is giving exception in itkImageGaussianEstimator class update function.I have set the parameters as follows..How to create train image.Please give me suggestion to run the application properly. Example is Insight\Examples\Segmentation\GibbsPriorImageFilter1.cxx. typedef itk::ImageGaussianModelEstimator ImageGaussianModelEstimatorType; ImageGaussianModelEstimatorType::Pointer applyEstimateModel = ImageGaussianModelEstimatorType::New(); applyEstimateModel->SetNumberOfModels(3); applyEstimateModel->SetInputImage(vecImage); applyEstimateModel->SetTrainingImage(trainingimagereader->GetOutput()); //Run the gaussian classifier algorithm try { applyEstimateModel->Update();///here program is getting exception. } catch(itk::ExceptionObject &exp) { std::cerr<<"Exception caught"< From yasheng_chen at med.unc.edu Sat Jul 5 16:25:49 2003 From: yasheng_chen at med.unc.edu (Yasheng Chen) Date: Sat, 05 Jul 2003 16:25:49 -0400 Subject: [Insight-users] Q: internal compiler error Message-ID: <5f9dac75f97b3d.5f97b3d5f9dac7@med.unc.edu> Hi, I got an error message (see below) when I include the header file "itkCastImageFilter.h". C:\itkdownload\InsightToolkit-1.2.0\Code\Common\itkConceptChecking.h (96) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1786) I think I have installed the service pack 5 with vc++, and the itk version is 1.2.0. Does any one have suggestions of what may go wrong ? Thank you very much ! Yasheng From luis.ibanez at kitware.com Sat Jul 5 18:19:47 2003 From: luis.ibanez at kitware.com (Luis Ibanez) Date: Sat, 05 Jul 2003 18:19:47 -0400 Subject: [Insight-users] Unable to run ItkImageGaussianModelEstimator example References: <000c01c342f1$75ba48c0$01000001@macinfo.net> Message-ID: <3F074F03.5020304@kitware.com> Hi Ramakrishna, Could you please give us more details on the kind of processing you want to perform. From your previous posting we guessed that you were interested on classified clusters in a parameteric space. However from your last message it seems that your data is directly in the image space and you want to separate objects in the image space as opposed to clusters in a parametric space. Are your objects already segmented ? Could you post a representative image on the web, so we can have a better idea of what you want to achieve. If what you are targeting is shape analysis in the image space, you may have better chances using mathematical morphology operators and/or level set filters (e.g. taking advantage of the curvature scaling). Please let us know, Regards, Luis ---------------------- CSPL wrote: > Dear Mr.Sayan, > > I want to split the objects on shape basis.The shape is convex.I have > gone through the Itk classe ItkImageGaussianModelEstimator.I got one > exmple to run .I want to know the output of the example.It is giving > exception in itkImageGaussianEstimator class update function.I have set > the parameters as follows..How to create train image.Please give me > suggestion to run the application properly. > Example is Insight\Examples\Segmentation\GibbsPriorImageFilter1.cxx. > > typedef itk::ImageGaussianModelEstimator MembershipFunctionType, ClassImageType> > ImageGaussianModelEstimatorType; > > ImageGaussianModelEstimatorType::Pointer > applyEstimateModel = ImageGaussianModelEstimatorType::New(); > > applyEstimateModel->SetNumberOfModels(3); > applyEstimateModel->SetInputImage(vecImage); > applyEstimateModel->SetTrainingImage(trainingimagereader->GetOutput()); > > > > //Run the gaussian classifier algorithm > try > { > applyEstimateModel->Update();///here program is getting exception. > } > catch(itk::ExceptionObject &exp) > { > std::cerr<<"Exception caught"< std::cerr< } > > > Thanking you, > Regards, > Ramakrishna From imho at skynet.be Mon Jul 7 07:22:02 2003 From: imho at skynet.be (imho) Date: Mon, 07 Jul 2003 13:22:02 +0200 Subject: [Insight-users] vtk polydata import / export Message-ID: <3F0957DA.4040107@skynet.be> Hi all, is it possible to import and export a vtkPolyData or can I use images only? How can I do? I have two vtkPolyData volumes, and I'd like to use itk filters like this : vtk reader -> vtk filters -> itk filters -> vtk viewer I've tried this : VTK -> ITK -> VTK ITKImageExporter4 VTKImageImporter4 ITKImageImporter4 == first POLY ITKImageExporter5 VTKImageImporter5 == second POLY (no output) but I don't know how to convert my vtkPolyData or how to typedef the VTKimporter to make it work : typedef unsigned short PixelType; typedef itk::Image ImageType; typedef itk::VTKImageImport ImageImportType; is ok but not with a polyData, and typedef itk::VTKImageImport ImageImportType; isn't ok Thanks a lot imho -------------- next part -------------- An HTML attachment was scrubbed... URL: From gwenael.guillard at enst-bretagne.fr Mon Jul 7 09:17:13 2003 From: gwenael.guillard at enst-bretagne.fr (=?iso-8859-1?Q?Gwena=EBl?= Guillard) Date: Mon, 07 Jul 2003 15:17:13 +0200 Subject: [Insight-users] hysteresis thresholding, local maxima filter Message-ID: <3F0972D9.18C5F22B@enst-bretagne.Fr> Hi, Is hysteresis thresholding implemented under another name? Or did I miss it in the documentation? The same question for a local maxima filter. Thank you for your answers, Gwen From luis.ibanez at kitware.com Mon Jul 7 10:21:12 2003 From: luis.ibanez at kitware.com (Luis Ibanez) Date: Mon, 07 Jul 2003 10:21:12 -0400 Subject: [Insight-users] hysteresis thresholding, local maxima filter References: <3F0972D9.18C5F22B@enst-bretagne.Fr> Message-ID: <3F0981D8.9010401@kitware.com> Hi Gwen, Hysteresis thresholding is implemented as part of the CannyEdgeDetectionImageFilter http://www.itk.org/Insight/Doxygen/html/classitk_1_1CannyEdgeDetectionImageFilter.html Please take a look at the method HyteresisThresholding() in itkCannyEdgeDetectionImageFilter.txx line 393 Do you need to apply this operation outside of the Canny edge detection framework ? -- Local maxima is detected used zero crossings on a second derivative image (e.g. the Laplacian) Pure Zero crossing is implemented in http://www.itk.org/Insight/Doxygen/html/classitk_1_1ZeroCrossingImageFilter.html Zero crossing of the laplacian is implemented in http://www.itk.org/Insight/Doxygen/html/classitk_1_1ZeroCrossingBasedEdgeDetectionImageFilter.html Regards, Luis ----------------------- Gwena?l Guillard wrote: > Hi, > > Is hysteresis thresholding implemented under another name? Or did I miss > it in the documentation? > The same question for a local maxima filter. > > Thank you for your answers, > > Gwen > > _______________________________________________ > Insight-users mailing list > Insight-users at itk.org > http://www.itk.org/mailman/listinfo/insight-users > From luis.ibanez at kitware.com Mon Jul 7 10:26:07 2003 From: luis.ibanez at kitware.com (Luis Ibanez) Date: Mon, 07 Jul 2003 10:26:07 -0400 Subject: [Insight-users] vtk polydata import / export References: <3F0957DA.4040107@skynet.be> Message-ID: <3F0982FF.6040601@kitware.com> Hi Imho, The import/export connections currently available between ITK and VTK only manage image-to-image conversions. You may want to convert your vtkPolyData to a vtkImageData and then use the itkVTKImageToImageFilter available in InsightApplications/Auxiliary/vtk In any case, a vtkPolyData may not be the best support for representing an image... Please let us know if you have futher questions, Thanks Luis ------------------ imho wrote: > Hi all, > is it possible to import and export a vtkPolyData or can I use images only? > How can I do? > I have two vtkPolyData volumes, and I'd like to use itk filters like this : > > vtk reader -> vtk filters -> itk filters -> vtk viewer > I've tried this : > > VTK -> ITK -> VTK > > ITKImageExporter4 VTKImageImporter4 > ITKImageImporter4 == first POLY > > ITKImageExporter5 VTKImageImporter5 > == second POLY (no output) > > but I don't know how to convert my vtkPolyData or how to typedef the > VTKimporter to make it work : > typedef unsigned short PixelType; > typedef itk::Image ImageType; > typedef itk::VTKImageImport ImageImportType; > is ok but not with a polyData, and > > typedef itk::VTKImageImport ImageImportType; > isn't ok > > Thanks a lot > > imho From sebordas at unizar.es Mon Jul 7 10:36:08 2003 From: sebordas at unizar.es (Sebastian Ordas) Date: Mon, 7 Jul 2003 16:36:08 +0200 Subject: [Insight-users] MRIConvert problem Message-ID: <003401c34495$1b23c210$829ed29b@GTC.LAB> Hi all, MRIConvert is a powerful application developed by Jolinda Smith for converting DICOM data sets into metafile info volumes. From imho at skynet.be Mon Jul 7 10:42:06 2003 From: imho at skynet.be (imho) Date: Mon, 07 Jul 2003 16:42:06 +0200 Subject: [Insight-users] vtk polydata import / export In-Reply-To: <3F0982FF.6040601@kitware.com> References: <3F0957DA.4040107@skynet.be> <3F0982FF.6040601@kitware.com> Message-ID: <3F0986BE.8040602@skynet.be> Hi Luis, I use vtkPolyData to represent 2 3D liver's models builded from slices. I already do registration on it with VTK (point-based + ICP), and now I'd like to use the demon registration in ITK. So I'll try the conversion you purpose. Thanks for your help Imho. Luis Ibanez wrote: > > Hi Imho, > > The import/export connections currently available > between ITK and VTK only manage image-to-image > conversions. > > You may want to convert your vtkPolyData to a vtkImageData > and then use the itkVTKImageToImageFilter available in > > InsightApplications/Auxiliary/vtk > > In any case, a vtkPolyData may not be the best support > for representing an image... > > > Please let us know if you have futher questions, > > > Thanks > > > Luis > > > > ------------------ > imho wrote: > >> Hi all, >> is it possible to import and export a vtkPolyData or can I use images >> only? >> How can I do? >> I have two vtkPolyData volumes, and I'd like to use itk filters like >> this : >> >> vtk reader -> vtk filters -> itk filters -> vtk viewer >> I've tried this : >> >> VTK -> ITK >> -> VTK >> >> ITKImageExporter4 VTKImageImporter4 >> ITKImageImporter4 == first POLY >> >> ITKImageExporter5 VTKImageImporter5 >> == second POLY (no >> output) >> >> but I don't know how to convert my vtkPolyData or how to typedef the >> VTKimporter to make it work : >> typedef unsigned short PixelType; >> typedef itk::Image ImageType; >> typedef itk::VTKImageImport ImageImportType; >> is ok but not with a polyData, and >> >> typedef itk::VTKImageImport ImageImportType; >> isn't ok >> >> Thanks a lot >> >> imho > > > > > >