[vtkusers] Trying to read a set of jpg slices
Rodrigo Lovera
lobo.theslayer at gmail.com
Tue Sep 25 11:23:20 EDT 2012
Thx a lot, that solved my problem with jpeg reader, but now there's nothing
in the vtk output window, I guess maybe is a problem with the images or not
the proper way to visualize the volume not sure of that. Does anyone know
where to get data set samples to test these kind of small apps??
2012/9/25 Goodwin Lawlor <goodwin.lawlor.lists at gmail.com>
> Hi Rodrigo,
>
> If your filenames are Image1.jpg, Image2.jpg etc
>
> Try
>
> jpegReader->SetFilePattern("%s%d.jpg");
> jpegReader->SetFilePrefix("C:/VTK5.10/DATA/MatlabTest/JPG/Image");
>
>
> With this FilePattern, the reader replaces "%s" with the FilePrefix, then
> appends the file number, then appends the extension ".jpg"
>
> Note you had a typo in the FilePrefix originally - "Imagen"
>
> hth
>
> Goodwin
>
> On Tue, Sep 25, 2012 at 3:34 PM, Rodrigo Lovera <lobo.theslayer at gmail.com>wrote:
>
>> Yes I got'm like
>> Image1.jpg
>> Image2.jpg
>> etc
>>
>> But i'm still getting the same error, solved the other one of unsigned
>> char but can't make the volume read :/
>>
>> ERROR: In C:\Users\RODRIGO LOVERA\Documents\PUCP\Tesis\VTK
>> 5.10\VTK\IO\vtkJPEGReader.cxx, line 93
>> vtkJPEGReader (010951B0): Unable to open file
>> C:/VTK5.10/DATA/MatlabTest/JPG/Imagen.0
>>
>> I'm running a function to save a matlab volume data 3d matrix to save 'em
>> as jpeg slices so I can read 'm with vtk in c++ environment but can't pass
>> that error any other advice???
>>
>> vtkJPEGReader *jpegReader = vtkJPEGReader::New();
>> jpegReader->SetDataByteOrderToLittleEndian();
>> // jpegReader->SetFilePattern("");
>> jpegReader->SetFilePrefix("C:/VTK5.10/DATA/MatlabTest/JPG/Imagen");
>> jpegReader->SetDataSpacing(3.2, 3.2, 20);
>> jpegReader->SetDataOrigin(0, 0, 0);
>>
>> I also 'd like to know where to see which properties or class members
>> aply to Jpeg Reader, already checked the jpegreader.h and .cpp but don't
>> get it.
>>
>>
>>
>> 2012/9/25 John Drescher <drescherjm at gmail.com>
>>
>>> > Each slice is a single file, all of 'em in a sequence but got them like
>>> > image1, image2.... image79... so u mean I need to save 'm like image.1
>>> > image.2... and so??
>>> >
>>>
>>> Shouldn't they be
>>>
>>> image1.jpg
>>> image2.jpg
>>> image3.jpg
>>> ...
>>> imageN.jpg
>>>
>>> If this is windows do you have hide extensions enabled for known types
>>> in your Folder Settings located in the Control Pannel.
>>>
>>> John
>>>
>>
>>
>>
>> --
>> *Rodrigo aka WarHearT*
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
--
*Rodrigo aka WarHearT*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120925/828806ca/attachment.htm>
More information about the vtkusers
mailing list