[Insight-users] Read *.img files

G G greenlander1986 at gmail.com
Fri Apr 22 13:54:48 EDT 2011


Thank you, I tried it...
But I havenot displayed this images.
I am using data from this web
http://www.cma.mgh.harvard.edu/ibsr/data.html

And I this code...

        typedef itk::ImageSeriesReader< TImageType >  ReaderType;
        ReaderType::Pointer reader = ReaderType::New();

        reader->SetImageIO(itk::GDCMImageIO::New()); // it works for DICOM
image series, but not for *.img series :(
        reader->SetFileNames( this->filesString );
        try
        {
            reader->Update(); // this crach, when I am trying to load *.img
series :(
            cout<<"OK"<<endl;
        }
        catch(...)
        {
            return false;
        }

        TImageTypePointer *Pout = (TImageTypePointer *)poutputImage;
        *Pout = reader->GetOutput();
        return true;

Do somebody know, where is the problem?
Thank you all very much

2011/4/18 Neil Panjwani <paniwani at gmail.com>

> See Examples/IO/ImageSeriesReadWrite.cxx. More details can be found in the
> ITK Software Guide.
>
>
> On Mon, Apr 18, 2011 at 2:01 PM, G G <greenlander1986 at gmail.com> wrote:
>
>> I have one new questions,
>> What about loading *.img files as image series? It is same like *.dcm
>> image series? Or something other?
>> thanks a lot
>>
>>
>> 2011/4/18 G G <greenlander1986 at gmail.com>
>>
>>> Oh then sorry for my stupid question :) I thought, that I have use
>>> special ITK class template...
>>>
>>> 2011/4/18 Neil Panjwani <paniwani at gmail.com>
>>>
>>>> http://www.vtk.org/Wiki/ITK/Examples/IO/ImageFileReader
>>>>
>>>>
>>>> On Sun, Apr 17, 2011 at 7:25 PM, G G <greenlander1986 at gmail.com> wrote:
>>>>
>>>>> Yes I have found a lot of .img files and I would like to read it...
>>>>> Is somewhere example?
>>>>>
>>>>>
>>>>> 2011/4/18 Neil Panjwani <paniwani at gmail.com>
>>>>>
>>>>>> ITK can read ANALYZE files, which consist of .img and .hdr files. Do
>>>>>> you have just .img?
>>>>>>
>>>>>> On Sun, Apr 17, 2011 at 7:07 PM, G G <greenlander1986 at gmail.com>wrote:
>>>>>>
>>>>>>> Hi Can ITK read *.img files?  found a lot of this data type, but when
>>>>>>> i try to load in ITK-SNAP it crashed.
>>>>>>> Where can I find examples about this in ITK?
>>>>>>> Thanks a lot
>>>>>>>
>>>>>>> _____________________________________
>>>>>>> Powered by www.kitware.com
>>>>>>>
>>>>>>> Visit other Kitware open-source projects at
>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>
>>>>>>> Kitware offers ITK Training Courses, for more information visit:
>>>>>>> http://www.kitware.com/products/protraining.html
>>>>>>>
>>>>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>>>>
>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>> http://www.itk.org/mailman/listinfo/insight-users
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110422/189fc1b6/attachment.htm>


More information about the Insight-users mailing list