[Insight-users] userPromiseToDeleteTheBuffer
Severino Fernandez
severinofer at recol . es
Fri, 6 Jun 2003 13:04:23 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0012_01C32C2C.26955590
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I call ITK C++ code from a C program. The C program passes buffers with =
image data to the static library generated using ITK code. I import =
these buffers using ImportImageFilter.
As I understand from the Software Guide the =
userPromiseToDeleteTheBuffer argument to the SetImportPointer method =
should be true, in order for the ImportImageFilter not to try to =
delete the passed buffer.
Taking this approach, the code will fail when the C++ code using the ITK =
classes exits. On the contrary, if I set the value to false, it seems to =
work OK and I can retrieve the values in the buffers from the C program.
It seems that I am misuderstanding the text of the Software Guide or I =
do not undersand some part of the mechanisms, or that there is some =
inconsistency in the Software Guide.
Could someone give a short comment on this ?
Severino Fernandez
Instituto Nacional de Tecnica Aeroespacial
Departamento de Observaci=F3n de la Tierra, Teledetecci=F3n y =
Aeronom=EDa
Carretera de Ajalvir, Km 4
28850 Torrejon de Ardoz
Spain
Tel +34 91 648 78 00
+34 91 305 16 52
Fax +34 91 677 46 46
Email severinofer at recol . es =20
------=_NextPart_000_0012_01C32C2C.26955590
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I call ITK C++ code from a C program. =
The C program=20
passes buffers with image data to the static library generated using ITK =
code. I import these buffers using <FONT face=3DCourier=20
size=3D2>ImportImageFilter</FONT><FONT face=3D"Times New Roman"=20
size=3D2>.</FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial>As I understand from the=20
Software Guide the <FONT size=3D1><FONT size=3D2><FONT=20
face=3DCourier>userPromiseToDeleteTheBuffer</FONT> argument to the <FONT =
face=3DCourier>SetImportPointer</FONT> method should be <FONT=20
face=3DCourier>true</FONT>, in order for the <FONT=20
face=3DCourier>ImportImageFilter</FONT> not to try to delete the =
passed=20
buffer.</FONT></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Taking this approach, the code will =
fail when the=20
C++ code using the ITK classes exits. On the contrary, if I set the =
value=20
to <FONT face=3DCourier>false, </FONT><FONT face=3DArial>it seems to =
work OK and I=20
can retrieve the values in the buffers from the C =
program.</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It seems that I am misuderstanding the =
text of the=20
Software Guide or I do not undersand some part of the =
mechanisms, or=20
that there is some inconsistency in the Software Guide.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Could someone give a short comment on =
this=20
?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Severino Fernandez<BR>Instituto =
Nacional de Tecnica=20
Aeroespacial<BR>Departamento de Observaci=F3n de la Tierra, =
Teledetecci=F3n y=20
Aeronom=EDa<BR>Carretera de Ajalvir, Km 4<BR>28850 Torrejon de=20
Ardoz<BR>Spain<BR>Tel +34 91 648 78=20
00<BR> +34 91 305 16=20
52<BR>Fax +34 91 677 46 46<BR>Email <A=20
href=3D"mailto:severinofer at recol . es">severinofer at recol . es</A> =
=20
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0012_01C32C2C.26955590--