Joe,

This is more of a question for the ITK discussion forum [1], but I'll
give you a potential solution here.

The problem is that

typedef itk::Image<unsigned char, 3>      ImageType;

declares a 3-dimensional scalar-valued image, not a 3-component (RGB)
2-dimensional image. To declare an RGB ITK image, try this:

typedef itk::RGBPixel< unsigned char > RGBPixelType;
typedef itk::Image< RGBPixelType, 3 > ImageType;

I hope that helps.

Cory

[1] https://discourse.itk.org/

On Thu, Nov 30, 2017 at 8:14 PM, joe kozak <lentilwal...@hotmail.com> wrote:
> grabbed frames from a standard youtube color video via ffmpeg
> used something like $    ./imageSeriesToVolume -sz 1.0 -o test.vtk -i
> input*.jpeg
> loaded test.vtk in paraview 5.0.1 and also paraview 5.4.1
> on information tab i see:   scalars  unsigned char [33,239]
>
> "Map Scalars"  on or off I get no RGB colored voxels, of course, because
> there is only one datum of type unsigned char.
>
> Where are the other two scalars?!?
>
> The important part you will ask me is here:
>
>  91   io->SetFileName (filenames[0].c_str());
>  92   io->ReadImageInformation();
>  93
>  94   if (io->GetNumberOfDimensions()==2) {
>  95
>  96     typedef itk::Image<unsigned char, 3>      ImageType;
>  97     typedef itk::ImageSeriesReader<ImageType> SeriesReaderType;
>  98
>  99
> 100     SeriesReaderType::Pointer reader = SeriesReaderType::New();
> 101     std::cout << "Adding:\n";
> 102     for (unsigned int i=0; i<filenames.size(); i++)
> 103     {
> 104       std::cout << filenames[i] << std::endl;
> 105       reader->AddFileName ( filenames[i].c_str() );
> 106     }
> 107
>
> Looks pretty standard, but no 3 scalar datums for an RGB voxel for
> non-false-colored volume.
> It is perported to work, and all other examples i see are none different
> from the code i used to generate a .vtk file.
>
>
> I cannot use IsoVolume If I load the jpegs directly in paraview,  but I can
> get RGB color voxels.
> The GOAL is to use IsoVolume on a volume of RGB points from frames from a
> video sequence.
> I have tried on and off for MANY YEARS to figure this out...    (its for an
> art project, metalcasting &3d Printing)
>
> _______________________________________________
> 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 ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
_______________________________________________
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to