From haratron at gmail.com Fri Jan 2 12:59:42 2015 From: haratron at gmail.com (haratron) Date: Fri, 2 Jan 2015 19:59:42 +0200 Subject: [ITK-users] WarpImageFilter wrong output Message-ID: Hello and happy new year, I'm using the WarpImageFilter from here: http://www.itk.org/Wiki/ITK/Examples/Registration/WarpImageFilter I have original.png that I'm using as the movingImage and I'm creating another one ("empty" image filled with white color, size 1800x1800) that is the fixedImage. The problem is that a blank image filled with black is created instead of the warped image that is expected. original.png : http://i.imgur.com/QQyXgzg.png output.png: http://i.imgur.com/LkYnZ6n.png My full WarpImageFilter.cxx file (includes changes from the original example code): http://pastebin.com/WNDb2TgM What am I doing wrong? John -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Jan 2 13:28:05 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 2 Jan 2015 13:28:05 -0500 Subject: [ITK-users] WarpImageFilter wrong output In-Reply-To: References: Message-ID: <52482848-2F1D-4DB9-A898-E2D197376F13@mail.nih.gov> Hello, In your CreateMovingImage2 method how is the "image" argument connected to the pipeline? Brad On Jan 2, 2015, at 12:59 PM, haratron wrote: > Hello and happy new year, > > I'm using the WarpImageFilter from here: > http://www.itk.org/Wiki/ITK/Examples/Registration/WarpImageFilter > > I have original.png that I'm using as the movingImage and I'm creating another one ("empty" image filled with white color, size 1800x1800) that is the fixedImage. > > The problem is that a blank image filled with black is created instead of the warped image that is expected. > > original.png : http://i.imgur.com/QQyXgzg.png > output.png: http://i.imgur.com/LkYnZ6n.png > > My full WarpImageFilter.cxx file (includes changes from the original example code): > http://pastebin.com/WNDb2TgM > > What am I doing wrong? > > John > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From haratron at gmail.com Fri Jan 2 22:57:54 2015 From: haratron at gmail.com (haratron) Date: Sat, 3 Jan 2015 05:57:54 +0200 Subject: [ITK-users] WarpImageFilter wrong output In-Reply-To: <52482848-2F1D-4DB9-A898-E2D197376F13@mail.nih.gov> References: <52482848-2F1D-4DB9-A898-E2D197376F13@mail.nih.gov> Message-ID: Thanks! What is the difference between: 1. http://www.itk.org/Wiki/ITK/Examples/Registration/WarpImageFilter 2. http://www.itk.org/Wiki/ITK/Examples/Registration/LandmarkBasedTransformInitializer3. http://www.itk.org/Wiki/ITK/Examples/Registration/DeformationFieldTransform On Fri, Jan 2, 2015 at 8:28 PM, Bradley Lowekamp wrote: > Hello, > > In your CreateMovingImage2 method how is the "image" argument connected to > the pipeline? > > Brad > > On Jan 2, 2015, at 12:59 PM, haratron wrote: > > Hello and happy new year, > > I'm using the WarpImageFilter from here: > http://www.itk.org/Wiki/ITK/Examples/Registration/WarpImageFilter > > I have original.png that I'm using as the movingImage and I'm creating > another one ("empty" image filled with white color, size 1800x1800) that is > the fixedImage. > > The problem is that a blank image filled with black is created instead of > the warped image that is expected. > > original.png : http://i.imgur.com/QQyXgzg.png > output.png: http://i.imgur.com/LkYnZ6n.png > > My full WarpImageFilter.cxx file (includes changes from the original > example code): > http://pastebin.com/WNDb2TgM > > What am I doing wrong? > > John > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Tue Jan 6 19:16:13 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 6 Jan 2015 21:16:13 -0300 Subject: [ITK-users] CT/MR Registration using ITK Message-ID: I'm trying to do registration of the 2 attached images (test) to implement CT/RM Registration, which is the best algorithm to achieve the best results? [image: Inline image 1][image: Inline image 2]Hi, -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CT.jpg Type: image/jpeg Size: 46303 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RM.jpg Type: image/jpeg Size: 88147 bytes Desc: not available URL: From j.plumat at auckland.ac.nz Tue Jan 6 21:56:00 2015 From: j.plumat at auckland.ac.nz (Jerome Plumat) Date: Wed, 07 Jan 2015 15:56:00 +1300 Subject: [ITK-users] CT/MR Registration using ITK In-Reply-To: References: Message-ID: <54ACA040.1030707@auckland.ac.nz> Hi Matias, you should look for multimodal algorithms with metrics such as Mutual Information. Have a look to ITK software guide book 2 section 3.5. Hope it helps. Jerome Plumat ------- School of Medical Sciences University of Auckland If I am not for myself, who will be for me? And if I am only for myself, then what an I? And if not now when? ? Hillel HaZaken On 07/01/15 13:16, Matias Montroull wrote: > I'm trying to do registration of the 2 attached images (test) to > implement CT/RM Registration, which is the best algorithm to achieve > the best results? > Hi, > > > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel.schaerer at laposte.net Wed Jan 7 05:36:53 2015 From: joel.schaerer at laposte.net (=?windows-1252?Q?Jo=EBl_Schaerer?=) Date: Wed, 07 Jan 2015 11:36:53 +0100 Subject: [ITK-users] Possible missing method in itkImageSource In-Reply-To: <0023FC88-13F9-4ED2-9767-FB324A2EE0CB@mail.nih.gov> References: <54413DE5.1050108@laposte.net> <3271CF4A-5DCC-47A5-8456-05BB9325FC4C@gmail.com> <0023FC88-13F9-4ED2-9767-FB324A2EE0CB@mail.nih.gov> Message-ID: <54AD0C45.1090102@laposte.net> Any plans on fixing this? I've run into this issue again when attempting a DisconnectPipeline() on a named output. It crashes because the SetOutput() method attempts to create a new output after detaching the old one using the faulty MakeOutput(key) method: 0x000000000063a3dc in itk::ProcessObject::SetOutput (this=0x1b2e060, name=..., output=) at ../Modules/Core/Common/src/itkProcessObject.cxx:484 483 DataObjectPointer newOutput = this->MakeOutput(key); 484 this->SetOutput(key, newOutput); // Segfault Thanks, Jo?l On 22/10/2014 15:44, Bradley Lowekamp wrote: > Hello, > > I'm going to take a look at this issue. > > Brad > > On Oct 17, 2014, at 5:01 PM, Jim Miller wrote: > >> At first glance it looks like an oversight. I would expect, however, that we should be seeing warnings about the named version of MakeOutput in ProcessObject being hidden. >> >> Jim >> >>> On Oct 17, 2014, at 12:03 PM, Jo?l Schaerer wrote: >>> >>> Hi all, >>> >>> I've run into a problem with named outputs, which I believe could be a bug in ITK. >>> >>> When using named outputs, one is supposed to create the output data objects in the constructor using the MakeOutput method (see http://www.itk.org/Wiki/ITK/Examples/Developer/ImageFilterMultipleOutputs for an example). The MakeOutput method exists for both indexed and named outputs. >>> . >>> These methods are declared and defined first in itkProcessObject: >>> >>> .h: >>> * ... >>> * ProcessObject::MakeOutput. Note that MakeOutput always returns a >>> * itkSmartPointer to a DataObject. ImageSource and MeshSource override >>> * this method to create the correct type of image and mesh respectively. >>> * If a filter has multiple outputs of different types, then that >>> * filter must provide an implementation of MakeOutput(). */ >>> virtual DataObjectPointer MakeOutput( const DataObjectIdentifierType & ); >>> virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx); >>> >>> .cxx >>> DataObject::Pointer >>> ProcessObject >>> ::MakeOutput( const DataObjectIdentifierType & name ) >>> { >>> itkDebugMacro("MakeOutput(" << name << ")"); >>> if( this->IsIndexedOutputName(name) ) >>> { >>> return this->MakeOutput( this->MakeIndexFromOutputName(name) ); >>> } >>> return static_cast(DataObject::New().GetPointer()); >>> } >>> >>> DataObject::Pointer >>> ProcessObject >>> ::MakeOutput(DataObjectPointerArraySizeType) >>> { >>> return static_cast(DataObject::New().GetPointer()); >>> } >>> >>> >>> For indexed outputs, it is redefined in ImageSource in order to create an image object of the correct type. >>> >>> template< typename TOutputImage > >>> ProcessObject::DataObjectPointer >>> ImageSource< TOutputImage > >>> ::MakeOutput(ProcessObject::DataObjectPointerArraySizeType) >>> { >>> return TOutputImage::New().GetPointer(); >>> } >>> >>> So far, so good. However, the named output version of MakeOutput is not redefined in ImageSource, contrary to what the comment in itkProcessObject.h says. And so if someone tries to use it in an ImageToImageFilter, it will crash. >>> >>> Any reason for this behavior? Is this an oversight? >>> >>> Thanks, >>> >>> Jo?l >>> _____________________________________ >>> From joel.schaerer at laposte.net Wed Jan 7 06:31:41 2015 From: joel.schaerer at laposte.net (=?windows-1252?Q?Jo=EBl_Schaerer?=) Date: Wed, 07 Jan 2015 12:31:41 +0100 Subject: [ITK-users] Possible missing method in itkImageSource In-Reply-To: <54AD0C45.1090102@laposte.net> References: <54413DE5.1050108@laposte.net> <3271CF4A-5DCC-47A5-8456-05BB9325FC4C@gmail.com> <0023FC88-13F9-4ED2-9767-FB324A2EE0CB@mail.nih.gov> <54AD0C45.1090102@laposte.net> Message-ID: <54AD191D.4050605@laposte.net> I just noticed that the problem is fixed in the latest release. Thanks for the fix, and sorry for the noise! Joel On 07/01/2015 11:36, Jo?l Schaerer wrote: > Any plans on fixing this? I've run into this issue again when > attempting a DisconnectPipeline() on a named output. It crashes > because the SetOutput() method attempts to create a new output after > detaching the old one using the faulty MakeOutput(key) method: > > 0x000000000063a3dc in itk::ProcessObject::SetOutput (this=0x1b2e060, > name=..., output=) at > ../Modules/Core/Common/src/itkProcessObject.cxx:484 > 483 DataObjectPointer newOutput = this->MakeOutput(key); > 484 this->SetOutput(key, newOutput); // Segfault > > Thanks, > > Jo?l > > On 22/10/2014 15:44, Bradley Lowekamp wrote: >> Hello, >> >> I'm going to take a look at this issue. >> >> Brad >> >> On Oct 17, 2014, at 5:01 PM, Jim Miller wrote: >> >>> At first glance it looks like an oversight. I would expect, however, >>> that we should be seeing warnings about the named version of >>> MakeOutput in ProcessObject being hidden. >>> >>> Jim >>> >>>> On Oct 17, 2014, at 12:03 PM, Jo?l Schaerer >>>> wrote: >>>> >>>> Hi all, >>>> >>>> I've run into a problem with named outputs, which I believe could >>>> be a bug in ITK. >>>> >>>> When using named outputs, one is supposed to create the output data >>>> objects in the constructor using the MakeOutput method (see >>>> http://www.itk.org/Wiki/ITK/Examples/Developer/ImageFilterMultipleOutputs >>>> for an example). The MakeOutput method exists for both indexed and >>>> named outputs. >>>> . >>>> These methods are declared and defined first in itkProcessObject: >>>> >>>> .h: >>>> * ... >>>> * ProcessObject::MakeOutput. Note that MakeOutput always returns a >>>> * itkSmartPointer to a DataObject. ImageSource and MeshSource >>>> override >>>> * this method to create the correct type of image and mesh >>>> respectively. >>>> * If a filter has multiple outputs of different types, then that >>>> * filter must provide an implementation of MakeOutput(). */ >>>> virtual DataObjectPointer MakeOutput( const >>>> DataObjectIdentifierType & ); >>>> virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType >>>> idx); >>>> >>>> .cxx >>>> DataObject::Pointer >>>> ProcessObject >>>> ::MakeOutput( const DataObjectIdentifierType & name ) >>>> { >>>> itkDebugMacro("MakeOutput(" << name << ")"); >>>> if( this->IsIndexedOutputName(name) ) >>>> { >>>> return this->MakeOutput( this->MakeIndexFromOutputName(name) ); >>>> } >>>> return static_cast(DataObject::New().GetPointer()); >>>> } >>>> >>>> DataObject::Pointer >>>> ProcessObject >>>> ::MakeOutput(DataObjectPointerArraySizeType) >>>> { >>>> return static_cast(DataObject::New().GetPointer()); >>>> } >>>> >>>> >>>> For indexed outputs, it is redefined in ImageSource in order to >>>> create an image object of the correct type. >>>> >>>> template< typename TOutputImage > >>>> ProcessObject::DataObjectPointer >>>> ImageSource< TOutputImage > >>>> ::MakeOutput(ProcessObject::DataObjectPointerArraySizeType) >>>> { >>>> return TOutputImage::New().GetPointer(); >>>> } >>>> >>>> So far, so good. However, the named output version of MakeOutput is >>>> not redefined in ImageSource, contrary to what the comment in >>>> itkProcessObject.h says. And so if someone tries to use it in an >>>> ImageToImageFilter, it will crash. >>>> >>>> Any reason for this behavior? Is this an oversight? >>>> >>>> Thanks, >>>> >>>> Jo?l >>>> _____________________________________ >>>> > From matt.mccormick at kitware.com Wed Jan 7 14:47:05 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 7 Jan 2015 14:47:05 -0500 Subject: [ITK-users] Discuss what's new ITK in ITK 4.7.0, what is coming in ITK 4.8.0 Message-ID: There are a couple of upcoming opportunities to share, discuss, design, and learn with your fellow ITK community members. Following the recent 4.7.0, this is also a great time to discuss what was new in ITK 4.7.0, and what to work on for ITK 4.8.0. On Thursday (tomorrow), 1:00 PM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/u/1/events/cmapnnf3gu3adnsdpfjr93a6hr8?authkey=CMbjm5aD2rO68gE On Friday, 11:00 AM Eastern USA time, an ITK development conference, https://plus.google.com/u/1/events/cntel7ikg752bo6lmpen8ade22c?authkey=CM2q5_2Bva6asgE For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423 To get regular invites to these events, join the ITK Bar Camp G+ Community: https://plus.google.com/u/0/communities/111375098792764998322 All are welcome. Hope to talk to you then! From matt.mccormick at kitware.com Wed Jan 7 14:58:03 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 7 Jan 2015 14:58:03 -0500 Subject: [ITK-users] WarpImageFilter wrong output In-Reply-To: References: <52482848-2F1D-4DB9-A898-E2D197376F13@mail.nih.gov> Message-ID: Hi John, The DisplacementFieldTransform can be used with the ResampleImageFilter like any other Transform. There was a time when the DisplacementFieldTransform was not available -- the special WarpImageFilter class was used in this case. HTH, Matt On Fri, Jan 2, 2015 at 10:57 PM, haratron wrote: > Thanks! > > What is the difference between: > 1. http://www.itk.org/Wiki/ITK/Examples/Registration/WarpImageFilter > 2. > http://www.itk.org/Wiki/ITK/Examples/Registration/LandmarkBasedTransformInitializer3. > http://www.itk.org/Wiki/ITK/Examples/Registration/DeformationFieldTransform > > On Fri, Jan 2, 2015 at 8:28 PM, Bradley Lowekamp > wrote: >> >> Hello, >> >> In your CreateMovingImage2 method how is the "image" argument connected to >> the pipeline? >> >> Brad >> >> On Jan 2, 2015, at 12:59 PM, haratron wrote: >> >> Hello and happy new year, >> >> I'm using the WarpImageFilter from here: >> http://www.itk.org/Wiki/ITK/Examples/Registration/WarpImageFilter >> >> I have original.png that I'm using as the movingImage and I'm creating >> another one ("empty" image filled with white color, size 1800x1800) that is >> the fixedImage. >> >> The problem is that a blank image filled with black is created instead of >> the warped image that is expected. >> >> original.png : http://i.imgur.com/QQyXgzg.png >> output.png: http://i.imgur.com/LkYnZ6n.png >> >> My full WarpImageFilter.cxx file (includes changes from the original >> example code): >> http://pastebin.com/WNDb2TgM >> >> What am I doing wrong? >> >> John >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Wed Jan 7 15:01:01 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 7 Jan 2015 15:01:01 -0500 Subject: [ITK-users] Mesh to stl or ply In-Reply-To: References: Message-ID: Hi Fabian, ITK has support for IO of a number of different mesh formats. See [1] [2]. HTH, Matt [1] http://itk.org/Insight/Doxygen/html/group__ITKIOMesh.html [2] http://itk.org/ITKExamples/src/IO/Mesh/ReadMesh/Documentation.html On Wed, Dec 31, 2014 at 5:18 AM, Fabian Torres wrote: > Hi every one > > I have a segmented image (object in white, background in black) and I want > to obtain a mesh for the segmented object. > I am using tetgen software to use obtain a Delaunay tetrahedralization to > obtain the mesh. With this software I obtain a list of nodes, a list of > tethraedrons and a list of triangle faces. > > Is there a way to use the information obtained with tetgen with ITK and/or > VTK to create a mesh that I can use in MeshLab or Comsol (.py or .stl)? > > Thanks > > -- > Fabi?n Torres Robles > Maestria en Ciencias en Ingenier?a Electr?nica > Ingenier?a en Sistemas Electr?nicos > tel. 58081280, 0445534661338 > e-mail fabian.trobles at gmail.com, dae.wong at gmail.com > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From haratron at gmail.com Wed Jan 7 15:10:30 2015 From: haratron at gmail.com (haratron) Date: Wed, 7 Jan 2015 22:10:30 +0200 Subject: [ITK-users] WarpImageFilter wrong output In-Reply-To: References: <52482848-2F1D-4DB9-A898-E2D197376F13@mail.nih.gov> Message-ID: Hi Matt, thanks for the response. What about http://www.itk.org/Wiki/ITK/Examples/Registration/LandmarkBasedTransformInitializer ? I missed a space in the previous email and it didn't parse the URL correctly. On Wed, Jan 7, 2015 at 9:58 PM, Matt McCormick wrote: > Hi John, > > The DisplacementFieldTransform can be used with the > ResampleImageFilter like any other Transform. There was a time when > the DisplacementFieldTransform was not available -- the special > WarpImageFilter class was used in this case. > > HTH, > Matt > > On Fri, Jan 2, 2015 at 10:57 PM, haratron wrote: > > Thanks! > > > > What is the difference between: > > 1. http://www.itk.org/Wiki/ITK/Examples/Registration/WarpImageFilter > > 2. > > > http://www.itk.org/Wiki/ITK/Examples/Registration/LandmarkBasedTransformInitializer3 > . > > > http://www.itk.org/Wiki/ITK/Examples/Registration/DeformationFieldTransform > > > > On Fri, Jan 2, 2015 at 8:28 PM, Bradley Lowekamp > > > wrote: > >> > >> Hello, > >> > >> In your CreateMovingImage2 method how is the "image" argument connected > to > >> the pipeline? > >> > >> Brad > >> > >> On Jan 2, 2015, at 12:59 PM, haratron wrote: > >> > >> Hello and happy new year, > >> > >> I'm using the WarpImageFilter from here: > >> http://www.itk.org/Wiki/ITK/Examples/Registration/WarpImageFilter > >> > >> I have original.png that I'm using as the movingImage and I'm creating > >> another one ("empty" image filled with white color, size 1800x1800) > that is > >> the fixedImage. > >> > >> The problem is that a blank image filled with black is created instead > of > >> the warped image that is expected. > >> > >> original.png : http://i.imgur.com/QQyXgzg.png > >> output.png: http://i.imgur.com/LkYnZ6n.png > >> > >> My full WarpImageFilter.cxx file (includes changes from the original > >> example code): > >> http://pastebin.com/WNDb2TgM > >> > >> What am I doing wrong? > >> > >> John > >> _____________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Kitware offers ITK Training Courses, for more information visit: > >> http://www.kitware.com/products/protraining.php > >> > >> Please keep messages on-topic and check the ITK FAQ at: > >> http://www.itk.org/Wiki/ITK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/insight-users > >> > >> > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Jan 7 15:18:24 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 7 Jan 2015 15:18:24 -0500 Subject: [ITK-users] WarpImageFilter wrong output In-Reply-To: References: <52482848-2F1D-4DB9-A898-E2D197376F13@mail.nih.gov> Message-ID: Hi Haratron, The referenced example is initializing a rigid transform based on landmarks while the other examples are creating a non-rigid displacement field based on landmarks. HTH, Matt On Wed, Jan 7, 2015 at 3:10 PM, haratron wrote: > Hi Matt, > > thanks for the response. > What about > http://www.itk.org/Wiki/ITK/Examples/Registration/LandmarkBasedTransformInitializer > ? > I missed a space in the previous email and it didn't parse the URL > correctly. > > On Wed, Jan 7, 2015 at 9:58 PM, Matt McCormick > wrote: >> >> Hi John, >> >> The DisplacementFieldTransform can be used with the >> ResampleImageFilter like any other Transform. There was a time when >> the DisplacementFieldTransform was not available -- the special >> WarpImageFilter class was used in this case. >> >> HTH, >> Matt >> >> On Fri, Jan 2, 2015 at 10:57 PM, haratron wrote: >> > Thanks! >> > >> > What is the difference between: >> > 1. http://www.itk.org/Wiki/ITK/Examples/Registration/WarpImageFilter >> > 2. >> > >> > http://www.itk.org/Wiki/ITK/Examples/Registration/LandmarkBasedTransformInitializer3. >> > >> > http://www.itk.org/Wiki/ITK/Examples/Registration/DeformationFieldTransform >> > >> > On Fri, Jan 2, 2015 at 8:28 PM, Bradley Lowekamp >> > >> > wrote: >> >> >> >> Hello, >> >> >> >> In your CreateMovingImage2 method how is the "image" argument connected >> >> to >> >> the pipeline? >> >> >> >> Brad >> >> >> >> On Jan 2, 2015, at 12:59 PM, haratron wrote: >> >> >> >> Hello and happy new year, >> >> >> >> I'm using the WarpImageFilter from here: >> >> http://www.itk.org/Wiki/ITK/Examples/Registration/WarpImageFilter >> >> >> >> I have original.png that I'm using as the movingImage and I'm creating >> >> another one ("empty" image filled with white color, size 1800x1800) >> >> that is >> >> the fixedImage. >> >> >> >> The problem is that a blank image filled with black is created instead >> >> of >> >> the warped image that is expected. >> >> >> >> original.png : http://i.imgur.com/QQyXgzg.png >> >> output.png: http://i.imgur.com/LkYnZ6n.png >> >> >> >> My full WarpImageFilter.cxx file (includes changes from the original >> >> example code): >> >> http://pastebin.com/WNDb2TgM >> >> >> >> What am I doing wrong? >> >> >> >> John >> >> _____________________________________ >> >> Powered by www.kitware.com >> >> >> >> Visit other Kitware open-source projects at >> >> http://www.kitware.com/opensource/opensource.html >> >> >> >> Kitware offers ITK Training Courses, for more information visit: >> >> http://www.kitware.com/products/protraining.php >> >> >> >> Please keep messages on-topic and check the ITK FAQ at: >> >> http://www.itk.org/Wiki/ITK_FAQ >> >> >> >> Follow this link to subscribe/unsubscribe: >> >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> >> >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > > > From franciscolopezdelafranca at gmail.com Fri Jan 9 14:59:49 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Fri, 9 Jan 2015 20:59:49 +0100 Subject: [ITK-users] Undefined references to methods of template classes Message-ID: Hi. I' like to create a library containing, for example, one template class with a number of methods. I've programmed a simple example and the compilation and generation of the library goes fine. I use the cmake "add_library" command for generating the library. The problem arises at the moment of testing the library. I get an undefined reference for every method in the template class. I've downloaded a tool to look in the contents (functions) of dynamic libraries, and there is no function in the library. If I add another class (not a template class), then, this tool shows me only the functions in this latter class. Has anyone ever come across with this problem? Thanks a lot in advance. Regards /Francisco -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri Jan 9 15:02:52 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 9 Jan 2015 15:02:52 -0500 Subject: [ITK-users] Undefined references to methods of template classes In-Reply-To: References: Message-ID: Hi Francisco, In order for the templates to be available in the library, they must be explicitly instantiated [1]. HTH, Matt [1] http://www.cplusplus.com/articles/1C75fSEw/ On Fri, Jan 9, 2015 at 2:59 PM, Francisco Lopez de la Franca wrote: > Hi. > I' like to create a library containing, for example, one template class with > a number of methods. > I've programmed a simple example and the compilation and generation of the > library goes fine. I use the cmake "add_library" command for generating the > library. > > The problem arises at the moment of testing the library. I get an undefined > reference for every method in the template class. > > I've downloaded a tool to look in the contents (functions) of dynamic > libraries, and there is no function in the library. If I add another class > (not a template class), then, this tool shows me only the functions in this > latter class. > > Has anyone ever come across with this problem? > > Thanks a lot in advance. > Regards > /Francisco > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From franciscolopezdelafranca at gmail.com Sat Jan 10 16:16:09 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Sat, 10 Jan 2015 22:16:09 +0100 Subject: [ITK-users] Undefined references to methods of template classes In-Reply-To: References: Message-ID: Thanks to your previous answer the problem was solved, but another one has come out. It occurs when linking to create the library. It gives an undefined reference to itk::ExceptionObject::ExceptionObject... as you can see below. What it is strange to me is that before including explicit template instantiation, I created the library without errors, and now that I include that, I get this error. I'll appreciate very much any help. Linking CXX shared library libTFM_Features.dll CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC 1ERKSsjS2_S2_]+0x35): undefined reference to `itk::ExceptionObject::ExceptionObj ect(std::string const&, unsigned int, std::string const&, std::string const&)' CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC 1ERKSsjS2_S2_]+0x40): undefined reference to `vtable for itk::MemoryAllocationEr ror' C:/CV/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-min gw32/bin/ld.exe: CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj): ba d reloc address 0x40 in section `.text$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_ S2_[_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_]' collect2.exe: error: ld returned 1 exit status SRC\CMakeFiles\TFM_Features.dir\build.make:219: recipe for target 'SRC/libTFM_Fe atures.dll' failed mingw32-make[2]: *** [SRC/libTFM_Features.dll] Error 1 CMakeFiles\Makefile2:77: recipe for target 'SRC/CMakeFiles/TFM_Features.dir/all' failed mingw32-make[1]: *** [SRC/CMakeFiles/TFM_Features.dir/all] Error 2 Makefile:74: recipe for target 'all' failed mingw32-make: *** [all] Error 2 2015-01-09 21:02 GMT+01:00 Matt McCormick : > Hi Francisco, > > In order for the templates to be available in the library, they must > be explicitly instantiated [1]. > > HTH, > Matt > > [1] http://www.cplusplus.com/articles/1C75fSEw/ > > On Fri, Jan 9, 2015 at 2:59 PM, Francisco Lopez de la Franca > wrote: > > Hi. > > I' like to create a library containing, for example, one template class > with > > a number of methods. > > I've programmed a simple example and the compilation and generation of > the > > library goes fine. I use the cmake "add_library" command for generating > the > > library. > > > > The problem arises at the moment of testing the library. I get an > undefined > > reference for every method in the template class. > > > > I've downloaded a tool to look in the contents (functions) of dynamic > > libraries, and there is no function in the library. If I add another > class > > (not a template class), then, this tool shows me only the functions in > this > > latter class. > > > > Has anyone ever come across with this problem? > > > > Thanks a lot in advance. > > Regards > > /Francisco > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sat Jan 10 16:38:32 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 10 Jan 2015 16:38:32 -0500 Subject: [ITK-users] Undefined references to methods of template classes In-Reply-To: References: Message-ID: Hi Francisco, Nice to hear about the progress! You will need to link your library to the ITK libraries: target_link_libraries( mylibrary ${ITK_LIBRARIES} ) HTH, Matt On Sat, Jan 10, 2015 at 4:16 PM, Francisco Lopez de la Franca < franciscolopezdelafranca at gmail.com> wrote: > Thanks to your previous answer the problem was solved, but another one has > come out. It occurs when linking to create the library. It gives an > undefined reference to itk::ExceptionObject::ExceptionObject... as you can > see below. > What it is strange to me is that before including explicit template > instantiation, I created the library without errors, and now that I include > that, I get this error. > I'll appreciate very much any help. > > Linking CXX shared library libTFM_Features.dll > > CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t > > ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC > 1ERKSsjS2_S2_]+0x35): undefined reference to > `itk::ExceptionObject::ExceptionObj > ect(std::string const&, unsigned int, std::string const&, std::string > const&)' > > CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t > > ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC > 1ERKSsjS2_S2_]+0x40): undefined reference to `vtable for > itk::MemoryAllocationEr > ror' > > C:/CV/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-min > gw32/bin/ld.exe: > CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj): ba > d reloc address 0x40 in section > `.text$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_ > S2_[_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_]' > collect2.exe: error: ld returned 1 exit status > SRC\CMakeFiles\TFM_Features.dir\build.make:219: recipe for target > 'SRC/libTFM_Fe > atures.dll' failed > mingw32-make[2]: *** [SRC/libTFM_Features.dll] Error 1 > CMakeFiles\Makefile2:77: recipe for target > 'SRC/CMakeFiles/TFM_Features.dir/all' > failed > mingw32-make[1]: *** [SRC/CMakeFiles/TFM_Features.dir/all] Error 2 > Makefile:74: recipe for target 'all' failed > mingw32-make: *** [all] Error 2 > > > 2015-01-09 21:02 GMT+01:00 Matt McCormick : > >> Hi Francisco, >> >> In order for the templates to be available in the library, they must >> be explicitly instantiated [1]. >> >> HTH, >> Matt >> >> [1] http://www.cplusplus.com/articles/1C75fSEw/ >> >> On Fri, Jan 9, 2015 at 2:59 PM, Francisco Lopez de la Franca >> wrote: >> > Hi. >> > I' like to create a library containing, for example, one template class >> with >> > a number of methods. >> > I've programmed a simple example and the compilation and generation of >> the >> > library goes fine. I use the cmake "add_library" command for generating >> the >> > library. >> > >> > The problem arises at the moment of testing the library. I get an >> undefined >> > reference for every method in the template class. >> > >> > I've downloaded a tool to look in the contents (functions) of dynamic >> > libraries, and there is no function in the library. If I add another >> class >> > (not a template class), then, this tool shows me only the functions in >> this >> > latter class. >> > >> > Has anyone ever come across with this problem? >> > >> > Thanks a lot in advance. >> > Regards >> > /Francisco >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rekha.pyage at gmail.com Mon Jan 12 02:42:22 2015 From: rekha.pyage at gmail.com (reks) Date: Mon, 12 Jan 2015 00:42:22 -0700 (MST) Subject: [ITK-users] itk Canny segmentation level set on 3d data Message-ID: <1421048542766-35103.post@n7.nabble.com> Hi all, I am trying to make use of itkCannySegmentationLevelSet 2d example on 3d data. Here I am giving the output of thresholdsegmentationlevelset as one of the input to the filter and input image as the feature input. I am giving The parameters to this filter as given in 2d example( canny threshold=7.0, CannyVariance= 0.1 ,AdvectionScaling=10.0,IsoSurfaceValue= 127.5,NumberOfIterations= 15) but I am not getting the expected output. I am getting thresholdsegmentationlevelset output as it is as the cannylevelset output. do I have to change the parameters to this filter ? I dont know where I am going wrong. please do help me.. any help will be appreciated. thanks in advance. reks -- View this message in context: http://itk-users.7.n7.nabble.com/itk-Canny-segmentation-level-set-on-3d-data-tp35103.html Sent from the ITK - Users mailing list archive at Nabble.com. From mathias.richter at informatik.uni-luebeck.de Mon Jan 12 04:36:29 2015 From: mathias.richter at informatik.uni-luebeck.de (mathew) Date: Mon, 12 Jan 2015 02:36:29 -0700 (MST) Subject: [ITK-users] extending label object's line iterator / cpp question Message-ID: <1421055389237-7586769.post@n2.nabble.com> Dear ITK users, Currently, I am working with the LabelObject class and its iterators (i.e. the line iterator). I have noticed that I can only advance the iterator by one. Unfortunately I want to step to any element in one step. I thought of deriving a subclass (ExtIterLabelObject) of the LabelObject, which lacks on loosing access on the private stuff of the LabelObject. The only way I see is defining a new ExtIterLabelObject class, which inherits from the LightObject and replaces the given LabelObject implementation. Since this is very ugly, I want to ask if there is a better way to extend the functionality of the LineIterator, so that I can increase the iterator by an arbitrary (valid) step. Thanks for your help. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/extending-label-object-s-line-iterator-cpp-question-tp7586769.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Mon Jan 12 08:36:19 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 12 Jan 2015 08:36:19 -0500 Subject: [ITK-users] itk Canny segmentation level set on 3d data In-Reply-To: <1421048542766-35103.post@n7.nabble.com> References: <1421048542766-35103.post@n7.nabble.com> Message-ID: Hi reks, The parameters will likely need tweaking. To understand how the change the parameters, look at the documentation for the filters and the parameters and the intermediate images that are generated. The documentation can be found in The Software Guide [1], the example code that is used to generate the Software Guide [2], and the Doxygen for classes [3]. As suggested in the Software Guide, you may want to pre-process your input image also to remove noise. HTH, Matt [1] http://itk.org/ITK/resources/software.html [2] http://www.itk.org/Doxygen/html/Examples_2Segmentation_2CannySegmentationLevelSetImageFilter_8cxx-example.html [3] http://www.itk.org/Doxygen/html/classitk_1_1CannySegmentationLevelSetImageFilter.html On Mon, Jan 12, 2015 at 2:42 AM, reks wrote: > Hi all, > > I am trying to make use of itkCannySegmentationLevelSet 2d example on 3d > data. Here I am giving the output of thresholdsegmentationlevelset as one of > the input to the filter and input image as the feature input. I am giving > The parameters to this filter as given in 2d example( canny threshold=7.0, > CannyVariance= 0.1 ,AdvectionScaling=10.0,IsoSurfaceValue= > 127.5,NumberOfIterations= 15) but I am not getting the expected output. I am > getting thresholdsegmentationlevelset output as it is as the cannylevelset > output. do I have to change the parameters to this filter ? I dont know > where I am going wrong. please do help me.. > > any help will be appreciated. > thanks in advance. > > reks > > > > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/itk-Canny-segmentation-level-set-on-3d-data-tp35103.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Mon Jan 12 08:44:14 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 12 Jan 2015 08:44:14 -0500 Subject: [ITK-users] extending label object's line iterator / cpp question In-Reply-To: <1421055389237-7586769.post@n2.nabble.com> References: <1421055389237-7586769.post@n2.nabble.com> Message-ID: Hi Mathew, If some required members are private that need to be protected for your extension, we can do that. Please submit a patch with the changes required [1]. Thanks, Matt [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html On Mon, Jan 12, 2015 at 4:36 AM, mathew wrote: > Dear ITK users, > > Currently, I am working with the LabelObject class and its iterators (i.e. > the line iterator). > I have noticed that I can only advance the iterator by one. Unfortunately I > want to step to any element in one step. > > I thought of deriving a subclass (ExtIterLabelObject) of the LabelObject, > which lacks on loosing access on the private stuff of the LabelObject. > > The only way I see is defining a new ExtIterLabelObject class, which > inherits from the LightObject and replaces the given LabelObject > implementation. > > Since this is very ugly, I want to ask if there is a better way to extend > the functionality of the LineIterator, so that I can increase the iterator > by an arbitrary (valid) step. > > Thanks for your help. > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/extending-label-object-s-line-iterator-cpp-question-tp7586769.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From yiyu.chou at gmail.com Mon Jan 12 13:55:38 2015 From: yiyu.chou at gmail.com (Yi-Yu Chou) Date: Mon, 12 Jan 2015 13:55:38 -0500 Subject: [ITK-users] 2 parameters registration Message-ID: Dear ITK experts, I would like to implement a 2 parameters (one pitch rotation + one global scaling) 3D image registration with ITK. It is highly appreciated if you could shed some light on this matter. Thanks in advance !! Yi-Yu -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Jan 12 17:46:57 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 12 Jan 2015 17:46:57 -0500 Subject: [ITK-users] 2 parameters registration In-Reply-To: References: Message-ID: Hi Yi-Yu, You may want to use a transform like the Similarity3DTransform [1] and set the Weights on the Optimizer appropriately [2] to hold parameters that should be fixed constant. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1Similarity3DTransform.html [2] http://www.itk.org/Doxygen/html/classitk_1_1ObjectToObjectOptimizerBaseTemplate.html On Mon, Jan 12, 2015 at 1:55 PM, Yi-Yu Chou wrote: > Dear ITK experts, > > I would like to implement a 2 parameters (one pitch rotation + one global > scaling) 3D image registration with ITK. > > It is highly appreciated if you could shed some light on this matter. > Thanks in advance !! > > Yi-Yu > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Wed Jan 14 10:50:20 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 14 Jan 2015 10:50:20 -0500 Subject: [ITK-users] Opportunities to share, discuss, design, and learn with other ITK community members Message-ID: There are a couple of upcoming opportunities to share, discuss, design, and learn with your fellow ITK community members. On Thursday (tomorrow), 1:00 PM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/events/ctg03o79vsd0irnhpugquuatfoc On Friday, 11:00 AM Eastern USA time, an ITK development conference, https://plus.google.com/events/cidukboj4bn3k2ndetr1rqdk3a0 For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423 To get regular invites to these events, join the ITK Bar Camp G+ Community: https://plus.google.com/u/0/communities/111375098792764998322 All are welcome. Hope to talk to you then! From emily-hammond at uiowa.edu Wed Jan 14 11:55:22 2015 From: emily-hammond at uiowa.edu (Hammond, Emily M) Date: Wed, 14 Jan 2015 16:55:22 +0000 Subject: [ITK-users] concept checking error - RegistrationMethodv4 Message-ID: <2609C492EC89AB4CAAD3647B8D1A43CC2F173BD7@ITSNT437.iowa.uiowa.edu> Hello, I am working with very large images and would like to use a short pixel type for my fixed and moving images within the ImageRegistrationMethodv4; however, my code does not build until a float pixel type is used. Here is a snippet of my code (looks pretty standard): const unsigned int Dimension = 3; typedef short PixelType; typedef itk::Image< PixelType, Dimension > FixedImageType; typedef itk::Image< PixelType, Dimension > MovingImageType; typedef itk::MattesMutualInformationImageToImageMetricv4< FixedImageType, MovingImageType > MetricType; typedef itk::ImageRegistrationMethodv4< FixedImageType, MovingImageType, TransformType > RegistrationType; RegistrationType::Pointer registration = RegistrationType::New(); MetricType::Pointer metric = MetricType::New(); At this point in the code, the following error is thrown (not seen if using float pixel type): error C2440: 'initializing' : cannot convert from 'itk::Concept::Detail::UniqueType_bool<__formal>' to 'itk::Concept::Detail::UniqueType_bool<__formal>' Can anyone give me some insight into this problem? From previous experience I know that short pixel types work with the metrics and registration method from the previous version. Does version 4 not have these capabilities? Thanks! Emily Hammond -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed Jan 14 12:57:10 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 14 Jan 2015 12:57:10 -0500 Subject: [ITK-users] concept checking error - RegistrationMethodv4 In-Reply-To: <2609C492EC89AB4CAAD3647B8D1A43CC2F173BD7@ITSNT437.iowa.uiowa.edu> References: <2609C492EC89AB4CAAD3647B8D1A43CC2F173BD7@ITSNT437.iowa.uiowa.edu> Message-ID: <804E5EFC-A383-471A-ABD2-6A51E3016E81@mail.nih.gov> Hello, The current ITKv4 registration frame work is limited to real type (float/double). I believe it could be changed with some work, I think much of the reasoning for this requirement has to do with the way the multi-scale and gradient magnitude are implemented. If you image is large, perhaps you should reduce the resolution before performing registration? Brad On Jan 14, 2015, at 11:55 AM, Hammond, Emily M wrote: > Hello, > > I am working with very large images and would like to use a short pixel type for my fixed and moving images within the ImageRegistrationMethodv4; however, my code does not build until a float pixel type is used. Here is a snippet of my code (looks pretty standard): > > const unsigned int Dimension = 3; > typedef short PixelType; > > typedef itk::Image< PixelType, Dimension > FixedImageType; > typedef itk::Image< PixelType, Dimension > MovingImageType; > > typedef itk::MattesMutualInformationImageToImageMetricv4< FixedImageType, MovingImageType > MetricType; > typedef itk::ImageRegistrationMethodv4< FixedImageType, MovingImageType, TransformType > RegistrationType; > > RegistrationType::Pointer registration = RegistrationType::New(); > MetricType::Pointer metric = MetricType::New(); > > At this point in the code, the following error is thrown (not seen if using float pixel type): > error C2440: 'initializing' : cannot convert from 'itk::Concept::Detail::UniqueType_bool<__formal>' to 'itk::Concept::Detail::UniqueType_bool<__formal>' > > Can anyone give me some insight into this problem? From previous experience I know that short pixel types work with the metrics and registration method from the previous version. Does version 4 not have these capabilities? > > Thanks! > Emily Hammond > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Wed Jan 14 17:05:19 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Wed, 14 Jan 2015 23:05:19 +0100 Subject: [ITK-users] Undefined references to methods of template classes In-Reply-To: References: Message-ID: Hi again. I fixed all the errors and got my library, now ready to be tested. It contains an encapsulation, on the one hand, of the class itkBinaryImageToShapeLabelMapFilter in order to get image shape descriptors of a 3D binary image, and on the other hand, the same for the class itkScalarImageToTextureFeaturesFilter to get image texture features of a 3D scalar image. I pass as input image to both classes a binary 3D Nifti image (150x150x150) containing a cylinder where the inside voxels are 255 and the outside voxels are 0. As for the shape issue, it's very strange to me that the call to GetNumberOfLabelObjects on a itk::LabelMap object returns a value of 0. The main code is as follows: binaryImageToShapeLabelMapFilter->SetInput(_input); binaryImageToShapeLabelMapFilter->ComputePerimeterOn(); binaryImageToShapeLabelMapFilter->Update(); LabelMapType::Pointer labelMap = binaryImageToShapeLabelMapFilter->GetOutput(); int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects(); And, as for the texture features, the result of the filter does not seem to be very logic: Energy = 1 Entropy = 0 Correlation = 1 Local Homogeneity = 0 Inertia = 0 Cluster Shade = 0 Cluster Prominence = 0 I've also tested this with a scalar 3D Nifti image and the results are the same. And the question is: What kind of image do I have to pass to the filters so that the code would return a more logic expected answer? Thank you very much in advance. My best regars. /Francisco 2015-01-10 22:38 GMT+01:00 Matt McCormick : > Hi Francisco, > > Nice to hear about the progress! > > You will need to link your library to the ITK libraries: > > target_link_libraries( mylibrary ${ITK_LIBRARIES} ) > > HTH, > Matt > > On Sat, Jan 10, 2015 at 4:16 PM, Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com> wrote: > >> Thanks to your previous answer the problem was solved, but another one >> has come out. It occurs when linking to create the library. It gives an >> undefined reference to itk::ExceptionObject::ExceptionObject... as you can >> see below. >> What it is strange to me is that before including explicit template >> instantiation, I created the library without errors, and now that I include >> that, I get this error. >> I'll appreciate very much any help. >> >> Linking CXX shared library libTFM_Features.dll >> >> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t >> >> ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC >> 1ERKSsjS2_S2_]+0x35): undefined reference to >> `itk::ExceptionObject::ExceptionObj >> ect(std::string const&, unsigned int, std::string const&, std::string >> const&)' >> >> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t >> >> ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC >> 1ERKSsjS2_S2_]+0x40): undefined reference to `vtable for >> itk::MemoryAllocationEr >> ror' >> >> C:/CV/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-min >> gw32/bin/ld.exe: >> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj): ba >> d reloc address 0x40 in section >> `.text$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_ >> S2_[_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_]' >> collect2.exe: error: ld returned 1 exit status >> SRC\CMakeFiles\TFM_Features.dir\build.make:219: recipe for target >> 'SRC/libTFM_Fe >> atures.dll' failed >> mingw32-make[2]: *** [SRC/libTFM_Features.dll] Error 1 >> CMakeFiles\Makefile2:77: recipe for target >> 'SRC/CMakeFiles/TFM_Features.dir/all' >> failed >> mingw32-make[1]: *** [SRC/CMakeFiles/TFM_Features.dir/all] Error 2 >> Makefile:74: recipe for target 'all' failed >> mingw32-make: *** [all] Error 2 >> >> >> 2015-01-09 21:02 GMT+01:00 Matt McCormick : >> >>> Hi Francisco, >>> >>> In order for the templates to be available in the library, they must >>> be explicitly instantiated [1]. >>> >>> HTH, >>> Matt >>> >>> [1] http://www.cplusplus.com/articles/1C75fSEw/ >>> >>> On Fri, Jan 9, 2015 at 2:59 PM, Francisco Lopez de la Franca >>> wrote: >>> > Hi. >>> > I' like to create a library containing, for example, one template >>> class with >>> > a number of methods. >>> > I've programmed a simple example and the compilation and generation of >>> the >>> > library goes fine. I use the cmake "add_library" command for >>> generating the >>> > library. >>> > >>> > The problem arises at the moment of testing the library. I get an >>> undefined >>> > reference for every method in the template class. >>> > >>> > I've downloaded a tool to look in the contents (functions) of dynamic >>> > libraries, and there is no function in the library. If I add another >>> class >>> > (not a template class), then, this tool shows me only the functions in >>> this >>> > latter class. >>> > >>> > Has anyone ever come across with this problem? >>> > >>> > Thanks a lot in advance. >>> > Regards >>> > /Francisco >>> > >>> > _____________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Kitware offers ITK Training Courses, for more information visit: >>> > http://www.kitware.com/products/protraining.php >>> > >>> > Please keep messages on-topic and check the ITK FAQ at: >>> > http://www.itk.org/Wiki/ITK_FAQ >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/insight-users >>> > >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nhadar at surgicaltheater.net Wed Jan 14 17:40:48 2015 From: nhadar at surgicaltheater.net (Nissim Hadar) Date: Wed, 14 Jan 2015 15:40:48 -0700 (MST) Subject: [ITK-users] Vessel Segmentation Message-ID: <1421275248945-35113.post@n7.nabble.com> Hello, I am trying to use the /HessianToObjectnessMeasureImageFilter/ to segment brain tissue. As this code is part of a larger system, I am providing the image as an array of /shorts/. Other segmentation methods, such as Otsu, flag the segmentation, so the result is a binary image (e.g. 255 and 0). I do not understand the results I am getting with the Hessian method. My code is as follows: *void HessianSegmentation( // Input data short *inputVoxels, const int dim, const double xSpacing, const double ySpacing, const double zSpacing, // Output data short *outputVoxels ) { try { const unsigned int Dimension = 3; typedef double InternalPixelType; typedef Image InternalImageType; typedef short VoxelPixelType; typedef Image VoxelImageType; // Image Importer - converts linear array of pixels in short format to an Image // typedef ImportImageFilter ImportFilterType; ImportFilterType::Pointer importFilter = ImportFilterType::New(); ImportFilterType::IndexType start; start.Fill(0); ImportFilterType::SizeType size; size[0] = size[1] = size[2] = dim; ImportFilterType::RegionType region; region.SetIndex(start); region.SetSize (size ); importFilter->SetRegion(region); const SpacePrecisionType origin[Dimension] = {0, 0, 0}; importFilter->SetOrigin(origin); const SpacePrecisionType spacing[Dimension] = {xSpacing, ySpacing, zSpacing}; importFilter->SetSpacing(spacing); importFilter->SetImportPointer(inputVoxels, dim * dim * dim, false); // Caster from short to float (input is shorts, detection needs floats) typedef CastImageFilter CastFilterTypeVoxelToInternal; CastFilterTypeVoxelToInternal::Pointer casterVoxelToInternal = CastFilterTypeVoxelToInternal::New(); casterVoxelToInternal-> SetInput(importFilter->GetOutput()); // Set up Hessian filter // typedef SymmetricSecondRankTensor HessianPixelType; typedef Image HessianImageType; typedef HessianToObjectnessMeasureImageFilter ObjectnessFilterType; ObjectnessFilterType::Pointer objectnessFilter = ObjectnessFilterType::New(); objectnessFilter->SetBrightObject(true); objectnessFilter->SetScaleObjectnessMeasure(false); objectnessFilter->SetAlpha(0.5); objectnessFilter->SetBeta (0.5); objectnessFilter->SetGamma(5.0); typedef MultiScaleHessianBasedMeasureImageFilter MultiScaleEnhancementFilterType; MultiScaleEnhancementFilterType::Pointer multiScaleEnhancementFilter = MultiScaleEnhancementFilterType::New(); multiScaleEnhancementFilter->SetHessianToMeasureFilter(objectnessFilter); multiScaleEnhancementFilter->SetSigmaStepMethodToLogarithmic(); multiScaleEnhancementFilter->SetSigmaMinimum(0.2); multiScaleEnhancementFilter->SetSigmaMaximum(2.0); multiScaleEnhancementFilter->SetNumberOfSigmaSteps(10); multiScaleEnhancementFilter->SetInput(casterVoxelToInternal->GetOutput()); // Setup rescaler // typedef RescaleIntensityImageFilter RescaleFilterType; RescaleFilterType::Pointer rescaleFilter = RescaleFilterType::New(); rescaleFilter->SetOutputMinimum(0); rescaleFilter->SetOutputMaximum(2000); rescaleFilter-> SetInput(multiScaleEnhancementFilter->GetOutput()); // Cast back from float to short typedef CastImageFilter CastFilterTypeInternalToVoxel; CastFilterTypeInternalToVoxel::Pointer casterInternalToVoxel = CastFilterTypeInternalToVoxel::New(); casterInternalToVoxel->SetInput(rescaleFilter->GetOutput()); // Run pipeline // casterInternalToVoxel->Update(); // Extract results // VoxelImageType *outputImage = casterInternalToVoxel->GetOutput(); InternalImageType::RegionType outputRegion = outputImage->GetBufferedRegion(); typedef itk::ImageRegionConstIterator IteratorType; IteratorType it(outputImage, outputRegion); VoxelPixelType *ptr = outputVoxels; it.GoToBegin(); while(!it.IsAtEnd()) { *ptr = it.Get(); ++it; ++ptr; } } catch (const std::exception& ex) { std::string s = ex.what(); bool error = true; // put breakpoint here to debug } }* The input data is a block of voxels from CT/MRI images. Thank you very much Cheers -- View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Wed Jan 14 20:25:46 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 14 Jan 2015 20:25:46 -0500 Subject: [ITK-users] Vessel Segmentation In-Reply-To: <1421275248945-35113.post@n7.nabble.com> References: <1421275248945-35113.post@n7.nabble.com> Message-ID: Hi Nissim, It is unclear from your message what you do not understand about the results. More information on the filters can be found in Doxygen [1] and The ITK Software Guide [2]. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1HessianToObjectnessMeasureImageFilter.html [2] http://itk.org/ItkSoftwareGuide.pdf On Wed, Jan 14, 2015 at 5:40 PM, Nissim Hadar wrote: > Hello, > > I am trying to use the /HessianToObjectnessMeasureImageFilter/ to segment > brain tissue. As this code is part of a larger system, I am providing the > image as an array of /shorts/. Other segmentation methods, such as Otsu, > flag the segmentation, so the result is a binary image (e.g. 255 and 0). I > do not understand the results I am getting with the Hessian method. > > My code is as follows: > > *void HessianSegmentation( > // Input data > short *inputVoxels, const int dim, > const double xSpacing, const double ySpacing, const double zSpacing, > > // Output data > short *outputVoxels > ) { > try > { > const unsigned int Dimension = 3; > > typedef double InternalPixelType; > typedef Image InternalImageType; > > typedef short VoxelPixelType; > typedef Image VoxelImageType; > > // Image Importer - converts linear array of pixels in short format to an > Image > // > typedef ImportImageFilter ImportFilterType; > ImportFilterType::Pointer importFilter = ImportFilterType::New(); > > ImportFilterType::IndexType start; > start.Fill(0); > > ImportFilterType::SizeType size; > size[0] = size[1] = size[2] = dim; > > ImportFilterType::RegionType region; > region.SetIndex(start); > region.SetSize (size ); > importFilter->SetRegion(region); > > const SpacePrecisionType origin[Dimension] = {0, 0, 0}; > importFilter->SetOrigin(origin); > > const SpacePrecisionType spacing[Dimension] = {xSpacing, ySpacing, > zSpacing}; > importFilter->SetSpacing(spacing); > > importFilter->SetImportPointer(inputVoxels, dim * dim * dim, false); > > // Caster from short to float (input is shorts, detection needs floats) > typedef CastImageFilter > CastFilterTypeVoxelToInternal; > CastFilterTypeVoxelToInternal::Pointer casterVoxelToInternal = > CastFilterTypeVoxelToInternal::New(); > > casterVoxelToInternal-> SetInput(importFilter->GetOutput()); > > // Set up Hessian filter > // > typedef SymmetricSecondRankTensor HessianPixelType; > typedef Image HessianImageType; > typedef HessianToObjectnessMeasureImageFilter InternalImageType> ObjectnessFilterType; > ObjectnessFilterType::Pointer objectnessFilter = > ObjectnessFilterType::New(); > > objectnessFilter->SetBrightObject(true); > objectnessFilter->SetScaleObjectnessMeasure(false); > objectnessFilter->SetAlpha(0.5); > objectnessFilter->SetBeta (0.5); > objectnessFilter->SetGamma(5.0); > > typedef MultiScaleHessianBasedMeasureImageFilter HessianImageType, InternalImageType> MultiScaleEnhancementFilterType; > MultiScaleEnhancementFilterType::Pointer multiScaleEnhancementFilter = > MultiScaleEnhancementFilterType::New(); > multiScaleEnhancementFilter->SetHessianToMeasureFilter(objectnessFilter); > multiScaleEnhancementFilter->SetSigmaStepMethodToLogarithmic(); > > multiScaleEnhancementFilter->SetSigmaMinimum(0.2); > multiScaleEnhancementFilter->SetSigmaMaximum(2.0); > multiScaleEnhancementFilter->SetNumberOfSigmaSteps(10); > > multiScaleEnhancementFilter->SetInput(casterVoxelToInternal->GetOutput()); > > // Setup rescaler > // > typedef RescaleIntensityImageFilter > RescaleFilterType; > RescaleFilterType::Pointer rescaleFilter = RescaleFilterType::New(); > rescaleFilter->SetOutputMinimum(0); > rescaleFilter->SetOutputMaximum(2000); > > rescaleFilter-> SetInput(multiScaleEnhancementFilter->GetOutput()); > > // Cast back from float to short > typedef CastImageFilter > CastFilterTypeInternalToVoxel; > CastFilterTypeInternalToVoxel::Pointer casterInternalToVoxel = > CastFilterTypeInternalToVoxel::New(); > > casterInternalToVoxel->SetInput(rescaleFilter->GetOutput()); > > // Run pipeline > // > casterInternalToVoxel->Update(); > > // Extract results > // > VoxelImageType *outputImage = casterInternalToVoxel->GetOutput(); > InternalImageType::RegionType outputRegion = > outputImage->GetBufferedRegion(); > > typedef itk::ImageRegionConstIterator IteratorType; > IteratorType it(outputImage, outputRegion); > > VoxelPixelType *ptr = outputVoxels; > > it.GoToBegin(); > while(!it.IsAtEnd()) > { > *ptr = it.Get(); > ++it; > ++ptr; > } > } > catch (const std::exception& ex) > { > std::string s = ex.what(); > bool error = true; // put breakpoint here to debug > } > }* > > The input data is a block of voxels from CT/MRI images. > > Thank you very much > Cheers > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Wed Jan 14 20:30:21 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 14 Jan 2015 20:30:21 -0500 Subject: [ITK-users] Undefined references to methods of template classes In-Reply-To: References: Message-ID: Hi Francisco, Great to hear about the progress! The itk::BinaryImageToShapeLabelMapFilter requires a binary input, which should have an integer pixel type, like unsigned char or unsigned short. It is important to set the BackgroundValue and ForegroundValue [1] to get this filter to work correctly. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1BinaryImageToShapeLabelMapFilter.html On Wed, Jan 14, 2015 at 5:05 PM, Francisco Lopez de la Franca wrote: > Hi again. > I fixed all the errors and got my library, now ready to be tested. > It contains an encapsulation, on the one hand, of the class > itkBinaryImageToShapeLabelMapFilter in order to get image shape descriptors > of a 3D binary image, and on the other hand, the same for the class > itkScalarImageToTextureFeaturesFilter to get image texture features of a 3D > scalar image. > > I pass as input image to both classes a binary 3D Nifti image (150x150x150) > containing a cylinder where the inside voxels are 255 and the outside voxels > are 0. > > As for the shape issue, it's very strange to me that the call to > GetNumberOfLabelObjects on a itk::LabelMap object returns a value of 0. The > main code is as follows: > > binaryImageToShapeLabelMapFilter->SetInput(_input); > binaryImageToShapeLabelMapFilter->ComputePerimeterOn(); > binaryImageToShapeLabelMapFilter->Update(); > > LabelMapType::Pointer labelMap = > binaryImageToShapeLabelMapFilter->GetOutput(); > > int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects(); > > > And, as for the texture features, the result of the filter does not seem to > be very logic: > > Energy = 1 > Entropy = 0 > Correlation = 1 > Local Homogeneity = 0 > Inertia = 0 > Cluster Shade = 0 > Cluster Prominence = 0 > > I've also tested this with a scalar 3D Nifti image and the results are the > same. > > And the question is: What kind of image do I have to pass to the filters so > that the code would return a more logic expected answer? > > Thank you very much in advance. > My best regars. > /Francisco > > 2015-01-10 22:38 GMT+01:00 Matt McCormick : >> >> Hi Francisco, >> >> Nice to hear about the progress! >> >> You will need to link your library to the ITK libraries: >> >> target_link_libraries( mylibrary ${ITK_LIBRARIES} ) >> >> HTH, >> Matt >> >> On Sat, Jan 10, 2015 at 4:16 PM, Francisco Lopez de la Franca >> wrote: >>> >>> Thanks to your previous answer the problem was solved, but another one >>> has come out. It occurs when linking to create the library. It gives an >>> undefined reference to itk::ExceptionObject::ExceptionObject... as you can >>> see below. >>> What it is strange to me is that before including explicit template >>> instantiation, I created the library without errors, and now that I include >>> that, I get this error. >>> I'll appreciate very much any help. >>> >>> Linking CXX shared library libTFM_Features.dll >>> >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t >>> >>> ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC >>> 1ERKSsjS2_S2_]+0x35): undefined reference to >>> `itk::ExceptionObject::ExceptionObj >>> ect(std::string const&, unsigned int, std::string const&, std::string >>> const&)' >>> >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t >>> >>> ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC >>> 1ERKSsjS2_S2_]+0x40): undefined reference to `vtable for >>> itk::MemoryAllocationEr >>> ror' >>> >>> C:/CV/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-min >>> gw32/bin/ld.exe: >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj): ba >>> d reloc address 0x40 in section >>> `.text$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_ >>> S2_[_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_]' >>> collect2.exe: error: ld returned 1 exit status >>> SRC\CMakeFiles\TFM_Features.dir\build.make:219: recipe for target >>> 'SRC/libTFM_Fe >>> atures.dll' failed >>> mingw32-make[2]: *** [SRC/libTFM_Features.dll] Error 1 >>> CMakeFiles\Makefile2:77: recipe for target >>> 'SRC/CMakeFiles/TFM_Features.dir/all' >>> failed >>> mingw32-make[1]: *** [SRC/CMakeFiles/TFM_Features.dir/all] Error 2 >>> Makefile:74: recipe for target 'all' failed >>> mingw32-make: *** [all] Error 2 >>> >>> >>> 2015-01-09 21:02 GMT+01:00 Matt McCormick : >>>> >>>> Hi Francisco, >>>> >>>> In order for the templates to be available in the library, they must >>>> be explicitly instantiated [1]. >>>> >>>> HTH, >>>> Matt >>>> >>>> [1] http://www.cplusplus.com/articles/1C75fSEw/ >>>> >>>> On Fri, Jan 9, 2015 at 2:59 PM, Francisco Lopez de la Franca >>>> wrote: >>>> > Hi. >>>> > I' like to create a library containing, for example, one template >>>> > class with >>>> > a number of methods. >>>> > I've programmed a simple example and the compilation and generation of >>>> > the >>>> > library goes fine. I use the cmake "add_library" command for >>>> > generating the >>>> > library. >>>> > >>>> > The problem arises at the moment of testing the library. I get an >>>> > undefined >>>> > reference for every method in the template class. >>>> > >>>> > I've downloaded a tool to look in the contents (functions) of dynamic >>>> > libraries, and there is no function in the library. If I add another >>>> > class >>>> > (not a template class), then, this tool shows me only the functions in >>>> > this >>>> > latter class. >>>> > >>>> > Has anyone ever come across with this problem? >>>> > >>>> > Thanks a lot in advance. >>>> > Regards >>>> > /Francisco >>>> > >>>> > _____________________________________ >>>> > Powered by www.kitware.com >>>> > >>>> > Visit other Kitware open-source projects at >>>> > http://www.kitware.com/opensource/opensource.html >>>> > >>>> > Kitware offers ITK Training Courses, for more information visit: >>>> > http://www.kitware.com/products/protraining.php >>>> > >>>> > Please keep messages on-topic and check the ITK FAQ at: >>>> > http://www.itk.org/Wiki/ITK_FAQ >>>> > >>>> > Follow this link to subscribe/unsubscribe: >>>> > http://public.kitware.com/mailman/listinfo/insight-users >>>> > >>> >>> >> > From franciscolopezdelafranca at gmail.com Thu Jan 15 01:32:43 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Thu, 15 Jan 2015 07:32:43 +0100 Subject: [ITK-users] Undefined references to methods of template classes In-Reply-To: References: Message-ID: Hi Matt, Thanks a lot for your answers. I'll try this afternoon what you suggest regarding the shape filter, but what do you think about my results as for the texture filter? Regards. /Francisco 2015-01-15 2:30 GMT+01:00 Matt McCormick : > Hi Francisco, > > Great to hear about the progress! > > The itk::BinaryImageToShapeLabelMapFilter requires a binary input, > which should have an integer pixel type, like unsigned char or > unsigned short. It is important to set the BackgroundValue and > ForegroundValue [1] to get this filter to work correctly. > > HTH, > Matt > > [1] > http://www.itk.org/Doxygen/html/classitk_1_1BinaryImageToShapeLabelMapFilter.html > > On Wed, Jan 14, 2015 at 5:05 PM, Francisco Lopez de la Franca > wrote: > > Hi again. > > I fixed all the errors and got my library, now ready to be tested. > > It contains an encapsulation, on the one hand, of the class > > itkBinaryImageToShapeLabelMapFilter in order to get image shape > descriptors > > of a 3D binary image, and on the other hand, the same for the class > > itkScalarImageToTextureFeaturesFilter to get image texture features of a > 3D > > scalar image. > > > > I pass as input image to both classes a binary 3D Nifti image > (150x150x150) > > containing a cylinder where the inside voxels are 255 and the outside > voxels > > are 0. > > > > As for the shape issue, it's very strange to me that the call to > > GetNumberOfLabelObjects on a itk::LabelMap object returns a value of 0. > The > > main code is as follows: > > > > binaryImageToShapeLabelMapFilter->SetInput(_input); > > binaryImageToShapeLabelMapFilter->ComputePerimeterOn(); > > binaryImageToShapeLabelMapFilter->Update(); > > > > LabelMapType::Pointer labelMap = > > binaryImageToShapeLabelMapFilter->GetOutput(); > > > > int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects(); > > > > > > And, as for the texture features, the result of the filter does not seem > to > > be very logic: > > > > Energy = 1 > > Entropy = 0 > > Correlation = 1 > > Local Homogeneity = 0 > > Inertia = 0 > > Cluster Shade = 0 > > Cluster Prominence = 0 > > > > I've also tested this with a scalar 3D Nifti image and the results are > the > > same. > > > > And the question is: What kind of image do I have to pass to the filters > so > > that the code would return a more logic expected answer? > > > > Thank you very much in advance. > > My best regars. > > /Francisco > > > > 2015-01-10 22:38 GMT+01:00 Matt McCormick : > >> > >> Hi Francisco, > >> > >> Nice to hear about the progress! > >> > >> You will need to link your library to the ITK libraries: > >> > >> target_link_libraries( mylibrary ${ITK_LIBRARIES} ) > >> > >> HTH, > >> Matt > >> > >> On Sat, Jan 10, 2015 at 4:16 PM, Francisco Lopez de la Franca > >> wrote: > >>> > >>> Thanks to your previous answer the problem was solved, but another one > >>> has come out. It occurs when linking to create the library. It gives an > >>> undefined reference to itk::ExceptionObject::ExceptionObject... as you > can > >>> see below. > >>> What it is strange to me is that before including explicit template > >>> instantiation, I created the library without errors, and now that I > include > >>> that, I get this error. > >>> I'll appreciate very much any help. > >>> > >>> Linking CXX shared library libTFM_Features.dll > >>> > >>> > CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t > >>> > >>> > ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC > >>> 1ERKSsjS2_S2_]+0x35): undefined reference to > >>> `itk::ExceptionObject::ExceptionObj > >>> ect(std::string const&, unsigned int, std::string const&, std::string > >>> const&)' > >>> > >>> > CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t > >>> > >>> > ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC > >>> 1ERKSsjS2_S2_]+0x40): undefined reference to `vtable for > >>> itk::MemoryAllocationEr > >>> ror' > >>> > >>> > C:/CV/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-min > >>> gw32/bin/ld.exe: > >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj): ba > >>> d reloc address 0x40 in section > >>> `.text$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_ > >>> S2_[_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_]' > >>> collect2.exe: error: ld returned 1 exit status > >>> SRC\CMakeFiles\TFM_Features.dir\build.make:219: recipe for target > >>> 'SRC/libTFM_Fe > >>> atures.dll' failed > >>> mingw32-make[2]: *** [SRC/libTFM_Features.dll] Error 1 > >>> CMakeFiles\Makefile2:77: recipe for target > >>> 'SRC/CMakeFiles/TFM_Features.dir/all' > >>> failed > >>> mingw32-make[1]: *** [SRC/CMakeFiles/TFM_Features.dir/all] Error 2 > >>> Makefile:74: recipe for target 'all' failed > >>> mingw32-make: *** [all] Error 2 > >>> > >>> > >>> 2015-01-09 21:02 GMT+01:00 Matt McCormick >: > >>>> > >>>> Hi Francisco, > >>>> > >>>> In order for the templates to be available in the library, they must > >>>> be explicitly instantiated [1]. > >>>> > >>>> HTH, > >>>> Matt > >>>> > >>>> [1] http://www.cplusplus.com/articles/1C75fSEw/ > >>>> > >>>> On Fri, Jan 9, 2015 at 2:59 PM, Francisco Lopez de la Franca > >>>> wrote: > >>>> > Hi. > >>>> > I' like to create a library containing, for example, one template > >>>> > class with > >>>> > a number of methods. > >>>> > I've programmed a simple example and the compilation and generation > of > >>>> > the > >>>> > library goes fine. I use the cmake "add_library" command for > >>>> > generating the > >>>> > library. > >>>> > > >>>> > The problem arises at the moment of testing the library. I get an > >>>> > undefined > >>>> > reference for every method in the template class. > >>>> > > >>>> > I've downloaded a tool to look in the contents (functions) of > dynamic > >>>> > libraries, and there is no function in the library. If I add another > >>>> > class > >>>> > (not a template class), then, this tool shows me only the functions > in > >>>> > this > >>>> > latter class. > >>>> > > >>>> > Has anyone ever come across with this problem? > >>>> > > >>>> > Thanks a lot in advance. > >>>> > Regards > >>>> > /Francisco > >>>> > > >>>> > _____________________________________ > >>>> > Powered by www.kitware.com > >>>> > > >>>> > Visit other Kitware open-source projects at > >>>> > http://www.kitware.com/opensource/opensource.html > >>>> > > >>>> > Kitware offers ITK Training Courses, for more information visit: > >>>> > http://www.kitware.com/products/protraining.php > >>>> > > >>>> > Please keep messages on-topic and check the ITK FAQ at: > >>>> > http://www.itk.org/Wiki/ITK_FAQ > >>>> > > >>>> > Follow this link to subscribe/unsubscribe: > >>>> > http://public.kitware.com/mailman/listinfo/insight-users > >>>> > > >>> > >>> > >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nhadar at surgicaltheater.net Thu Jan 15 02:28:41 2015 From: nhadar at surgicaltheater.net (Nissim Hadar) Date: Thu, 15 Jan 2015 00:28:41 -0700 (MST) Subject: [ITK-users] Vessel Segmentation In-Reply-To: <1421275248945-35113.post@n7.nabble.com> References: <1421275248945-35113.post@n7.nabble.com> Message-ID: <1421306921950-35117.post@n7.nabble.com> The array of shorts I supply is a block of raw DICOM data (with, or without windowing). The result is an array of similar size, containing a lot of zeros, but the non-zero values seem to be quite random. Does each short represent a filtered voxel, or do the values have a specific meaning, like they do in the Segmentation algorithms? When I view the result as an image it seems very noisy, even though there /is/ some resemblance to the blood vessels. I don't know if my understanding is wrong, my parameters are way off, or there is a bug in the method.... The images I am using are MRI scans of brain aneurysms and the like. Thanks -- View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113p35117.html Sent from the ITK - Users mailing list archive at Nabble.com. From blowekamp at mail.nih.gov Thu Jan 15 10:07:58 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 15 Jan 2015 10:07:58 -0500 Subject: [ITK-users] SimpleITK | read a 3D image from a non DICOM file and write it as a series of DICOM slices In-Reply-To: References: Message-ID: <9B24E4DF-447C-42CA-A8EC-609DABA2B630@mail.nih.gov> Hello, I have just added an ImageSeriesWriter to SimpleITK: http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ImageSeriesWriter.html The hooks for getting the meta-data dictionary in the dicom series aren't quite there yet. But its a step closer. It's actually rather confusing how the tags are handled in the example you linked too, and I'm not sure what exactly needs to be done to create a "valid" dicom series. Brad On Dec 31, 2014, at 10:46 AM, Bradley Lowekamp wrote: > Hello, > > Sorry for the slow reply. Earlier you linked to this nice example for reference: > http://www.itk.org/Doxygen/html/Examples_2IO_2ImageReadDicomSeriesWrite_8cxx-example.html > > With SimpleITK I have done the following when I needed to write a series in Python: > > for i in range(img.GetSize()[2]): > sitk.WriteImage(img[:,:,i],"test_{0:04}.tif".format(i)) > > > However it is not quite this simple for a DICOM series. The metadata tags need to be correct too. SimpleITK is not designed to be a full fledge interface to DICOM files. Other tools may be better for that. But this seems like a reasonable thing to do but it's not currently readily available in the SimpleITK interface. Perhaps after some discussion on the best way to do it it and be added. > > > There are 3 main components to this example: > > 1) MetaDataDictionary > > In SimpleITK the MetaDataDictionary interface is only part of the Image class. Currently it provides a read only interface, with the GetMetaDataKeys(), and GetMetaData(key) methods[1]. This get method only returns the type of data in the dictionary converted to a string. > > The required method would be Image::SetMetaData(key,value). The issue would be what types of value need to be supported. For this example only std::string is needed, perhaps others should be overloaded? > > 2) NumericSeriesFileNameGenerator > > This class only produces a "list" of file names. I think that many of the languages may have a more convenient way to do this. For example in Python: > > [ "test_{0:04}.png".format(i) for i in range(img.GetSize()[2]) ] > > So I don't think this is so important. > > 3) SeriesWriter > > What we just used above is different then the SeriesWriter, as special metadata is passed from the ImageSeriesWriter to the ImageIO [2]. Here is the JIRA issue for this task [3]. > > > So after these get done something like the following would do what you ask: > > import SimpleITK as sitk > > img = stik.ReadImage(argv[1]) > img.SetMetaData("008|0060", "MR") // Modality > img.SetMetaData("008|0008", "DERIVED\\SECONDARY") // Image Type > img.SetMetaData("008|0064", "DV") // Conversion Type > sitk.WriteImage(img, [ "test_{0:04}.dcm".format(i) for i in range(img.GetSize()[2]) ]) > > Does that look like what you are looking for? > > Brad > > [1] http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1Image.html#a3d6cb12a211352ee38da5405b9c75928 > [2] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx#L327-L368 > [3] https://issues.itk.org/jira/browse/SIMPLEITK-122 > > On Dec 29, 2014, at 2:48 PM, Matias Montroull wrote: > >> Hi, >> >> Is there an example for SimpleITK to read a 3D image from a non Dicom file such as mhd and then write it as a series of DICOM Slices? >> >> I can do this with C++ but I haven't been able to figure out how to do it using simpleITK. >> >> Thanks, >> >> Matias. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Jan 15 10:41:24 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 15 Jan 2015 10:41:24 -0500 Subject: [ITK-users] Undefined references to methods of template classes In-Reply-To: References: Message-ID: Hi Francisco, There is definitely something wrong with the textures features. It is not possible to know what is going on without more details, though. Matt On Thu, Jan 15, 2015 at 1:32 AM, Francisco Lopez de la Franca wrote: > Hi Matt, > Thanks a lot for your answers. I'll try this afternoon what you suggest > regarding the shape filter, but what do you think about my results as for > the texture filter? > Regards. > /Francisco > > 2015-01-15 2:30 GMT+01:00 Matt McCormick : >> >> Hi Francisco, >> >> Great to hear about the progress! >> >> The itk::BinaryImageToShapeLabelMapFilter requires a binary input, >> which should have an integer pixel type, like unsigned char or >> unsigned short. It is important to set the BackgroundValue and >> ForegroundValue [1] to get this filter to work correctly. >> >> HTH, >> Matt >> >> [1] >> http://www.itk.org/Doxygen/html/classitk_1_1BinaryImageToShapeLabelMapFilter.html >> >> On Wed, Jan 14, 2015 at 5:05 PM, Francisco Lopez de la Franca >> wrote: >> > Hi again. >> > I fixed all the errors and got my library, now ready to be tested. >> > It contains an encapsulation, on the one hand, of the class >> > itkBinaryImageToShapeLabelMapFilter in order to get image shape >> > descriptors >> > of a 3D binary image, and on the other hand, the same for the class >> > itkScalarImageToTextureFeaturesFilter to get image texture features of a >> > 3D >> > scalar image. >> > >> > I pass as input image to both classes a binary 3D Nifti image >> > (150x150x150) >> > containing a cylinder where the inside voxels are 255 and the outside >> > voxels >> > are 0. >> > >> > As for the shape issue, it's very strange to me that the call to >> > GetNumberOfLabelObjects on a itk::LabelMap object returns a value of 0. >> > The >> > main code is as follows: >> > >> > binaryImageToShapeLabelMapFilter->SetInput(_input); >> > binaryImageToShapeLabelMapFilter->ComputePerimeterOn(); >> > binaryImageToShapeLabelMapFilter->Update(); >> > >> > LabelMapType::Pointer labelMap = >> > binaryImageToShapeLabelMapFilter->GetOutput(); >> > >> > int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects(); >> > >> > >> > And, as for the texture features, the result of the filter does not seem >> > to >> > be very logic: >> > >> > Energy = 1 >> > Entropy = 0 >> > Correlation = 1 >> > Local Homogeneity = 0 >> > Inertia = 0 >> > Cluster Shade = 0 >> > Cluster Prominence = 0 >> > >> > I've also tested this with a scalar 3D Nifti image and the results are >> > the >> > same. >> > >> > And the question is: What kind of image do I have to pass to the filters >> > so >> > that the code would return a more logic expected answer? >> > >> > Thank you very much in advance. >> > My best regars. >> > /Francisco >> > >> > 2015-01-10 22:38 GMT+01:00 Matt McCormick : >> >> >> >> Hi Francisco, >> >> >> >> Nice to hear about the progress! >> >> >> >> You will need to link your library to the ITK libraries: >> >> >> >> target_link_libraries( mylibrary ${ITK_LIBRARIES} ) >> >> >> >> HTH, >> >> Matt >> >> >> >> On Sat, Jan 10, 2015 at 4:16 PM, Francisco Lopez de la Franca >> >> wrote: >> >>> >> >>> Thanks to your previous answer the problem was solved, but another one >> >>> has come out. It occurs when linking to create the library. It gives >> >>> an >> >>> undefined reference to itk::ExceptionObject::ExceptionObject... as you >> >>> can >> >>> see below. >> >>> What it is strange to me is that before including explicit template >> >>> instantiation, I created the library without errors, and now that I >> >>> include >> >>> that, I get this error. >> >>> I'll appreciate very much any help. >> >>> >> >>> Linking CXX shared library libTFM_Features.dll >> >>> >> >>> >> >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t >> >>> >> >>> >> >>> ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC >> >>> 1ERKSsjS2_S2_]+0x35): undefined reference to >> >>> `itk::ExceptionObject::ExceptionObj >> >>> ect(std::string const&, unsigned int, std::string const&, std::string >> >>> const&)' >> >>> >> >>> >> >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t >> >>> >> >>> >> >>> ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC >> >>> 1ERKSsjS2_S2_]+0x40): undefined reference to `vtable for >> >>> itk::MemoryAllocationEr >> >>> ror' >> >>> >> >>> >> >>> C:/CV/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-min >> >>> gw32/bin/ld.exe: >> >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj): ba >> >>> d reloc address 0x40 in section >> >>> `.text$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_ >> >>> S2_[_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_]' >> >>> collect2.exe: error: ld returned 1 exit status >> >>> SRC\CMakeFiles\TFM_Features.dir\build.make:219: recipe for target >> >>> 'SRC/libTFM_Fe >> >>> atures.dll' failed >> >>> mingw32-make[2]: *** [SRC/libTFM_Features.dll] Error 1 >> >>> CMakeFiles\Makefile2:77: recipe for target >> >>> 'SRC/CMakeFiles/TFM_Features.dir/all' >> >>> failed >> >>> mingw32-make[1]: *** [SRC/CMakeFiles/TFM_Features.dir/all] Error 2 >> >>> Makefile:74: recipe for target 'all' failed >> >>> mingw32-make: *** [all] Error 2 >> >>> >> >>> >> >>> 2015-01-09 21:02 GMT+01:00 Matt McCormick >> >>> : >> >>>> >> >>>> Hi Francisco, >> >>>> >> >>>> In order for the templates to be available in the library, they must >> >>>> be explicitly instantiated [1]. >> >>>> >> >>>> HTH, >> >>>> Matt >> >>>> >> >>>> [1] http://www.cplusplus.com/articles/1C75fSEw/ >> >>>> >> >>>> On Fri, Jan 9, 2015 at 2:59 PM, Francisco Lopez de la Franca >> >>>> wrote: >> >>>> > Hi. >> >>>> > I' like to create a library containing, for example, one template >> >>>> > class with >> >>>> > a number of methods. >> >>>> > I've programmed a simple example and the compilation and generation >> >>>> > of >> >>>> > the >> >>>> > library goes fine. I use the cmake "add_library" command for >> >>>> > generating the >> >>>> > library. >> >>>> > >> >>>> > The problem arises at the moment of testing the library. I get an >> >>>> > undefined >> >>>> > reference for every method in the template class. >> >>>> > >> >>>> > I've downloaded a tool to look in the contents (functions) of >> >>>> > dynamic >> >>>> > libraries, and there is no function in the library. If I add >> >>>> > another >> >>>> > class >> >>>> > (not a template class), then, this tool shows me only the functions >> >>>> > in >> >>>> > this >> >>>> > latter class. >> >>>> > >> >>>> > Has anyone ever come across with this problem? >> >>>> > >> >>>> > Thanks a lot in advance. >> >>>> > Regards >> >>>> > /Francisco >> >>>> > >> >>>> > _____________________________________ >> >>>> > Powered by www.kitware.com >> >>>> > >> >>>> > Visit other Kitware open-source projects at >> >>>> > http://www.kitware.com/opensource/opensource.html >> >>>> > >> >>>> > Kitware offers ITK Training Courses, for more information visit: >> >>>> > http://www.kitware.com/products/protraining.php >> >>>> > >> >>>> > Please keep messages on-topic and check the ITK FAQ at: >> >>>> > http://www.itk.org/Wiki/ITK_FAQ >> >>>> > >> >>>> > Follow this link to subscribe/unsubscribe: >> >>>> > http://public.kitware.com/mailman/listinfo/insight-users >> >>>> > >> >>> >> >>> >> >> >> > > > From matt.mccormick at kitware.com Thu Jan 15 10:44:41 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 15 Jan 2015 10:44:41 -0500 Subject: [ITK-users] Vessel Segmentation In-Reply-To: <1421306921950-35117.post@n7.nabble.com> References: <1421275248945-35113.post@n7.nabble.com> <1421306921950-35117.post@n7.nabble.com> Message-ID: Hi Nissim, I would suggest reading in the DICOM data with an ITK reader as an ITK Image and writing out the output in an ITK supported file format, at least until the source of the problem is determined. There are many errors that can occurs when passing around blocks of bytes. HTH, Matt On Thu, Jan 15, 2015 at 2:28 AM, Nissim Hadar wrote: > The array of shorts I supply is a block of raw DICOM data (with, or without > windowing). The result is an array of similar size, containing a lot of > zeros, but the non-zero values seem to be quite random. Does each short > represent a filtered voxel, or do the values have a specific meaning, like > they do in the Segmentation algorithms? When I view the result as an image > it seems very noisy, even though there /is/ some resemblance to the blood > vessels. > I don't know if my understanding is wrong, my parameters are way off, or > there is a bug in the method.... > The images I am using are MRI scans of brain aneurysms and the like. > > Thanks > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113p35117.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From franciscolopezdelafranca at gmail.com Thu Jan 15 12:26:30 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Thu, 15 Jan 2015 18:26:30 +0100 Subject: [ITK-users] Undefined references to methods of template classes In-Reply-To: References: Message-ID: Hi Matt again. You were fully right about setting the background/foreground values for the filter. I 2015-01-15 16:41 GMT+01:00 Matt McCormick : > Hi Francisco, > > There is definitely something wrong with the textures features. It is > not possible to know what is going on without more details, though. > > Matt > > On Thu, Jan 15, 2015 at 1:32 AM, Francisco Lopez de la Franca > wrote: > > Hi Matt, > > Thanks a lot for your answers. I'll try this afternoon what you suggest > > regarding the shape filter, but what do you think about my results as for > > the texture filter? > > Regards. > > /Francisco > > > > 2015-01-15 2:30 GMT+01:00 Matt McCormick : > >> > >> Hi Francisco, > >> > >> Great to hear about the progress! > >> > >> The itk::BinaryImageToShapeLabelMapFilter requires a binary input, > >> which should have an integer pixel type, like unsigned char or > >> unsigned short. It is important to set the BackgroundValue and > >> ForegroundValue [1] to get this filter to work correctly. > >> > >> HTH, > >> Matt > >> > >> [1] > >> > http://www.itk.org/Doxygen/html/classitk_1_1BinaryImageToShapeLabelMapFilter.html > >> > >> On Wed, Jan 14, 2015 at 5:05 PM, Francisco Lopez de la Franca > >> wrote: > >> > Hi again. > >> > I fixed all the errors and got my library, now ready to be tested. > >> > It contains an encapsulation, on the one hand, of the class > >> > itkBinaryImageToShapeLabelMapFilter in order to get image shape > >> > descriptors > >> > of a 3D binary image, and on the other hand, the same for the class > >> > itkScalarImageToTextureFeaturesFilter to get image texture features > of a > >> > 3D > >> > scalar image. > >> > > >> > I pass as input image to both classes a binary 3D Nifti image > >> > (150x150x150) > >> > containing a cylinder where the inside voxels are 255 and the outside > >> > voxels > >> > are 0. > >> > > >> > As for the shape issue, it's very strange to me that the call to > >> > GetNumberOfLabelObjects on a itk::LabelMap object returns a value of > 0. > >> > The > >> > main code is as follows: > >> > > >> > binaryImageToShapeLabelMapFilter->SetInput(_input); > >> > binaryImageToShapeLabelMapFilter->ComputePerimeterOn(); > >> > binaryImageToShapeLabelMapFilter->Update(); > >> > > >> > LabelMapType::Pointer labelMap = > >> > binaryImageToShapeLabelMapFilter->GetOutput(); > >> > > >> > int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects(); > >> > > >> > > >> > And, as for the texture features, the result of the filter does not > seem > >> > to > >> > be very logic: > >> > > >> > Energy = 1 > >> > Entropy = 0 > >> > Correlation = 1 > >> > Local Homogeneity = 0 > >> > Inertia = 0 > >> > Cluster Shade = 0 > >> > Cluster Prominence = 0 > >> > > >> > I've also tested this with a scalar 3D Nifti image and the results are > >> > the > >> > same. > >> > > >> > And the question is: What kind of image do I have to pass to the > filters > >> > so > >> > that the code would return a more logic expected answer? > >> > > >> > Thank you very much in advance. > >> > My best regars. > >> > /Francisco > >> > > >> > 2015-01-10 22:38 GMT+01:00 Matt McCormick >: > >> >> > >> >> Hi Francisco, > >> >> > >> >> Nice to hear about the progress! > >> >> > >> >> You will need to link your library to the ITK libraries: > >> >> > >> >> target_link_libraries( mylibrary ${ITK_LIBRARIES} ) > >> >> > >> >> HTH, > >> >> Matt > >> >> > >> >> On Sat, Jan 10, 2015 at 4:16 PM, Francisco Lopez de la Franca > >> >> wrote: > >> >>> > >> >>> Thanks to your previous answer the problem was solved, but another > one > >> >>> has come out. It occurs when linking to create the library. It gives > >> >>> an > >> >>> undefined reference to itk::ExceptionObject::ExceptionObject... as > you > >> >>> can > >> >>> see below. > >> >>> What it is strange to me is that before including explicit template > >> >>> instantiation, I created the library without errors, and now that I > >> >>> include > >> >>> that, I get this error. > >> >>> I'll appreciate very much any help. > >> >>> > >> >>> Linking CXX shared library libTFM_Features.dll > >> >>> > >> >>> > >> >>> > CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t > >> >>> > >> >>> > >> >>> > ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC > >> >>> 1ERKSsjS2_S2_]+0x35): undefined reference to > >> >>> `itk::ExceptionObject::ExceptionObj > >> >>> ect(std::string const&, unsigned int, std::string const&, > std::string > >> >>> const&)' > >> >>> > >> >>> > >> >>> > CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t > >> >>> > >> >>> > >> >>> > ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC > >> >>> 1ERKSsjS2_S2_]+0x40): undefined reference to `vtable for > >> >>> itk::MemoryAllocationEr > >> >>> ror' > >> >>> > >> >>> > >> >>> > C:/CV/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-min > >> >>> gw32/bin/ld.exe: > >> >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj): ba > >> >>> d reloc address 0x40 in section > >> >>> `.text$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_ > >> >>> S2_[_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_]' > >> >>> collect2.exe: error: ld returned 1 exit status > >> >>> SRC\CMakeFiles\TFM_Features.dir\build.make:219: recipe for target > >> >>> 'SRC/libTFM_Fe > >> >>> atures.dll' failed > >> >>> mingw32-make[2]: *** [SRC/libTFM_Features.dll] Error 1 > >> >>> CMakeFiles\Makefile2:77: recipe for target > >> >>> 'SRC/CMakeFiles/TFM_Features.dir/all' > >> >>> failed > >> >>> mingw32-make[1]: *** [SRC/CMakeFiles/TFM_Features.dir/all] Error 2 > >> >>> Makefile:74: recipe for target 'all' failed > >> >>> mingw32-make: *** [all] Error 2 > >> >>> > >> >>> > >> >>> 2015-01-09 21:02 GMT+01:00 Matt McCormick > >> >>> : > >> >>>> > >> >>>> Hi Francisco, > >> >>>> > >> >>>> In order for the templates to be available in the library, they > must > >> >>>> be explicitly instantiated [1]. > >> >>>> > >> >>>> HTH, > >> >>>> Matt > >> >>>> > >> >>>> [1] http://www.cplusplus.com/articles/1C75fSEw/ > >> >>>> > >> >>>> On Fri, Jan 9, 2015 at 2:59 PM, Francisco Lopez de la Franca > >> >>>> wrote: > >> >>>> > Hi. > >> >>>> > I' like to create a library containing, for example, one template > >> >>>> > class with > >> >>>> > a number of methods. > >> >>>> > I've programmed a simple example and the compilation and > generation > >> >>>> > of > >> >>>> > the > >> >>>> > library goes fine. I use the cmake "add_library" command for > >> >>>> > generating the > >> >>>> > library. > >> >>>> > > >> >>>> > The problem arises at the moment of testing the library. I get an > >> >>>> > undefined > >> >>>> > reference for every method in the template class. > >> >>>> > > >> >>>> > I've downloaded a tool to look in the contents (functions) of > >> >>>> > dynamic > >> >>>> > libraries, and there is no function in the library. If I add > >> >>>> > another > >> >>>> > class > >> >>>> > (not a template class), then, this tool shows me only the > functions > >> >>>> > in > >> >>>> > this > >> >>>> > latter class. > >> >>>> > > >> >>>> > Has anyone ever come across with this problem? > >> >>>> > > >> >>>> > Thanks a lot in advance. > >> >>>> > Regards > >> >>>> > /Francisco > >> >>>> > > >> >>>> > _____________________________________ > >> >>>> > Powered by www.kitware.com > >> >>>> > > >> >>>> > Visit other Kitware open-source projects at > >> >>>> > http://www.kitware.com/opensource/opensource.html > >> >>>> > > >> >>>> > Kitware offers ITK Training Courses, for more information visit: > >> >>>> > http://www.kitware.com/products/protraining.php > >> >>>> > > >> >>>> > Please keep messages on-topic and check the ITK FAQ at: > >> >>>> > http://www.itk.org/Wiki/ITK_FAQ > >> >>>> > > >> >>>> > Follow this link to subscribe/unsubscribe: > >> >>>> > http://public.kitware.com/mailman/listinfo/insight-users > >> >>>> > > >> >>> > >> >>> > >> >> > >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Thu Jan 15 12:34:22 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Thu, 15 Jan 2015 18:34:22 +0100 Subject: [ITK-users] Undefined references to methods of template classes In-Reply-To: References: Message-ID: Sorry, I might press the wrong key. Hi Matt again. You were fully right about setting the background/foreground values for the filter. I wasn't using them because I followed the examples and there was no reference to them. Now my shape related functions are working. As for the textures, I attach my code so that anyone can see if i am doing something wrong: typedef itk::Statistics::ScalarImageToTextureFeaturesFilter TextureFilterType; typedef typename TextureFilterType::Pointer TextureFilterPtr; typedef typename TextureFilterType::FeatureValueVector FeatureValueVectorType; TextureFilterPtr textureFilter = TextureFilterType::New(); textureFilter->SetInput(_input); textureFilter->Update(); FeatureValueVectorType* output = textureFilter->GetFeatureMeans(); cout << "Energy = " << (*output)[0]) << endl; cout << "Entropy " << (*output)[1]); cout << "LocalHomogeneity = " << (*output)[3]) << endl; cout << "Inertia = " << (*output)[4]) << endl; cout << "ClusterShade " << (*output)[5]) << endl; cout << "ClusterProminence = " << (*output)[6]) << endl; Sincereously, I thank you a lot your help. Regards. /Francisco 2015-01-15 18:26 GMT+01:00 Francisco Lopez de la Franca < franciscolopezdelafranca at gmail.com>: > Hi Matt again. > You were fully right about setting the background/foreground values for > the filter. I > > 2015-01-15 16:41 GMT+01:00 Matt McCormick : > >> Hi Francisco, >> >> There is definitely something wrong with the textures features. It is >> not possible to know what is going on without more details, though. >> >> Matt >> >> On Thu, Jan 15, 2015 at 1:32 AM, Francisco Lopez de la Franca >> wrote: >> > Hi Matt, >> > Thanks a lot for your answers. I'll try this afternoon what you suggest >> > regarding the shape filter, but what do you think about my results as >> for >> > the texture filter? >> > Regards. >> > /Francisco >> > >> > 2015-01-15 2:30 GMT+01:00 Matt McCormick : >> >> >> >> Hi Francisco, >> >> >> >> Great to hear about the progress! >> >> >> >> The itk::BinaryImageToShapeLabelMapFilter requires a binary input, >> >> which should have an integer pixel type, like unsigned char or >> >> unsigned short. It is important to set the BackgroundValue and >> >> ForegroundValue [1] to get this filter to work correctly. >> >> >> >> HTH, >> >> Matt >> >> >> >> [1] >> >> >> http://www.itk.org/Doxygen/html/classitk_1_1BinaryImageToShapeLabelMapFilter.html >> >> >> >> On Wed, Jan 14, 2015 at 5:05 PM, Francisco Lopez de la Franca >> >> wrote: >> >> > Hi again. >> >> > I fixed all the errors and got my library, now ready to be tested. >> >> > It contains an encapsulation, on the one hand, of the class >> >> > itkBinaryImageToShapeLabelMapFilter in order to get image shape >> >> > descriptors >> >> > of a 3D binary image, and on the other hand, the same for the class >> >> > itkScalarImageToTextureFeaturesFilter to get image texture features >> of a >> >> > 3D >> >> > scalar image. >> >> > >> >> > I pass as input image to both classes a binary 3D Nifti image >> >> > (150x150x150) >> >> > containing a cylinder where the inside voxels are 255 and the outside >> >> > voxels >> >> > are 0. >> >> > >> >> > As for the shape issue, it's very strange to me that the call to >> >> > GetNumberOfLabelObjects on a itk::LabelMap object returns a value of >> 0. >> >> > The >> >> > main code is as follows: >> >> > >> >> > binaryImageToShapeLabelMapFilter->SetInput(_input); >> >> > binaryImageToShapeLabelMapFilter->ComputePerimeterOn(); >> >> > binaryImageToShapeLabelMapFilter->Update(); >> >> > >> >> > LabelMapType::Pointer labelMap = >> >> > binaryImageToShapeLabelMapFilter->GetOutput(); >> >> > >> >> > int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects(); >> >> > >> >> > >> >> > And, as for the texture features, the result of the filter does not >> seem >> >> > to >> >> > be very logic: >> >> > >> >> > Energy = 1 >> >> > Entropy = 0 >> >> > Correlation = 1 >> >> > Local Homogeneity = 0 >> >> > Inertia = 0 >> >> > Cluster Shade = 0 >> >> > Cluster Prominence = 0 >> >> > >> >> > I've also tested this with a scalar 3D Nifti image and the results >> are >> >> > the >> >> > same. >> >> > >> >> > And the question is: What kind of image do I have to pass to the >> filters >> >> > so >> >> > that the code would return a more logic expected answer? >> >> > >> >> > Thank you very much in advance. >> >> > My best regars. >> >> > /Francisco >> >> > >> >> > 2015-01-10 22:38 GMT+01:00 Matt McCormick < >> matt.mccormick at kitware.com>: >> >> >> >> >> >> Hi Francisco, >> >> >> >> >> >> Nice to hear about the progress! >> >> >> >> >> >> You will need to link your library to the ITK libraries: >> >> >> >> >> >> target_link_libraries( mylibrary ${ITK_LIBRARIES} ) >> >> >> >> >> >> HTH, >> >> >> Matt >> >> >> >> >> >> On Sat, Jan 10, 2015 at 4:16 PM, Francisco Lopez de la Franca >> >> >> wrote: >> >> >>> >> >> >>> Thanks to your previous answer the problem was solved, but another >> one >> >> >>> has come out. It occurs when linking to create the library. It >> gives >> >> >>> an >> >> >>> undefined reference to itk::ExceptionObject::ExceptionObject... as >> you >> >> >>> can >> >> >>> see below. >> >> >>> What it is strange to me is that before including explicit template >> >> >>> instantiation, I created the library without errors, and now that I >> >> >>> include >> >> >>> that, I get this error. >> >> >>> I'll appreciate very much any help. >> >> >>> >> >> >>> Linking CXX shared library libTFM_Features.dll >> >> >>> >> >> >>> >> >> >>> >> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t >> >> >>> >> >> >>> >> >> >>> >> ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC >> >> >>> 1ERKSsjS2_S2_]+0x35): undefined reference to >> >> >>> `itk::ExceptionObject::ExceptionObj >> >> >>> ect(std::string const&, unsigned int, std::string const&, >> std::string >> >> >>> const&)' >> >> >>> >> >> >>> >> >> >>> >> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t >> >> >>> >> >> >>> >> >> >>> >> ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC >> >> >>> 1ERKSsjS2_S2_]+0x40): undefined reference to `vtable for >> >> >>> itk::MemoryAllocationEr >> >> >>> ror' >> >> >>> >> >> >>> >> >> >>> >> C:/CV/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-min >> >> >>> gw32/bin/ld.exe: >> >> >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj): ba >> >> >>> d reloc address 0x40 in section >> >> >>> `.text$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_ >> >> >>> S2_[_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_]' >> >> >>> collect2.exe: error: ld returned 1 exit status >> >> >>> SRC\CMakeFiles\TFM_Features.dir\build.make:219: recipe for target >> >> >>> 'SRC/libTFM_Fe >> >> >>> atures.dll' failed >> >> >>> mingw32-make[2]: *** [SRC/libTFM_Features.dll] Error 1 >> >> >>> CMakeFiles\Makefile2:77: recipe for target >> >> >>> 'SRC/CMakeFiles/TFM_Features.dir/all' >> >> >>> failed >> >> >>> mingw32-make[1]: *** [SRC/CMakeFiles/TFM_Features.dir/all] Error 2 >> >> >>> Makefile:74: recipe for target 'all' failed >> >> >>> mingw32-make: *** [all] Error 2 >> >> >>> >> >> >>> >> >> >>> 2015-01-09 21:02 GMT+01:00 Matt McCormick >> >> >>> : >> >> >>>> >> >> >>>> Hi Francisco, >> >> >>>> >> >> >>>> In order for the templates to be available in the library, they >> must >> >> >>>> be explicitly instantiated [1]. >> >> >>>> >> >> >>>> HTH, >> >> >>>> Matt >> >> >>>> >> >> >>>> [1] http://www.cplusplus.com/articles/1C75fSEw/ >> >> >>>> >> >> >>>> On Fri, Jan 9, 2015 at 2:59 PM, Francisco Lopez de la Franca >> >> >>>> wrote: >> >> >>>> > Hi. >> >> >>>> > I' like to create a library containing, for example, one >> template >> >> >>>> > class with >> >> >>>> > a number of methods. >> >> >>>> > I've programmed a simple example and the compilation and >> generation >> >> >>>> > of >> >> >>>> > the >> >> >>>> > library goes fine. I use the cmake "add_library" command for >> >> >>>> > generating the >> >> >>>> > library. >> >> >>>> > >> >> >>>> > The problem arises at the moment of testing the library. I get >> an >> >> >>>> > undefined >> >> >>>> > reference for every method in the template class. >> >> >>>> > >> >> >>>> > I've downloaded a tool to look in the contents (functions) of >> >> >>>> > dynamic >> >> >>>> > libraries, and there is no function in the library. If I add >> >> >>>> > another >> >> >>>> > class >> >> >>>> > (not a template class), then, this tool shows me only the >> functions >> >> >>>> > in >> >> >>>> > this >> >> >>>> > latter class. >> >> >>>> > >> >> >>>> > Has anyone ever come across with this problem? >> >> >>>> > >> >> >>>> > Thanks a lot in advance. >> >> >>>> > Regards >> >> >>>> > /Francisco >> >> >>>> > >> >> >>>> > _____________________________________ >> >> >>>> > Powered by www.kitware.com >> >> >>>> > >> >> >>>> > Visit other Kitware open-source projects at >> >> >>>> > http://www.kitware.com/opensource/opensource.html >> >> >>>> > >> >> >>>> > Kitware offers ITK Training Courses, for more information visit: >> >> >>>> > http://www.kitware.com/products/protraining.php >> >> >>>> > >> >> >>>> > Please keep messages on-topic and check the ITK FAQ at: >> >> >>>> > http://www.itk.org/Wiki/ITK_FAQ >> >> >>>> > >> >> >>>> > Follow this link to subscribe/unsubscribe: >> >> >>>> > http://public.kitware.com/mailman/listinfo/insight-users >> >> >>>> > >> >> >>> >> >> >>> >> >> >> >> >> > >> > >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Jan 15 13:01:49 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 15 Jan 2015 13:01:49 -0500 Subject: [ITK-users] SimpleITK | read a 3D image from a non DICOM file and write it as a series of DICOM slices In-Reply-To: <9B24E4DF-447C-42CA-A8EC-609DABA2B630@mail.nih.gov> References: <9B24E4DF-447C-42CA-A8EC-609DABA2B630@mail.nih.gov> Message-ID: Hi, Generating a valid DICOM series can be a pretty complex task. New UID's need to be generated, for example. Some more information can be found here [1]. HTH, Matt [1] http://gdcm.sourceforge.net/wiki/index.php/Writing_DICOM On Thu, Jan 15, 2015 at 10:07 AM, Bradley Lowekamp wrote: > Hello, > > I have just added an ImageSeriesWriter to SimpleITK: > > http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ImageSeriesWriter.html > > The hooks for getting the meta-data dictionary in the dicom series aren't > quite there yet. But its a step closer. It's actually rather confusing how > the tags are handled in the example you linked too, and I'm not sure what > exactly needs to be done to create a "valid" dicom series. > > Brad > > On Dec 31, 2014, at 10:46 AM, Bradley Lowekamp > wrote: > > Hello, > > Sorry for the slow reply. Earlier you linked to this nice example for > reference: > http://www.itk.org/Doxygen/html/Examples_2IO_2ImageReadDicomSeriesWrite_8cxx-example.html > > With SimpleITK I have done the following when I needed to write a series in > Python: > > for i in range(img.GetSize()[2]): > sitk.WriteImage(img[:,:,i],"test_{0:04}.tif".format(i)) > > > However it is not quite this simple for a DICOM series. The metadata tags > need to be correct too. SimpleITK is not designed to be a full fledge > interface to DICOM files. Other tools may be better for that. But this seems > like a reasonable thing to do but it's not currently readily available in > the SimpleITK interface. Perhaps after some discussion on the best way to do > it it and be added. > > > There are 3 main components to this example: > > 1) MetaDataDictionary > > In SimpleITK the MetaDataDictionary interface is only part of the Image > class. Currently it provides a read only interface, with the > GetMetaDataKeys(), and GetMetaData(key) methods[1]. This get method only > returns the type of data in the dictionary converted to a string. > > The required method would be Image::SetMetaData(key,value). The issue would > be what types of value need to be supported. For this example only > std::string is needed, perhaps others should be overloaded? > > 2) NumericSeriesFileNameGenerator > > This class only produces a "list" of file names. I think that many of the > languages may have a more convenient way to do this. For example in Python: > > [ "test_{0:04}.png".format(i) for i in range(img.GetSize()[2]) ] > > So I don't think this is so important. > > 3) SeriesWriter > > What we just used above is different then the SeriesWriter, as special > metadata is passed from the ImageSeriesWriter to the ImageIO [2]. Here is > the JIRA issue for this task [3]. > > > So after these get done something like the following would do what you ask: > > import SimpleITK as sitk > > img = stik.ReadImage(argv[1]) > img.SetMetaData("008|0060", "MR") // Modality > img.SetMetaData("008|0008", "DERIVED\\SECONDARY") // Image Type > img.SetMetaData("008|0064", "DV") // Conversion Type > sitk.WriteImage(img, [ "test_{0:04}.dcm".format(i) for i in > range(img.GetSize()[2]) ]) > > Does that look like what you are looking for? > > Brad > > [1] > http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1Image.html#a3d6cb12a211352ee38da5405b9c75928 > [2] > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx#L327-L368 > [3] https://issues.itk.org/jira/browse/SIMPLEITK-122 > > On Dec 29, 2014, at 2:48 PM, Matias Montroull wrote: > > Hi, > > Is there an example for SimpleITK to read a 3D image from a non Dicom file > such as mhd and then write it as a series of DICOM Slices? > > I can do this with C++ but I haven't been able to figure out how to do it > using simpleITK. > > Thanks, > > Matias. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Thu Jan 15 14:08:02 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 15 Jan 2015 14:08:02 -0500 Subject: [ITK-users] Undefined references to methods of template classes In-Reply-To: References: Message-ID: Hi Francisco, Good to hear the BinaryImageToShapeLabelMapFilter is working. This is probably not the source of your issues, but this line FeatureValueVectorType* output = textureFilter->GetFeatureMeans(); should be FeatureValueVectorType::Pointer output = textureFilter->GetFeatureMeans(); since itk::SmartPointer's [1] are different from raw pointers. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1SmartPointer.html On Thu, Jan 15, 2015 at 12:34 PM, Francisco Lopez de la Franca wrote: > Sorry, I might press the wrong key. > Hi Matt again. > You were fully right about setting the background/foreground values for the > filter. I wasn't using them because I followed the examples and there was no > reference to them. Now my shape related functions are working. > > As for the textures, I attach my code so that anyone can see if i am doing > something wrong: > > typedef itk::Statistics::ScalarImageToTextureFeaturesFilter > TextureFilterType; > typedef typename TextureFilterType::Pointer TextureFilterPtr; > typedef typename TextureFilterType::FeatureValueVector > FeatureValueVectorType; > > TextureFilterPtr textureFilter = TextureFilterType::New(); > textureFilter->SetInput(_input); > textureFilter->Update(); > > FeatureValueVectorType* output = textureFilter->GetFeatureMeans(); > > cout << "Energy = " << (*output)[0]) << endl; > cout << "Entropy " << (*output)[1]); > cout << "LocalHomogeneity = " << (*output)[3]) << endl; > cout << "Inertia = " << (*output)[4]) << endl; > cout << "ClusterShade " << (*output)[5]) << endl; > cout << "ClusterProminence = " << (*output)[6]) << endl; > > Sincereously, I thank you a lot your help. > Regards. > /Francisco > > > > 2015-01-15 18:26 GMT+01:00 Francisco Lopez de la Franca > : >> >> Hi Matt again. >> You were fully right about setting the background/foreground values for >> the filter. I >> >> 2015-01-15 16:41 GMT+01:00 Matt McCormick : >>> >>> Hi Francisco, >>> >>> There is definitely something wrong with the textures features. It is >>> not possible to know what is going on without more details, though. >>> >>> Matt >>> >>> On Thu, Jan 15, 2015 at 1:32 AM, Francisco Lopez de la Franca >>> wrote: >>> > Hi Matt, >>> > Thanks a lot for your answers. I'll try this afternoon what you suggest >>> > regarding the shape filter, but what do you think about my results as >>> > for >>> > the texture filter? >>> > Regards. >>> > /Francisco >>> > >>> > 2015-01-15 2:30 GMT+01:00 Matt McCormick : >>> >> >>> >> Hi Francisco, >>> >> >>> >> Great to hear about the progress! >>> >> >>> >> The itk::BinaryImageToShapeLabelMapFilter requires a binary input, >>> >> which should have an integer pixel type, like unsigned char or >>> >> unsigned short. It is important to set the BackgroundValue and >>> >> ForegroundValue [1] to get this filter to work correctly. >>> >> >>> >> HTH, >>> >> Matt >>> >> >>> >> [1] >>> >> >>> >> http://www.itk.org/Doxygen/html/classitk_1_1BinaryImageToShapeLabelMapFilter.html >>> >> >>> >> On Wed, Jan 14, 2015 at 5:05 PM, Francisco Lopez de la Franca >>> >> wrote: >>> >> > Hi again. >>> >> > I fixed all the errors and got my library, now ready to be tested. >>> >> > It contains an encapsulation, on the one hand, of the class >>> >> > itkBinaryImageToShapeLabelMapFilter in order to get image shape >>> >> > descriptors >>> >> > of a 3D binary image, and on the other hand, the same for the class >>> >> > itkScalarImageToTextureFeaturesFilter to get image texture features >>> >> > of a >>> >> > 3D >>> >> > scalar image. >>> >> > >>> >> > I pass as input image to both classes a binary 3D Nifti image >>> >> > (150x150x150) >>> >> > containing a cylinder where the inside voxels are 255 and the >>> >> > outside >>> >> > voxels >>> >> > are 0. >>> >> > >>> >> > As for the shape issue, it's very strange to me that the call to >>> >> > GetNumberOfLabelObjects on a itk::LabelMap object returns a value of >>> >> > 0. >>> >> > The >>> >> > main code is as follows: >>> >> > >>> >> > binaryImageToShapeLabelMapFilter->SetInput(_input); >>> >> > binaryImageToShapeLabelMapFilter->ComputePerimeterOn(); >>> >> > binaryImageToShapeLabelMapFilter->Update(); >>> >> > >>> >> > LabelMapType::Pointer labelMap = >>> >> > binaryImageToShapeLabelMapFilter->GetOutput(); >>> >> > >>> >> > int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects(); >>> >> > >>> >> > >>> >> > And, as for the texture features, the result of the filter does not >>> >> > seem >>> >> > to >>> >> > be very logic: >>> >> > >>> >> > Energy = 1 >>> >> > Entropy = 0 >>> >> > Correlation = 1 >>> >> > Local Homogeneity = 0 >>> >> > Inertia = 0 >>> >> > Cluster Shade = 0 >>> >> > Cluster Prominence = 0 >>> >> > >>> >> > I've also tested this with a scalar 3D Nifti image and the results >>> >> > are >>> >> > the >>> >> > same. >>> >> > >>> >> > And the question is: What kind of image do I have to pass to the >>> >> > filters >>> >> > so >>> >> > that the code would return a more logic expected answer? >>> >> > >>> >> > Thank you very much in advance. >>> >> > My best regars. >>> >> > /Francisco >>> >> > >>> >> > 2015-01-10 22:38 GMT+01:00 Matt McCormick >>> >> > : >>> >> >> >>> >> >> Hi Francisco, >>> >> >> >>> >> >> Nice to hear about the progress! >>> >> >> >>> >> >> You will need to link your library to the ITK libraries: >>> >> >> >>> >> >> target_link_libraries( mylibrary ${ITK_LIBRARIES} ) >>> >> >> >>> >> >> HTH, >>> >> >> Matt >>> >> >> >>> >> >> On Sat, Jan 10, 2015 at 4:16 PM, Francisco Lopez de la Franca >>> >> >> wrote: >>> >> >>> >>> >> >>> Thanks to your previous answer the problem was solved, but another >>> >> >>> one >>> >> >>> has come out. It occurs when linking to create the library. It >>> >> >>> gives >>> >> >>> an >>> >> >>> undefined reference to itk::ExceptionObject::ExceptionObject... as >>> >> >>> you >>> >> >>> can >>> >> >>> see below. >>> >> >>> What it is strange to me is that before including explicit >>> >> >>> template >>> >> >>> instantiation, I created the library without errors, and now that >>> >> >>> I >>> >> >>> include >>> >> >>> that, I get this error. >>> >> >>> I'll appreciate very much any help. >>> >> >>> >>> >> >>> Linking CXX shared library libTFM_Features.dll >>> >> >>> >>> >> >>> >>> >> >>> >>> >> >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t >>> >> >>> >>> >> >>> >>> >> >>> >>> >> >>> ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC >>> >> >>> 1ERKSsjS2_S2_]+0x35): undefined reference to >>> >> >>> `itk::ExceptionObject::ExceptionObj >>> >> >>> ect(std::string const&, unsigned int, std::string const&, >>> >> >>> std::string >>> >> >>> const&)' >>> >> >>> >>> >> >>> >>> >> >>> >>> >> >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t >>> >> >>> >>> >> >>> >>> >> >>> >>> >> >>> ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC >>> >> >>> 1ERKSsjS2_S2_]+0x40): undefined reference to `vtable for >>> >> >>> itk::MemoryAllocationEr >>> >> >>> ror' >>> >> >>> >>> >> >>> >>> >> >>> >>> >> >>> C:/CV/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-min >>> >> >>> gw32/bin/ld.exe: >>> >> >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj): ba >>> >> >>> d reloc address 0x40 in section >>> >> >>> `.text$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_ >>> >> >>> S2_[_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_]' >>> >> >>> collect2.exe: error: ld returned 1 exit status >>> >> >>> SRC\CMakeFiles\TFM_Features.dir\build.make:219: recipe for target >>> >> >>> 'SRC/libTFM_Fe >>> >> >>> atures.dll' failed >>> >> >>> mingw32-make[2]: *** [SRC/libTFM_Features.dll] Error 1 >>> >> >>> CMakeFiles\Makefile2:77: recipe for target >>> >> >>> 'SRC/CMakeFiles/TFM_Features.dir/all' >>> >> >>> failed >>> >> >>> mingw32-make[1]: *** [SRC/CMakeFiles/TFM_Features.dir/all] Error 2 >>> >> >>> Makefile:74: recipe for target 'all' failed >>> >> >>> mingw32-make: *** [all] Error 2 >>> >> >>> >>> >> >>> >>> >> >>> 2015-01-09 21:02 GMT+01:00 Matt McCormick >>> >> >>> : >>> >> >>>> >>> >> >>>> Hi Francisco, >>> >> >>>> >>> >> >>>> In order for the templates to be available in the library, they >>> >> >>>> must >>> >> >>>> be explicitly instantiated [1]. >>> >> >>>> >>> >> >>>> HTH, >>> >> >>>> Matt >>> >> >>>> >>> >> >>>> [1] http://www.cplusplus.com/articles/1C75fSEw/ >>> >> >>>> >>> >> >>>> On Fri, Jan 9, 2015 at 2:59 PM, Francisco Lopez de la Franca >>> >> >>>> wrote: >>> >> >>>> > Hi. >>> >> >>>> > I' like to create a library containing, for example, one >>> >> >>>> > template >>> >> >>>> > class with >>> >> >>>> > a number of methods. >>> >> >>>> > I've programmed a simple example and the compilation and >>> >> >>>> > generation >>> >> >>>> > of >>> >> >>>> > the >>> >> >>>> > library goes fine. I use the cmake "add_library" command for >>> >> >>>> > generating the >>> >> >>>> > library. >>> >> >>>> > >>> >> >>>> > The problem arises at the moment of testing the library. I get >>> >> >>>> > an >>> >> >>>> > undefined >>> >> >>>> > reference for every method in the template class. >>> >> >>>> > >>> >> >>>> > I've downloaded a tool to look in the contents (functions) of >>> >> >>>> > dynamic >>> >> >>>> > libraries, and there is no function in the library. If I add >>> >> >>>> > another >>> >> >>>> > class >>> >> >>>> > (not a template class), then, this tool shows me only the >>> >> >>>> > functions >>> >> >>>> > in >>> >> >>>> > this >>> >> >>>> > latter class. >>> >> >>>> > >>> >> >>>> > Has anyone ever come across with this problem? >>> >> >>>> > >>> >> >>>> > Thanks a lot in advance. >>> >> >>>> > Regards >>> >> >>>> > /Francisco >>> >> >>>> > >>> >> >>>> > _____________________________________ >>> >> >>>> > Powered by www.kitware.com >>> >> >>>> > >>> >> >>>> > Visit other Kitware open-source projects at >>> >> >>>> > http://www.kitware.com/opensource/opensource.html >>> >> >>>> > >>> >> >>>> > Kitware offers ITK Training Courses, for more information >>> >> >>>> > visit: >>> >> >>>> > http://www.kitware.com/products/protraining.php >>> >> >>>> > >>> >> >>>> > Please keep messages on-topic and check the ITK FAQ at: >>> >> >>>> > http://www.itk.org/Wiki/ITK_FAQ >>> >> >>>> > >>> >> >>>> > Follow this link to subscribe/unsubscribe: >>> >> >>>> > http://public.kitware.com/mailman/listinfo/insight-users >>> >> >>>> > >>> >> >>> >>> >> >>> >>> >> >> >>> >> > >>> > >>> > >> >> > From jmerkow at gmail.com Thu Jan 15 17:09:20 2015 From: jmerkow at gmail.com (jmerkow) Date: Thu, 15 Jan 2015 15:09:20 -0700 (MST) Subject: [ITK-users] Setting constants in ternary functor filters Message-ID: <1421359760646-35125.post@n7.nabble.com> Hello, I am writing a ternary functor filter and I want to allow constants to be set for inputs 2 and 3 (1 and 2 in SetNthInput). I believe I followed the example in BinaryFunctor but when I set them I get NULL pointers for the inputs: "At least one input is missing. Input1 is 0xb212190, Input2 is 0, Input3 is 0" My filter looks something like this (I trimmed it down to just the relevant parts): ... class MyTernaryFunctorImageFilter: public itk::TernaryFunctorImageFilter< TInputImage1, TInputImage2, TInputImage3, TOutputImage, MyTernaryFunctor< typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TInputImage3::PixelType, typename TOutputImage::PixelType > > { ... //Common Typedefs are here ... typedef TInputImage2 Input2ImageType; typedef typename Input2ImageType::ConstPointer Input2ImagePointer; typedef typename Input2ImageType::RegionType Input2ImageRegionType; typedef typename Input2ImageType::PixelType Input2ImagePixelType; typedef itk::SimpleDataObjectDecorator DecoratedInput2ImagePixelType; typedef TInputImage3 Input3ImageType; typedef typename Input3ImageType::ConstPointer Input3ImagePointer; typedef typename Input3ImageType::RegionType Input3ImageRegionType; typedef typename Input3ImageType::PixelType Input3ImagePixelType; typedef itk::SimpleDataObjectDecorator DecoratedInput3ImagePixelType; virtual void SetConstant2(const Input2ImagePixelType &input); virtual void SetConstant2(const DecoratedInput2ImagePixelType *input); /** Set the Third operand as a constant */ virtual void SetConstant3(const Input3ImagePixelType &input); virtual void SetConstant3(const DecoratedInput3ImagePixelType *input); }; template<...> void MyTernaryFunctorImageFilter< TInputImage1, TInputImage2, TInputImage3, TOutputImage> ::SetConstant2(const Input2ImagePixelType &input) { itkDebugMacro("setting SetConstant2 to " << input); typename DecoratedInput2ImagePixelType::Pointer newInput = DecoratedInput2ImagePixelType::New(); newInput->Set(input); this->SetConstant2(newInput); } template<...> void MyTernaryFunctorImageFilter< TInputImage1, TInputImage2, TInputImage3, TOutputImage> ::SetConstant2(const DecoratedInput2ImagePixelType *input) { this->SetNthInput( 1,const_cast(input)); } template<...> void MyTernaryFunctorImageFilter< TInputImage1, TInputImage2, TInputImage3, TOutputImage> ::SetConstant3(const Input3ImagePixelType &input) { itkDebugMacro("setting SetConstant3 to " << input); typename DecoratedInput3ImagePixelType::Pointer newInput = DecoratedInput3ImagePixelType::New(); newInput->Set(input); this->SetConstant3(newInput); } template<...> void MyTernaryFunctorImageFilter< TInputImage1, TInputImage2, TInputImage3, TOutputImage> ::SetConstant3(const DecoratedInput3ImagePixelType *input) { this->SetNthInput( 2,const_cast(input)); } I pass this function an image for input1, then floats for other two inputs. Am I missing an ingredient here? -Jameson -- View this message in context: http://itk-users.7.n7.nabble.com/Setting-constants-in-ternary-functor-filters-tp35125.html Sent from the ITK - Users mailing list archive at Nabble.com. From jmerkow at gmail.com Thu Jan 15 17:15:51 2015 From: jmerkow at gmail.com (jmerkow) Date: Thu, 15 Jan 2015 15:15:51 -0700 (MST) Subject: [ITK-users] Create java VM failure SimpleITK, Python, Windows In-Reply-To: <1419773770742-35075.post@n7.nabble.com> References: <1379456385734-32371.post@n7.nabble.com> <1379463383239-32376.post@n7.nabble.com> <1403721309106-34160.post@n7.nabble.com> <1419771563210-35074.post@n7.nabble.com> <1419773770742-35075.post@n7.nabble.com> Message-ID: <1421360151382-35126.post@n7.nabble.com> Change them in the standard way. Google search turned up these two tutorials: https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx?mfr=true http://www.nextofwindows.com/how-to-addedit-environment-variables-in-windows-7/ which seems to cover it. -- View this message in context: http://itk-users.7.n7.nabble.com/Create-java-VM-failure-SimpleITK-Python-Windows-tp32371p35126.html Sent from the ITK - Users mailing list archive at Nabble.com. From franciscolopezdelafranca at gmail.com Fri Jan 16 02:02:24 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Fri, 16 Jan 2015 08:02:24 +0100 Subject: [ITK-users] Undefined references to methods of template classes In-Reply-To: References: Message-ID: Hi Matt. I've already solved the texture features problem. The solution is similar to that of the shape features. You must set a value or values to the filter in order to be able to calculate the features. I've used the SetPixelValueMinMax () method and everything OK. Thank you very much for your support. /Francisco 2015-01-15 20:08 GMT+01:00 Matt McCormick : > Hi Francisco, > > Good to hear the BinaryImageToShapeLabelMapFilter is working. > > This is probably not the source of your issues, but this line > > FeatureValueVectorType* output = textureFilter->GetFeatureMeans(); > > should be > > FeatureValueVectorType::Pointer output = > textureFilter->GetFeatureMeans(); > > since itk::SmartPointer's [1] are different from raw pointers. > > HTH, > Matt > > [1] http://www.itk.org/Doxygen/html/classitk_1_1SmartPointer.html > > > On Thu, Jan 15, 2015 at 12:34 PM, Francisco Lopez de la Franca > wrote: > > Sorry, I might press the wrong key. > > Hi Matt again. > > You were fully right about setting the background/foreground values for > the > > filter. I wasn't using them because I followed the examples and there > was no > > reference to them. Now my shape related functions are working. > > > > As for the textures, I attach my code so that anyone can see if i am > doing > > something wrong: > > > > typedef itk::Statistics::ScalarImageToTextureFeaturesFilter > > TextureFilterType; > > typedef typename TextureFilterType::Pointer TextureFilterPtr; > > typedef typename TextureFilterType::FeatureValueVector > > FeatureValueVectorType; > > > > TextureFilterPtr textureFilter = TextureFilterType::New(); > > textureFilter->SetInput(_input); > > textureFilter->Update(); > > > > FeatureValueVectorType* output = textureFilter->GetFeatureMeans(); > > > > cout << "Energy = " << (*output)[0]) << endl; > > cout << "Entropy " << (*output)[1]); > > cout << "LocalHomogeneity = " << (*output)[3]) << endl; > > cout << "Inertia = " << (*output)[4]) << endl; > > cout << "ClusterShade " << (*output)[5]) << endl; > > cout << "ClusterProminence = " << (*output)[6]) << endl; > > > > Sincereously, I thank you a lot your help. > > Regards. > > /Francisco > > > > > > > > 2015-01-15 18:26 GMT+01:00 Francisco Lopez de la Franca > > : > >> > >> Hi Matt again. > >> You were fully right about setting the background/foreground values for > >> the filter. I > >> > >> 2015-01-15 16:41 GMT+01:00 Matt McCormick : > >>> > >>> Hi Francisco, > >>> > >>> There is definitely something wrong with the textures features. It is > >>> not possible to know what is going on without more details, though. > >>> > >>> Matt > >>> > >>> On Thu, Jan 15, 2015 at 1:32 AM, Francisco Lopez de la Franca > >>> wrote: > >>> > Hi Matt, > >>> > Thanks a lot for your answers. I'll try this afternoon what you > suggest > >>> > regarding the shape filter, but what do you think about my results as > >>> > for > >>> > the texture filter? > >>> > Regards. > >>> > /Francisco > >>> > > >>> > 2015-01-15 2:30 GMT+01:00 Matt McCormick >: > >>> >> > >>> >> Hi Francisco, > >>> >> > >>> >> Great to hear about the progress! > >>> >> > >>> >> The itk::BinaryImageToShapeLabelMapFilter requires a binary input, > >>> >> which should have an integer pixel type, like unsigned char or > >>> >> unsigned short. It is important to set the BackgroundValue and > >>> >> ForegroundValue [1] to get this filter to work correctly. > >>> >> > >>> >> HTH, > >>> >> Matt > >>> >> > >>> >> [1] > >>> >> > >>> >> > http://www.itk.org/Doxygen/html/classitk_1_1BinaryImageToShapeLabelMapFilter.html > >>> >> > >>> >> On Wed, Jan 14, 2015 at 5:05 PM, Francisco Lopez de la Franca > >>> >> wrote: > >>> >> > Hi again. > >>> >> > I fixed all the errors and got my library, now ready to be tested. > >>> >> > It contains an encapsulation, on the one hand, of the class > >>> >> > itkBinaryImageToShapeLabelMapFilter in order to get image shape > >>> >> > descriptors > >>> >> > of a 3D binary image, and on the other hand, the same for the > class > >>> >> > itkScalarImageToTextureFeaturesFilter to get image texture > features > >>> >> > of a > >>> >> > 3D > >>> >> > scalar image. > >>> >> > > >>> >> > I pass as input image to both classes a binary 3D Nifti image > >>> >> > (150x150x150) > >>> >> > containing a cylinder where the inside voxels are 255 and the > >>> >> > outside > >>> >> > voxels > >>> >> > are 0. > >>> >> > > >>> >> > As for the shape issue, it's very strange to me that the call to > >>> >> > GetNumberOfLabelObjects on a itk::LabelMap object returns a value > of > >>> >> > 0. > >>> >> > The > >>> >> > main code is as follows: > >>> >> > > >>> >> > binaryImageToShapeLabelMapFilter->SetInput(_input); > >>> >> > binaryImageToShapeLabelMapFilter->ComputePerimeterOn(); > >>> >> > binaryImageToShapeLabelMapFilter->Update(); > >>> >> > > >>> >> > LabelMapType::Pointer labelMap = > >>> >> > binaryImageToShapeLabelMapFilter->GetOutput(); > >>> >> > > >>> >> > int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects(); > >>> >> > > >>> >> > > >>> >> > And, as for the texture features, the result of the filter does > not > >>> >> > seem > >>> >> > to > >>> >> > be very logic: > >>> >> > > >>> >> > Energy = 1 > >>> >> > Entropy = 0 > >>> >> > Correlation = 1 > >>> >> > Local Homogeneity = 0 > >>> >> > Inertia = 0 > >>> >> > Cluster Shade = 0 > >>> >> > Cluster Prominence = 0 > >>> >> > > >>> >> > I've also tested this with a scalar 3D Nifti image and the results > >>> >> > are > >>> >> > the > >>> >> > same. > >>> >> > > >>> >> > And the question is: What kind of image do I have to pass to the > >>> >> > filters > >>> >> > so > >>> >> > that the code would return a more logic expected answer? > >>> >> > > >>> >> > Thank you very much in advance. > >>> >> > My best regars. > >>> >> > /Francisco > >>> >> > > >>> >> > 2015-01-10 22:38 GMT+01:00 Matt McCormick > >>> >> > : > >>> >> >> > >>> >> >> Hi Francisco, > >>> >> >> > >>> >> >> Nice to hear about the progress! > >>> >> >> > >>> >> >> You will need to link your library to the ITK libraries: > >>> >> >> > >>> >> >> target_link_libraries( mylibrary ${ITK_LIBRARIES} ) > >>> >> >> > >>> >> >> HTH, > >>> >> >> Matt > >>> >> >> > >>> >> >> On Sat, Jan 10, 2015 at 4:16 PM, Francisco Lopez de la Franca > >>> >> >> wrote: > >>> >> >>> > >>> >> >>> Thanks to your previous answer the problem was solved, but > another > >>> >> >>> one > >>> >> >>> has come out. It occurs when linking to create the library. It > >>> >> >>> gives > >>> >> >>> an > >>> >> >>> undefined reference to itk::ExceptionObject::ExceptionObject... > as > >>> >> >>> you > >>> >> >>> can > >>> >> >>> see below. > >>> >> >>> What it is strange to me is that before including explicit > >>> >> >>> template > >>> >> >>> instantiation, I created the library without errors, and now > that > >>> >> >>> I > >>> >> >>> include > >>> >> >>> that, I get this error. > >>> >> >>> I'll appreciate very much any help. > >>> >> >>> > >>> >> >>> Linking CXX shared library libTFM_Features.dll > >>> >> >>> > >>> >> >>> > >>> >> >>> > >>> >> >>> > CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t > >>> >> >>> > >>> >> >>> > >>> >> >>> > >>> >> >>> > ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC > >>> >> >>> 1ERKSsjS2_S2_]+0x35): undefined reference to > >>> >> >>> `itk::ExceptionObject::ExceptionObj > >>> >> >>> ect(std::string const&, unsigned int, std::string const&, > >>> >> >>> std::string > >>> >> >>> const&)' > >>> >> >>> > >>> >> >>> > >>> >> >>> > >>> >> >>> > CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj):TFM_Features.cpp:(.t > >>> >> >>> > >>> >> >>> > >>> >> >>> > >>> >> >>> > ext$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_[_ZN3itk21MemoryAllocationErrorC > >>> >> >>> 1ERKSsjS2_S2_]+0x40): undefined reference to `vtable for > >>> >> >>> itk::MemoryAllocationEr > >>> >> >>> ror' > >>> >> >>> > >>> >> >>> > >>> >> >>> > >>> >> >>> > C:/CV/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-min > >>> >> >>> gw32/bin/ld.exe: > >>> >> >>> CMakeFiles\TFM_Features.dir/objects.a(TFM_Features.cpp.obj): ba > >>> >> >>> d reloc address 0x40 in section > >>> >> >>> `.text$_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_ > >>> >> >>> S2_[_ZN3itk21MemoryAllocationErrorC1ERKSsjS2_S2_]' > >>> >> >>> collect2.exe: error: ld returned 1 exit status > >>> >> >>> SRC\CMakeFiles\TFM_Features.dir\build.make:219: recipe for > target > >>> >> >>> 'SRC/libTFM_Fe > >>> >> >>> atures.dll' failed > >>> >> >>> mingw32-make[2]: *** [SRC/libTFM_Features.dll] Error 1 > >>> >> >>> CMakeFiles\Makefile2:77: recipe for target > >>> >> >>> 'SRC/CMakeFiles/TFM_Features.dir/all' > >>> >> >>> failed > >>> >> >>> mingw32-make[1]: *** [SRC/CMakeFiles/TFM_Features.dir/all] > Error 2 > >>> >> >>> Makefile:74: recipe for target 'all' failed > >>> >> >>> mingw32-make: *** [all] Error 2 > >>> >> >>> > >>> >> >>> > >>> >> >>> 2015-01-09 21:02 GMT+01:00 Matt McCormick > >>> >> >>> : > >>> >> >>>> > >>> >> >>>> Hi Francisco, > >>> >> >>>> > >>> >> >>>> In order for the templates to be available in the library, they > >>> >> >>>> must > >>> >> >>>> be explicitly instantiated [1]. > >>> >> >>>> > >>> >> >>>> HTH, > >>> >> >>>> Matt > >>> >> >>>> > >>> >> >>>> [1] http://www.cplusplus.com/articles/1C75fSEw/ > >>> >> >>>> > >>> >> >>>> On Fri, Jan 9, 2015 at 2:59 PM, Francisco Lopez de la Franca > >>> >> >>>> wrote: > >>> >> >>>> > Hi. > >>> >> >>>> > I' like to create a library containing, for example, one > >>> >> >>>> > template > >>> >> >>>> > class with > >>> >> >>>> > a number of methods. > >>> >> >>>> > I've programmed a simple example and the compilation and > >>> >> >>>> > generation > >>> >> >>>> > of > >>> >> >>>> > the > >>> >> >>>> > library goes fine. I use the cmake "add_library" command for > >>> >> >>>> > generating the > >>> >> >>>> > library. > >>> >> >>>> > > >>> >> >>>> > The problem arises at the moment of testing the library. I > get > >>> >> >>>> > an > >>> >> >>>> > undefined > >>> >> >>>> > reference for every method in the template class. > >>> >> >>>> > > >>> >> >>>> > I've downloaded a tool to look in the contents (functions) of > >>> >> >>>> > dynamic > >>> >> >>>> > libraries, and there is no function in the library. If I add > >>> >> >>>> > another > >>> >> >>>> > class > >>> >> >>>> > (not a template class), then, this tool shows me only the > >>> >> >>>> > functions > >>> >> >>>> > in > >>> >> >>>> > this > >>> >> >>>> > latter class. > >>> >> >>>> > > >>> >> >>>> > Has anyone ever come across with this problem? > >>> >> >>>> > > >>> >> >>>> > Thanks a lot in advance. > >>> >> >>>> > Regards > >>> >> >>>> > /Francisco > >>> >> >>>> > > >>> >> >>>> > _____________________________________ > >>> >> >>>> > Powered by www.kitware.com > >>> >> >>>> > > >>> >> >>>> > Visit other Kitware open-source projects at > >>> >> >>>> > http://www.kitware.com/opensource/opensource.html > >>> >> >>>> > > >>> >> >>>> > Kitware offers ITK Training Courses, for more information > >>> >> >>>> > visit: > >>> >> >>>> > http://www.kitware.com/products/protraining.php > >>> >> >>>> > > >>> >> >>>> > Please keep messages on-topic and check the ITK FAQ at: > >>> >> >>>> > http://www.itk.org/Wiki/ITK_FAQ > >>> >> >>>> > > >>> >> >>>> > Follow this link to subscribe/unsubscribe: > >>> >> >>>> > http://public.kitware.com/mailman/listinfo/insight-users > >>> >> >>>> > > >>> >> >>> > >>> >> >>> > >>> >> >> > >>> >> > > >>> > > >>> > > >> > >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.welch at gmail.com Fri Jan 16 11:31:59 2015 From: david.m.welch at gmail.com (dmwelch) Date: Fri, 16 Jan 2015 09:31:59 -0700 (MST) Subject: [ITK-users] Vessel Segmentation In-Reply-To: <1421275248945-35113.post@n7.nabble.com> References: <1421275248945-35113.post@n7.nabble.com> Message-ID: <1421425919413-35128.post@n7.nabble.com> This is off topic, but have you looked at using VMTK? It's a ITK-based Python package designed for vessel segmentation, so you don't have to re-invent the wheel, ICYI. I used it to create a semi-automated cerebral aneurysm segmentation app several years back. ;-) Cheers, Dave W. -- View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113p35128.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Fri Jan 16 11:54:24 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 16 Jan 2015 11:54:24 -0500 Subject: [ITK-users] Setting constants in ternary functor filters In-Reply-To: <1421359760646-35125.post@n7.nabble.com> References: <1421359760646-35125.post@n7.nabble.com> Message-ID: Hi Jameson, The TernaryFunctorImageFilter was designed to work on three input images. For this case, it would be better to inherit from UnaryFunctorImageFilter, then set the constants on the functor. See, for example, the itk::ExpNegativeImageFilter [1], which also has a constant input. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1ExpNegativeImageFilter.html On Thu, Jan 15, 2015 at 5:09 PM, jmerkow wrote: > Hello, > > I am writing a ternary functor filter and I want to allow constants to be > set for inputs 2 and 3 (1 and 2 in SetNthInput). > I believe I followed the example in BinaryFunctor but when I set them I get > NULL pointers for the inputs: > "At least one input is missing. Input1 is 0xb212190, Input2 is 0, Input3 > is 0" > > My filter looks something like this (I trimmed it down to just the relevant > parts): > > ... > class MyTernaryFunctorImageFilter: > public itk::TernaryFunctorImageFilter< TInputImage1, TInputImage2, > TInputImage3, TOutputImage, > MyTernaryFunctor< > typename TInputImage1::PixelType, > typename TInputImage2::PixelType, > typename TInputImage3::PixelType, > typename TOutputImage::PixelType > > > { > ... > //Common Typedefs are here > ... > > typedef TInputImage2 Input2ImageType; > typedef typename Input2ImageType::ConstPointer Input2ImagePointer; > typedef typename Input2ImageType::RegionType Input2ImageRegionType; > typedef typename Input2ImageType::PixelType Input2ImagePixelType; > typedef itk::SimpleDataObjectDecorator > DecoratedInput2ImagePixelType; > > typedef TInputImage3 Input3ImageType; > typedef typename Input3ImageType::ConstPointer Input3ImagePointer; > typedef typename Input3ImageType::RegionType Input3ImageRegionType; > typedef typename Input3ImageType::PixelType Input3ImagePixelType; > typedef itk::SimpleDataObjectDecorator > DecoratedInput3ImagePixelType; > > virtual void SetConstant2(const Input2ImagePixelType &input); > virtual void SetConstant2(const DecoratedInput2ImagePixelType *input); > /** Set the Third operand as a constant */ > virtual void SetConstant3(const Input3ImagePixelType &input); > virtual void SetConstant3(const DecoratedInput3ImagePixelType *input); > }; > > template<...> > void > MyTernaryFunctorImageFilter< TInputImage1, TInputImage2, TInputImage3, > TOutputImage> > ::SetConstant2(const Input2ImagePixelType &input) > { > itkDebugMacro("setting SetConstant2 to " << input); > typename DecoratedInput2ImagePixelType::Pointer newInput = > DecoratedInput2ImagePixelType::New(); > newInput->Set(input); > this->SetConstant2(newInput); > } > > template<...> > void > MyTernaryFunctorImageFilter< TInputImage1, TInputImage2, TInputImage3, > TOutputImage> > ::SetConstant2(const DecoratedInput2ImagePixelType *input) > { > this->SetNthInput( 1,const_cast(input)); > } > template<...> > void > MyTernaryFunctorImageFilter< TInputImage1, TInputImage2, TInputImage3, > TOutputImage> > ::SetConstant3(const Input3ImagePixelType &input) > { > itkDebugMacro("setting SetConstant3 to " << input); > typename DecoratedInput3ImagePixelType::Pointer newInput = > DecoratedInput3ImagePixelType::New(); > newInput->Set(input); > this->SetConstant3(newInput); > } > > template<...> > void > MyTernaryFunctorImageFilter< TInputImage1, TInputImage2, TInputImage3, > TOutputImage> > ::SetConstant3(const DecoratedInput3ImagePixelType *input) > { > this->SetNthInput( 2,const_cast(input)); > } > > I pass this function an image for input1, then floats for other two inputs. > > Am I missing an ingredient here? > > -Jameson > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Setting-constants-in-ternary-functor-filters-tp35125.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From jmerkow at gmail.com Fri Jan 16 11:56:57 2015 From: jmerkow at gmail.com (jmerkow) Date: Fri, 16 Jan 2015 09:56:57 -0700 (MST) Subject: [ITK-users] Setting constants in ternary functor filters In-Reply-To: References: <1421359760646-35125.post@n7.nabble.com> Message-ID: <1421427417375-35130.post@n7.nabble.com> I originally debated using a unary functor, though this will generally be used with constants, there may be some cases where don't want it to be constant, so I thought it best to write one image filter and have the ability to set constants or image inputs. Is there any reason that what Im trying to do won't work? -Jameson -- View this message in context: http://itk-users.7.n7.nabble.com/Setting-constants-in-ternary-functor-filters-tp35125p35130.html Sent from the ITK - Users mailing list archive at Nabble.com. From blowekamp at mail.nih.gov Fri Jan 16 12:06:12 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 16 Jan 2015 12:06:12 -0500 Subject: [ITK-users] Setting constants in ternary functor filters In-Reply-To: <1421427417375-35130.post@n7.nabble.com> References: <1421359760646-35125.post@n7.nabble.com> <1421427417375-35130.post@n7.nabble.com> Message-ID: Hello, You will need to look at the implementation of the TernaryFunctorImageFilter. You'll see that it expects the inputs to be images. I used image iterators and dynamics casts under this assumption. On the other hand the implementation BinaryFunctorImageFilter, this handles the case where the inputs are decorators and the other complications that are needed. Now, this is certainly a nice feature that could be added to the TernaryFunctorImageFilter, but I think there are really to many possible permutations for it to be worth the effort. Brad On Jan 16, 2015, at 11:56 AM, jmerkow wrote: > I originally debated using a unary functor, though this will generally be > used with constants, there may be some cases where don't want it to be > constant, so I thought it best to write one image filter and have the > ability to set constants or image inputs. > Is there any reason that what Im trying to do won't work? > > -Jameson > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Setting-constants-in-ternary-functor-filters-tp35125p35130.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From jmerkow at gmail.com Fri Jan 16 12:20:12 2015 From: jmerkow at gmail.com (jmerkow) Date: Fri, 16 Jan 2015 10:20:12 -0700 (MST) Subject: [ITK-users] Setting constants in ternary functor filters In-Reply-To: References: <1421359760646-35125.post@n7.nabble.com> <1421427417375-35130.post@n7.nabble.com> Message-ID: <1421428812539-35132.post@n7.nabble.com> Ahhh, I see. You have an if-else block that checked for NULL pointers, and then call GetConstant on the null pointer. I guess I misunderstood the decorated data object for pixel types. I thought that they were constant images, so that GetPixel returns the constant at all locations. I re-read [1] more carefully and see my mistake. Im going to switch to the unary functor, but is there a constant image class like Im describing? It would be an easy way to set constants for functors (or anything) without wasting memory by CreateImage -> Fill. Thanks for your help! -Jameson -- View this message in context: http://itk-users.7.n7.nabble.com/Setting-constants-in-ternary-functor-filters-tp35125p35132.html Sent from the ITK - Users mailing list archive at Nabble.com. From nhadar at surgicaltheater.net Fri Jan 16 12:43:15 2015 From: nhadar at surgicaltheater.net (Nissim Hadar) Date: Fri, 16 Jan 2015 10:43:15 -0700 (MST) Subject: [ITK-users] Vessel Segmentation In-Reply-To: References: <1421275248945-35113.post@n7.nabble.com> <1421306921950-35117.post@n7.nabble.com> Message-ID: <1421430195087-35133.post@n7.nabble.com> Thanks Matt. I can try reading in the DICOM images, but I am not sure about the "supported ITK file format". Can I produce a DICOM output? I do not use VTK, so I do not understand how I will be able to view the output, in any non-DICOM format. -- View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113p35133.html Sent from the ITK - Users mailing list archive at Nabble.com. From nhadar at surgicaltheater.net Fri Jan 16 12:58:42 2015 From: nhadar at surgicaltheater.net (Nissim Hadar) Date: Fri, 16 Jan 2015 10:58:42 -0700 (MST) Subject: [ITK-users] Vessel Segmentation In-Reply-To: <1421425919413-35128.post@n7.nabble.com> References: <1421275248945-35113.post@n7.nabble.com> <1421425919413-35128.post@n7.nabble.com> Message-ID: <1421431122358-35134.post@n7.nabble.com> Actually - very on topic :) I have built and started playing with VMTK, but the Python interface put me off. Our application has a C# GUI that calls ITK through a SWIG wrapper. Your application sounds very interesting ... can we talk about it? (So ... very interested...) -- View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113p35134.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Fri Jan 16 14:07:46 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 16 Jan 2015 14:07:46 -0500 Subject: [ITK-users] Vessel Segmentation In-Reply-To: <1421430195087-35133.post@n7.nabble.com> References: <1421275248945-35113.post@n7.nabble.com> <1421306921950-35117.post@n7.nabble.com> <1421430195087-35133.post@n7.nabble.com> Message-ID: ITK supports a number of file formats [1]. While it is technically possible to create DICOM, this is very complicated, and one of the other research formats, i.e. MetaImage, are recommended. There are programs like 3D Slicer, based on ITK, that can be used to visualize the output [2]. It is also possible to output PNG, JPG, TIFF, representations, too. Write the resulting image to file in one of these formats with ITK classes should be useful for debugging purposes. HTH, Matt [1] http://www.itk.org/Doxygen/html/group__Group-IO.html [2] http://slicer.org/ On Fri, Jan 16, 2015 at 12:43 PM, Nissim Hadar wrote: > Thanks Matt. I can try reading in the DICOM images, but I am not sure about > the "supported ITK file format". Can I produce a DICOM output? I do not > use VTK, so I do not understand how I will be able to view the output, in > any non-DICOM format. > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113p35133.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Fri Jan 16 14:09:18 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 16 Jan 2015 14:09:18 -0500 Subject: [ITK-users] Vessel Segmentation In-Reply-To: <1421431122358-35134.post@n7.nabble.com> References: <1421275248945-35113.post@n7.nabble.com> <1421425919413-35128.post@n7.nabble.com> <1421431122358-35134.post@n7.nabble.com> Message-ID: Hi, I would also recommend TubeTK [1] -- its forte is vessel segmentation, and it works well with ITK. Thanks, Matt [1] http://tubetk.org/ On Fri, Jan 16, 2015 at 12:58 PM, Nissim Hadar wrote: > Actually - very on topic :) > I have built and started playing with VMTK, but the Python interface put me > off. Our application has a C# GUI that calls ITK through a SWIG wrapper. > Your application sounds very interesting ... can we talk about it? (So ... > very interested...) > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113p35134.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From nhadar at surgicaltheater.net Fri Jan 16 17:00:04 2015 From: nhadar at surgicaltheater.net (Nissim Hadar) Date: Fri, 16 Jan 2015 15:00:04 -0700 (MST) Subject: [ITK-users] Vessel Segmentation In-Reply-To: References: <1421275248945-35113.post@n7.nabble.com> <1421425919413-35128.post@n7.nabble.com> <1421431122358-35134.post@n7.nabble.com> Message-ID: <1421445604453-35137.post@n7.nabble.com> I am also trying TubeTK. Trying to compile that is :) -- View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113p35137.html Sent from the ITK - Users mailing list archive at Nabble.com. From emmasaunders123 at gmail.com Mon Jan 19 11:47:58 2015 From: emmasaunders123 at gmail.com (Emma Saunders) Date: Mon, 19 Jan 2015 16:47:58 +0000 Subject: [ITK-users] Upsample images or Deformation field - accuracy? Message-ID: Hi, Just wondering peoples experiences, would it be more or less accurate to upsample to images and register them, than register two images and upsample the deformation field? Thanks Emma -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Jan 19 13:59:08 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 19 Jan 2015 13:59:08 -0500 Subject: [ITK-users] Upsample images or Deformation field - accuracy? In-Reply-To: References: Message-ID: Hi Emma, In practice, for many cases it probably does not make much of a difference. However, if it does make a difference, upsampling the images first with an accurate interpolator, like windowed-sinc interpolation, should be best. HTH, Matt On Mon, Jan 19, 2015 at 11:47 AM, Emma Saunders wrote: > Hi, > > Just wondering peoples experiences, would it be more or less accurate to > upsample to images and register them, than register two images and upsample > the deformation field? > > Thanks > > Emma > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From Erik.Olsson at neuro.gu.se Tue Jan 20 15:04:10 2015 From: Erik.Olsson at neuro.gu.se (Erik Olsson) Date: Tue, 20 Jan 2015 20:04:10 +0000 Subject: [ITK-users] Command line use of N4 in MacOS terminal In-Reply-To: References: Message-ID: Hi, I have recently started to use N4 as a command line installation and the bias field correction works great in general. I am trying to figure out how to configure the flags for best performance on our T2 MRI images and when trying the rescale intensities I get the error message "segmentation fault 11" for both options ( -r 1 as well as -r 0). I also have a problem with the convergence flag -c, all works fine when I leave this flag out but when trying for example -c 50x50x50x50,0.0001 it stops after 1 iteration (Current level = 1 Iteration 1 (of 50). Current convergence value = 0.000816419 (threshold = 0.001). It does not seem like my specification of the threshold is read but the default value is used. Do you have an example of a typical setting for the -c flag other than the default values? best regards Erik Erik Olsson PhD Institute of Psychiatry and Neurochemistry Department of Neuroscience & physiology The Sahlgrenska academy Gothenburg University Sweden -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntustison at gmail.com Tue Jan 20 17:05:19 2015 From: ntustison at gmail.com (Nicholas Tustison) Date: Tue, 20 Jan 2015 14:05:19 -0800 Subject: [ITK-users] Command line use of N4 in MacOS terminal In-Reply-To: References: Message-ID: Hi Erik, It sounds like this is an ANTs-specific issue. If you have any further questions, I would recommend asking at that forum. https://github.com/stnava/ANTs/issues The command line interface that you reference is ANTs-specific and should have brackets around it e.g., -c [50x50x50x50,0.0001] I don?t know about the rescale problem. Does it happen on any image or just that specific T2? Anyway, meet me over on the ANTs forum if you have further questions/ issues. Nick > On Jan 20, 2015, at 12:04 PM, Erik Olsson wrote: > > > > Hi, > > I have recently started to use N4 as a command line installation and the bias field correction works great in general. > > I am trying to figure out how to configure the flags for best performance on our T2 MRI images and when trying the rescale intensities I get the error message "segmentation fault 11" for both options ( -r 1 as well as -r 0). I also have a problem with the convergence flag -c, all works fine when I leave this flag out but when trying for example -c 50x50x50x50,0.0001 it stops after 1 iteration (Current level = 1 > Iteration 1 (of 50). Current convergence value = 0.000816419 (threshold = 0.001). It does not seem like my specification of the threshold is read but the default value is used. Do you have an example of a typical setting for the -c flag other than the default values? > > best regards > Erik > > Erik Olsson > PhD > > Institute of Psychiatry and Neurochemistry > Department of Neuroscience & physiology > The Sahlgrenska academy > Gothenburg University > Sweden > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed Jan 21 09:09:14 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 21 Jan 2015 09:09:14 -0500 Subject: [ITK-users] FastMarching UpwindGradient Filters difference Message-ID: <02EFACE9-9946-4546-9403-1A2709CB7B41@mail.nih.gov> Hello, I am trying to figure out the difference between the FastMarchingUpwindGradientImageFilterBase[1] and the FastMarchingUpwindGradientImageFilter[2]. The first thing to notice is that the "Base" class is NOT a parent of the other. Secondly, the non-Base implements a stopping criteria of reaching a number of target nodes. This is now incorporated as an optional stopping criteria [3], in the framework. Then both of the filters add the upwind gradient image as an output, with what appears to be duplicated code. I don't see a real difference here. I think one should be deprecated. Brad [1] http://www.itk.org/Doxygen/html/classitk_1_1FastMarchingUpwindGradientImageFilterBase.html [2] http://www.itk.org/Doxygen/html/classitk_1_1FastMarchingUpwindGradientImageFilter.html [3] http://www.itk.org/Doxygen/html/classitk_1_1FastMarchingReachedTargetNodesStoppingCriterion.html From arnaudgelas at gmail.com Wed Jan 21 09:33:48 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Wed, 21 Jan 2015 15:33:48 +0100 Subject: [ITK-users] FastMarching UpwindGradient Filters difference In-Reply-To: <02EFACE9-9946-4546-9403-1A2709CB7B41@mail.nih.gov> References: <02EFACE9-9946-4546-9403-1A2709CB7B41@mail.nih.gov> Message-ID: <3C7C228B-B1B1-4DF5-8CFF-06F82A542FD6@gmail.com> Hi Brad, FastMarchingUpwindGradientImageFilter is from ITKv3 while the other one is from ITKv4. Note that in terms of features, FastMarchingUpwiindGradientImageFilter would be a subset of the ?Base" one? Arnaud > On 21 Jan 2015, at 15:09, Bradley Lowekamp wrote: > > Hello, > > I am trying to figure out the difference between the FastMarchingUpwindGradientImageFilterBase[1] and the FastMarchingUpwindGradientImageFilter[2]. > > The first thing to notice is that the "Base" class is NOT a parent of the other. Secondly, the non-Base implements a stopping criteria of reaching a number of target nodes. This is now incorporated as an optional stopping criteria [3], in the framework. Then both of the filters add the upwind gradient image as an output, with what appears to be duplicated code. > > I don't see a real difference here. I think one should be deprecated. > > Brad > > [1] http://www.itk.org/Doxygen/html/classitk_1_1FastMarchingUpwindGradientImageFilterBase.html > [2] http://www.itk.org/Doxygen/html/classitk_1_1FastMarchingUpwindGradientImageFilter.html > [3] http://www.itk.org/Doxygen/html/classitk_1_1FastMarchingReachedTargetNodesStoppingCriterion.html From ra.corredor at gmail.com Wed Jan 21 12:50:06 2015 From: ra.corredor at gmail.com (Ricardo A Corredor) Date: Wed, 21 Jan 2015 10:50:06 -0700 (MST) Subject: [ITK-users] Vessel Segmentation In-Reply-To: References: <1421275248945-35113.post@n7.nabble.com> <1421306921950-35117.post@n7.nabble.com> <1421430195087-35133.post@n7.nabble.com> Message-ID: <1421862606723-35144.post@n7.nabble.com> Hi, For medical image visualization using a non-DICOM format I often use the MHD/RAW (MetaImage) format. You only need to use a ImageFileWriter, set as input the image you want to save and put a filename with .mhd as extension, e.g. "./theImage.mhd". It is possible to visualize these files in multiple programs: ParaView, MeVisLab, 3D Slicer, itkSNAP, ... Usually I suggest those tools on that order. Check also that the way you're constructing the image is the same as stored in the array (row-major order or column-major order) and that you're constructing an image with the correct data type, correct size. Hope that works! Best, RaC -- View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113p35144.html Sent from the ITK - Users mailing list archive at Nabble.com. From mpinkert at wisc.edu Wed Jan 21 14:44:53 2015 From: mpinkert at wisc.edu (Michael Pinkert) Date: Wed, 21 Jan 2015 12:44:53 -0700 (MST) Subject: [ITK-users] [ITK-Users] Multiple Inputs of different types Message-ID: <1421869493940-7586810.post@n2.nabble.com> Hi all, I'm trying to develop a Vector Connected Component Filter/pipeline that checks the direction of the eigenvector as well as whether or not the pixels are touching. I am doing this by modifying the three following filters that build off of each other. itkSymmetricEigenAnalysisImageFilter.h so that it returns the largest eigenvector rather than the eigenvalues itkBinaryImageToLabelMapFilter.h to check that the eigenvectors for each pixel are aligned after checking that they are touching itkBinaryShapeKeepNObjectsImageFilter.h to simply pass the hessian into the LabelMapFilter. The problem is that I need to include a image that contains the hessian for each pixel along with the normal input image, so that the KeepNObjects filter can send it down to the LabelMapFilter and then to the EigenAnalysisFilter. However, none of the methods I have tried to get the hessian image into the filters work, and I do not understand how to allow for this second input. So far I have tried modifying the template as follows class BinaryVectorConnectedShapeKeepNObjectsImageFilter: public ImageToImageFilter< TInputImage, THessianImage, TInputImage > Combined with using the SetInputX functions as seen in other filters as follows void SetInput1(const TInputImage *image1) { this->SetNthInput(0, const_cast ( image1)); } This produces an error of "Too many template arguments". I have tried to make the hessian image a member variable and to use the normal Get/Set macros, but that also produces errors of being unable to convert between types when the function is used in main. I have also tried to simply define a new function to set the Hessian, like such void SetHessian(HessianImageType::Pointer hessianImage) { m_HessianImage = hessianImage; } And alternate versions with different input arguments, which include "const HessianImage *hessianImage". These also run into errors where it won't covert between types when I use the function in main. I have looked around at different filters that have multiple inputs, and all of them seem to be based on Functors/the BinaryFunctorImageFilter, but I am very unsure of how I would go about modifying the filters, and have very little experience with Functors. Also, the arguments for the other filters based on Functors all seem to include an operator as a fourth argument, and I do not want to perform any operations on the Hessian until the SymmetricAnalysis filter. Does anyone know how I could set this second input simply, or could point me to an example that does similar? Best regards, Michael Pinkert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-Users-Multiple-Inputs-of-different-types-tp7586810.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Wed Jan 21 15:11:02 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 21 Jan 2015 15:11:02 -0500 Subject: [ITK-users] [ITK-Users] Multiple Inputs of different types In-Reply-To: <1421869493940-7586810.post@n2.nabble.com> References: <1421869493940-7586810.post@n2.nabble.com> Message-ID: Hi Michael, The ImageToImageFilter will still need to be templated over TInputImage and TOutputImage. For example filters that have multiple inputs to study, see, e.g., ConvolutionImageFilterBase [1] (has a KernalImage input) MaskedFFTNormalizedCorrelationImageFilter [2] (has MaskImage input) HistogramThresholdImageFilter [3] (has MaskImage input) HTH, Matt [1] http://itk.org/Doxygen/html/classitk_1_1ConvolutionImageFilterBase.html [2] http://itk.org/Doxygen/html/classitk_1_1MaskedFFTNormalizedCorrelationImageFilter.html#a238b7f7d871a81849e66a12e0564825a [3] http://itk.org/Doxygen/html/classitk_1_1HistogramThresholdImageFilter.html#a19a692e8043422ba6721815f94f04944 On Wed, Jan 21, 2015 at 2:44 PM, Michael Pinkert wrote: > Hi all, > > I'm trying to develop a Vector Connected Component Filter/pipeline that > checks the direction of the eigenvector as well as whether or not the pixels > are touching. I am doing this by modifying the three following filters that > build off of each other. > > itkSymmetricEigenAnalysisImageFilter.h so that it returns the largest > eigenvector rather than the eigenvalues > > itkBinaryImageToLabelMapFilter.h to check that the eigenvectors for each > pixel are aligned after checking that they are touching > > itkBinaryShapeKeepNObjectsImageFilter.h to simply pass the hessian into the > LabelMapFilter. > > The problem is that I need to include a image that contains the hessian for > each pixel along with the normal input image, so that the KeepNObjects > filter can send it down to the LabelMapFilter and then to the > EigenAnalysisFilter. However, none of the methods I have tried to get the > hessian image into the filters work, and I do not understand how to allow > for this second input. > > So far I have tried modifying the template as follows > > class BinaryVectorConnectedShapeKeepNObjectsImageFilter: > public ImageToImageFilter< TInputImage, THessianImage, TInputImage > > > Combined with using the SetInputX functions as seen in other filters as > follows > > void SetInput1(const TInputImage *image1) > { > this->SetNthInput(0, const_cast ( image1)); > } > > This produces an error of "Too many template arguments". > > I have tried to make the hessian image a member variable and to use the > normal Get/Set macros, but that also produces errors of being unable to > convert between types when the function is used in main. > > I have also tried to simply define a new function to set the Hessian, like > such > > void SetHessian(HessianImageType::Pointer hessianImage) > { > m_HessianImage = hessianImage; > } > > And alternate versions with different input arguments, which include "const > HessianImage *hessianImage". These also run into errors where it won't > covert between types when I use the function in main. > > I have looked around at different filters that have multiple inputs, and all > of them seem to be based on Functors/the BinaryFunctorImageFilter, but I am > very unsure of how I would go about modifying the filters, and have very > little experience with Functors. Also, the arguments for the other filters > based on Functors all seem to include an operator as a fourth argument, and > I do not want to perform any operations on the Hessian until the > SymmetricAnalysis filter. > > Does anyone know how I could set this second input simply, or could point me > to an example that does similar? > > Best regards, > Michael Pinkert > > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-Users-Multiple-Inputs-of-different-types-tp7586810.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From ted.florez at gmail.com Wed Jan 21 15:26:28 2015 From: ted.florez at gmail.com (=?UTF-8?Q?Edward_Fl=C3=B3rez_Pacheco?=) Date: Wed, 21 Jan 2015 14:26:28 -0600 Subject: [ITK-users] Files not found Message-ID: Hi everyone I am a new ITK user. Currently, I am using a set of algorithms that use ITK. I installed the *InsightToolkit - version 4.6.1* but I had these troubles: CMakeFiles/DicomSeriesReadImageWrite2.dir/DicomSeriesReadImageWrite2.cxx.o Linking CXX executable DicomSeriesReadImageWrite2 /usr/bin/ld: cannot find -lITKAlgorithms /usr/bin/ld: cannot find -lITKIO collect2: ld returned 1 exit status make[2]: ** [DicomSeriesReadImageWrite2] Erro 1 make[1]: ** [CMakeFiles/DicomSeriesReadImageWrite2.dir/all] Erro 2 make: ** [all] Erro 2 If anyone has some idea about these issues and can give me some help I'll be very thankful. Thank you in advance. Best regards. -- *Edward Fl?rez* -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Jan 21 15:40:44 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 21 Jan 2015 15:40:44 -0500 Subject: [ITK-users] [ITK] Files not found In-Reply-To: References: Message-ID: Hi Edward, It looks like you are trying to use a project that had a CMake configuration for ITKv3. To update the configuration for ITKv4, change target_link_libraries(myexecutable ITKAlgorithms ITKIO ) with target_link_libraries(myexecutable ${ITK_LIBRARIES} ) HTH, Matt On Wed, Jan 21, 2015 at 3:26 PM, Edward Fl?rez Pacheco wrote: > Hi everyone > > I am a new ITK user. > Currently, I am using a set of algorithms that use ITK. > I installed the InsightToolkit - version 4.6.1 but I had these troubles: > > CMakeFiles/DicomSeriesReadImageWrite2.dir/DicomSeriesReadImageWrite2.cxx.o > Linking CXX executable DicomSeriesReadImageWrite2 > /usr/bin/ld: cannot find -lITKAlgorithms > /usr/bin/ld: cannot find -lITKIO > collect2: ld returned 1 exit status > make[2]: ** [DicomSeriesReadImageWrite2] Erro 1 > make[1]: ** [CMakeFiles/DicomSeriesReadImageWrite2.dir/all] Erro 2 > make: ** [all] Erro 2 > > If anyone has some idea about these issues and can give me some help I'll be > very thankful. > Thank you in advance. > > Best regards. > > -- > Edward Fl?rez > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From ted.florez at gmail.com Wed Jan 21 16:21:28 2015 From: ted.florez at gmail.com (=?UTF-8?Q?Edward_Fl=C3=B3rez_Pacheco?=) Date: Wed, 21 Jan 2015 15:21:28 -0600 Subject: [ITK-users] [ITK] Files not found In-Reply-To: References: Message-ID: Dear Matt Thank you so much! I made the change you suggested and now it is working fine. Regards. Edward 2015-01-21 14:40 GMT-06:00 Matt McCormick : > Hi Edward, > > It looks like you are trying to use a project that had a CMake > configuration for ITKv3. To update the configuration for ITKv4, > change > > target_link_libraries(myexecutable > ITKAlgorithms > ITKIO > ) > > with > > target_link_libraries(myexecutable > ${ITK_LIBRARIES} > ) > > HTH, > Matt > > On Wed, Jan 21, 2015 at 3:26 PM, Edward Fl?rez Pacheco > wrote: > > Hi everyone > > > > I am a new ITK user. > > Currently, I am using a set of algorithms that use ITK. > > I installed the InsightToolkit - version 4.6.1 but I had these troubles: > > > > > CMakeFiles/DicomSeriesReadImageWrite2.dir/DicomSeriesReadImageWrite2.cxx.o > > Linking CXX executable DicomSeriesReadImageWrite2 > > /usr/bin/ld: cannot find -lITKAlgorithms > > /usr/bin/ld: cannot find -lITKIO > > collect2: ld returned 1 exit status > > make[2]: ** [DicomSeriesReadImageWrite2] Erro 1 > > make[1]: ** [CMakeFiles/DicomSeriesReadImageWrite2.dir/all] Erro 2 > > make: ** [all] Erro 2 > > > > If anyone has some idea about these issues and can give me some help > I'll be > > very thankful. > > Thank you in advance. > > > > Best regards. > > > > -- > > Edward Fl?rez > > > > _______________________________________________ > > Community mailing list > > Community at itk.org > > http://public.kitware.com/mailman/listinfo/community > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpinkert at wisc.edu Wed Jan 21 15:29:15 2015 From: mpinkert at wisc.edu (Michael Pinkert) Date: Wed, 21 Jan 2015 20:29:15 +0000 Subject: [ITK-users] [ITK-Users] Multiple Inputs of different types In-Reply-To: References: <1421869493940-7586810.post@n2.nabble.com> Message-ID: <1421872155297.63645@wisc.edu> Hi Matt, Following the example of those filters seems to have worked, I'm no longer getting errors related to the multiple inputs. Thank you very much. Best regards, Michael Pinkert ________________________________________ From: Matt McCormick Sent: Wednesday, January 21, 2015 2:11 PM To: Michael Pinkert Cc: insight-users at itk.org Subject: Re: [ITK-users] [ITK-Users] Multiple Inputs of different types Hi Michael, The ImageToImageFilter will still need to be templated over TInputImage and TOutputImage. For example filters that have multiple inputs to study, see, e.g., ConvolutionImageFilterBase [1] (has a KernalImage input) MaskedFFTNormalizedCorrelationImageFilter [2] (has MaskImage input) HistogramThresholdImageFilter [3] (has MaskImage input) HTH, Matt [1] http://itk.org/Doxygen/html/classitk_1_1ConvolutionImageFilterBase.html [2] http://itk.org/Doxygen/html/classitk_1_1MaskedFFTNormalizedCorrelationImageFilter.html#a238b7f7d871a81849e66a12e0564825a [3] http://itk.org/Doxygen/html/classitk_1_1HistogramThresholdImageFilter.html#a19a692e8043422ba6721815f94f04944 On Wed, Jan 21, 2015 at 2:44 PM, Michael Pinkert wrote: > Hi all, > > I'm trying to develop a Vector Connected Component Filter/pipeline that > checks the direction of the eigenvector as well as whether or not the pixels > are touching. I am doing this by modifying the three following filters that > build off of each other. > > itkSymmetricEigenAnalysisImageFilter.h so that it returns the largest > eigenvector rather than the eigenvalues > > itkBinaryImageToLabelMapFilter.h to check that the eigenvectors for each > pixel are aligned after checking that they are touching > > itkBinaryShapeKeepNObjectsImageFilter.h to simply pass the hessian into the > LabelMapFilter. > > The problem is that I need to include a image that contains the hessian for > each pixel along with the normal input image, so that the KeepNObjects > filter can send it down to the LabelMapFilter and then to the > EigenAnalysisFilter. However, none of the methods I have tried to get the > hessian image into the filters work, and I do not understand how to allow > for this second input. > > So far I have tried modifying the template as follows > > class BinaryVectorConnectedShapeKeepNObjectsImageFilter: > public ImageToImageFilter< TInputImage, THessianImage, TInputImage > > > Combined with using the SetInputX functions as seen in other filters as > follows > > void SetInput1(const TInputImage *image1) > { > this->SetNthInput(0, const_cast ( image1)); > } > > This produces an error of "Too many template arguments". > > I have tried to make the hessian image a member variable and to use the > normal Get/Set macros, but that also produces errors of being unable to > convert between types when the function is used in main. > > I have also tried to simply define a new function to set the Hessian, like > such > > void SetHessian(HessianImageType::Pointer hessianImage) > { > m_HessianImage = hessianImage; > } > > And alternate versions with different input arguments, which include "const > HessianImage *hessianImage". These also run into errors where it won't > covert between types when I use the function in main. > > I have looked around at different filters that have multiple inputs, and all > of them seem to be based on Functors/the BinaryFunctorImageFilter, but I am > very unsure of how I would go about modifying the filters, and have very > little experience with Functors. Also, the arguments for the other filters > based on Functors all seem to include an operator as a fourth argument, and > I do not want to perform any operations on the Hessian until the > SymmetricAnalysis filter. > > Does anyone know how I could set this second input simply, or could point me > to an example that does similar? > > Best regards, > Michael Pinkert > > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-Users-Multiple-Inputs-of-different-types-tp7586810.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From nhadar at surgicaltheater.net Wed Jan 21 17:04:06 2015 From: nhadar at surgicaltheater.net (Nissim Hadar) Date: Wed, 21 Jan 2015 15:04:06 -0700 (MST) Subject: [ITK-users] Vessel Segmentation In-Reply-To: <1421862606723-35144.post@n7.nabble.com> References: <1421275248945-35113.post@n7.nabble.com> <1421306921950-35117.post@n7.nabble.com> <1421430195087-35133.post@n7.nabble.com> <1421862606723-35144.post@n7.nabble.com> Message-ID: <1421877846342-35151.post@n7.nabble.com> Thanks! I now have the vessel segmentation working with my format (a sub-volume of shorts extracted from the DICOM) - and can see the results in my 3D viewer (see http://surgicaltheater.net if it interests you) . The issue I have now is settup up the parameters. I have noticed that the algorithm is very sensitive to gamma; the rest I am not sure of yet. Cheers -- View this message in context: http://itk-users.7.n7.nabble.com/Vessel-Segmentation-tp35113p35151.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Wed Jan 21 17:25:12 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 21 Jan 2015 17:25:12 -0500 Subject: [ITK-users] Opportunities to share, discuss, design, and learn with other ITK community members Message-ID: There are a couple of upcoming opportunities to share, discuss, design, and learn with your fellow ITK community members. On Thursday (tomorrow), 1:00 PM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/events/cjudsaidlnb7v4tpiob79q92n8s On Friday, 11:00 AM Eastern USA time, an ITK development conference, https://plus.google.com/events/c4jvg33epbvaldg25skbm81fag4 For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423 To get regular invites to these events, join the ITK Bar Camp G+ Community: https://plus.google.com/u/0/communities/111375098792764998322 All are welcome. Hope to talk to you then! From grothausmann.roman at mh-hannover.de Thu Jan 22 05:21:34 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Thu, 22 Jan 2015 11:21:34 +0100 Subject: [ITK-users] compile itk (VTKGlue ON) with vtk from paraview Message-ID: <54C0CF2E.3060106@mh-hannover.de> Dear mailing list members, What configuration is needed to compile itk (4.6.1) with VTKGlue enabled with vtk from paraview (4.3.1) in order to compile Paraview plugins making use of ITK and VTK? If I configure ITK to with: BUILD_SHARED_LIBS ON Module_ITKVtkGlue ON VTK_DIR /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3 cmake complains about a missing VTKTargets.cmake even though PARAVIEW_INSTALL_DEVELOPMENT_FILES was set to ON. After a cp VTK/VTKTargets.cmake /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3/ cmake is happy but I get linker errors at the end of the compilation of ITK when the VTKGlue is due: Linking CXX shared library ../../../../lib/libITKVtkGlue-4.6.so /usr/bin/ld: cannot find -lvtkSciberQuest /usr/bin/ld: cannot find -lvtkEyeDomeLighting /usr/bin/ld: cannot find -lvtkQvis /usr/bin/ld: cannot find -lvtkPointSpriteRendering /usr/bin/ld: cannot find -lvtkPVPythonCatalyst /usr/bin/ld: cannot find -lvtkPointSpriteGraphics /usr/bin/ld: cannot find -lvtkUtilitiesPythonInitializer Switching off all PV plugin builds only leaves: Linking CXX shared library ../../../../lib/libITKVtkGlue-4.6.so /usr/bin/ld: cannot find -lvtkPVPythonCatalyst /usr/bin/ld: cannot find -lvtkUtilitiesPythonInitializer However, the files are there: find /opt/paraview-4.3.1_git/ -name '*vtkPVPythonCatalyst*so*' /opt/paraview-4.3.1_git/lib/paraview-4.3/site-packages/vtk/vtkPVPythonCatalystPython.so /opt/paraview-4.3.1_git/lib/paraview-4.3/libvtkPVPythonCatalyst-pv4.3.so.1 /opt/paraview-4.3.1_git/lib/paraview-4.3/libvtkPVPythonCatalystPython27D-pv4.3.so.1 /opt/paraview-4.3.1_git/lib/paraview-4.3/libvtkPVPythonCatalyst-pv4.3.so /opt/paraview-4.3.1_git/lib/paraview-4.3/libvtkPVPythonCatalystPython27D-pv4.3.so find /opt/paraview-4.3.1_git/ -name '*vtkUtilitiesPythonInitializer*so*' /opt/paraview-4.3.1_git/lib/paraview-4.3/libvtkUtilitiesPythonInitializer-pv4.3.so.1 /opt/paraview-4.3.1_git/lib/paraview-4.3/libvtkUtilitiesPythonInitializer-pv4.3.so Adding the abs. file locations to the build command does not help nor does -L/opt/paraview-4.3.1_git/lib/paraview-4.3/ Using the build dir of VTK in PV-tree instead for ITK does not help either: VTK_DIR /opt/compilation/ParaView-v4.3.1/build/VTK If I configure ITK to with: BUILD_SHARED_LIBS OFF I get linker errors in the last stage when compiling a PV plugin that makes use of VTK and ITK: /usr/bin/ld: /opt/compilation/InsightToolkit-4.6.1/build/lib/libitkvnl_algo-4.6.a(vnl_real_eigensystem.cxx.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /opt/compilation/InsightToolkit-4.6.1/build/lib/libitkvnl_algo-4.6.a: could not read symbols: Bad value After I've added CMAKE_CXX_FLAGS -fPIC to Paraview and ITK and recompiled both I get: /usr/bin/ld: /opt/compilation/InsightToolkit-4.6.1/build/lib/libitkv3p_netlib-4.6.a(dlamch.c.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC /opt/compilation/InsightToolkit-4.6.1/build/lib/libitkv3p_netlib-4.6.a: could not read symbols: Bad value What am I missing in my configuration of PV and ITK? When and where should I specify: CMAKE_CXX_FLAGS -fPIC BUILD_SHARED_LIBS ON/OFF Is this the right VTK_DIR specification for ITK: /opt/compilation/ParaView-v4.3.1/build/VTK or /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3 Many thanks for any help or hints. Roman -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 From rbar9508 at uni.sydney.edu.au Thu Jan 22 18:02:32 2015 From: rbar9508 at uni.sydney.edu.au (rbar9508 at uni.sydney.edu.au) Date: Thu, 22 Jan 2015 23:02:32 +0000 Subject: [ITK-users] NucMed DICOM slice thickness Message-ID: <1421967755984.90298@uni.sydney.edu.au> ITK seems to be misinterpreting the slice thickness reported in reconstructed nuc med images. The problem is that the slice thickness is being set to 1mm for some reason. This wasn't a problem for ITK version 3.14, but it seems to have started to occur with versions 4.4.2 and 4.7.0 - probably since GDCM was merged into the ITK project. The slice thickness tag is 0018,0050. What's the best workaround if I want to use ITK version 4? Thanks Robbie -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Jan 22 19:01:16 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 22 Jan 2015 19:01:16 -0500 Subject: [ITK-users] NucMed DICOM slice thickness In-Reply-To: <1421967755984.90298@uni.sydney.edu.au> References: <1421967755984.90298@uni.sydney.edu.au> Message-ID: Hi Robbie, This slice thickness, how thick the slab of tissue is that is irradiated, is different from the spacing between slices -- the slice thickness tag should not be used for spacing. However, to override this, use the ChangeInformationImageFilter with the slice thickness taken from the MetaDataDictionary. Hope this helps, Matt On Thu, Jan 22, 2015 at 6:02 PM, rbar9508 at uni.sydney.edu.au wrote: > > ITK seems to be misinterpreting the slice thickness reported in > reconstructed nuc med images. The problem is that the slice thickness is > being set to 1mm for some reason. > > > This wasn't a problem for ITK version 3.14, but it seems to have started to > occur with versions 4.4.2 and 4.7.0 - probably since GDCM was merged into > the ITK project. > > > The slice thickness tag is 0018,0050. > > > What's the best workaround if I want to use ITK version 4? > > > Thanks > > > Robbie > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From rbar9508 at uni.sydney.edu.au Thu Jan 22 19:19:14 2015 From: rbar9508 at uni.sydney.edu.au (rbar9508 at uni.sydney.edu.au) Date: Fri, 23 Jan 2015 00:19:14 +0000 Subject: [ITK-users] NucMed DICOM slice thickness In-Reply-To: References: <1421967755984.90298@uni.sydney.edu.au>, Message-ID: Thanks Matt. Actually, it looks like both slice spacing and slice thickness are set to 2.697mm for this particular spect recon image. It looks like it is in accordance with the nuc med IOD. Sent from my iPad > On 23 Jan 2015, at 11:01 am, "Matt McCormick" wrote: > > Hi Robbie, > > This slice thickness, how thick the slab of tissue is that is > irradiated, is different from the spacing between slices -- the slice > thickness tag should not be used for spacing. However, to override > this, use the ChangeInformationImageFilter with the slice thickness > taken from the MetaDataDictionary. > > Hope this helps, > Matt > > On Thu, Jan 22, 2015 at 6:02 PM, rbar9508 at uni.sydney.edu.au > wrote: >> >> ITK seems to be misinterpreting the slice thickness reported in >> reconstructed nuc med images. The problem is that the slice thickness is >> being set to 1mm for some reason. >> >> >> This wasn't a problem for ITK version 3.14, but it seems to have started to >> occur with versions 4.4.2 and 4.7.0 - probably since GDCM was merged into >> the ITK project. >> >> >> The slice thickness tag is 0018,0050. >> >> >> What's the best workaround if I want to use ITK version 4? >> >> >> Thanks >> >> >> Robbie >> >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> From grothausmann.roman at mh-hannover.de Fri Jan 23 04:20:29 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Fri, 23 Jan 2015 10:20:29 +0100 Subject: [ITK-users] [Paraview] compile itk (VTKGlue ON) with vtk from paraview In-Reply-To: <54C0CF2E.3060106@mh-hannover.de> References: <54C0CF2E.3060106@mh-hannover.de> Message-ID: <54C2125D.7090801@mh-hannover.de> On 22/01/15 11:21, Dr. Roman Grothausmann wrote: > Adding the abs. file locations to the build command does not help nor does > -L/opt/paraview-4.3.1_git/lib/paraview-4.3/ I figured that the vtk dynamic libraries of PV have the ending *-pv4.3.so which seems to be the reason why the linker does not find them. If I create symbolic links to these files without the extension: cd /opt/compilation/paraview-git_build/lib/ for i in *-pv*.so; do ln -s $i ${i%-pv*}.so; done and adding -L/opt/compilation/paraview-git_build/lib/ to CMAKE_CXX_FLAGS the compilation of ITK succeeds. I wonder, is that the way it's meant to be done? > What am I missing in my configuration of PV and ITK? > > When and where should I specify: > CMAKE_CXX_FLAGS -fPIC > BUILD_SHARED_LIBS ON/OFF > > Is this the right VTK_DIR specification for ITK: > /opt/compilation/ParaView-v4.3.1/build/VTK > or > /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3 > > > > Many thanks for any help or hints. > Roman > > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 From blowekamp at mail.nih.gov Fri Jan 23 08:31:47 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 23 Jan 2015 08:31:47 -0500 Subject: [ITK-users] FastMarching UpwindGradient Filters difference In-Reply-To: <3C7C228B-B1B1-4DF5-8CFF-06F82A542FD6@gmail.com> References: <02EFACE9-9946-4546-9403-1A2709CB7B41@mail.nih.gov> <3C7C228B-B1B1-4DF5-8CFF-06F82A542FD6@gmail.com> Message-ID: Arnaud, Thanks for the info on this. I am looked through the code in the FastMarchingImageFilterBase [1], it looks like its using std::vector a surprising number of times, and that it is getting re-allocated very frequently. Some cases look like they should be stack allocated templated array. Do you know why this class is this way? This may be the reason why it's so slow in debug mode, i.e. too much dynamic allocation on a per-pixel basis. Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx On Jan 21, 2015, at 9:33 AM, Arnaud Gelas wrote: > Hi Brad, > > FastMarchingUpwindGradientImageFilter is from ITKv3 while the other one is from ITKv4. Note that in terms of features, FastMarchingUpwiindGradientImageFilter would be a subset of the ?Base" one? > > Arnaud > > > >> On 21 Jan 2015, at 15:09, Bradley Lowekamp wrote: >> >> Hello, >> >> I am trying to figure out the difference between the FastMarchingUpwindGradientImageFilterBase[1] and the FastMarchingUpwindGradientImageFilter[2]. >> >> The first thing to notice is that the "Base" class is NOT a parent of the other. Secondly, the non-Base implements a stopping criteria of reaching a number of target nodes. This is now incorporated as an optional stopping criteria [3], in the framework. Then both of the filters add the upwind gradient image as an output, with what appears to be duplicated code. >> >> I don't see a real difference here. I think one should be deprecated. >> >> Brad >> >> [1] http://www.itk.org/Doxygen/html/classitk_1_1FastMarchingUpwindGradientImageFilterBase.html >> [2] http://www.itk.org/Doxygen/html/classitk_1_1FastMarchingUpwindGradientImageFilter.html >> [3] http://www.itk.org/Doxygen/html/classitk_1_1FastMarchingReachedTargetNodesStoppingCriterion.html > From taylor at braun-jones.org Fri Jan 23 09:43:30 2015 From: taylor at braun-jones.org (Taylor Braun-Jones) Date: Fri, 23 Jan 2015 09:43:30 -0500 Subject: [ITK-users] Implementation of DBSCAN clustering algorithm in ITK Message-ID: Hello insight-users, Does ITK include an implementation of the DBSCAN algorithm[1] or are there plans to add one? Searching through the code didn't turn anything up, but maybe I missed it. Thanks, Taylor [1] http://en.wikipedia.org/wiki/DBSCAN -------------- next part -------------- An HTML attachment was scrubbed... URL: From flymolo at gmail.com Fri Jan 23 10:29:37 2015 From: flymolo at gmail.com (Jonathan Grimm) Date: Fri, 23 Jan 2015 10:29:37 -0500 Subject: [ITK-users] Job opening Message-ID: Our lab is looking for a programmer. We use Fiji and ITK heavily. Job flyer is linked below. Also check out the rest of website, we do microscopy and have collaborations to do Optical Coherence Tomography and MRI. http://ocularbiomechanics.com/pdfs/ProgrammerJobFlyer.pdf -- Sometimes it's hard to tell the dancer from the dance - Corwin in CoC -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri Jan 23 10:44:18 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 23 Jan 2015 10:44:18 -0500 Subject: [ITK-users] Implementation of DBSCAN clustering algorithm in ITK In-Reply-To: References: Message-ID: Hi Taylor, I think this algorithm would be great to have! Thanks, Matt On Fri, Jan 23, 2015 at 9:43 AM, Taylor Braun-Jones wrote: > Hello insight-users, > > Does ITK include an implementation of the DBSCAN algorithm[1] or are there > plans to add one? Searching through the code didn't turn anything up, but > maybe I missed it. > > Thanks, > Taylor > > [1] http://en.wikipedia.org/wiki/DBSCAN > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From taylor at braun-jones.org Fri Jan 23 12:14:24 2015 From: taylor at braun-jones.org (Taylor Braun-Jones) Date: Fri, 23 Jan 2015 12:14:24 -0500 Subject: [ITK-users] Implementation of DBSCAN clustering algorithm in ITK In-Reply-To: References: Message-ID: Maybe Nico (from the MITK team) can help :-) Nico, Would you be interested in converting mitk::UnstructuredGridClusteringFilter into a (templated) ITK filter and having it live upstream in ITK? On Fri, Jan 23, 2015 at 10:44 AM, Matt McCormick wrote: > Hi Taylor, > > I think this algorithm would be great to have! > > Thanks, > Matt > > On Fri, Jan 23, 2015 at 9:43 AM, Taylor Braun-Jones > wrote: > > Hello insight-users, > > > > Does ITK include an implementation of the DBSCAN algorithm[1] or are > there > > plans to add one? Searching through the code didn't turn anything up, but > > maybe I missed it. > > > > Thanks, > > Taylor > > > > [1] http://en.wikipedia.org/wiki/DBSCAN > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri Jan 23 12:15:45 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 23 Jan 2015 12:15:45 -0500 Subject: [ITK-users] [Paraview] compile itk (VTKGlue ON) with vtk from paraview In-Reply-To: <54C2125D.7090801@mh-hannover.de> References: <54C0CF2E.3060106@mh-hannover.de> <54C2125D.7090801@mh-hannover.de> Message-ID: Hi Roman, Thanks for looking into the issue and reporting it to the mailing list. Paraview should be installing VTKTargets.cmake, which tells the build system where to find the libraries. Note that there might be two VTKTargets.cmake files that are generated -- one for the build tree and one for the install tree. HTH, Matt On Fri, Jan 23, 2015 at 4:20 AM, Dr. Roman Grothausmann wrote: > > On 22/01/15 11:21, Dr. Roman Grothausmann wrote: >> >> Adding the abs. file locations to the build command does not help nor does >> -L/opt/paraview-4.3.1_git/lib/paraview-4.3/ > > > I figured that the vtk dynamic libraries of PV have the ending *-pv4.3.so > which seems to be the reason why the linker does not find them. If I create > symbolic links to these files without the extension: > > cd /opt/compilation/paraview-git_build/lib/ > for i in *-pv*.so; do ln -s $i ${i%-pv*}.so; done > > and adding -L/opt/compilation/paraview-git_build/lib/ to CMAKE_CXX_FLAGS > the compilation of ITK succeeds. > > I wonder, is that the way it's meant to be done? > > > >> What am I missing in my configuration of PV and ITK? >> >> When and where should I specify: >> CMAKE_CXX_FLAGS -fPIC >> BUILD_SHARED_LIBS ON/OFF >> >> Is this the right VTK_DIR specification for ITK: >> /opt/compilation/ParaView-v4.3.1/build/VTK >> or >> /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3 >> >> >> >> Many thanks for any help or hints. >> Roman >> >> > > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-9574 > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From mpinkert at wisc.edu Fri Jan 23 14:36:21 2015 From: mpinkert at wisc.edu (Michael Pinkert) Date: Fri, 23 Jan 2015 12:36:21 -0700 (MST) Subject: [ITK-users] Visual Studio 2010 Express autocomplete IntelliSense not working with ITK 4.8.0 Message-ID: <1422041781731-7586829.post@n2.nabble.com> Hi all, I recently upgraded my install of ITK from 4.5 to 4.8, but it seems to have broken IntelliSense in Microsoft Visual Studio 2010. The editor will not autocomplete functions anymore or give a list of options, making it much more cumbersome to write code. Normally it will give a list of options after :: or -> commands, but now I simply get the error: IntelliSense: 'No additional information available' (See Troubleshooting IntelliSense in C++ Projects' for further help) I am still given a list of included .h files when I use #include, and I can also right click on declared types to go to the appropriate header files, but it does not autocomplete otherwise, so the program is locating the files correctly. The faq page of "Troubleshooting IntelliSense in C++ projects" has not been helpful. Does anyone have experience with a bug like this? Best regards, Michael Pinkert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Visual-Studio-2010-Express-autocomplete-IntelliSense-not-working-with-ITK-4-8-0-tp7586829.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From dzenanz at gmail.com Fri Jan 23 16:31:17 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 23 Jan 2015 16:31:17 -0500 Subject: [ITK-users] [ITK] Visual Studio 2010 Express autocomplete IntelliSense not working with ITK 4.8.0 In-Reply-To: <1422041781731-7586829.post@n2.nabble.com> References: <1422041781731-7586829.post@n2.nabble.com> Message-ID: I do remember occasionally have such issues with template-heavy code, mostly (earlier) versions of ITK. That was years ago. Newer versions of Visual Studio handle templated code much better. Newest free VS works well with ITK. On Fri, Jan 23, 2015 at 2:36 PM, Michael Pinkert wrote: > Hi all, > > I recently upgraded my install of ITK from 4.5 to 4.8, but it seems to have > broken IntelliSense in Microsoft Visual Studio 2010. > > The editor will not autocomplete functions anymore or give a list of > options, making it much more cumbersome to write code. Normally it will > give a list of options after :: or -> commands, but now I simply get the > error: > > IntelliSense: 'No additional information available' (See Troubleshooting > IntelliSense in C++ Projects' for further help) > > I am still given a list of included .h files when I use #include, and I can > also right click on declared types to go to the appropriate header files, > but it does not autocomplete otherwise, so the program is locating the > files > correctly. > > The faq page of "Troubleshooting IntelliSense in C++ projects" has not been > helpful. > > Does anyone have experience with a bug like this? > > Best regards, > Michael Pinkert > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Visual-Studio-2010-Express-autocomplete-IntelliSense-not-working-with-ITK-4-8-0-tp7586829.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elena.bresciani87 at gmail.com Mon Jan 26 03:44:48 2015 From: elena.bresciani87 at gmail.com (gmail) Date: Mon, 26 Jan 2015 09:44:48 +0100 Subject: [ITK-users] Management of big datasets Message-ID: Hi everybody, I?m having issues with a project that requires using 3D datasets up to 4-5 GB without subsampling. The pipeline is something like this: ImageFileReader -> IntensityWindowingImageFilterType -> MedianImageFilter -> ScalarImageKmeansImageFilter -> RelabelComponentImageFilter -> RescaleIntensityImageFilter -> ImageSeriesWriter I was getting std::bad_alloc error but I solved this problem with -> ReleaseDataFlagOn() for each filter of the pipeline. My code runs well till the end and all the images of the output stack are written but after only 170 images (of a total of 1990) are written correctly whilst the others have only black pixels. Any guess on what could be the problem? Maybe I should use ImageFileWriter instead of ImageSeriesWriter? Best regards Elena -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Mon Jan 26 04:02:20 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Mon, 26 Jan 2015 10:02:20 +0100 Subject: [ITK-users] [Paraview] compile itk (VTKGlue ON) with vtk from paraview In-Reply-To: References: <54C0CF2E.3060106@mh-hannover.de> <54C2125D.7090801@mh-hannover.de> Message-ID: <54C6029C.4040600@mh-hannover.de> Hi Matt, Thank You very much for Your reply. I can only find one VTKTargets.cmake in /opt/compilation/paraview-git_build/VTK/ It seems though that it is lacking the relevant entries for the libraries that troubled me, e.g. vtkPVPythonCatalyst and vtkUtilitiesPythonInitializer. I'm about to publish the ITK-VTK PV plugin in the Midas Journal, what installation instructions should I give there? Will the testing environment be able to compile this plugin and its tests or should I disable automatic testing for this contribution? Many thanks for looking into this. Roman On 23/01/15 18:15, Matt McCormick wrote: > Hi Roman, > > Thanks for looking into the issue and reporting it to the mailing list. > > Paraview should be installing VTKTargets.cmake, which tells the build > system where to find the libraries. Note that there might be two > VTKTargets.cmake files that are generated -- one for the build tree > and one for the install tree. > > HTH, > Matt > > On Fri, Jan 23, 2015 at 4:20 AM, Dr. Roman Grothausmann > wrote: >> >> On 22/01/15 11:21, Dr. Roman Grothausmann wrote: >>> >>> Adding the abs. file locations to the build command does not help nor does >>> -L/opt/paraview-4.3.1_git/lib/paraview-4.3/ >> >> >> I figured that the vtk dynamic libraries of PV have the ending *-pv4.3.so >> which seems to be the reason why the linker does not find them. If I create >> symbolic links to these files without the extension: >> >> cd /opt/compilation/paraview-git_build/lib/ >> for i in *-pv*.so; do ln -s $i ${i%-pv*}.so; done >> >> and adding -L/opt/compilation/paraview-git_build/lib/ to CMAKE_CXX_FLAGS >> the compilation of ITK succeeds. >> >> I wonder, is that the way it's meant to be done? >> >> >> >>> What am I missing in my configuration of PV and ITK? >>> >>> When and where should I specify: >>> CMAKE_CXX_FLAGS -fPIC >>> BUILD_SHARED_LIBS ON/OFF >>> >>> Is this the right VTK_DIR specification for ITK: >>> /opt/compilation/ParaView-v4.3.1/build/VTK >>> or >>> /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3 >>> >>> >>> >>> Many thanks for any help or hints. >>> Roman >>> >>> >> >> -- >> Dr. Roman Grothausmann >> >> Tomographie und Digitale Bildverarbeitung >> Tomography and Digital Image Analysis >> >> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >> Medizinische Hochschule Hannover >> Carl-Neuberg-Str. 1 >> D-30625 Hannover >> >> Tel. +49 511 532-9574 >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 From matt.mccormick at kitware.com Mon Jan 26 09:39:23 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 26 Jan 2015 09:39:23 -0500 Subject: [ITK-users] Management of big datasets In-Reply-To: References: Message-ID: Hi Elena, Using ImageFileWriter might help debug the problem. Or, ensuring that all the data is being processed incrementally along each stage of the pipeline can help. Also, it is recommended to conclude each pipeline with ->UpdateLargestPossibleRegion(); instead of just ->Update(); which helps with some subtle pipeline issues. Please keep us posted on your progress. Thanks, Matt On Mon, Jan 26, 2015 at 3:44 AM, gmail wrote: > Hi everybody, > > I?m having issues with a project that requires using 3D datasets up to 4-5 > GB without subsampling. > The pipeline is something like this: > > ImageFileReader -> IntensityWindowingImageFilterType -> MedianImageFilter -> > ScalarImageKmeansImageFilter -> RelabelComponentImageFilter -> > RescaleIntensityImageFilter -> ImageSeriesWriter > > I was getting std::bad_alloc error but I solved this problem with -> > ReleaseDataFlagOn() for each filter of the pipeline. > > My code runs well till the end and all the images of the output stack are > written but after only 170 images (of a total of 1990) are written correctly > whilst the others have only black pixels. > > Any guess on what could be the problem? Maybe I should use ImageFileWriter > instead of ImageSeriesWriter? > > Best regards > > Elena > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From blowekamp at mail.nih.gov Mon Jan 26 09:43:36 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 26 Jan 2015 09:43:36 -0500 Subject: [ITK-users] Management of big datasets In-Reply-To: References: Message-ID: Hello, It looks like this should work. What OS, compiler, architecture are you using? How much memory is on the system you are using? We need to narrow down where the problem is occurring. Here are some suggestions to track down and to figure out where the problem is: Your though of switching to a ImageFileWirter is reasonable. My goto format it mha, as I have written the most tests for that IO, and have the highest confidence there. Does this pipeline work with smaller data? Perhaps just run your data through the BInShrinkFilter in stead of Median? I have used most of these filters with large data, and expect them to work very well. But I have not used the ScalarImageKmeans so much. Try replacing it with the MultiOtsu. Also write out some intermediate image to see where the image processing is going awry. Hope that helps, Brad On Jan 26, 2015, at 3:44 AM, gmail wrote: > Hi everybody, > > I?m having issues with a project that requires using 3D datasets up to 4-5 GB without subsampling. > The pipeline is something like this: > > ImageFileReader -> IntensityWindowingImageFilterType -> MedianImageFilter -> ScalarImageKmeansImageFilter -> RelabelComponentImageFilter -> RescaleIntensityImageFilter -> ImageSeriesWriter > > I was getting std::bad_alloc error but I solved this problem with -> ReleaseDataFlagOn() for each filter of the pipeline. > > My code runs well till the end and all the images of the output stack are written but after only 170 images (of a total of 1990) are written correctly whilst the others have only black pixels. > > Any guess on what could be the problem? Maybe I should use ImageFileWriter instead of ImageSeriesWriter? > > Best regards > > Elena > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Jan 26 11:54:53 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 26 Jan 2015 11:54:53 -0500 Subject: [ITK-users] [Paraview] compile itk (VTKGlue ON) with vtk from paraview In-Reply-To: <54C6029C.4040600@mh-hannover.de> References: <54C0CF2E.3060106@mh-hannover.de> <54C2125D.7090801@mh-hannover.de> <54C6029C.4040600@mh-hannover.de> Message-ID: Hi Roman, Thanks for the update. Great to hear about the Midas Journal article! I do not think the Midas Journal will be able to build your plugin. I would recommend creating build instructions to build against a ParaView build tree. I have just verified that ITK builds with the ITKVtkGlue module ON when pointing VTK_DIR to the /VTK directory. I don't see the install tree VTKTargets.cmake file in my ParaView build, either. In the long term, the ParaView CMake configuration should be corrected. HTH, Matt On Mon, Jan 26, 2015 at 4:02 AM, Dr. Roman Grothausmann wrote: > Hi Matt, > > > Thank You very much for Your reply. > I can only find one VTKTargets.cmake in > /opt/compilation/paraview-git_build/VTK/ > It seems though that it is lacking the relevant entries for the libraries > that troubled me, e.g. vtkPVPythonCatalyst and > vtkUtilitiesPythonInitializer. > > I'm about to publish the ITK-VTK PV plugin in the Midas Journal, what > installation instructions should I give there? > Will the testing environment be able to compile this plugin and its tests or > should I disable automatic testing for this contribution? > > Many thanks for looking into this. > Roman > > > On 23/01/15 18:15, Matt McCormick wrote: >> >> Hi Roman, >> >> Thanks for looking into the issue and reporting it to the mailing list. >> >> Paraview should be installing VTKTargets.cmake, which tells the build >> system where to find the libraries. Note that there might be two >> VTKTargets.cmake files that are generated -- one for the build tree >> and one for the install tree. >> >> HTH, >> Matt >> >> On Fri, Jan 23, 2015 at 4:20 AM, Dr. Roman Grothausmann >> wrote: >>> >>> >>> On 22/01/15 11:21, Dr. Roman Grothausmann wrote: >>>> >>>> >>>> Adding the abs. file locations to the build command does not help nor >>>> does >>>> -L/opt/paraview-4.3.1_git/lib/paraview-4.3/ >>> >>> >>> >>> I figured that the vtk dynamic libraries of PV have the ending *-pv4.3.so >>> which seems to be the reason why the linker does not find them. If I >>> create >>> symbolic links to these files without the extension: >>> >>> cd /opt/compilation/paraview-git_build/lib/ >>> for i in *-pv*.so; do ln -s $i ${i%-pv*}.so; done >>> >>> and adding -L/opt/compilation/paraview-git_build/lib/ to CMAKE_CXX_FLAGS >>> the compilation of ITK succeeds. >>> >>> I wonder, is that the way it's meant to be done? >>> >>> >>> >>>> What am I missing in my configuration of PV and ITK? >>>> >>>> When and where should I specify: >>>> CMAKE_CXX_FLAGS -fPIC >>>> BUILD_SHARED_LIBS ON/OFF >>>> >>>> Is this the right VTK_DIR specification for ITK: >>>> /opt/compilation/ParaView-v4.3.1/build/VTK >>>> or >>>> /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3 >>>> >>>> >>>> >>>> Many thanks for any help or hints. >>>> Roman >>>> >>>> >>> >>> -- >>> Dr. Roman Grothausmann >>> >>> Tomographie und Digitale Bildverarbeitung >>> Tomography and Digital Image Analysis >>> >>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>> Medizinische Hochschule Hannover >>> Carl-Neuberg-Str. 1 >>> D-30625 Hannover >>> >>> Tel. +49 511 532-9574 >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users > > > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-9574 From matt.mccormick at kitware.com Mon Jan 26 12:03:33 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 26 Jan 2015 12:03:33 -0500 Subject: [ITK-users] [Paraview] compile itk (VTKGlue ON) with vtk from paraview In-Reply-To: References: <54C0CF2E.3060106@mh-hannover.de> <54C2125D.7090801@mh-hannover.de> <54C6029C.4040600@mh-hannover.de> Message-ID: PS. Another option is to compile / install VTK separately outside of ParaView. This may be a better approach. It is a little tricky to configure ParaView in this way. See: http://www.paraview.org/gitweb?p=ParaView.git;a=blob;f=CMakeLists.txt;h=d80ff535090edc1fa9520d39aa66d269fc1db8b3;hb=HEAD#l516 On Mon, Jan 26, 2015 at 11:54 AM, Matt McCormick wrote: > Hi Roman, > > Thanks for the update. Great to hear about the Midas Journal article! > > I do not think the Midas Journal will be able to build your plugin. > > I would recommend creating build instructions to build against a > ParaView build tree. I have just verified that ITK builds with the > ITKVtkGlue module ON when pointing VTK_DIR to the /VTK > directory. > > I don't see the install tree VTKTargets.cmake file in my ParaView > build, either. In the long term, the ParaView CMake configuration > should be corrected. > > HTH, > Matt > > On Mon, Jan 26, 2015 at 4:02 AM, Dr. Roman Grothausmann > wrote: >> Hi Matt, >> >> >> Thank You very much for Your reply. >> I can only find one VTKTargets.cmake in >> /opt/compilation/paraview-git_build/VTK/ >> It seems though that it is lacking the relevant entries for the libraries >> that troubled me, e.g. vtkPVPythonCatalyst and >> vtkUtilitiesPythonInitializer. >> >> I'm about to publish the ITK-VTK PV plugin in the Midas Journal, what >> installation instructions should I give there? >> Will the testing environment be able to compile this plugin and its tests or >> should I disable automatic testing for this contribution? >> >> Many thanks for looking into this. >> Roman >> >> >> On 23/01/15 18:15, Matt McCormick wrote: >>> >>> Hi Roman, >>> >>> Thanks for looking into the issue and reporting it to the mailing list. >>> >>> Paraview should be installing VTKTargets.cmake, which tells the build >>> system where to find the libraries. Note that there might be two >>> VTKTargets.cmake files that are generated -- one for the build tree >>> and one for the install tree. >>> >>> HTH, >>> Matt >>> >>> On Fri, Jan 23, 2015 at 4:20 AM, Dr. Roman Grothausmann >>> wrote: >>>> >>>> >>>> On 22/01/15 11:21, Dr. Roman Grothausmann wrote: >>>>> >>>>> >>>>> Adding the abs. file locations to the build command does not help nor >>>>> does >>>>> -L/opt/paraview-4.3.1_git/lib/paraview-4.3/ >>>> >>>> >>>> >>>> I figured that the vtk dynamic libraries of PV have the ending *-pv4.3.so >>>> which seems to be the reason why the linker does not find them. If I >>>> create >>>> symbolic links to these files without the extension: >>>> >>>> cd /opt/compilation/paraview-git_build/lib/ >>>> for i in *-pv*.so; do ln -s $i ${i%-pv*}.so; done >>>> >>>> and adding -L/opt/compilation/paraview-git_build/lib/ to CMAKE_CXX_FLAGS >>>> the compilation of ITK succeeds. >>>> >>>> I wonder, is that the way it's meant to be done? >>>> >>>> >>>> >>>>> What am I missing in my configuration of PV and ITK? >>>>> >>>>> When and where should I specify: >>>>> CMAKE_CXX_FLAGS -fPIC >>>>> BUILD_SHARED_LIBS ON/OFF >>>>> >>>>> Is this the right VTK_DIR specification for ITK: >>>>> /opt/compilation/ParaView-v4.3.1/build/VTK >>>>> or >>>>> /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3 >>>>> >>>>> >>>>> >>>>> Many thanks for any help or hints. >>>>> Roman >>>>> >>>>> >>>> >>>> -- >>>> Dr. Roman Grothausmann >>>> >>>> Tomographie und Digitale Bildverarbeitung >>>> Tomography and Digital Image Analysis >>>> >>>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>>> Medizinische Hochschule Hannover >>>> Carl-Neuberg-Str. 1 >>>> D-30625 Hannover >>>> >>>> Tel. +49 511 532-9574 >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> -- >> Dr. Roman Grothausmann >> >> Tomographie und Digitale Bildverarbeitung >> Tomography and Digital Image Analysis >> >> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >> Medizinische Hochschule Hannover >> Carl-Neuberg-Str. 1 >> D-30625 Hannover >> >> Tel. +49 511 532-9574 From alexandra-judisch at uiowa.edu Mon Jan 26 12:04:46 2015 From: alexandra-judisch at uiowa.edu (Judisch, Alexandra L) Date: Mon, 26 Jan 2015 17:04:46 +0000 Subject: [ITK-users] Image Size [0, 0, 0] Message-ID: <15CDF1AC0152924C817C2D5522E0904F329FA901@ITSNT438.iowa.uiowa.edu> Hi all! I am trying to write code to downsample an image using the resample image filter. The problem is that the program keeps failing because it is reading the image size as [0, 0, 0] which is obviously not the case. Has anyone run into this problem before or have any ideas how to fix it? Thanks, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Jan 26 12:27:54 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 26 Jan 2015 12:27:54 -0500 Subject: [ITK-users] Image Size [0, 0, 0] In-Reply-To: <15CDF1AC0152924C817C2D5522E0904F329FA901@ITSNT438.iowa.uiowa.edu> References: <15CDF1AC0152924C817C2D5522E0904F329FA901@ITSNT438.iowa.uiowa.edu> Message-ID: What image format? On Mon, Jan 26, 2015 at 12:04 PM, Judisch, Alexandra L wrote: > Hi all! > I am trying to write code to downsample an image using the resample image > filter. The problem is that the program keeps failing because it is reading > the image size as [0, 0, 0] which is obviously not the case. Has anyone run > into this problem before or have any ideas how to fix it? > Thanks, > Alex > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Mon Jan 26 12:50:24 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 26 Jan 2015 12:50:24 -0500 Subject: [ITK-users] Image Size [0, 0, 0] In-Reply-To: References: <15CDF1AC0152924C817C2D5522E0904F329FA901@ITSNT438.iowa.uiowa.edu> Message-ID: Can you share code that illustrate the problem? On Mon, Jan 26, 2015 at 12:27 PM, Bill Lorensen wrote: > What image format? > > > On Mon, Jan 26, 2015 at 12:04 PM, Judisch, Alexandra L > wrote: >> Hi all! >> I am trying to write code to downsample an image using the resample image >> filter. The problem is that the program keeps failing because it is reading >> the image size as [0, 0, 0] which is obviously not the case. Has anyone run >> into this problem before or have any ideas how to fix it? >> Thanks, >> Alex >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Mon Jan 26 12:57:37 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 26 Jan 2015 12:57:37 -0500 Subject: [ITK-users] Image Size [0, 0, 0] In-Reply-To: <15CDF1AC0152924C817C2D5522E0904F329FA93E@ITSNT438.iowa.uiowa.edu> References: <15CDF1AC0152924C817C2D5522E0904F329FA901@ITSNT438.iowa.uiowa.edu> <15CDF1AC0152924C817C2D5522E0904F329FA93E@ITSNT438.iowa.uiowa.edu> Message-ID: Before input = reader->GetOutput(); apply reader->Update(); On Mon, Jan 26, 2015 at 12:52 PM, Judisch, Alexandra L wrote: > Here it is. > ________________________________________ > From: Bill Lorensen [bill.lorensen at gmail.com] > Sent: Monday, January 26, 2015 11:50 AM > To: Judisch, Alexandra L > Cc: insight-users at itk.org > Subject: Re: [ITK-users] Image Size [0, 0, 0] > > Can you share code that illustrate the problem? > > > On Mon, Jan 26, 2015 at 12:27 PM, Bill Lorensen wrote: >> What image format? >> >> >> On Mon, Jan 26, 2015 at 12:04 PM, Judisch, Alexandra L >> wrote: >>> Hi all! >>> I am trying to write code to downsample an image using the resample image >>> filter. The problem is that the program keeps failing because it is reading >>> the image size as [0, 0, 0] which is obviously not the case. Has anyone run >>> into this problem before or have any ideas how to fix it? >>> Thanks, >>> Alex >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Mon Jan 26 12:58:51 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 26 Jan 2015 12:58:51 -0500 Subject: [ITK-users] Image Size [0, 0, 0] In-Reply-To: References: <15CDF1AC0152924C817C2D5522E0904F329FA901@ITSNT438.iowa.uiowa.edu> <15CDF1AC0152924C817C2D5522E0904F329FA93E@ITSNT438.iowa.uiowa.edu> Message-ID: Or instead of resample->SetInput( input ); apply resample->SetInput(reader->GetOutput()); On Mon, Jan 26, 2015 at 12:57 PM, Bill Lorensen wrote: > Before > input = reader->GetOutput(); > apply > reader->Update(); > > > On Mon, Jan 26, 2015 at 12:52 PM, Judisch, Alexandra L > wrote: >> Here it is. >> ________________________________________ >> From: Bill Lorensen [bill.lorensen at gmail.com] >> Sent: Monday, January 26, 2015 11:50 AM >> To: Judisch, Alexandra L >> Cc: insight-users at itk.org >> Subject: Re: [ITK-users] Image Size [0, 0, 0] >> >> Can you share code that illustrate the problem? >> >> >> On Mon, Jan 26, 2015 at 12:27 PM, Bill Lorensen wrote: >>> What image format? >>> >>> >>> On Mon, Jan 26, 2015 at 12:04 PM, Judisch, Alexandra L >>> wrote: >>>> Hi all! >>>> I am trying to write code to downsample an image using the resample image >>>> filter. The problem is that the program keeps failing because it is reading >>>> the image size as [0, 0, 0] which is obviously not the case. Has anyone run >>>> into this problem before or have any ideas how to fix it? >>>> Thanks, >>>> Alex >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From mpinkert at wisc.edu Mon Jan 26 15:30:40 2015 From: mpinkert at wisc.edu (Michael Pinkert) Date: Mon, 26 Jan 2015 13:30:40 -0700 (MST) Subject: [ITK-users] Trouble compiling ITK 4.8.0 on Visual Studio 2013/12.0 Message-ID: <1422304240599-7586842.post@n2.nabble.com> Hi all, I have been trying to compile ITK on Visual Studio 2013, as I was having problems with the autocomplete IntelliSense in Visual Studio 2010. However, when I try to build ITK I am running into two errors, and do not know what to do about them. Does anyone have experience with the following? Error 1 error C1189: #error : "No native data type can represent a 16-bit integer." C:\Build\ITK\Modules\ThirdParty\KWSys\src\itksys\FundamentalType.h 75 1 ITKIOLSM Error 2 error LNK1104: cannot open file '..\..\..\..\lib\Debug\ITKIOLSM-4.8.lib' C:\Build\ITK\Modules\Core\TestKernel\src\LINK itkTestDriver Best regards, Michael Pinkert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Mon Jan 26 15:36:21 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 26 Jan 2015 15:36:21 -0500 Subject: [ITK-users] Trouble compiling ITK 4.8.0 on Visual Studio 2013/12.0 In-Reply-To: <1422304240599-7586842.post@n2.nabble.com> References: <1422304240599-7586842.post@n2.nabble.com> Message-ID: Hi Michael, Did you start with a fresh build tree? Matt On Mon, Jan 26, 2015 at 3:30 PM, Michael Pinkert wrote: > Hi all, > > I have been trying to compile ITK on Visual Studio 2013, as I was having > problems with the autocomplete IntelliSense in Visual Studio 2010. However, > when I try to build ITK I am running into two errors, and do not know what > to do about them. Does anyone have experience with the following? > > Error 1 error C1189: #error : "No native data type can represent a 16-bit > integer." C:\Build\ITK\Modules\ThirdParty\KWSys\src\itksys\FundamentalType.h > 75 1 ITKIOLSM > > Error 2 error LNK1104: cannot open file > '..\..\..\..\lib\Debug\ITKIOLSM-4.8.lib' > C:\Build\ITK\Modules\Core\TestKernel\src\LINK itkTestDriver > > Best regards, > Michael Pinkert > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From mpinkert at wisc.edu Mon Jan 26 15:44:00 2015 From: mpinkert at wisc.edu (Michael Pinkert) Date: Mon, 26 Jan 2015 13:44:00 -0700 (MST) Subject: [ITK-users] Trouble compiling ITK 4.8.0 on Visual Studio 2013/12.0 In-Reply-To: References: <1422304240599-7586842.post@n2.nabble.com> Message-ID: <1422305040386-7586844.post@n2.nabble.com> Hi Matt, I am not sure what you mean by fresh build tree. I cleared my cache in CMake and deleted the build folder for my old ITK installation, if that is what you mean. Best regards, Michale Pinkert Matt McCormick-2 wrote > Hi Michael, > > Did you start with a fresh build tree? > > Matt > > On Mon, Jan 26, 2015 at 3:30 PM, Michael Pinkert < > mpinkert@ > > wrote: >> Hi all, >> >> I have been trying to compile ITK on Visual Studio 2013, as I was having >> problems with the autocomplete IntelliSense in Visual Studio 2010. >> However, >> when I try to build ITK I am running into two errors, and do not know >> what >> to do about them. Does anyone have experience with the following? >> >> Error 1 error C1189: #error : "No native data type can represent >> a 16-bit >> integer." >> C:\Build\ITK\Modules\ThirdParty\KWSys\src\itksys\FundamentalType.h >> 75 1 ITKIOLSM >> >> Error 2 error LNK1104: cannot open file >> '..\..\..\..\lib\Debug\ITKIOLSM-4.8.lib' >> C:\Build\ITK\Modules\Core\TestKernel\src\LINK itkTestDriver >> >> Best regards, >> Michael Pinkert >> >> >> >> -- >> View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842.html >> Sent from the ITK Insight Users mailing list archive at Nabble.com. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842p7586844.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Mon Jan 26 15:49:23 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 26 Jan 2015 15:49:23 -0500 Subject: [ITK-users] Trouble compiling ITK 4.8.0 on Visual Studio 2013/12.0 In-Reply-To: <1422305040386-7586844.post@n2.nabble.com> References: <1422304240599-7586842.post@n2.nabble.com> <1422305040386-7586844.post@n2.nabble.com> Message-ID: Hi Michael, Instead of just clearing the cache, it is necessary to delete the entry build tree when switching to a new compiler. HTH, Matt On Mon, Jan 26, 2015 at 3:44 PM, Michael Pinkert wrote: > Hi Matt, > > I am not sure what you mean by fresh build tree. I cleared my cache in > CMake and deleted the build folder for my old ITK installation, if that is > what you mean. > > Best regards, > Michale Pinkert > > > Matt McCormick-2 wrote >> Hi Michael, >> >> Did you start with a fresh build tree? >> >> Matt >> >> On Mon, Jan 26, 2015 at 3:30 PM, Michael Pinkert < > >> mpinkert@ > >> > wrote: >>> Hi all, >>> >>> I have been trying to compile ITK on Visual Studio 2013, as I was having >>> problems with the autocomplete IntelliSense in Visual Studio 2010. >>> However, >>> when I try to build ITK I am running into two errors, and do not know >>> what >>> to do about them. Does anyone have experience with the following? >>> >>> Error 1 error C1189: #error : "No native data type can represent >>> a 16-bit >>> integer." >>> C:\Build\ITK\Modules\ThirdParty\KWSys\src\itksys\FundamentalType.h >>> 75 1 ITKIOLSM >>> >>> Error 2 error LNK1104: cannot open file >>> '..\..\..\..\lib\Debug\ITKIOLSM-4.8.lib' >>> C:\Build\ITK\Modules\Core\TestKernel\src\LINK itkTestDriver >>> >>> Best regards, >>> Michael Pinkert >>> >>> >>> >>> -- >>> View this message in context: >>> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842.html >>> Sent from the ITK Insight Users mailing list archive at Nabble.com. >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842p7586844.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From mpinkert at wisc.edu Tue Jan 27 10:43:26 2015 From: mpinkert at wisc.edu (Michael Pinkert) Date: Tue, 27 Jan 2015 08:43:26 -0700 (MST) Subject: [ITK-users] Trouble compiling ITK 4.8.0 on Visual Studio 2013/12.0 In-Reply-To: References: <1422304240599-7586842.post@n2.nabble.com> <1422305040386-7586844.post@n2.nabble.com> Message-ID: <1422373406186-7586846.post@n2.nabble.com> Hi Matt, I managed to get ITK built by building to a new folder, but I still do not understand how I am supposed to clear the build tree, as I doubt that is the correct solution. I have googled the term, but I have not found anything that would indicate how I would delete the build tree, if clearing the cache and deleting the build folder do not count. I am still having more errors after trying to build it. The first is an error in the compiler: command-line error: invalid macro definition: ..../ITK/CMakeFiles/vtkRenderingCore_AUTOINIT_vtkInteractionStyle_vtkRenderingFreeType_vtkRenderingOpenGL.h" The next is related, in that I am still having trouble with the IntelliSense autocomplete not functioning in any of my projects, which was my purpose in updating visual studio. Do you have any experience with these additional errors? I believe the first error may be related to IntelliSense, due to a quick google turning up that error in relation to it, but nothing I've found has told me how to solve it. Best regards, Michael Pinkert Matt McCormick-2 wrote > Hi Michael, > > Instead of just clearing the cache, it is necessary to delete the > entry build tree when switching to a new compiler. > > HTH, > Matt > > On Mon, Jan 26, 2015 at 3:44 PM, Michael Pinkert < > mpinkert@ > > wrote: >> Hi Matt, >> >> I am not sure what you mean by fresh build tree. I cleared my cache in >> CMake and deleted the build folder for my old ITK installation, if that >> is >> what you mean. >> >> Best regards, >> Michale Pinkert >> >> >> Matt McCormick-2 wrote >>> Hi Michael, >>> >>> Did you start with a fresh build tree? >>> >>> Matt >>> >>> On Mon, Jan 26, 2015 at 3:30 PM, Michael Pinkert < >> >>> mpinkert@ >> >>> > wrote: >>>> Hi all, >>>> >>>> I have been trying to compile ITK on Visual Studio 2013, as I was >>>> having >>>> problems with the autocomplete IntelliSense in Visual Studio 2010. >>>> However, >>>> when I try to build ITK I am running into two errors, and do not know >>>> what >>>> to do about them. Does anyone have experience with the following? >>>> >>>> Error 1 error C1189: #error : "No native data type can >>>> represent >>>> a 16-bit >>>> integer." >>>> C:\Build\ITK\Modules\ThirdParty\KWSys\src\itksys\FundamentalType.h >>>> 75 1 ITKIOLSM >>>> >>>> Error 2 error LNK1104: cannot open file >>>> '..\..\..\..\lib\Debug\ITKIOLSM-4.8.lib' >>>> C:\Build\ITK\Modules\Core\TestKernel\src\LINK itkTestDriver >>>> >>>> Best regards, >>>> Michael Pinkert >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842.html >>>> Sent from the ITK Insight Users mailing list archive at Nabble.com. >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> >> >> >> -- >> View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842p7586844.html >> Sent from the ITK Insight Users mailing list archive at Nabble.com. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842p7586846.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Tue Jan 27 12:45:56 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 27 Jan 2015 12:45:56 -0500 Subject: [ITK-users] Trouble compiling ITK 4.8.0 on Visual Studio 2013/12.0 In-Reply-To: <1422373406186-7586846.post@n2.nabble.com> References: <1422304240599-7586842.post@n2.nabble.com> <1422305040386-7586844.post@n2.nabble.com> <1422373406186-7586846.post@n2.nabble.com> Message-ID: Hi Michael, > I managed to get ITK built by building to a new folder, but I still do not > understand how I am supposed to clear the build tree, as I doubt that is the > correct solution. I have googled the term, but I have not found anything > that would indicate how I would delete the build tree, if clearing the cache > and deleting the build folder do not count. Good to hear it is build . By "clearing the build tree", I meant to complete delete all the content of the build folder. Sorry if there was any confusion. > I am still having more errors after trying to build it. The first is an > error in the compiler: > > command-line error: invalid macro definition: > ..../ITK/CMakeFiles/vtkRenderingCore_AUTOINIT_vtkInteractionStyle_vtkRenderingFreeType_vtkRenderingOpenGL.h" This is fixed in ITK's current Git "master" and "release" branches. Instructions to get the Git version are here [1]. > The next is related, in that I am still having trouble with the IntelliSense > autocomplete not functioning in any of my projects, which was my purpose in > updating visual studio. Do you have any experience with these additional > errors? I believe the first error may be related to IntelliSense, due to a > quick google turning up that error in relation to it, but nothing I've found > has told me how to solve it. Sorry, I don't have much experience with IntelliSense. Be well, Matt [1] http://www.itk.org/Wiki/ITK/Git/Download > Best regards, > Michael Pinkert > > > Matt McCormick-2 wrote >> Hi Michael, >> >> Instead of just clearing the cache, it is necessary to delete the >> entry build tree when switching to a new compiler. >> >> HTH, >> Matt >> >> On Mon, Jan 26, 2015 at 3:44 PM, Michael Pinkert < > >> mpinkert@ > >> > wrote: >>> Hi Matt, >>> >>> I am not sure what you mean by fresh build tree. I cleared my cache in >>> CMake and deleted the build folder for my old ITK installation, if that >>> is >>> what you mean. >>> >>> Best regards, >>> Michale Pinkert >>> >>> >>> Matt McCormick-2 wrote >>>> Hi Michael, >>>> >>>> Did you start with a fresh build tree? >>>> >>>> Matt >>>> >>>> On Mon, Jan 26, 2015 at 3:30 PM, Michael Pinkert < >>> >>>> mpinkert@ >>> >>>> > wrote: >>>>> Hi all, >>>>> >>>>> I have been trying to compile ITK on Visual Studio 2013, as I was >>>>> having >>>>> problems with the autocomplete IntelliSense in Visual Studio 2010. >>>>> However, >>>>> when I try to build ITK I am running into two errors, and do not know >>>>> what >>>>> to do about them. Does anyone have experience with the following? >>>>> >>>>> Error 1 error C1189: #error : "No native data type can >>>>> represent >>>>> a 16-bit >>>>> integer." >>>>> C:\Build\ITK\Modules\ThirdParty\KWSys\src\itksys\FundamentalType.h >>>>> 75 1 ITKIOLSM >>>>> >>>>> Error 2 error LNK1104: cannot open file >>>>> '..\..\..\..\lib\Debug\ITKIOLSM-4.8.lib' >>>>> C:\Build\ITK\Modules\Core\TestKernel\src\LINK itkTestDriver >>>>> >>>>> Best regards, >>>>> Michael Pinkert >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842.html >>>>> Sent from the ITK Insight Users mailing list archive at Nabble.com. >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842p7586844.html >>> Sent from the ITK Insight Users mailing list archive at Nabble.com. >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842p7586846.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From dzenanz at gmail.com Tue Jan 27 13:11:11 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 27 Jan 2015 13:11:11 -0500 Subject: [ITK-users] Trouble compiling ITK 4.8.0 on Visual Studio 2013/12.0 In-Reply-To: <1422373406186-7586846.post@n2.nabble.com> References: <1422304240599-7586842.post@n2.nabble.com> <1422305040386-7586844.post@n2.nabble.com> <1422373406186-7586846.post@n2.nabble.com> Message-ID: Hi Michael, compile errors in the project can throw off IntelliSense. Once the project is properly compiling, it takes some time to gather all the information into a browsing database (*.sdf). Let VS scan all headers and generate this file. It needs to be done independently for projects using ITK, I think. In case IntelliSense is broken for a project, try closing VS, deleting its .sdf file, and then reopening the project's solution file. This should re-trigger an update of IntelliSense browsing database. HTH On Tue, Jan 27, 2015 at 10:43 AM, Michael Pinkert wrote: > Hi Matt, > > I managed to get ITK built by building to a new folder, but I still do not > understand how I am supposed to clear the build tree, as I doubt that is > the > correct solution. I have googled the term, but I have not found anything > that would indicate how I would delete the build tree, if clearing the > cache > and deleting the build folder do not count. > > I am still having more errors after trying to build it. The first is an > error in the compiler: > > command-line error: invalid macro definition: > > ..../ITK/CMakeFiles/vtkRenderingCore_AUTOINIT_vtkInteractionStyle_vtkRenderingFreeType_vtkRenderingOpenGL.h" > > The next is related, in that I am still having trouble with the > IntelliSense > autocomplete not functioning in any of my projects, which was my purpose in > updating visual studio. Do you have any experience with these additional > errors? I believe the first error may be related to IntelliSense, due to a > quick google turning up that error in relation to it, but nothing I've > found > has told me how to solve it. > > Best regards, > Michael Pinkert > > > Matt McCormick-2 wrote > > Hi Michael, > > > > Instead of just clearing the cache, it is necessary to delete the > > entry build tree when switching to a new compiler. > > > > HTH, > > Matt > > > > On Mon, Jan 26, 2015 at 3:44 PM, Michael Pinkert < > > > mpinkert@ > > > > wrote: > >> Hi Matt, > >> > >> I am not sure what you mean by fresh build tree. I cleared my cache in > >> CMake and deleted the build folder for my old ITK installation, if that > >> is > >> what you mean. > >> > >> Best regards, > >> Michale Pinkert > >> > >> > >> Matt McCormick-2 wrote > >>> Hi Michael, > >>> > >>> Did you start with a fresh build tree? > >>> > >>> Matt > >>> > >>> On Mon, Jan 26, 2015 at 3:30 PM, Michael Pinkert < > >> > >>> mpinkert@ > >> > >>> > wrote: > >>>> Hi all, > >>>> > >>>> I have been trying to compile ITK on Visual Studio 2013, as I was > >>>> having > >>>> problems with the autocomplete IntelliSense in Visual Studio 2010. > >>>> However, > >>>> when I try to build ITK I am running into two errors, and do not know > >>>> what > >>>> to do about them. Does anyone have experience with the following? > >>>> > >>>> Error 1 error C1189: #error : "No native data type can > >>>> represent > >>>> a 16-bit > >>>> integer." > >>>> C:\Build\ITK\Modules\ThirdParty\KWSys\src\itksys\FundamentalType.h > >>>> 75 1 ITKIOLSM > >>>> > >>>> Error 2 error LNK1104: cannot open file > >>>> '..\..\..\..\lib\Debug\ITKIOLSM-4.8.lib' > >>>> C:\Build\ITK\Modules\Core\TestKernel\src\LINK itkTestDriver > >>>> > >>>> Best regards, > >>>> Michael Pinkert > >>>> > >>>> > >>>> > >>>> -- > >>>> View this message in context: > >>>> > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842.html > >>>> Sent from the ITK Insight Users mailing list archive at Nabble.com. > >>>> _____________________________________ > >>>> Powered by www.kitware.com > >>>> > >>>> Visit other Kitware open-source projects at > >>>> http://www.kitware.com/opensource/opensource.html > >>>> > >>>> Kitware offers ITK Training Courses, for more information visit: > >>>> http://www.kitware.com/products/protraining.php > >>>> > >>>> Please keep messages on-topic and check the ITK FAQ at: > >>>> http://www.itk.org/Wiki/ITK_FAQ > >>>> > >>>> Follow this link to subscribe/unsubscribe: > >>>> http://public.kitware.com/mailman/listinfo/insight-users > >>> _____________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at > >>> http://www.kitware.com/opensource/opensource.html > >>> > >>> Kitware offers ITK Training Courses, for more information visit: > >>> http://www.kitware.com/products/protraining.php > >>> > >>> Please keep messages on-topic and check the ITK FAQ at: > >>> http://www.itk.org/Wiki/ITK_FAQ > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://public.kitware.com/mailman/listinfo/insight-users > >> > >> > >> > >> > >> > >> -- > >> View this message in context: > >> > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842p7586844.html > >> Sent from the ITK Insight Users mailing list archive at Nabble.com. > >> _____________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Kitware offers ITK Training Courses, for more information visit: > >> http://www.kitware.com/products/protraining.php > >> > >> Please keep messages on-topic and check the ITK FAQ at: > >> http://www.itk.org/Wiki/ITK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842p7586846.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpinkert at wisc.edu Tue Jan 27 16:51:03 2015 From: mpinkert at wisc.edu (Michael Pinkert) Date: Tue, 27 Jan 2015 14:51:03 -0700 (MST) Subject: [ITK-users] Trouble compiling ITK 4.8.0 on Visual Studio 2013/12.0 In-Reply-To: References: <1422304240599-7586842.post@n2.nabble.com> <1422305040386-7586844.post@n2.nabble.com> <1422373406186-7586846.post@n2.nabble.com> Message-ID: <1422395463573-7586849.post@n2.nabble.com> Hi Matt, D?enan, Thank you both. Updating ITK again managed to solve both issues, and I will definitely keep in mind how Visual Studio IntelliSense works in the future when I am having problems again. Best regards, Michael Pinkert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Trouble-compiling-ITK-4-8-0-on-Visual-Studio-2013-12-0-tp7586842p7586849.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From grothausmann.roman at mh-hannover.de Wed Jan 28 07:02:10 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Wed, 28 Jan 2015 13:02:10 +0100 Subject: [ITK-users] [Paraview] compile itk (VTKGlue ON) with vtk from paraview In-Reply-To: References: <54C0CF2E.3060106@mh-hannover.de> <54C2125D.7090801@mh-hannover.de> <54C6029C.4040600@mh-hannover.de> Message-ID: <54C8CFC2.4000305@mh-hannover.de> Hi Matt, On 26/01/15 17:54, Matt McCormick wrote: > I do not think the Midas Journal will be able to build your plugin. OK, so I added a VTK test program. Is there a way to test if the automatic testing environment would be able to build and run my VTK test program BEFORE submitting the contribution to Midas? (My last submission never got tested by the system so far, i.e. there is no colde review reported: http://www.vtkjournal.org/browse/publication/949) > I would recommend creating build instructions to build against a > ParaView build tree. I have just verified that ITK builds with the > ITKVtkGlue module ON when pointing VTK_DIR to the /VTK > directory. Did You use BUILD_SHARED_LIBS ON for both ITK and ParaView? ITK also compiles fine without any errors for me if I use BUILD_SHARED_LIBS OFF, however the problems then arise when compiling the plugin. If You like, You can test the compilation of the plugin with the code from the git repository: https://github.com/romangrothausmann/FacetAnalyser Many thanks for looking into this. Roman On 26/01/15 17:54, Matt McCormick wrote: > Hi Roman, > > Thanks for the update. Great to hear about the Midas Journal article! > > I do not think the Midas Journal will be able to build your plugin. > > I would recommend creating build instructions to build against a > ParaView build tree. I have just verified that ITK builds with the > ITKVtkGlue module ON when pointing VTK_DIR to the /VTK > directory. > > I don't see the install tree VTKTargets.cmake file in my ParaView > build, either. In the long term, the ParaView CMake configuration > should be corrected. > > HTH, > Matt > > On Mon, Jan 26, 2015 at 4:02 AM, Dr. Roman Grothausmann > wrote: >> Hi Matt, >> >> >> Thank You very much for Your reply. >> I can only find one VTKTargets.cmake in >> /opt/compilation/paraview-git_build/VTK/ >> It seems though that it is lacking the relevant entries for the libraries >> that troubled me, e.g. vtkPVPythonCatalyst and >> vtkUtilitiesPythonInitializer. >> >> I'm about to publish the ITK-VTK PV plugin in the Midas Journal, what >> installation instructions should I give there? >> Will the testing environment be able to compile this plugin and its tests or >> should I disable automatic testing for this contribution? >> >> Many thanks for looking into this. >> Roman >> >> >> On 23/01/15 18:15, Matt McCormick wrote: >>> >>> Hi Roman, >>> >>> Thanks for looking into the issue and reporting it to the mailing list. >>> >>> Paraview should be installing VTKTargets.cmake, which tells the build >>> system where to find the libraries. Note that there might be two >>> VTKTargets.cmake files that are generated -- one for the build tree >>> and one for the install tree. >>> >>> HTH, >>> Matt >>> >>> On Fri, Jan 23, 2015 at 4:20 AM, Dr. Roman Grothausmann >>> wrote: >>>> >>>> >>>> On 22/01/15 11:21, Dr. Roman Grothausmann wrote: >>>>> >>>>> >>>>> Adding the abs. file locations to the build command does not help nor >>>>> does >>>>> -L/opt/paraview-4.3.1_git/lib/paraview-4.3/ >>>> >>>> >>>> >>>> I figured that the vtk dynamic libraries of PV have the ending *-pv4.3.so >>>> which seems to be the reason why the linker does not find them. If I >>>> create >>>> symbolic links to these files without the extension: >>>> >>>> cd /opt/compilation/paraview-git_build/lib/ >>>> for i in *-pv*.so; do ln -s $i ${i%-pv*}.so; done >>>> >>>> and adding -L/opt/compilation/paraview-git_build/lib/ to CMAKE_CXX_FLAGS >>>> the compilation of ITK succeeds. >>>> >>>> I wonder, is that the way it's meant to be done? >>>> >>>> >>>> >>>>> What am I missing in my configuration of PV and ITK? >>>>> >>>>> When and where should I specify: >>>>> CMAKE_CXX_FLAGS -fPIC >>>>> BUILD_SHARED_LIBS ON/OFF >>>>> >>>>> Is this the right VTK_DIR specification for ITK: >>>>> /opt/compilation/ParaView-v4.3.1/build/VTK >>>>> or >>>>> /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3 >>>>> >>>>> >>>>> >>>>> Many thanks for any help or hints. >>>>> Roman >>>>> >>>>> >>>> >>>> -- >>>> Dr. Roman Grothausmann >>>> >>>> Tomographie und Digitale Bildverarbeitung >>>> Tomography and Digital Image Analysis >>>> >>>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>>> Medizinische Hochschule Hannover >>>> Carl-Neuberg-Str. 1 >>>> D-30625 Hannover >>>> >>>> Tel. +49 511 532-9574 >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> -- >> Dr. Roman Grothausmann >> >> Tomographie und Digitale Bildverarbeitung >> Tomography and Digital Image Analysis >> >> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >> Medizinische Hochschule Hannover >> Carl-Neuberg-Str. 1 >> D-30625 Hannover >> >> Tel. +49 511 532-9574 -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 From matimontg at gmail.com Wed Jan 28 08:45:09 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 28 Jan 2015 10:45:09 -0300 Subject: [ITK-users] ITK Apps | MultiResMIRegistration output slices blank Message-ID: Hi, I'm working on testing the MultiResMIRegistration example in the ITK-Apps and it runs ok with my dataset, however, the output mhd file has blank slices (all black or white depending the Window Level setting) I get the matrix and overall transform set parameters and the values kinda make sense but I can't see the resulting slices for some reason. Both MR and CT 3D files are signed short pixel type. Thanks for the help. Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From emily-hammond at uiowa.edu Wed Jan 28 10:36:08 2015 From: emily-hammond at uiowa.edu (Hammond, Emily M) Date: Wed, 28 Jan 2015 15:36:08 +0000 Subject: [ITK-users] STL methods and ITK Message-ID: <2609C492EC89AB4CAAD3647B8D1A43CC2F1854DB@ITSNT437.iowa.uiowa.edu> Hello all, I am trying to wrap some functionality into a class. I am trying to write a function that reads in a transform file, however, I want it to take the list of transform pointers that it reads in and merge/insert them into an already existing list. Here is the relevant code with more details below it: #include "itkTransform.h" #include "itkTransformFileReader.h" public: typedef itk::TransformFileReaderTemplate< double > TransformReaderType; typedef TransformReaderType::TransformListType TransformListType; void ReadTransformFile( const char * transformFilename ); protected: LandmarkAnalysis() { TransformListType * m_TransformList = 0; TransformListType * m_TransformListTemporary = 0; } private: TransformListType * m_TransformList; TransformListType * m_TransformListTemporary; }; .hxx file void LandmarkAnalysis::ReadTransformFile( const char * transformFilename ) { TransformReaderType::Pointer reader = TransformReaderType::New(); reader->SetFileName( transformFilename ); reader->Update(); // put output into member variable m_TransformListTemporary = reader->GetTransformList(); //(*m_TransformList).merge( *m_TransformListTemporary ); // print out to prove that it was completed TransformListType::const_iterator tempIt = m_TransformListTemporary->begin(); TransformListType::iterator it = m_TransformList->begin(); ***CODE BREAKS AT THIS LINE*** for(; tempIt !=m_TransformListTemporary->end(); tempIt++) { std::cout << (*tempIt) << std::endl; (*m_TransformList).insert(it, (*tempIt)); } std::cout << transformFilename << " has been read in." << std::endl; return; } Here is my problem: I know that at the base level both m_TransformListTemporary and m_TransformList are lists of transform pointers. However, I cannot use any of the c++ stl list member functions such as merge or insert (I get runtime errors.) Is there some fundamental concept that I do not understand with how ITK interacts with the STL? In addition, through debugging, the line shown above instantiating an iterator for m_TransformList breaks the code, even though the previous line (which, to my understanding, does the same thing, but with a different list) works fine. Any help would be very much appreciated. Emily Hammond -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed Jan 28 10:47:50 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 28 Jan 2015 10:47:50 -0500 Subject: [ITK-users] [ITK] STL methods and ITK In-Reply-To: <2609C492EC89AB4CAAD3647B8D1A43CC2F1854DB@ITSNT437.iowa.uiowa.edu> References: <2609C492EC89AB4CAAD3647B8D1A43CC2F1854DB@ITSNT437.iowa.uiowa.edu> Message-ID: Hello Emily, This has recently been fixed in ITK: https://github.com/InsightSoftwareConsortium/ITK/commit/240b5568b641bb995ba01cbc338ddadffd95d5fa The return for GetTransformList is now a constant pointer: const TransformListType * GetTransformList() Truthfully I am not sure why this method is returning a pointer and not a reference. So the return should not be modified, which is your issue. The pointer is to an STL list managed by the reader. The list is of itk::SmartPointers, so doing a copy should be light weight. So you should do something like: TransformListType m_TransformList; this->m_TransformList = *(reader->GetTranformList()); Brad On Jan 28, 2015, at 10:36 AM, Hammond, Emily M wrote: > Hello all, > > I am trying to wrap some functionality into a class. I am trying to write a function that reads in a transform file, however, I want it to take the list of transform pointers that it reads in and merge/insert them into an already existing list. Here is the relevant code with more details below it: > > #include "itkTransform.h" > #include "itkTransformFileReader.h" > > public: > typedef itk::TransformFileReaderTemplate< double > > TransformReaderType; > typedef TransformReaderType::TransformListType > TransformListType; > > void ReadTransformFile( const char * transformFilename ); > > protected: > LandmarkAnalysis() > { > TransformListType * m_TransformList = 0; > TransformListType * m_TransformListTemporary = 0; > } > > private: > TransformListType * m_TransformList; > TransformListType * m_TransformListTemporary; > }; > > > .hxx file > void LandmarkAnalysis::ReadTransformFile( const char * transformFilename ) > { > TransformReaderType::Pointer reader = TransformReaderType::New(); > reader->SetFileName( transformFilename ); > reader->Update(); > > // put output into member variable > m_TransformListTemporary = reader->GetTransformList(); > //(*m_TransformList).merge( *m_TransformListTemporary ); > // print out to prove that it was completed > TransformListType::const_iterator tempIt = m_TransformListTemporary->begin(); > TransformListType::iterator it = m_TransformList->begin(); ***CODE BREAKS AT THIS LINE*** > > for(; tempIt !=m_TransformListTemporary->end(); tempIt++) > { > std::cout << (*tempIt) << std::endl; > (*m_TransformList).insert(it, (*tempIt)); > } > > std::cout << transformFilename << " has been read in." << std::endl; > return; > } > > Here is my problem: I know that at the base level both m_TransformListTemporary and m_TransformList are lists of transform pointers. However, I cannot use any of the c++ stl list member functions such as merge or insert (I get runtime errors.) Is there some fundamental concept that I do not understand with how ITK interacts with the STL? In addition, through debugging, the line shown above instantiating an iterator for m_TransformList breaks the code, even though the previous line (which, to my understanding, does the same thing, but with a different list) works fine. > > Any help would be very much appreciated. > > Emily Hammond > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Jan 29 14:04:30 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 29 Jan 2015 14:04:30 -0500 Subject: [ITK-users] [ANNOUNCE] ITK Software Guide hardcopies are available on Amazon! Message-ID: Hardcopies of The ITK Software Guide are available on Amazon! Book 1: http://www.amazon.com/ITK-Software-Guide-Book-Introduction/dp/1930934270/ Book 2: http://www.amazon.com/ITK-Software-Guide-Book-Functionality/dp/1930934289/ Thanks to everyone who helped make this happen! New versions of the book will be available with subsequent releases. If you would like to contribute to the Guide, see http://itk.org/gitweb?p=ITKSoftwareGuide.git;a=blob;f=README.md;h=eadf34576971b36c6f1c64c9f9590d7194fa4463;hb=HEAD From matt.mccormick at kitware.com Fri Jan 30 15:00:31 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 30 Jan 2015 15:00:31 -0500 Subject: [ITK-users] [ITK-dev] [ANNOUNCE] ITK Software Guide hardcopies are available on Amazon! In-Reply-To: References: Message-ID: On Fri, Jan 30, 2015 at 3:51 AM, Mathieu Malaterre wrote: > On Thu, Jan 29, 2015 at 8:04 PM, Matt McCormick > wrote: >> Hardcopies of The ITK Software Guide are available on Amazon! >> >> >> Book 1: http://www.amazon.com/ITK-Software-Guide-Book-Introduction/dp/1930934270/ >> >> Book 2: http://www.amazon.com/ITK-Software-Guide-Book-Functionality/dp/1930934289/ >> >> >> Thanks to everyone who helped make this happen! > > If you do so, don't forget to set a charity at smile.amazon.com. > > For example some people can pick: Software In The Public Interest Inc > [*] among the possible charities. > > https://en.wikipedia.org/wiki/Software_in_the_Public_Interest +1! PS. For community members in Europe, the books are also available on Amazon's sites for Spain, the United Kingdom, Germany, France, and Italy. Please see the website for the links: http://www.kitware.com/products/books.php From matimontg at gmail.com Sat Jan 31 08:17:12 2015 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 31 Jan 2015 10:17:12 -0300 Subject: [ITK-users] uncompress failed Message-ID: Hi, I'm running the ImageSeriesWriter example: /*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *=========================================================================*/ #include "itkGDCMImageIO.h" #include "itkNumericSeriesFileNames.h" #include "itkImageFileReader.h" #include "itkImageSeriesWriter.h" #include "itkMetaDataObject.h" #include #include "itksys/SystemTools.hxx" // Software Guide : BeginLatex // // This example illustrates how to read a 3D image from a non DICOM file and write it as a series of DICOM slices. // with some changed header information. Header // // Please note that modifying the content of a DICOM header is a very risky // operation. The Header contains fundamental information about the patient // and therefore its consistency must be protected from any data corruption. // Before attempting to modify the DICOM headers of your files, you must make // sure that you have a very good reason for doing so, and that you can ensure // that this information change will not result in a lower quality of health // care to be delivered to the patient. // // \index{DICOM!Writing Series} // // Software Guide : EndLatex int main( int argc, char* argv[] ) { if( argc < 3 ) { std::cerr << "Usage: " << argv[0]; std::cerr << " InputImage OutputDicomDirectory" << std::endl; return EXIT_FAILURE; } typedef signed short PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); try { reader->Update(); } catch (itk::ExceptionObject &excp) { std::cerr << "Exception thrown while writing the image" << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } typedef itk::GDCMImageIO ImageIOType; typedef itk::NumericSeriesFileNames NamesGeneratorType; ImageIOType::Pointer gdcmIO = ImageIOType::New(); const char * outputDirectory = argv[2]; itksys::SystemTools::MakeDirectory( outputDirectory ); typedef signed short OutputPixelType; const unsigned int OutputDimension = 2; typedef itk::Image< OutputPixelType, OutputDimension > Image2DType; typedef itk::ImageSeriesWriter< ImageType, Image2DType > SeriesWriterType; NamesGeneratorType::Pointer namesGenerator = NamesGeneratorType::New(); itk::MetaDataDictionary & dict = gdcmIO->GetMetaDataDictionary(); std::string tagkey, value; tagkey = "0008|0060"; // Modality value = "MR"; itk::EncapsulateMetaData(dict, tagkey, value ); tagkey = "0008|0008"; // Image Type value = "DERIVED\\SECONDARY"; itk::EncapsulateMetaData(dict, tagkey, value); tagkey = "0008|0064"; // Conversion Type value = "DV"; itk::EncapsulateMetaData(dict, tagkey, value); SeriesWriterType::Pointer seriesWriter = SeriesWriterType::New(); seriesWriter->SetInput( reader->GetOutput() ); seriesWriter->SetImageIO( gdcmIO ); ImageType::RegionType region = reader->GetOutput()->GetLargestPossibleRegion(); ImageType::IndexType start = region.GetIndex(); ImageType::SizeType size = region.GetSize(); std::string format = outputDirectory; format += "/image%03d.dcm"; namesGenerator->SetSeriesFormat( format.c_str() ); namesGenerator->SetStartIndex( start[2] ); namesGenerator->SetEndIndex( start[2] + size[2] - 1 ); namesGenerator->SetIncrementIndex( 1 ); seriesWriter->SetFileNames( namesGenerator->GetFileNames() ); seriesWriter->UseCompressionOn(); try { seriesWriter->Update(); } catch( itk::ExceptionObject & excp ) { std::cerr << "Exception thrown while writing the series " << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; } *And when reading images in .Z format (I believe it is Zraw), it returns an error indicating: "Uncompress Failed".* Any hint why this may be happening? Thank you, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sat Jan 31 10:53:31 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 31 Jan 2015 10:53:31 -0500 Subject: [ITK-users] uncompress failed In-Reply-To: References: Message-ID: Hi Matias, .Z is not a supported file extension as I can tell. If it is a "raw" image, the RawImageIO will need to be used explicitly with the correct metadata added. See [1]. HTH, Matt [1] http://itk.org/Insight/Doxygen/html/classitk_1_1RawImageIO.html On Sat, Jan 31, 2015 at 8:17 AM, Matias Montroull wrote: > Hi, > > I'm running the ImageSeriesWriter example: > > /*========================================================================= > * > * Copyright Insight Software Consortium > * > * Licensed under the Apache License, Version 2.0 (the "License"); > * you may not use this file except in compliance with the License. > * You may obtain a copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0.txt > * > * Unless required by applicable law or agreed to in writing, software > * distributed under the License is distributed on an "AS IS" BASIS, > * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > * See the License for the specific language governing permissions and > * limitations under the License. > * > *=========================================================================*/ > #include "itkGDCMImageIO.h" > #include "itkNumericSeriesFileNames.h" > #include "itkImageFileReader.h" > #include "itkImageSeriesWriter.h" > #include "itkMetaDataObject.h" > #include > #include "itksys/SystemTools.hxx" > // Software Guide : BeginLatex > // > // This example illustrates how to read a 3D image from a non DICOM file and > write it as a series of DICOM slices. > // with some changed header information. Header > // > // Please note that modifying the content of a DICOM header is a very risky > // operation. The Header contains fundamental information about the patient > // and therefore its consistency must be protected from any data corruption. > // Before attempting to modify the DICOM headers of your files, you must > make > // sure that you have a very good reason for doing so, and that you can > ensure > // that this information change will not result in a lower quality of health > // care to be delivered to the patient. > // > // \index{DICOM!Writing Series} > // > // Software Guide : EndLatex > int main( int argc, char* argv[] ) > { > if( argc < 3 ) > { > std::cerr << "Usage: " << argv[0]; > std::cerr << " InputImage OutputDicomDirectory" << std::endl; > return EXIT_FAILURE; > } > typedef signed short PixelType; > const unsigned int Dimension = 3; > typedef itk::Image< PixelType, Dimension > ImageType; > typedef itk::ImageFileReader< ImageType > ReaderType; > ReaderType::Pointer reader = ReaderType::New(); > reader->SetFileName( argv[1] ); > try > { > reader->Update(); > } > catch (itk::ExceptionObject &excp) > { > std::cerr << "Exception thrown while writing the image" << std::endl; > std::cerr << excp << std::endl; > return EXIT_FAILURE; > } > typedef itk::GDCMImageIO ImageIOType; > typedef itk::NumericSeriesFileNames NamesGeneratorType; > ImageIOType::Pointer gdcmIO = ImageIOType::New(); > const char * outputDirectory = argv[2]; > itksys::SystemTools::MakeDirectory( outputDirectory ); > typedef signed short OutputPixelType; > const unsigned int OutputDimension = 2; > typedef itk::Image< OutputPixelType, OutputDimension > Image2DType; > typedef itk::ImageSeriesWriter< > ImageType, Image2DType > SeriesWriterType; > NamesGeneratorType::Pointer namesGenerator = NamesGeneratorType::New(); > itk::MetaDataDictionary & dict = gdcmIO->GetMetaDataDictionary(); > std::string tagkey, value; > tagkey = "0008|0060"; // Modality > value = "MR"; > itk::EncapsulateMetaData(dict, tagkey, value ); > tagkey = "0008|0008"; // Image Type > value = "DERIVED\\SECONDARY"; > itk::EncapsulateMetaData(dict, tagkey, value); > tagkey = "0008|0064"; // Conversion Type > value = "DV"; > itk::EncapsulateMetaData(dict, tagkey, value); > SeriesWriterType::Pointer seriesWriter = SeriesWriterType::New(); > seriesWriter->SetInput( reader->GetOutput() ); > seriesWriter->SetImageIO( gdcmIO ); > ImageType::RegionType region = > reader->GetOutput()->GetLargestPossibleRegion(); > ImageType::IndexType start = region.GetIndex(); > ImageType::SizeType size = region.GetSize(); > std::string format = outputDirectory; > format += "/image%03d.dcm"; > namesGenerator->SetSeriesFormat( format.c_str() ); > namesGenerator->SetStartIndex( start[2] ); > namesGenerator->SetEndIndex( start[2] + size[2] - 1 ); > namesGenerator->SetIncrementIndex( 1 ); > seriesWriter->SetFileNames( namesGenerator->GetFileNames() ); > seriesWriter->UseCompressionOn(); > try > { > seriesWriter->Update(); > } > catch( itk::ExceptionObject & excp ) > { > std::cerr << "Exception thrown while writing the series " << std::endl; > std::cerr << excp << std::endl; > return EXIT_FAILURE; > } > return EXIT_SUCCESS; > } > > > And when reading images in .Z format (I believe it is Zraw), it returns an > error indicating: "Uncompress Failed". > > Any hint why this may be happening? > > Thank you, > > Matias. > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Sat Jan 31 11:25:10 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 31 Jan 2015 11:25:10 -0500 Subject: [ITK-users] [Paraview] compile itk (VTKGlue ON) with vtk from paraview In-Reply-To: <54C8CFC2.4000305@mh-hannover.de> References: <54C0CF2E.3060106@mh-hannover.de> <54C2125D.7090801@mh-hannover.de> <54C6029C.4040600@mh-hannover.de> <54C8CFC2.4000305@mh-hannover.de> Message-ID: On Wed, Jan 28, 2015 at 7:02 AM, Dr. Roman Grothausmann wrote: > Hi Matt, > > On 26/01/15 17:54, Matt McCormick wrote: >> I do not think the Midas Journal will be able to build your plugin. > > OK, so I added a VTK test program. Is there a way to test if the automatic > testing environment would be able to build and run my VTK test program > BEFORE submitting the contribution to Midas? > (My last submission never got tested by the system so far, i.e. there is no > colde review reported: > http://www.vtkjournal.org/browse/publication/949) Unfortunately, the submission build system is currently opaque and limited. We have many thoughts on how to improve the journal infrastructure but lack the funding to implement it :-(. >> I would recommend creating build instructions to build against a >> ParaView build tree. I have just verified that ITK builds with the >> ITKVtkGlue module ON when pointing VTK_DIR to the /VTK >> directory. > > Did You use BUILD_SHARED_LIBS ON for both ITK and ParaView? ITK also > compiles fine without any errors for me if I use BUILD_SHARED_LIBS OFF, > however the problems then arise when compiling the plugin. > If You like, You can test the compilation of the plugin with the code from > the git repository: > https://github.com/romangrothausmann/FacetAnalyser Looks like a great project! I was using BUILD_SHARED_LIBS for both. What issue were you seeing? Again, I think the best approach is to build VTK separately, then build both ParaView and ITK against that version. HTH, Matt > > On 26/01/15 17:54, Matt McCormick wrote: >> >> Hi Roman, >> >> Thanks for the update. Great to hear about the Midas Journal article! >> >> I do not think the Midas Journal will be able to build your plugin. >> >> I would recommend creating build instructions to build against a >> ParaView build tree. I have just verified that ITK builds with the >> ITKVtkGlue module ON when pointing VTK_DIR to the /VTK >> directory. >> >> I don't see the install tree VTKTargets.cmake file in my ParaView >> build, either. In the long term, the ParaView CMake configuration >> should be corrected. >> >> HTH, >> Matt >> >> On Mon, Jan 26, 2015 at 4:02 AM, Dr. Roman Grothausmann >> wrote: >>> >>> Hi Matt, >>> >>> >>> Thank You very much for Your reply. >>> I can only find one VTKTargets.cmake in >>> /opt/compilation/paraview-git_build/VTK/ >>> It seems though that it is lacking the relevant entries for the libraries >>> that troubled me, e.g. vtkPVPythonCatalyst and >>> vtkUtilitiesPythonInitializer. >>> >>> I'm about to publish the ITK-VTK PV plugin in the Midas Journal, what >>> installation instructions should I give there? >>> Will the testing environment be able to compile this plugin and its tests >>> or >>> should I disable automatic testing for this contribution? >>> >>> Many thanks for looking into this. >>> Roman >>> >>> >>> On 23/01/15 18:15, Matt McCormick wrote: >>>> >>>> >>>> Hi Roman, >>>> >>>> Thanks for looking into the issue and reporting it to the mailing list. >>>> >>>> Paraview should be installing VTKTargets.cmake, which tells the build >>>> system where to find the libraries. Note that there might be two >>>> VTKTargets.cmake files that are generated -- one for the build tree >>>> and one for the install tree. >>>> >>>> HTH, >>>> Matt >>>> >>>> On Fri, Jan 23, 2015 at 4:20 AM, Dr. Roman Grothausmann >>>> wrote: >>>>> >>>>> >>>>> >>>>> On 22/01/15 11:21, Dr. Roman Grothausmann wrote: >>>>>> >>>>>> >>>>>> >>>>>> Adding the abs. file locations to the build command does not help nor >>>>>> does >>>>>> -L/opt/paraview-4.3.1_git/lib/paraview-4.3/ >>>>> >>>>> >>>>> >>>>> >>>>> I figured that the vtk dynamic libraries of PV have the ending >>>>> *-pv4.3.so >>>>> which seems to be the reason why the linker does not find them. If I >>>>> create >>>>> symbolic links to these files without the extension: >>>>> >>>>> cd /opt/compilation/paraview-git_build/lib/ >>>>> for i in *-pv*.so; do ln -s $i ${i%-pv*}.so; done >>>>> >>>>> and adding -L/opt/compilation/paraview-git_build/lib/ to >>>>> CMAKE_CXX_FLAGS >>>>> the compilation of ITK succeeds. >>>>> >>>>> I wonder, is that the way it's meant to be done? >>>>> >>>>> >>>>> >>>>>> What am I missing in my configuration of PV and ITK? >>>>>> >>>>>> When and where should I specify: >>>>>> CMAKE_CXX_FLAGS -fPIC >>>>>> BUILD_SHARED_LIBS ON/OFF >>>>>> >>>>>> Is this the right VTK_DIR specification for ITK: >>>>>> /opt/compilation/ParaView-v4.3.1/build/VTK >>>>>> or >>>>>> /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3 >>>>>> >>>>>> >>>>>> >>>>>> Many thanks for any help or hints. >>>>>> Roman >>>>>> >>>>>> >>>>> >>>>> -- >>>>> Dr. Roman Grothausmann >>>>> >>>>> Tomographie und Digitale Bildverarbeitung >>>>> Tomography and Digital Image Analysis >>>>> >>>>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>>>> Medizinische Hochschule Hannover >>>>> Carl-Neuberg-Str. 1 >>>>> D-30625 Hannover >>>>> >>>>> Tel. +49 511 532-9574 >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >>> >>> -- >>> Dr. Roman Grothausmann >>> >>> Tomographie und Digitale Bildverarbeitung >>> Tomography and Digital Image Analysis >>> >>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>> Medizinische Hochschule Hannover >>> Carl-Neuberg-Str. 1 >>> D-30625 Hannover >>> >>> Tel. +49 511 532-9574 > > > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-9574