[Insight-users] itk::fem::MaterialLinearElasticity::Read

Lara Vigneron Lara . Vigneron at ulg . ac . be
Thu, 22 May 2003 16:41:11 +0200


--------------BD835967F2189BECD101DECE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Luis,

Thank you for your suggestion. I try to open the file with your code lines but
it doesn't seem to change anything...

Do you think to some other reason my program aborts?

Thank you,

Lara



Luis Ibanez wrote:

> Hi Lara,
>
> Is there any reason for opening the file
> in the way you are doing now ?
>
> A far simpler way may be the following:
>
>     std::ifstream  inFile;
>     inFile.open( matfilename1.c_str() );
>
>     if( inFile.fail() ) return -1;
>
> and then
>
>     mat_1->Read( inFile ,(void*) NULL);
>
>     inFile.close();
>
> The NULL seems to be ok, since the
> MaterialLinearElasticity doesn't use
> this argument in the Read() method.
>
> Regards,
>
>    Luis
>

--
Lara VIGNERON

Signal Processing Group

University of Liege
Institut Montefiore
Sart-Tilman, Batiment B28
B-4000 Liege
BELGIUM

Tel: +32-(0)4-366.26.42
Fax: +32-(0)4-366.29.84
Lara . Vigneron at ulg . ac . be



--------------BD835967F2189BECD101DECE
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi Luis,
<p>Thank you for your suggestion. I try to open the file with your code
lines but
<br>it doesn't seem to change anything...
<p>Do you think to some other reason my program aborts?
<p>Thank you,
<p>Lara
<br>&nbsp;
<br>&nbsp;
<p>Luis Ibanez wrote:
<blockquote TYPE=CITE>Hi Lara,
<p>Is there any reason for opening the file
<br>in the way you are doing now ?
<p>A far simpler way may be the following:
<p>&nbsp;&nbsp;&nbsp; std::ifstream&nbsp; inFile;
<br>&nbsp;&nbsp;&nbsp; inFile.open( matfilename1.c_str() );
<p>&nbsp;&nbsp;&nbsp; if( inFile.fail() ) return -1;
<p>and then
<p>&nbsp;&nbsp;&nbsp; mat_1->Read( inFile ,(void*) NULL);
<p>&nbsp;&nbsp;&nbsp; inFile.close();
<p>The NULL seems to be ok, since the
<br>MaterialLinearElasticity doesn't use
<br>this argument in the Read() method.
<p>Regards,
<p>&nbsp;&nbsp; Luis
<br>&nbsp;</blockquote>

<pre>--&nbsp;
Lara VIGNERON

Signal Processing Group

University of Liege
Institut Montefiore
Sart-Tilman, Batiment B28
B-4000 Liege
BELGIUM

Tel: +32-(0)4-366.26.42
Fax: +32-(0)4-366.29.84
Lara . Vigneron at ulg . ac . be</pre>
&nbsp;</html>

--------------BD835967F2189BECD101DECE--