[Insight-users] Pluggable Factories

Ron Inbar ron@mediguide.co.il
Mon, 31 Mar 2003 12:15:45 +0200


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C2F76E.7E4C2D60
Content-Type: text/plain

Hi all,

 

I'm trying to write my own ImageIO subclass.

So far I just copied MetaImageIO, gave it a new name and changed the file
extension test in CanReadFile and CanWriteFile.

I saw the bit in the Software Guide about "pluggable factories", and I
understand from it that it should be possible to register my file type to
make ImageFileReader and ImageFileWriter automatically recognize it.  My
question is: how?  I didn't find any explanation in the Software Guide or
elsewhere.

I tried using <my class>::RegisterOneFactory, but it doesn't seem to work
yet, and I'm not sure it's the right method.

Can you please give me an example of how this is done?

 

Thanks in advance,

 

Ron

 


This e-mail message has been sent by MediGuide
and is for the use of the intended recipients only.
The message may contain privileged or confidential information .
If you are not the intended recipient you are hereby notified that any use,
distribution or copying of this communication is strictly prohibited,
and you are requested to delete the e-mail and any attachments
and notify the sender immediately.

------_=_NextPart_001_01C2F76E.7E4C2D60
Content-Type: text/html

<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">


<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{font-family:Arial;
	color:windowtext;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi all,</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I'm trying to write my own ImageIO subclass.</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>So far I just copied MetaImageIO, gave it a new name and changed
the file extension test in CanReadFile and CanWriteFile.</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I saw the bit in the Software Guide about "pluggable
factories", and I understand from it that it should be possible to
register my file type to make ImageFileReader and ImageFileWriter automatically
recognize it.&nbsp; My question is: how?&nbsp; I didn't find any
explanation in the Software Guide or elsewhere.</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I tried using &lt;my class&gt;::RegisterOneFactory, but it
doesn't seem to work yet, and I'm not sure it's the right
method.</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Can you please give me an example of how this is done?</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks in advance,</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Ron</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

</div>


<DIV><STRONG><FONT color=#000080 size=2></FONT></STRONG>&nbsp;</DIV>
<DIV><STRONG><FONT color=#000080 size=2></FONT></STRONG>&nbsp;</DIV>
<DIV><STRONG><FONT color=#000080 size=2>This e-mail message has been sent by 
MediGuide</FONT></STRONG></DIV>
<DIV><STRONG><FONT color=#000080 size=2>and is for the use of the intended 
recipients only.<BR>The message may contain&nbsp;privileged or confidential 
information .<BR>If you are not the intended recipient you are hereby notified 
that any use,<BR>distribution or copying of this communication is strictly 
prohibited,<BR>and you are requested to delete the e-mail and any 
attachments</FONT></STRONG></DIV>
<DIV><STRONG><FONT color=#000080 size=2>and notify the sender 
immediately.</FONT></STRONG></DIV>
</body>

</html>

------_=_NextPart_001_01C2F76E.7E4C2D60--