I am trying to make a new class: itkPTXImageIO (derived from itkImageIOBase). A ptx file is very simple, basically something like this<br><br>ASCII Header<br>x y z i r g b<br>x y z i r g b<br>x y z i r g b<br>x y z i r g b<br>

ad. nausium...<br><br>My current reader uses getline() to get the lines and then parses them. What I want to do is have a class:<br><br>namespace itk<br>{<br>    <br>    class PTXPoint<br>    {<br>        public:<br>            typedef itk::Point&lt;double, 3&gt; PointType;<br>
            typedef itk::RGBPixel&lt;unsigned char&gt; ColorType;<br>            <br>            PointType Point;<br>            ColorType Color;<br>            double Intensity;<br>            <br>    };<br>} //end itk namespace<br>
<br><br>and store an instance of that class in every pixel of an itkImage&lt;itkPTXPoint, 2&gt;. What I&#39;ve gathered about the current framework is that the itkImageFileReader has a member variable of an ImageIOBase. It then calls the Read() function of which ever derived class you specify, which fills a void* buffer. Everything seems to need to know the number of bytes required so a big buffer of the correct size can be declared (which I guess is very fitting for binary reading).<br>
<br>It seems like the way I want to read and fill (image(0,0) = FirstLine; Image(0,1) = SecondLine; etc) the image may not fit into the framework? I guess the part that is missing is how to access the pixels of the ImageIOBase in itkImageFileReader from the Read() function of itkPTXImageIO?<br>

<br>Any suggestions?<br><br clear="all">Thanks,<br><br>David<br>