[Insight-users] CreateImageIO is not called in Release mode
Emma Ryan
eryanvtk at yahoo.com
Sat Jul 17 14:48:35 EDT 2010
Hello All,
This is with regards to my previous question about writing to jpg. This code
works fine in Release mode, but crashes in Debug. When I try to debug it, the
program seems to crash in CreateImageIO module. Stepping through the code in
release mode, I notice that the program does not even enter this module. Any
tips on how I can debug this ?
Thank you for your time.
Emma.
Code snippet that crashes
void write_to_jpg(std::string filename, itk::Image<unsigned char, 2>::Pointer
mask)
{
typedef itk::Image<unsigned char, 2> InputImageType, UCharImageType;
itk::ImageFileWriter<UCharImageType>::Pointer p_writer =
itk::ImageFileWriter<UCharImageType>::New();
p_writer->SetFileName(filename);
p_writer->SetInput(mask);
try
{
p_writer->Update();
}
catch(itk::ExceptionObject & err)
{
std::cout<< "Writer Update failed:"<< std::endl;
}
}
________________________________
From: "insight-users-request at itk.org" <insight-users-request at itk.org>
To: insight-users at itk.org
Sent: Sat, July 17, 2010 5:47:19 AM
Subject: Insight-users Digest, Vol 75, Issue 31
Send Insight-users mailing list submissions to
insight-users at itk.org
To subscribe or unsubscribe via the World Wide Web, visit
http://www.itk.org/mailman/listinfo/insight-users
or, via email, send a message with subject or body 'help' to
insight-users-request at itk.org
You can reach the person managing the list at
insight-users-owner at itk.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Insight-users digest..."
Today's Topics:
1. ImageFileWriter crashes in creatImageIO in Debug mode (Emma Ryan)
2. CMake config problem: ITK + GDCM 2 + VTK (Roger Bramon Feixas)
3. Re: CMake config problem: ITK + GDCM 2 + VTK (Karthik Krishnan)
----------------------------------------------------------------------
Message: 1
Date: Fri, 16 Jul 2010 20:58:42 -0700 (PDT)
From: Emma Ryan <eryanvtk at yahoo.com>
Subject: [Insight-users] ImageFileWriter crashes in creatImageIO in
Debug mode
To: insight-users at itk.org
Message-ID: <532205.26358.qm at web57908.mail.re3.yahoo.com>
Content-Type: text/plain; charset="us-ascii"
Hello All,
I have written a simple program to write out a JPG image of input data. all
is well and internediate results of my program are correct. However, when I try
to write the jpg, then program crashes. Here is teh code snippet. Please
suggest some tips to identify/correct the problem. The program crashes when
Update() is called and program counter is in CreateImageIO function. The input
image, 'mask' seems to be set correctly in the writer. Yet, the writer crashes.
All this works fine in Release mode. I am using VS 2005.
void write_to_jpg(std::string filename, itk::Image<unsigned char, 2>::Pointer
mask)
{
typedef itk::Image<unsigned char, 2> InputImageType, UCharImageType;
itk::ImageFileWriter<UCharImageType>::Pointer p_writer =
itk::ImageFileWriter<UCharImageType>::New();
p_writer->SetFileName(filename);
p_writer->SetInput(mask);
itk::Image<unsigned char, 2>::PixelContainer * p_cont =
mask->GetPixelContainer();
unsigned char const * p_image_data = p_cont->GetImportPointer();
for(int ii = 0; ii < 10; ++ii)
for(int jj = 0; jj < 10; ++jj)
std::cout << ii << ", " << jj << ", " << int(p_image_data[ii*10+jj])
<< std::endl;
try
{
p_writer->Update();
}
catch(itk::ExceptionObject & err)
{
std::cout<< "Writer Update failed:"<< std::endl;
}
}
Program crashes in :
std::list<LightObject::Pointer> allobjects =
ObjectFactoryBase::CreateAllInstance("itkImageIOBase");
for(std::list<LightObject::Pointer>::iterator i = allobjects.begin();
Thank you,
Emma
________________________________
From: "insight-users-request at itk.org" <insight-users-request at itk.org>
To: insight-users at itk.org
Sent: Fri, July 16, 2010 9:00:33 AM
Subject: Insight-users Digest, Vol 75, Issue 29
Send Insight-users mailing list submissions to
insight-users at itk.org
To subscribe or unsubscribe via the World Wide Web, visit
http://www.itk.org/mailman/listinfo/insight-users
or, via email, send a message with subject or body 'help' to
insight-users-request at itk.org
You can reach the person managing the list at
insight-users-owner at itk.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Insight-users digest..."
Today's Topics:
1. Re: Segmentation validation Curves, Spheres (Juan Cardelino)
2. Re: building contour trees (Reda, Fitsum A)
----------------------------------------------------------------------
Message: 1
Date: Fri, 16 Jul 2010 11:13:13 -0300
From: Juan Cardelino <juan.cardelino at gmail.com>
Subject: Re: [Insight-users] Segmentation validation Curves, Spheres
To: elhadj meljane <elhadj.meljane at gmail.com>
Cc: ITK Users <insight-users at itk.org>
Message-ID:
<AANLkTilymdEDPOg4y8Fz4CPPyL9O8AXzzymjgrfPLDWy at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Hi elhadj,
In the 2D case I know some works that, compare
segmentations, by either compare boundary maps or partitions. If your
ultimate goal is segmentation, I'm not sure if it is a good idea to
compare curves, I'd rather compare segmentations. Regarding boundary
comparison you can check the work of D. Martin at Berkeley, and a
benchmark system called Berkeley Segmentation Dataset or something
like that. Regarding the region based approach, you should check the
work of J. Cardoso, search for "Quantitative evaluation".
If you really want to compare curves, there's I know some work
comparing curves represented as distance maps, which compare them
modulo a rigid transformation.
I hope this helps.
Best regards,
Juan
On Wed, Jul 14, 2010 at 2:20 PM, elhadj meljane
<elhadj.meljane at gmail.com> wrote:
> Hi all,
> I'm looking for a tool to validate my segmentation results in 2D and 3D:
> ??- 2D: I have manual and automatic segmented curves
> ??- ?3D: I have a manual segmentation of a sphere-like structure and a
> simulated sphere like structure
>
> I would like to know:
>
> -? Do I have to choose manually a set of points on the manual and automatic
> ?? segmentation to compute a distance between the two sets (for example
> ?? housdorff distance)?
> - there is an itk tool (or a simplest way) that I can use it to validate the
> segmentation?
> ?? Thank you
> ?? Sincerely,
> H.
> _____________________________________
> 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.html
>
> 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://www.itk.org/mailman/listinfo/insight-users
>
>
------------------------------
Message: 2
Date: Fri, 16 Jul 2010 11:10:51 -0400
From: "Reda, Fitsum A" <fitecx at gmail.com>
Subject: Re: [Insight-users] building contour trees
To: Liam Kurmos <quantum.leaf at googlemail.com>, insight-users
<insight-users at itk.org>
Message-ID:
<AANLkTin_6jaaUDcGcPs3Wgwhdvu5rQz8ogUZG8lViTUw at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On 7/13/10, Liam Kurmos <quantum.leaf at googlemail.com> wrote:
> Hi All,
>
> I'm wondering if anyone has experience of building Contour Trees (such
> as per http://citeseer.ist.psu.edu/carr99computing.html ) from volume
> data? and if so whether there are any open source libraries for tree
> construction? I have looked at libtourtre
> http://graphics.cs.ucdavis.edu/~sdillard/libtourtre/doc/html/ but so
> far not had much success with getting it to work.
>
> If anyone has any information of how to do it, please let me know.
>
> Liam
> _____________________________________
> 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.html
>
> 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://www.itk.org/mailman/listinfo/insight-users
>
--
Sent from my mobile device
------------------------------
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users
End of Insight-users Digest, Vol 75, Issue 29
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.itk.org/pipermail/insight-users/attachments/20100716/d21053e3/attachment-0001.htm>
------------------------------
Message: 2
Date: Sat, 17 Jul 2010 11:55:27 +0200
From: Roger Bramon Feixas <rogerbramon at gmail.com>
Subject: [Insight-users] CMake config problem: ITK + GDCM 2 + VTK
To: insight-users at itk.org
Message-ID:
<AANLkTimhNlVHsmoiyPOpuKr7oEL6JnQio-T2ElEC8ZjK at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I have the same problem reported in this thread:
http://www.itk.org/pipermail/insight-users/2010-March/035903.html, but any
solution was published. I would like to continue the discussion.
I'm trying to compile ITK 3.18 with GDCM 2.0.15. I compiled correctly GDCM
2.0.15 with VTK 5.6 but when I set to 1 the ITK_USE_SYSTEM_GDCM option this
CMake message error appears:
CMake Error at Utilities/MetaIO/CMakeLists.txt:104 (INSTALL):
install TARGETS given no LIBRARY DESTINATION for shared library target
"vtkmetaio".
In the mentioned thread, Brad King proposed a test:
"
Edit ITK/Utilities/MetaIO/CMakeLists.txt to add some message()-s
in this top block:
IF(VTK_VERSION)
SET(METAIO_FOR_VTK 1)
MARK_AS_ADVANCED( METAIO_FOR_VTK )
SET(METAIO_NAMESPACE "vtkmetaio")
MESSAGE(FATAL_ERRORO "ITK IS NOT VTK!") # ADD THIS LINE
ELSE(VTK_VERSION)
...
ENDIF(VTK_VERSION)
Does CMake hit this? Are you pointing ITK at a VTK? "
I tested it, and yes, CMake hits this.
Anyone have any suggestion?
Thanks,
Roger
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.itk.org/pipermail/insight-users/attachments/20100717/091cc5d6/attachment-0001.htm>
------------------------------
Message: 3
Date: Sat, 17 Jul 2010 18:17:16 +0530
From: Karthik Krishnan <karthik.krishnan at kitware.com>
Subject: Re: [Insight-users] CMake config problem: ITK + GDCM 2 + VTK
To: Roger Bramon Feixas <rogerbramon at gmail.com>
Cc: insight-users at itk.org
Message-ID:
<AANLkTikCI_aQG8zDXhApwqd_D92u0LiJsuMS8pW_--YE at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Known issue.. See this
http://www.itk.org/pipermail/insight-users/2010-June/037360.html
and
http://www.itk.org/pipermail/insight-users/2010-July/037404.html
I think the consensus is to downgrade to CMake 2.6 from Cmake 2.8
On Sat, Jul 17, 2010 at 3:25 PM, Roger Bramon Feixas
<rogerbramon at gmail.com>wrote:
> Hi,
>
> I have the same problem reported in this thread:
> http://www.itk.org/pipermail/insight-users/2010-March/035903.html, but any
> solution was published. I would like to continue the discussion.
>
> I'm trying to compile ITK 3.18 with GDCM 2.0.15. I compiled correctly GDCM
> 2.0.15 with VTK 5.6 but when I set to 1 the ITK_USE_SYSTEM_GDCM option this
> CMake message error appears:
>
> CMake Error at Utilities/MetaIO/CMakeLists.txt:104 (INSTALL):
> install TARGETS given no LIBRARY DESTINATION for shared library target
> "vtkmetaio".
>
>
> In the mentioned thread, Brad King proposed a test:
>
> "
> Edit ITK/Utilities/MetaIO/CMakeLists.txt to add some message()-s
> in this top block:
>
> IF(VTK_VERSION)
> SET(METAIO_FOR_VTK 1)
> MARK_AS_ADVANCED( METAIO_FOR_VTK )
> SET(METAIO_NAMESPACE "vtkmetaio")
> MESSAGE(FATAL_ERRORO "ITK IS NOT VTK!") # ADD THIS LINE
> ELSE(VTK_VERSION)
> ...
> ENDIF(VTK_VERSION)
>
> Does CMake hit this? Are you pointing ITK at a VTK? "
>
> I tested it, and yes, CMake hits this.
>
> Anyone have any suggestion?
>
> Thanks,
>
> Roger
>
> _____________________________________
> 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.html
>
> 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://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.itk.org/pipermail/insight-users/attachments/20100717/b3ad9e8f/attachment.htm>
------------------------------
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users
End of Insight-users Digest, Vol 75, Issue 31
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100717/99ec329c/attachment-0001.htm>
More information about the Insight-users
mailing list