[Insight-users] Request for ImageFileWriter...

Miller, James V (Research) millerjv@crd.ge.com
Wed, 2 Apr 2003 09:58:52 -0500


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_01C2F928.60502B70
Content-Type: text/plain;
	charset="iso-8859-1"

This may be a problem with the ImageFileReader.  In ITK, member variables
are supposed to be private.  Access
to these variables from subclasses should be done via Get/Set methods. This
is one of ITK's coding conventions. It protects the subclasses against
changes to the data structures used in superclasses.  
 
 

-----Original Message-----
From: Parag Chandra [mailto:pchandra@radonc.unc.edu]
Sent: Tuesday, April 01, 2003 4:43 PM
To: Miller, James V (Research); ITK Mailing List
Subject: Re: [Insight-users] Request for ImageFileWriter...


Thanks, although I also see that all the member variables for
ImageFileWriter are declared private; not sure why it doesn't follow the
pattern of ImageFileReader, which declares them protected. I think I'm just
going to end up copying the class and modifying it to get what I need for
now.
 
-Parag
 

----- Original Message ----- 
From: Miller, James  <mailto:millerjv@crd.ge.com> V (Research) 
To: 'Parag Chandra' <mailto:pchandra@radonc.unc.edu>  ; ITK Mailing List
<mailto:insight-users@public.kitware.com>  
Sent: Tuesday, April 01, 2003 4:30 PM
Subject: RE: [Insight-users] Request for ImageFileWriter...

Both of these methods are already virtual in the superclass (ProcessObject).
You should not have a problem subclassing.
 
Jim
 

-----Original Message-----
From: Parag Chandra [mailto:pchandra@radonc.unc.edu]
Sent: Tuesday, April 01, 2003 4:13 PM
To: ITK Mailing List
Subject: [Insight-users] Request for ImageFileWriter...


Hi,
 
I'm trying to subclass ImageFileWriter to work with fstreams. I've defined
my own file format that contains non-image data, and so I need to be able to
write to an open stream in my application. I just need to override
GenerateOutputInformation and GenerateData, but these are not declared as
virtual. Can this change be made to facilitate subclassing? Thanks.
 
-Parag
 
 


------_=_NextPart_001_01C2F928.60502B70
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2715.400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=711385614-02042003><FONT color=#0000ff size=2>This may be a 
problem with the ImageFileReader.&nbsp; In ITK, member variables are supposed to 
be private.&nbsp; Access</FONT></SPAN></DIV>
<DIV><SPAN class=711385614-02042003><FONT color=#0000ff size=2>to these 
variables from subclasses should be done via Get/Set methods. This is one of 
ITK's coding conventions. It protects the subclasses against changes to the data 
structures used in superclasses.&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=711385614-02042003><FONT color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=711385614-02042003><FONT color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Parag Chandra 
  [mailto:pchandra@radonc.unc.edu]<BR><B>Sent:</B> Tuesday, April 01, 2003 4:43 
  PM<BR><B>To:</B> Miller, James V (Research); ITK Mailing 
  List<BR><B>Subject:</B> Re: [Insight-users] Request for 
  ImageFileWriter...<BR><BR></FONT></DIV>
  <DIV><FONT face=Arial size=2>Thanks, although I also see that all the member 
  variables for ImageFileWriter are declared private; not sure why it doesn't 
  follow the pattern of ImageFileReader,&nbsp;which declares them protected. I 
  think I'm just going to end up copying the class and modifying it to get what 
  I need for now.</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>-Parag</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <BLOCKQUOTE dir=ltr 
  style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
    <DIV 
    style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
    <A title=millerjv@crd.ge.com href="mailto:millerjv@crd.ge.com">Miller, James 
    V (Research)</A> </DIV>
    <DIV style="FONT: 10pt arial"><B>To:</B> <A title=pchandra@radonc.unc.edu 
    href="mailto:pchandra@radonc.unc.edu">'Parag Chandra'</A> ; <A 
    title=insight-users@public.kitware.com 
    href="mailto:insight-users@public.kitware.com">ITK Mailing List</A> </DIV>
    <DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, April 01, 2003 4:30 
    PM</DIV>
    <DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [Insight-users] Request 
    for ImageFileWriter...</DIV>
    <DIV><BR></DIV>
    <DIV><SPAN class=117432921-01042003><FONT color=#0000ff size=2>Both of these 
    methods are already&nbsp;virtual in the superclass (ProcessObject).&nbsp; 
    You should not have a problem subclassing.</FONT></SPAN></DIV>
    <DIV><SPAN class=117432921-01042003><FONT color=#0000ff 
    size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=117432921-01042003><FONT color=#0000ff 
    size=2>Jim</FONT></SPAN></DIV>
    <DIV><SPAN class=117432921-01042003><FONT color=#0000ff 
    size=2></FONT></SPAN>&nbsp;</DIV>
    <BLOCKQUOTE dir=ltr 
    style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
      <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
      size=2>-----Original Message-----<BR><B>From:</B> Parag Chandra 
      [mailto:pchandra@radonc.unc.edu]<BR><B>Sent:</B> Tuesday, April 01, 2003 
      4:13 PM<BR><B>To:</B> ITK Mailing List<BR><B>Subject:</B> [Insight-users] 
      Request for ImageFileWriter...<BR><BR></FONT></DIV>
      <DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
      <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
      <DIV><FONT face=Arial size=2>I'm trying to 
      subclass&nbsp;ImageFileWriter&nbsp;to work with fstreams. I've defined my 
      own file format that contains non-image data, and so&nbsp;I need to be 
      able to&nbsp;write to an open stream in my application. I just need to 
      override GenerateOutputInformation and GenerateData, but these are not 
      declared as virtual. Can this change be made to facilitate subclassing? 
      Thanks.</FONT></DIV>
      <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
      <DIV><FONT face=Arial size=2>-Parag</FONT></DIV>
      <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
      <DIV>&nbsp;</DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C2F928.60502B70--