[Insight-users] Exception when execute update of a writer

Antonio Gómez Barquero agb1 at alu.upct.es
Wed Sep 14 04:26:20 EDT 2011


Hi all!

I have an image in an “itk::image<Pixeltype, 2>::Pointer salida”. I have
checked that it has the correct pixelvalues. I want to save the image into a
file, but in the last line, it gives me an exception and now I don’t know
what to do:

                // Saving the result into a file

                salida = ui.imageframe->imagereader;

                writer = itk::ImageFileWriter<ImageType>::New(); 

                writer->SetInput( salida ) ; 

                writer->SetFileName ( "output.jpeg");

                writer->Update();// ---> EXCEPTION!!

 

The exception goes to  xmtx.c  file ( mutex[mutual exclusion] support for
VC++), 

It goes to the last line of this part of the code:

 

_RELIABILITY_CONTRACT

void  __CLRCALL_PURE_OR_CDECL _Mtxlock(_Rmtx *_Mtx)

                {              /* lock mutex */

#ifdef _M_CEE

                System::Threading::Thread::BeginThreadAffinity();

#endif

                EnterCriticalSection(_Mtx);

                }

 

Does any of you have had the same problem? Any hint for fixing it?

 

Thanks in advance

 

Antonio Gómez Barquero

 

 

Ingeniero de Telecomunicaciones -Becario Investigador asociado a Actividades
de I+D+I 

GTTS ( Grupo de Tratamiento y Teoría de la Señal)[  <http://gtts.upct.es/>
http://gtts.upct.es/]

UPCT (Universidad Politécnica de Cartagena)[  <http://www.upct.es/>
http://www.upct.es/]

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110914/ba345ba9/attachment.htm>


More information about the Insight-users mailing list