Re: [Paraview] [EXTERNAL] 4.3.1 warnings

2015-05-05 Thread Angelini, Richard C (Rick) CIV USARMY ARL (US)
Thanks for confirming!

Rick Angelini
USArmy Research Laboratory
CISD/HPC Architectures Team
Phone:  410-278-6266

From: Scott, Alan Scott wasc...@sandia.govmailto:wasc...@sandia.gov
Date: Monday, May 4, 2015 at 4:12 PM
To: Rick Angelini 
richard.c.angelini@mail.milmailto:richard.c.angelini@mail.mil, 
paraview@paraview.orgmailto:paraview@paraview.org 
paraview@paraview.orgmailto:paraview@paraview.org
Subject: RE: [EXTERNAL] [Paraview] 4.3.1 warnings

Just talked to Utkarsh.  My bad, I gave you wrong information, you did find a 
bug.  I will work on fixing it.

Thanks,

Alan

From: Angelini, Richard C (Rick) CIV USARMY ARL (US) 
[mailto:richard.c.angelini@mail.mil]
Sent: Monday, May 04, 2015 1:55 PM
To: Scott, W Alan; paraview@paraview.orgmailto:paraview@paraview.org
Subject: Re: [EXTERNAL] [Paraview] 4.3.1 warnings

This was not a debug build.   It’s a standard CTH-11.0 generated dataset ….



Rick Angelini
USArmy Research Laboratory
CISD/HPC Architectures Team
Phone:  410-278-6266

From: Scott, Alan Scott wasc...@sandia.govmailto:wasc...@sandia.gov
Date: Monday, May 4, 2015 at 2:18 PM
To: Rick Angelini 
richard.c.angelini@mail.milmailto:richard.c.angelini@mail.mil, 
paraview@paraview.orgmailto:paraview@paraview.org 
paraview@paraview.orgmailto:paraview@paraview.org
Subject: RE: [EXTERNAL] [Paraview] 4.3.1 warnings

Rick,
If this is a debug build, it is to be expected.  Two issues – one is that 
release builds should never show warnings, debug builds always print out 
warnings.  Second issue, which still needs to be fixed, but is smaller, is that 
the spyplot reader is passing incorrect information to the Progress Handler.  
Frankly, I thought I had fixed it a few years ago...

Can you share this dataset?  Is this a debug build?

Alan

From: ParaView [mailto:paraview-boun...@paraview.org] On Behalf Of Angelini, 
Richard C (Rick) CIV USARMY ARL (US)
Sent: Monday, May 04, 2015 9:39 AM
To: paraview@paraview.orgmailto:paraview@paraview.org
Subject: [EXTERNAL] [Paraview] 4.3.1 warnings

I thought we saw this warning message several releases ago, but it seems to be 
back again???  Reading CTH dataset in client-server mode:



/app/paraview/4.3.1_osmesa/bin/pvserver
Connecting to client (reverse connection requested)...
Connection URL: csrc://hostname-0001:25248
Client connected.
Warning: In 
/u/home/angel/PV/4.3.1/Build/paraview/src/paraview/ParaViewCore/ClientServerCore/Core/vtkPVProgressHandler.cxx,
 line 261
vtkPVProgressHandler (0x235a500): vtkSpyPlotReader reported invalid progress 
(2.01875). Value must be between [0, 1]. Clamping to this range.

Warning: In 
/u/home/angel/PV/4.3.1/Build/paraview/src/paraview/ParaViewCore/ClientServerCore/Core/vtkPVProgressHandler.cxx,
 line 261
vtkPVProgressHandler (0x21034c0): vtkSpyPlotReader reported invalid progress 
(1.81875). Value must be between [0, 1]. Clamping to this range.




Rick Angelini
USArmy Research Laboratory
CISD/HPC Architectures Team
Phone:  410-278-6266
___
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


Re: [Paraview] Fwd: Image Doesn't load correctly

2015-05-05 Thread Dean, Kevin
ok, now I am getting new and exciting error messages for loading the
plugin... it doesn't seem to enjoy this line from the XML

FileListDomain name=files/

errors:

ERROR: In
/home/kdean/tmp/install_PV_source/ParaView/VTK/IO/XMLParser/vtkXMLParser.cxx,
line 483
vtkPVXMLParser (0x35d8d20): Error parsing XML in stream at line 18, column
8, byte index 632: not well-formed (invalid token)


ERROR: In
/home/kdean/tmp/install_PV_source/ParaView/VTK/IO/XMLParser/vtkXMLParser.cxx,
line 483
vtkPVXMLParser (0x238f5a0): Error parsing XML in stream at line 18, column
8, byte index 632: not well-formed (invalid token)


ERROR: In
/home/kdean/tmp/install_PV_source/ParaView/ParaViewCore/ServerImplementation/Core/vtkSIProxyDefinitionManager.cxx,
line 565
vtkSIProxyDefinitionManager (0x1815770): No proxy that matches:
group=sources and proxy=vtkPVPROTOImageReader were found.

Error opening file  .../protobuf.

Kevin E. Dean

On Tue, May 5, 2015 at 10:12 AM, Burlen Loring blor...@lbl.gov wrote:

  at the moment I do not implement that.

 this may be the source of your issues, I thought that if you don't return
 1 from this function PV will assume your reader is not the right one and
 skip it(ie never call SetFileName). But if that were really true I don't
 get how RequestData is getting called...



 On 05/05/2015 10:00 AM, Dean, Kevin wrote:

 at the moment I do not implement that. I am assuming that may be the
 reason why I get this message every time i load the shared object file...

 ERROR: In
 /home/kdean/tmp/install_PV_source/ParaView/ParaViewCore/ServerManager/Core/vtkSMProperty.cxx,
 line 552
 vtkSMStringVectorProperty (0x3cb10f0): Could not create object of type:
 vtkSMFileListDoman. Did you specify wrong xml element?

 On Tue, May 5, 2015 at 9:14 AM, Burlen Loring blor...@lbl.gov wrote:

  ParaView should set it after it determines if the reader can read it.
 Did you also implement CanReadFile? Maybe the problem is in that function.


 On 05/05/2015 09:09 AM, Dean, Kevin wrote:


 -- Forwarded message --
 From: Dean, Kevin kevin.d...@decisionsciencescorp.com
 Date: Mon, May 4, 2015 at 5:10 PM
 Subject: Re: [Paraview] Image Doesn't load correctly
 To: Burlen Loring burlen.lor...@gmail.com


  awesome, thanks, that did it.

 One more question. Is there a way to debug the FileName aspect of the
 reader. I can't figure out how it's supposed to get set. The only way I can
 get the image to show is by hard
 coding it within the RequestData() function.

  Thanks Again

  Kevin E. Dean

 On Mon, May 4, 2015 at 11:33 AM, Burlen Loring burlen.lor...@gmail.com
 wrote:

  Hi Kevin.

 Your RequestInformation looks a little bare. Unless things have changed
 recently, you might need to set WHOLE_EXTENT, ORIGIN, SPACING,
 CAN_PRODUCE_SUB_EXTENT keys there. and if you support parallel IO honor the
 requested extent in RequestData.

 Burlen


 On 05/04/2015 09:52 AM, Dean, Kevin wrote:

   So I am still having a few issues with the reader. I have checked the
 output from the information Panel. And it seems as if all the information
 is the same. So maybe the data is getting deleted somehow (I'm not
 sure, but here is a snippet of my code);

 int vtkPVPROTOImageReader::RequestInformation (
vtkInformation*,
vtkInformationVector**,
vtkInformationVector* outputVector)
 {
vtkInformation* outInfo = outputVector-GetInformationObject(0);
vtkDataObject::SetPointDataActiveScalarInfo(outInfo,
 VTK_UNSIGNED_CHAR, 1);

return 1;
 }

 int vtkPVPROTOImageReader::RequestData(vtkInformation
 *vtkNotUsed(request),
vtkInformationVector
 **inputVector,
vtkInformationVector
 *outputVector)
 {
 ... conversion code from protobuf

   /* Convert from protobuf to vtkImageData */
   vtkSmartPointervtkImageData image = function converting to
 protobuf;

   vtkDataArray* scalars = image-GetPointData()-GetScalars();
   scalars-SetName(ReconstructionData);

   /* Get the info object */
   vtkInformation *outInfo = outputVector-GetInformationObject(0);
   outInfo-Set(vtkDataObject::DATA_TYPE_NAME(), vtkImageData);

   /* Get the output */
   vtkImageData* output = vtkImageData::GetData(outputVector);

 //  output-SetSpacing(image-GetSpacing());
 //  output-SetOrigin(image-GetOrigin());
 //  output-AllocateScalars(outInfo);
 //
 output-GetPointData()-SetScalars(image-GetPointData()-GetScalars());
 //  output-SetDimensions(image-GetDimensions());

   output-ShallowCopy(image);

   int* dimensions = output-GetDimensions();

   std::cout  \nNumber of points:   output-GetNumberOfPoints() 
 std::endl;
   std::cout  Number of cells:   output-GetNumberOfCells()  \n
  std::endl;

  // print out the pixel values to see if they are actually present
   for (int z = 0; z  dimensions[2]; z++)
   {
 for (int y = 0; y  dimensions[1]; y++)
 {
   for (int x = 0; x  dimensions[0]; x++)
   {
 double* pixel =
 

Re: [Paraview] Fwd: Image Doesn't load correctly

2015-05-05 Thread Dean, Kevin
nevermind, I figured it out.

the xml I had didn't like having a documentation section within the string
vector property

Kevin

On Tue, May 5, 2015 at 4:31 PM, Dean, Kevin 
kevin.d...@decisionsciencescorp.com wrote:

 ok, now I am getting new and exciting error messages for loading the
 plugin... it doesn't seem to enjoy this line from the XML

 FileListDomain name=files/

 errors:

 ERROR: In
 /home/kdean/tmp/install_PV_source/ParaView/VTK/IO/XMLParser/vtkXMLParser.cxx,
 line 483
 vtkPVXMLParser (0x35d8d20): Error parsing XML in stream at line 18, column
 8, byte index 632: not well-formed (invalid token)


 ERROR: In
 /home/kdean/tmp/install_PV_source/ParaView/VTK/IO/XMLParser/vtkXMLParser.cxx,
 line 483
 vtkPVXMLParser (0x238f5a0): Error parsing XML in stream at line 18, column
 8, byte index 632: not well-formed (invalid token)


 ERROR: In
 /home/kdean/tmp/install_PV_source/ParaView/ParaViewCore/ServerImplementation/Core/vtkSIProxyDefinitionManager.cxx,
 line 565
 vtkSIProxyDefinitionManager (0x1815770): No proxy that matches:
 group=sources and proxy=vtkPVPROTOImageReader were found.

 Error opening file  .../protobuf.

 Kevin E. Dean

 On Tue, May 5, 2015 at 10:12 AM, Burlen Loring blor...@lbl.gov wrote:

  at the moment I do not implement that.

 this may be the source of your issues, I thought that if you don't return
 1 from this function PV will assume your reader is not the right one and
 skip it(ie never call SetFileName). But if that were really true I don't
 get how RequestData is getting called...



 On 05/05/2015 10:00 AM, Dean, Kevin wrote:

 at the moment I do not implement that. I am assuming that may be the
 reason why I get this message every time i load the shared object file...

 ERROR: In
 /home/kdean/tmp/install_PV_source/ParaView/ParaViewCore/ServerManager/Core/vtkSMProperty.cxx,
 line 552
 vtkSMStringVectorProperty (0x3cb10f0): Could not create object of type:
 vtkSMFileListDoman. Did you specify wrong xml element?

 On Tue, May 5, 2015 at 9:14 AM, Burlen Loring blor...@lbl.gov wrote:

  ParaView should set it after it determines if the reader can read it.
 Did you also implement CanReadFile? Maybe the problem is in that function.


 On 05/05/2015 09:09 AM, Dean, Kevin wrote:


 -- Forwarded message --
 From: Dean, Kevin kevin.d...@decisionsciencescorp.com
 Date: Mon, May 4, 2015 at 5:10 PM
 Subject: Re: [Paraview] Image Doesn't load correctly
 To: Burlen Loring burlen.lor...@gmail.com


  awesome, thanks, that did it.

 One more question. Is there a way to debug the FileName aspect of the
 reader. I can't figure out how it's supposed to get set. The only way I can
 get the image to show is by hard
 coding it within the RequestData() function.

  Thanks Again

  Kevin E. Dean

 On Mon, May 4, 2015 at 11:33 AM, Burlen Loring burlen.lor...@gmail.com
 wrote:

  Hi Kevin.

 Your RequestInformation looks a little bare. Unless things have changed
 recently, you might need to set WHOLE_EXTENT, ORIGIN, SPACING,
 CAN_PRODUCE_SUB_EXTENT keys there. and if you support parallel IO honor the
 requested extent in RequestData.

 Burlen


 On 05/04/2015 09:52 AM, Dean, Kevin wrote:

   So I am still having a few issues with the reader. I have checked
 the output from the information Panel. And it seems as if all the
 information is the same. So maybe the data is getting deleted somehow (I'm
 not sure, but here is a snippet of my code);

 int vtkPVPROTOImageReader::RequestInformation (
vtkInformation*,
vtkInformationVector**,
vtkInformationVector* outputVector)
 {
vtkInformation* outInfo = outputVector-GetInformationObject(0);
vtkDataObject::SetPointDataActiveScalarInfo(outInfo,
 VTK_UNSIGNED_CHAR, 1);

return 1;
 }

 int vtkPVPROTOImageReader::RequestData(vtkInformation
 *vtkNotUsed(request),
vtkInformationVector
 **inputVector,
vtkInformationVector
 *outputVector)
 {
 ... conversion code from protobuf

   /* Convert from protobuf to vtkImageData */
   vtkSmartPointervtkImageData image = function converting to
 protobuf;

   vtkDataArray* scalars = image-GetPointData()-GetScalars();
   scalars-SetName(ReconstructionData);

   /* Get the info object */
   vtkInformation *outInfo = outputVector-GetInformationObject(0);
   outInfo-Set(vtkDataObject::DATA_TYPE_NAME(), vtkImageData);

   /* Get the output */
   vtkImageData* output = vtkImageData::GetData(outputVector);

 //  output-SetSpacing(image-GetSpacing());
 //  output-SetOrigin(image-GetOrigin());
 //  output-AllocateScalars(outInfo);
 //
 output-GetPointData()-SetScalars(image-GetPointData()-GetScalars());
 //  output-SetDimensions(image-GetDimensions());

   output-ShallowCopy(image);

   int* dimensions = output-GetDimensions();

   std::cout  \nNumber of points:   output-GetNumberOfPoints() 
 std::endl;
   std::cout  Number of cells:   output-GetNumberOfCells() 
 \n  std::endl;

  // print out the pixel 

Re: [Paraview] Contours of unstructured grid paraview 3 vs paraview 4

2015-05-05 Thread Cory Quammen
Michael,

A change has just went into ParaView that should prevent this problem in
the future.

https://gitlab.kitware.com/paraview/paraview/commit/a57c26237a41955465326a0cde8b586aecada416

If one really wants integer precision in the contour coordinates, it is
still possible with this change.

Thanks,
Cory

On Thu, Apr 16, 2015 at 9:05 AM, Greenwood, Michael 
michael.greenw...@nrcan-rncan.gc.ca wrote:

  Yup, that was the issue, it was a simple matter of changing the
 coordinates of my grid to floating point instead of integer.



 *From:* Cory Quammen [mailto:cory.quam...@kitware.com]
 *Sent:* April 15, 2015 21:30
 *To:* Greenwood, Michael
 *Cc:* Berk Geveci; paraview@paraview.org

 *Subject:* Re: [Paraview] Contours of unstructured grid paraview 3 vs
 paraview 4



 This email explains a bit more detail what I think the problem might be:



 http://www.paraview.org/pipermail/paraview/2014-October/032458.html



 - Cory



 On Wed, Apr 15, 2015 at 6:11 PM, Cory Quammen cory.quam...@kitware.com
 wrote:

  Michael,



 I remember tracking down a similar bug like this. I recall it had to do
 with the type of the points being specified as an integral type. The change
 between 3 and 4 was that interpolation for the isocontours is now performed
 with the precision available in the point type, so if your point type is an
 integral value, you'll get this chunky result.



 Try changing your point type in your data file to float or double.



 Hope that helps,

 Cory



 On Wed, Apr 15, 2015 at 4:09 PM, Greenwood, Michael 
 michael.greenw...@nrcan-rncan.gc.ca wrote:

  The data file is being held in moderation since its larger size, let me
 see if I can find a place to store it and send a link.



 *From:* ParaView [mailto:paraview-boun...@paraview.org] *On Behalf Of 
 *Greenwood,
 Michael
 *Sent:* April 15, 2015 16:08
 *To:* Berk Geveci
 *Cc:* paraview@paraview.org
 *Subject:* Re: [Paraview] Contours of unstructured grid paraview 3 vs
 paraview 4



 It seems that in paraview 3 it would interpolate inside the cell between
 the mesh points when building the polymesh for the contour and now it is
 snapping the interpolation to nearest grid point of my unstructured mesh.





 *From:* Berk Geveci [mailto:berk.gev...@kitware.com
 berk.gev...@kitware.com]
 *Sent:* April 15, 2015 15:57
 *To:* Greenwood, Michael
 *Cc:* paraview@paraview.org
 *Subject:* Re: [Paraview] Contours of unstructured grid paraview 3 vs
 paraview 4



 Very strange. I can't recall a change that can cause this. Do you have a
 dataset that we can reproduce this with?



 Best,

 -berk



 On Wed, Apr 15, 2015 at 3:49 PM, Greenwood, Michael 
 michael.greenw...@nrcan-rncan.gc.ca wrote:

  Hi I’ve upgraded to paraview 4 and now when building contours of my 3D
 unstructured grid, the contours are pixelated.  This was not the case in 3,
 and when you look at a slice of the contour overlayed with a slice of the
 volume data it is obvious that the contour in paraview 4 seems to be
 “hugging” the boundaries of my mesh instead of interpolating through it.
 How can I get my nice smooth contours I had in version 3?



 Thanks

 [image: cid:image001.png@01D07796.42933DD0]


 ___
 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




 ___
 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
 RD Engineer
 Kitware, Inc.





 --

 Cory Quammen
 RD Engineer
 Kitware, Inc.




-- 
Cory Quammen
RD 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


[Paraview] Fwd: Re: Fwd: Image Doesn't load correctly

2015-05-05 Thread Burlen Loring




 Forwarded Message 
Subject:Re: [Paraview] Fwd: Image Doesn't load correctly
Date:   Tue, 05 May 2015 09:14:06 -0700
From:   Burlen Loring blor...@lbl.gov
To: Dean, Kevin kevin.d...@decisionsciencescorp.com



ParaView should set it after it determines if the reader can read it. 
Did you also implement CanReadFile? Maybe the problem is in that function.


On 05/05/2015 09:09 AM, Dean, Kevin wrote:


-- Forwarded message --
From: *Dean, Kevin* kevin.d...@decisionsciencescorp.com 
mailto:kevin.d...@decisionsciencescorp.com

Date: Mon, May 4, 2015 at 5:10 PM
Subject: Re: [Paraview] Image Doesn't load correctly
To: Burlen Loring burlen.lor...@gmail.com 
mailto:burlen.lor...@gmail.com



awesome, thanks, that did it.

One more question. Is there a way to debug the FileName aspect of the 
reader. I can't figure out how it's supposed to get set. The only way 
I can get the image to show is by hard

coding it within the RequestData() function.

Thanks Again

Kevin E. Dean

On Mon, May 4, 2015 at 11:33 AM, Burlen Loring 
burlen.lor...@gmail.com mailto:burlen.lor...@gmail.com wrote:


Hi Kevin.

Your RequestInformation looks a little bare. Unless things have
changed recently, you might need to set WHOLE_EXTENT, ORIGIN,
SPACING, CAN_PRODUCE_SUB_EXTENT keys there. and if you support
parallel IO honor the requested extent in RequestData.

Burlen


On 05/04/2015 09:52 AM, Dean, Kevin wrote:

So I am still having a few issues with the reader. I have checked
the output from the information Panel. And it seems as if all the
information is the same. So maybe the data is getting deleted
somehow (I'm not sure, but here is a snippet of my code);

int vtkPVPROTOImageReader::RequestInformation (
   vtkInformation*,
   vtkInformationVector**,
   vtkInformationVector* outputVector)
{
   vtkInformation* outInfo = outputVector-GetInformationObject(0);
vtkDataObject::SetPointDataActiveScalarInfo(outInfo,
VTK_UNSIGNED_CHAR, 1);

   return 1;
}

int vtkPVPROTOImageReader::RequestData(vtkInformation
*vtkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector)
{
   ... conversion code from protobuf

  /* Convert from protobuf to vtkImageData */
  vtkSmartPointervtkImageData image = function converting to
protobuf;

  vtkDataArray* scalars = image-GetPointData()-GetScalars();
scalars-SetName(ReconstructionData);

  /* Get the info object */
  vtkInformation *outInfo = outputVector-GetInformationObject(0);
outInfo-Set(vtkDataObject::DATA_TYPE_NAME(), vtkImageData);

  /* Get the output */
  vtkImageData* output = vtkImageData::GetData(outputVector);

// output-SetSpacing(image-GetSpacing());
// output-SetOrigin(image-GetOrigin());
// output-AllocateScalars(outInfo);
//
output-GetPointData()-SetScalars(image-GetPointData()-GetScalars());
// output-SetDimensions(image-GetDimensions());

  output-ShallowCopy(image);

  int* dimensions = output-GetDimensions();

  std::cout  \nNumber of points:  
output-GetNumberOfPoints()  std::endl;
  std::cout  Number of cells:   output-GetNumberOfCells()
 \n  std::endl;

// print out the pixel values to see if they are actually present
  for (int z = 0; z  dimensions[2]; z++)
  {
for (int y = 0; y  dimensions[1]; y++)
{
  for (int x = 0; x  dimensions[0]; x++)
  {
double* pixel =
static_castdouble*(output-GetScalarPointer(x,y,z));
// do something with v
std::cout  pixel value:   pixel[0]  \n;
  }
  std::cout  std::endl;
}
std::cout  std::endl;
  }

  // write output to file and compare in visualization window...
vtkSmartPointervtkXMLImageDataWriter vtk_writer =
vtkSmartPointervtkXMLImageDataWriter::New();
  vtk_writer-SetInputData(output);
  vtk_writer-SetFileName( /home/kdean/tmp/foo.vti );
  vtk_writer-Update();
  vtk_writer-Write();

  return 1;
}


Another Problem I ran into:
So I had to hardcode a file for the char *FileName into the
RequestData Function in order to read any protobuf file. I ran a
debugger on the code, and it seems like these functions from the
header file (of the reader):

vtkGetStringMacro(FileName);
vtkSetStringMacro(FileName);

they are never getting called.

Thanks,

Kevin

here are my xml too... it looks right, but maybe I am missing
something.

On Sun, May 3, 2015 at 7:04 AM, Utkarsh Ayachit
utkarsh.ayac...@kitware.com
mailto:utkarsh.ayac...@kitware.com wrote:

You can also use the Information panel to see what arrays are
being
read in and what their ranges are.

On Sat, May 2, 2015 at 7:06 PM, Dean, Kevin
kevin.d...@decisionsciencescorp.com

[Paraview] Fwd: Image Doesn't load correctly

2015-05-05 Thread Dean, Kevin
-- Forwarded message --
From: Dean, Kevin kevin.d...@decisionsciencescorp.com
Date: Mon, May 4, 2015 at 5:10 PM
Subject: Re: [Paraview] Image Doesn't load correctly
To: Burlen Loring burlen.lor...@gmail.com


awesome, thanks, that did it.

One more question. Is there a way to debug the FileName aspect of the
reader. I can't figure out how it's supposed to get set. The only way I can
get the image to show is by hard
coding it within the RequestData() function.

Thanks Again

Kevin E. Dean

On Mon, May 4, 2015 at 11:33 AM, Burlen Loring burlen.lor...@gmail.com
wrote:

  Hi Kevin.

 Your RequestInformation looks a little bare. Unless things have changed
 recently, you might need to set WHOLE_EXTENT, ORIGIN, SPACING,
 CAN_PRODUCE_SUB_EXTENT keys there. and if you support parallel IO honor the
 requested extent in RequestData.

 Burlen


 On 05/04/2015 09:52 AM, Dean, Kevin wrote:

  So I am still having a few issues with the reader. I have checked the
 output from the information Panel. And it seems as if all the information
 is the same. So maybe the data is getting deleted somehow (I'm not
 sure, but here is a snippet of my code);

 int vtkPVPROTOImageReader::RequestInformation (
vtkInformation*,
vtkInformationVector**,
vtkInformationVector* outputVector)
 {
vtkInformation* outInfo = outputVector-GetInformationObject(0);
vtkDataObject::SetPointDataActiveScalarInfo(outInfo, VTK_UNSIGNED_CHAR,
 1);

return 1;
 }

 int vtkPVPROTOImageReader::RequestData(vtkInformation *vtkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector)
 {
 ... conversion code from protobuf

   /* Convert from protobuf to vtkImageData */
   vtkSmartPointervtkImageData image = function converting to protobuf;

   vtkDataArray* scalars = image-GetPointData()-GetScalars();
   scalars-SetName(ReconstructionData);

   /* Get the info object */
   vtkInformation *outInfo = outputVector-GetInformationObject(0);
   outInfo-Set(vtkDataObject::DATA_TYPE_NAME(), vtkImageData);

   /* Get the output */
   vtkImageData* output = vtkImageData::GetData(outputVector);

 //  output-SetSpacing(image-GetSpacing());
 //  output-SetOrigin(image-GetOrigin());
 //  output-AllocateScalars(outInfo);
 //
 output-GetPointData()-SetScalars(image-GetPointData()-GetScalars());
 //  output-SetDimensions(image-GetDimensions());

   output-ShallowCopy(image);

   int* dimensions = output-GetDimensions();

   std::cout  \nNumber of points:   output-GetNumberOfPoints() 
 std::endl;
   std::cout  Number of cells:   output-GetNumberOfCells()  \n
  std::endl;

  // print out the pixel values to see if they are actually present
   for (int z = 0; z  dimensions[2]; z++)
   {
 for (int y = 0; y  dimensions[1]; y++)
 {
   for (int x = 0; x  dimensions[0]; x++)
   {
 double* pixel =
 static_castdouble*(output-GetScalarPointer(x,y,z));
 // do something with v
 std::cout  pixel value:   pixel[0]  \n;
   }
   std::cout  std::endl;
 }
 std::cout  std::endl;
   }

   // write output to file and compare in visualization window...
   vtkSmartPointervtkXMLImageDataWriter vtk_writer =
 vtkSmartPointervtkXMLImageDataWriter::New();
   vtk_writer-SetInputData(output);
   vtk_writer-SetFileName( /home/kdean/tmp/foo.vti );
   vtk_writer-Update();
   vtk_writer-Write();

   return 1;
 }


  Another Problem I ran into:
  So I had to hardcode a file for the char *FileName into the RequestData
 Function in order to read any protobuf file. I ran a debugger on the code,
 and it seems like these functions from the header file (of the reader):

 vtkGetStringMacro(FileName);
 vtkSetStringMacro(FileName);

  they are never getting called.

  Thanks,

  Kevin

  here are my xml too... it looks right, but maybe I am missing something.

 On Sun, May 3, 2015 at 7:04 AM, Utkarsh Ayachit 
 utkarsh.ayac...@kitware.com wrote:

 You can also use the Information panel to see what arrays are being
 read in and what their ranges are.

 On Sat, May 2, 2015 at 7:06 PM, Dean, Kevin
 kevin.d...@decisionsciencescorp.com wrote:
  looked at the spreadsheet view in the GUI, and it looks like none of the
  Point Data is actually being copied...
 
  On Sat, May 2, 2015 at 3:44 PM, Dean, Kevin
  kevin.d...@decisionsciencescorp.com wrote:
 
  What's up Utkarsh?
 
  So I was able to write that plugin and convert my image to the
  vtkImageData. However, I am having trouble visualizing the image.
 However,
  when I write out the output from my reader, the image gets written
  correctly... Here are some pictures to show the differences. (All the
  information for the images is exactly the same) Do you have an idea of
 how I
  can try to fix it? Thanks.
 
  Kevin E. Dean
 
 
 
  This email and its contents are confidential. If you are not the
 intended
  recipient, please do not disclose or use the information within 

Re: [Paraview] File in pipeline browser has changed; best way to reload

2015-05-05 Thread Christian Richter

Hi Alex,

I'm using a little python macro to refresh the fileNames Property of all 
readers in the Pipeline. It is located here:

https://github.com/richti83/ParaView_Reader_for_LIGGGHTS/blob/master/python_macros/update.py

Feel free to use this as a starting point.

Best,
Christian.

Am 5/5/2015 um 12:08 AM schrieb Alex Lindsay:

Hi all,

I am doing something that most other modellers do: I am visualizing a 
file in my pipeline browser, but I ran a new simulation and now the 
file I am viewing should have changed. What is the best way to reload 
the file/get the new data from the file? So far my google searches 
have yielded this 
http://www.cfd-online.com/Forums/openfoam-paraview/78129-update-data-paraview.html#post446239 
as the best result, but it seems quite clumsy.


I've seen in other places people recommend clicking on update gui, 
but I don't see that button available anywhere in my version of paraview.


Refresh times also doesn't seem to work.

As you can tell, I'm a new paraview user!

Thanks,
Alex


___
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


--



Dipl.-Ing. Christian Richter
Lehrstuhl für Materialflusstechnik
Institut für Logistik und Materialflusstechnik (ILM)
Fakultät für Maschinenbau (FMB)

Otto-von-Guericke-Universität Magdeburg
Universitätsplatz 2
D-39106 Magdeburg
Gebäude 10, Raum 213

University Magdeburg “Otto-von-Guericke”
Department of Material Handling
Institute of Logistics and Material Handling Systems (ILM)
Faculty for Mechanical Engineering (FMB)

E-Mail: christian.rich...@ovgu.de
Tel.: +49 (0)391/5976687-4
Fax: +49 (0)391/5976687-5
URL: http://www.ilm.ovgu.de
Der Inhalt dieser E-Mail ist vertraulich und ausschließlich für den 
bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene 
Adressat dieser E-Mail oder dessen Vertreter sein sollten, so beachten 
Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung, 
Vervielfältigung oder Weitergabe des Inhalts dieser E-Mail unzulässig 
ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der E-Mail in 
Verbindung zu setzen.
___
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


Re: [Paraview] File in pipeline browser has changed; best way to reload

2015-05-05 Thread Schlottke, Michael
Hi Alex,

there is a thread from around 2 years ago that proposed a couple of solutions. 
Especially if you are using a custom reader plugin this provides for a clean 
and user-friendly approach:

http://public.kitware.com/pipermail/paraview/2013-June/028588.html
http://public.kitware.com/pipermail/paraview/2013-June/028596.html (this is the 
solution we use)

Regards,

Michael

On 05 May 2015, at 09:12 , Christian Richter 
christian.rich...@ovgu.demailto:christian.rich...@ovgu.de wrote:

Hi Alex,

I'm using a little python macro to refresh the fileNames Property of all 
readers in the Pipeline. It is located here:
https://github.com/richti83/ParaView_Reader_for_LIGGGHTS/blob/master/python_macros/update.py

Feel free to use this as a starting point.

Best,
Christian.

Am 5/5/2015 um 12:08 AM schrieb Alex Lindsay:
Hi all,

I am doing something that most other modellers do: I am visualizing a file in 
my pipeline browser, but I ran a new simulation and now the file I am viewing 
should have changed. What is the best way to reload the file/get the new data 
from the file? So far my google searches have yielded 
thishttp://www.cfd-online.com/Forums/openfoam-paraview/78129-update-data-paraview.html#post446239
 as the best result, but it seems quite clumsy.

I've seen in other places people recommend clicking on update gui, but I 
don't see that button available anywhere in my version of paraview.

Refresh times also doesn't seem to work.

As you can tell, I'm a new paraview user!

Thanks,
Alex



___
Powered by www.kitware.comhttp://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


--

signatur.png

Dipl.-Ing. Christian Richter
Lehrstuhl für Materialflusstechnik
Institut für Logistik und Materialflusstechnik (ILM)
Fakultät für Maschinenbau (FMB)

Otto-von-Guericke-Universität Magdeburg
Universitätsplatz 2
D-39106 Magdeburg
Gebäude 10, Raum 213

University Magdeburg “Otto-von-Guericke”
Department of Material Handling
Institute of Logistics and Material Handling Systems (ILM)
Faculty for Mechanical Engineering (FMB)

E-Mail: christian.rich...@ovgu.demailto:christian.rich...@ovgu.de
Tel.: +49 (0)391/5976687-4
Fax: +49 (0)391/5976687-5
URL: http://www.ilm.ovgu.dehttp://www.ilm.ovgu.de/
Der Inhalt dieser E-Mail ist vertraulich und ausschließlich für den 
bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat 
dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, dass 
jede Form der Kenntnisnahme, Veröffentlichung, Vervielfältigung oder Weitergabe 
des Inhalts dieser E-Mail unzulässig ist. Wir bitten Sie, sich in diesem Fall 
mit dem Absender der E-Mail in Verbindung zu setzen.
___
Powered by www.kitware.comhttp://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

___
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