[Paraview] unable to RGB voxel from tiff/jpeg slice to volume

Cory Quammen cory.quammen at kitware.com
Fri Dec 1 15:45:06 EST 2017


On Thu, Nov 30, 2017 at 9:17 PM, joe kozak <lentilwallop at hotmail.com> wrote:
> that worked...    so why cant IsoVolume work on that type of dataset?  Can i
> not carve out a volume base on some range of Reds or Greens ?   What about
> based on some union of each channel?

I'm not sure what you are referring when you say IsoVolume. Is this
the Contour filter in ParaView? If so, the Contour filter does not
operate on RGB data. The Threshold filter does not work with RGB data,
either. You may be able to instead use Find Data to locate all points
that fall in some range, and you can use a Python expression to
perform a union of thresholds on different channels. After you have
created a selection this way, you can extract the selection with the
Extract Selection button on the bottom of the Find Data dialog.

Note that image data is associated with points in images in ParaView,
not cells, so if you want to extract a selection of cells, you might
use the Point Data to Cell Data filter before creating a selection.

HTH,
Cory

> ________________________________
> From: Cory Quammen <cory.quammen at kitware.com>
> Sent: Thursday, November 30, 2017 7:29 PM
> To: joe kozak
> Cc: paraview at paraview.org
> Subject: Re: [Paraview] unable to RGB voxel from tiff/jpeg slice to volume
>
> 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 <lentilwallop at 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.



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.


More information about the ParaView mailing list